You are on page 1of 14

Discrete Mathematics

LECTURE 32, 33
k-SELECTION,
k-COMBINATION
Course Instructor:
1 Rida Memon
Counting Formulas

For a given set of n distinct elements, one can choose k elements in different ways:

The number of selections of elements varies according to:


 Elements may or may not be repeated.
 The order of elements is considered or not.

We have total four combinations:

1. Repetitions allowed, order matters


2. Repetitions not allowed, order matters
3. Repetitions allowed, order doesn’t matter
4. Repetitions not allowed, order doesn’t matter

These combinations lead us to four different counting methods.

2
Counting Formulas

Criteria Order Matters Order Doesn’t Matter

Repetitions Allowed k-sample k-selection

Repetitions Not Allowed k-permutation k-combination

3
k-COMBINATION

 A k-COMBINATION of a set of n-elements is a choice of


k-elements taken from the set of n-elements such that
the order of elements DOES NOT matter and elements
can NOT be repeated.

 NOTE: As repetition of elements is not allowed,


therefore, k <= n.

 FORMULA:
C(n,k) = nCk = =

4
Example 1

 Let X = {a,b,c}. Then 2-permutations of the 3 elements


of the set X are:
ab,ac,ba,bc,ca,cb

 But, in k-combinations, the order does not matter.


Therefore, ab=ba, ac=ca & bc=cb.

 Hence, 2-combinations of the 3-elements are:


ab,ac,bc

5
Remarks

1. P(n,k)=C(n,k).k!
2. C(n,0)=1
3. C(n,n)=1
4. C(n,1)=n
5. C(n,2)=n(n-1)/2
6. C(n,k)=C(n,n-k)
7. C(n,k)+C(n,k+1)=C(n+1,k+1)

6
Example 2

 A student is to answer eight out of ten questions in an


exam.
 Find:
a) The number m of ways that the student can choose the
eight questions.
b) The number m of ways that the student can choose the
eight questions, if the first three questions are compulsory.

SOLUTION:
c) m=C(10,8)=10!/(2!.8!)=5.9=45 ways
d) m=C(7,5)=7!/(2!.5!)=7.3=21 ways

7
Task 1

 How many 16-bit strings contain exactly 9 1’s?

8
Task 2

 How many 16-bit strings contain at least one 1?

9
k-SELECTION

 A k-SELECTION of a set of n-elements is a choice of k-


elements taken from the set of n-elements such that
the order of elements DOES NOT matter and elements
can be repeated.

 NOTE: As repetition of elements is allowed, therefore, k


is independent of n.

 FORMULA:
k-selection = k+n-1
Ck = =

10
Example
 A camera shop stocks ten different types of batteries. How many ways can
a total inventory of 30 batteries be distributed among the ten different
types?

SOLUTION:
Here n=10 & k=30. Order of the elements does not matter and the elements
can be repeated. So k-selection will be used.

C(k+n-1,k)====211915132

11
Summary

 Which formula to use?

12
Practice Questions

13
Thanks

 End of Lecture
 Q/As

14

You might also like