Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 DISCRETE STRUCTURES DISCRETE STRUCTURES SSK3003 DR. ALI MAMAT 1.

Similar presentations


Presentation on theme: "1 DISCRETE STRUCTURES DISCRETE STRUCTURES SSK3003 DR. ALI MAMAT 1."— Presentation transcript:

1 1 DISCRETE STRUCTURES DISCRETE STRUCTURES SSK3003 DR. ALI MAMAT 1

2 2 Combination OBJECTIVES: At the end of this chapter, students should be able to: 1. describe the concepts of permutation (arrangement) and combination (selection) 2. apply permutation and combination in problem solving

3 3 Informal Suppose 5 members of a group of 12 are to be selected to work as a team on a special project. How many distinct 5-person teams can be selected? General question: Given a set S with n elements, how many subsets of size r can be chosen from S ? The number of subsets of size r that can be chosen form S = the number of subsets of size r that S has. Each individual subset of size r is called r- combination

4 4 Counting Subsets of a set C(n,r) denotes the number of subsets of size r that can be chosen from a set of n elements. Example: Find all subsets of size 2 (2-combinations) from the set {0,1,2,3} {0,1},{0,2},{0,3} subsets containing 0 {1,2}, {1,3} subset containing 1 but not yet listed {2,3} subset containing 1 but not yet listed C(4,2) = 6.

5 5 Relation between Permutation & Combination Write all 2-permutation of the set {0,1,2,3} P(4,2) = 4!/(4-2)! = 4.3 = 12. Constructing a 2-permutation of {0,1,2,3} can be thought of as a two-step process: Step 1: Choose a subset of two elements (2- combinations Step 2: Choose an ordering for the two-element subset

6 6 Relation between Permutation & Combination Step1. Choose 2- combinations Step 2. Order 2-combinations {0,1}{0,1}, {1,0} {0,2}{0,2}, {2,0} {0,3}{0,3}, {3,0} {1,2}{1,2}, {2,1} {1,3}{1,3}, {3,1} {2,3}{2,3}, {3,2}

7 7 Relation between Permutation & Combination Step 1: Choose a subset of two elements (2-combinations Step 2: Choose an ordering for the two-element subset The number of ways to perform step 1 is C(4,2) The number of ways to perform step 2 is 2! 2! C(4,2) = P(4,2) C(4,2) = P(4,2)/2! C(n,r) = P(n,r)/r! = n! r!(n-r)!

8 8 Combination: The Binomial Theorem I f we start with n distinct objects, each selection, or combination, of r of these objects, with no reference to order, corresponds to r! permutation of size r from the n objects. Thus the number of combinations of size r from a collection of size n, denoted C(n,r), where 0≤r≤n, satisfies (r!) × C(n, r) = P(n, r) and C ( n, r ) = P ( n, r ) = n !, 0 ≤ r ≤ n. r ! r !( n – r )! 8 Discrete Structures / SAK3103 / Unit 2 Dr. Ali Mamat

9 9 In addition to C(n, r), the symbol is also frequently used. Both C(n, r) and are sometimes read as “n choose r”. Note that C(n, 0) = 1, for all n ≥ 0. Important Note When dealing with any counting problem, we should ask ourselves about the importance of order in the problem. When order is relevant, we think in terms of permutations and arrangements and the rule of product. When order is not relevant, combinations could play a key role in solving the problem. 9 Discrete Structures / SAK3103 / Unit 2 Dr. Ali Mamat

10 10 Example 1.18 A hostess is having a dinner party for some members of her charity committee. Because of the size of her home, she can invite only 11 of the 20 committee members. Order is not important, so she can invite “the lucky 11” in 10 Discrete Structures / SAK3103 / Unit 2 Dr. Ali Mamat

11 11 Example 1.20 a) A student taking a history examination is directed to answer any 7 of 10 essay questions. There is no concern about order here, so the student can answer the examination in 11 Discrete Structures / SAK3103 / Unit 2 Dr. Ali Mamat

12 12 b) If the student must answer 3 questions from the first 5 and 4 questions from the last 5, 3 questions can be selected from the first 5 in C(5,3) = 10 ways and the other 4 in Hence, by the rule of product, the student can complete the examination in 12 Discrete Structures / SAK3103 / Unit 2 Dr. Ali Mamat

13 13 c) Finally, should the directions on this examination indicate that the student must answer 7 of the 10 questions where at least 3 are selected from the first five, then there are three cases to consider: i) The student answers three of the first five questions and four of the last five: By the rule of product this can happen in 13 Discrete Structures / SAK3103 / Unit 2 Dr. Ali Mamat

