This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Illinois Institute of Technology Department of Computer Science Lecture 6: February 11, 2008 CS 330 Discrete Structures Spring Semester, 2008 1 Combinations We have examined the question of how many ways there are to arrange (permute) n different items. Suppose instead we want to arrange only k of the n items, k < n . For example, if we have ten empty, single-bed hotel rooms numbered 1 , 2 , . . ., 10 and four guests arrive on a stormy night, in how many ways can we assign each guest to a room? The first guest can be given any of the ten rooms; the second guest can be given any of the remaining nine rooms; the third guest can be given any of the remaining eight rooms; finally, the fourth guest can be given any of the remaining seven rooms. The rule of product tells us that there are 10 9 8 7 = 5040 different ways to make the room assignments. In general, if there are n rooms and k < n guests, the room assignments can be made in n ( n- 1) ( n- 2) ( n- k + 1) ways. This number can be rewritten conveniently using the factorial notation: n ( n- 1) ( n- 2) ( n- k + 1) = n ! ( n- k )! ; (1) this is called the number of permutations of n things taken k at a time , and is sometimes denoted P ( n, k ). The rewritten form n ! / ( n- k )! is also valid for k = n since it yields n ! ( n- n )! = n ! 0! = n ! (by our definition that 0! = 1). This agrees with our discovery that there are n ! permutations of n different items. Furthermore, when k = 0, n ! / ( n- k )! = 1, in agreement with our convention that there is a unique (empty) permutation of zero items. Rewriting the product in the form n ! / ( n- k )! also suggests an alternative proof of the result based on the variation on the rule of product: Let E be the event of forming a permutation of all n items, viewed as a compound event E = E 1 E 2 in which E 2 is the event of forming a permutation of first k of the n elements and E 1 is the event of forming a permutation of the last n- k elements. The variation on the rule of product then tells us that E 2 , that is forming a permutation of k of n items, can happen in e 2 = e/e 1 . But, we know that e = n ! and e 1 = ( n- k )! since these are simply the numbers of permutations of n and n- k items, respectively. It follows that e 2 = n ! / ( n- k )!. Returning to the problem of how to assign guests to empty hotel rooms, let is consider the point of view of the hotel cleaning staff. As far as the cleaning staff is concerned, guests are indistinguishable from one anotherthe staff only cares about which rooms have been occupied and need cleaning. Thus, if there are n hotel rooms and k guests, we might want to ask: how many different arrangements of the k rooms might the cleaning staff be asked to clean? Again we use the variation on the rule of product. Let E be the event CS 330Spring, 2008 2 Lecture 6: February 11, 2008 of assigning k guests to k of n hotel rooms; we have seen from (1) that this can be done in...
View Full Document
- Spring '08
- Computer Science