210 likes | 379 Views
9.5 Counting Subsets of a Set: Combinations. r-Combination. An r-combination from a set of n-elements is an r-subset of an n-set. Any of the symbols C ( n , r ), n C r , C n , r , is used to count the number of r-subsets from an n-set . r-Combinations.
E N D
r-Combination An r-combination from a set of n-elements is an r-subset of an n-set. Any of the symbols C(n, r ), n Cr, C n, r, is used to count the number of r-subsets from an n-set
r-Combinations Consider the set A={a, b, c, d}. Calculate the number of r-combinations below by showing the subsets counted in each case
Counting r-Combinations Take A={a, b, c, d} Consider the 3-combination {a, b, c}. Notice that {a, b, c}={a ,c, b}={b, c, a} etc. How many 3-permutation are there with the elements from the r-combination {a, b, c}?
Formula for C(n , r) The number of r-combinations of an n-set is given by
Examples 1. How many distinct five-person teams can be chosen to work on a special project from a group of 12 people? Solution:The number of distinct five-person teams is the same as the number of subsets of size 5 (or 5-combinations) that can be chosen from the set of twelve. This number is . Thus there are 792 distinct five-person teams.
Examples 2. Suppose the group of twelve consists of five men and seven women. How many five-person teams can be chosen that consist of three men and two women? b. How many five-person teams contain at least one man? (two ways) c. How many five-person teams contain at most one man?
Solution a. To answer this question, think of forming a team as a two-step process: Step 1: Choose the men. Step 2: Choose the women. There are ways to choose the three men out of the five and ways to choose the two women out of the seven. Hence, by the product rule,
b. How many five-person teams contain at least one man? (two ways) This question can be answered either by the addition rule or by the difference rule. (Difference Rule) Observe that the set of five-person teams containing at least one man equals the set difference between the set of all five-person teams and the set of five-person teams that do not contain any men.
(addition rule) observe that the set of teams containing at least one man can be partitioned as shown Teams with At Least One Man
The number of teams in each subset of the partition is calculated using the method illustrated in part (a). There are
c. The set of teams containing at most one man can be partitioned into the set that does not contain any men and the set that contains exactly one man. Hence, by the addition rule,
Number of Bit String with Fixed Number of 1’s How many 10-bit strings are there with exactly 3 ones? Label the entries of the bit string from 1-10. ___ ____ ____ _____ ………….._____ _____ 1 2 3 4 9 10 To place 3 ones simply choose three of the entries to place them. For instance {1,7,10} indicates that 1’s will be placed on those entries; {5, 2, 9} indicates that 1’s will be placed on entries 5, 2, 9. The other entries are zeroes. There are a total of 10-bit strings with 3 ones
Permutations of a Set With Repeated Elements Consider different ordering of the letters in the word MISSISSIPPI How many distinguishable orderings are there? IIMSSPISSIP, ISSSPMIIPIS, PIMISSSSIIP, and so on Approach 1: Strings with all entries different. Account for repetitions (labels) Approach 2: Strings and select entries to put each of the different letters in the word
APPROACH 1 Consider all the entries different and then take care of repetitions There are a total of 11 characters, so 11! different words that can be made For each word any reordering of the I’s, S’s, P’s will produce the same word (disregarding the sub-index). There are 4!4! 2! repeated words. Total of different words with the letters in MISSISSIPPI is
APPROACH 2 Consider a 11-word where the entries are the letters in MISSISSIPPI ___ ____ ____ _____ ………….._____ _____ _____ 1 2 3 4 9 10 11 Choose the number of ways to place 1 M Then choose the number of ways to place 4 I’s Then choose the number of ways to place 4 S’s Then choose the number of ways to place 2 P’s
By the multiplication principle the total number of different words with the letters in MISSISSIPPIis These is the number of permutations of 11 objects with repetitions
Formula Permutation with repetitions of n characters of k different types
Exercise • How many passwords of length 8 can be made with the letters A, B, C, D, E, F? • How many of those passwords have three B’s, two E’s, and three F’s? • How many of those passwords are permutations of the letters A, B, C, D, E, F?