14 14 ii) Four of the first five questions and three of the last five questions are selected by the student: This can come about in iii) The student decides to answer all five of the first five questions and two of the last five: The rule of product tells us that this last case can occur in 14 Discrete Structures / SAK3103 / Unit 2 Dr. Ali Mamat

15 15 Combining the results for cases (i), (ii), and (iii), by the rule of sum we find that the student can make selections of seven (out of 10) questions where each selection includes at least three of the first five questions. 15 Discrete Structures / SAK3103 / Unit 2 Dr. Ali Mamat

16 16 Example 1.23 The number of arrangements of the letters in TALLAHASSEE is How many of these arrangements have no adjacent A’s? When we disregard (remove) the A’s, there are 16 Discrete Structures / SAK3103 / Unit 2 Dr. Ali Mamat

17 17 ways to arrange the remaining letters. One of these 5040 ways is shown in the following figure, where the arrows indicate nine possible locations for the three A’s. Three of these locations can be selected in 17 Discrete Structures / SAK3103 / Unit 2 Dr. Ali Mamat

18 18 and because this is also possible for all the other 5039 arrangements of E, E, S, T, L, L, S, H, by the rule of product there are 5040 × 84 = 423,360 arrangements of the letters in TALLAHASSEE with no consecutive A’s. 18 Discrete Structures / SAK3103 / Unit 2 Dr. Ali Mamat

19 19 The Binomial Theorem (Theorem 1.1) If x and y are variables and n is a positive integer, then 19 Discrete Structures / SAK3103 / Unit 2 Dr. Ali Mamat

20 20 In view of this theorem, is often referred to as a binomial coefficient. Notice that it is also possible to express the result of Theorem 1.1 as 20 Discrete Structures / SAK3103 / Unit 2 Dr. Ali Mamat

21 21 Example 1.26 a) From the binomial theorem it follows that the coefficient of x 5 y 2 in the expansion of b) To obtain the coefficient of a 5 b 2 in the expansion of (2 a – 3 b ) 7, replace 2 a by x and –3 b by y. From the binomial theorem the coefficient of x 5 y 2 in ( x + y ) 7 is, and 21 Discrete Structures / SAK3103 / Unit 2 Dr. Ali Mamat

22 22 Corollary 1.1 For each integer n > 0, Proof: Part (a) follows from the binomial theorem when we set x=y=1. When x = -1 and y = 1, part (b) results. 22 Discrete Structures / SAK3103 / Unit 2 Dr. Ali Mamat

23 23 Combinations with Repetition Example How many ways are there to select 4 pieces of fruits from a bowl containing apples, oranges, and pears if the order does not matter, only the type of fruit matters, an there are at least 4 pieces of each type of fruit in the bowl

24 24 Example (cont.) Possible SelectionRepresentation A A A OX X X | X | A A X X X X | | A A O PX X | X | X P P | | X X X X

25 25 Example (cont.) The number of ways to select 4 pieces of fruit = the number of ways to arrange 4 X’s and 2 |’s, which is given by 6! / 4!2! = C(6,4) = 15 ways.

26 26 Combinations with Repetition In general, when we wish to select, with repetition, r of n distinct objects, we are considering all arrangements of r X’s and n-1 |’s and that their number is Consequently, the number of combinations of n objects taken r at a time, with repetitions, is 26 Discrete Structures / SAK3103 / Unit 2 Dr. Ali Mamat

27 27 Example 1.29 A donut shop offers 20 kinds of donuts. Assuming that there are at least a dozen of each kind when we enter the shop, we can select a dozen donuts in (20 + 12 - 1, 12) = C(31, 12) = 141,120,525 ways. (Here n = 20, r = 12). One possible selection: D i where i=1,2, …,12. 27 Discrete Structures / SAK3103 / Unit 2 Dr. Ali Mamat

28 28 Example A restaurant offers 4 kinds of food. In how many ways can we choose six of the food? C(4 + 6 - 1, 6) = C(9, 6) = C(9, 3) = 9! = 84 ways. 3! 6! 28 Discrete Structures / SAK3103 / Unit 2 Dr. Ali Mamat

29 29 Activity Suppose two members of the group of 12 insist on working as a pair – any team must contain either both or neither. How many 5-person teams can be formed? Suppose two members of the group of 12 don’t get along and refuse to work together on a team. How many 5-person teams can be formed?

30 30 SUMMARY 30 Discrete Structures / SAK3103 / Unit 2 Dr. Ali Mamat

31 31 End of the Chapter Thank You.


Download ppt "1 DISCRETE STRUCTURES DISCRETE STRUCTURES SSK3003 DR. ALI MAMAT 1."

Similar presentations


Ads by Google