170 likes | 499 Views
5.5 Generalized Permutations and Combinations. Permutations with Repetition Theorem 1: The number of r-permutations of a set of n objects with repetition allowed is n r . Example 1: How many strings of length r can be formed from the English alphabet?. Combinations with Repetition.
E N D
5.5 Generalized Permutations and Combinations Permutations with Repetition • Theorem 1: The number of r-permutations of a set of n objects with repetition allowed is nr. • Example 1: How many strings of length r can be formed from the English alphabet?
Combinations with Repetition • Theorem 2: There are C(n+r-1, r) = C(n+r-1, n-1) r-combinations from a set with n elements when repetition of elements is allowed. • Example 4: Suppose that a cookie shop has four different kinds of cookies. How many different ways can six cookies be chosen? Assume that only the type of cookie, and not the individual cookies or the order in which they are chosen, matters. • Example 5: How many solutions does the equation x1 + x2 + x3 = 11 have, where x1, x2, and x3 are nonnegative integers? • HW: Example 3,(p.372)
Combinations with Repetition • Example 6: What is the value of k after the following pseudocode has been executed? k :=0 for i1 := 1 to n for i2 := 1 to i1 : for im := 1 to im-1 k :=k+1
Permutations with Indistinguishable Objects • Some elements may be indistinguishable in counting problems. When this is the case , care must be taken to avoid counting things more than once. Consider example 7. • Example 7: How many different strings can be made by reordering the letters of the word SUCCESS?
Permutations with Indistinguishable Objects • Theorem 3: The number of different permutations of n objects, where there are n1indistinguishable objects of type 1, n2 indistinguishable objects of type 2,. . . , and nk indistinguishable objects of type k, is n! /(n1! n2! ‥nk!)
Distributing Objects into Boxes • Distinguishable Objects and Distinguishable Boxes • We first consider the case when distinguishable objects are placed into distinguishable boxes. Consider example 8 in which the objects are cards and the boxes are hands of players. • Theorem 4: The number of ways to distribute n distinguishable objects into k distinguishable boxes so that ni objects are placed into box i, i=1, 2, . . .,k, equals n! /(n1! n2!‥nk!) • Example 8: How many ways are there to distribute hands of 5 cards to each of four players from the standard deck of 52 cards?
Distributing Objects into Boxes • Indistinguishable Objects and Distinguishable Boxes • example 9: How many ways are there to place 10 indistinguishable balls into eight distinguishable bins?
Distributing Objects into Boxes • Distinguishable Objects and Indistinguishable Boxes • Example 10: How many ways are there to put four different employees into three indistinguishable offices, when each office can contain any number of employees?
Distributing Objects into Boxes • Indistinguishable Objects and Indistinguishable Boxes • Example 11: How many ways are there to pack six copies of the same book into four identical boxes, where a box can contain as many as six books?