This preview shows pages 1–4. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 6.042/18.062J Mathematics for Computer Science April 5, 2005 Srini Devadas and Eric Lehman Lecture Notes Counting III Today we’ll brieﬂy review some facts you dervied in recitation on Friday and then turn to some applications of counting. 1 The Bookkeeper Rule In recitation you learned that the number of ways to rearrange the letters in the word BOOKKEEPER is: total letters 10! 1! 2! 2! 3! 1! 1! B’s O’s K’s E’s P’s R’s This is a special case of an exceptionally useful counting principle. Rule 1 (Bookkeeper Rule). The number of sequences with n 1 copies of l 1 , n 2 copies of l 2 , . . . , and n k copies of l k is ( n 1 + n 2 + . . . + n k )! n 1 ! n 2 ! . . . n k ! provided l 1 , . . . , l k are distinct. Let’s review some applications and implications of the Bookkeeper Rule. 1.1 20Mile Walks I’m planning a 20 miles walk, which should include 5 northward miles, 5 eastward miles, 5 southward miles, and 5 westward miles. How many different walks are possible? There is a bijection between such walks and sequences with 5 N’s, 5 E’s, 5 S’s, and 5 W’s. By the Bookkeeper Rule, the number of such sequences is: 20! 5! 4 2 Counting III 1.2 Bit Sequences How many nbit sequences contain exactly k ones? Each such sequence also contains n − k zeroes, so there are n ! k ! ( n − k )! by the Bookkeeper Rule. 1.3 kelement Subsets of an nelement Set How many kelements subsets of an nelement set are there? This question arises all the time in various guises: • In how many ways can I select 5 books from my collection of 100 to bring on vaca tion? • How many different 13card Bridge hands can be dealt from a 52card deck? • In how many ways can I select 5 toppings for my pizza if there are 14 available? There is a natural bijection between kelement subsets of an nelement set and nbit sequences with exactly k ones. For example, here is a 3element subset of { x 1 , x 2 , . . . , x 8 } and the associated 8bit sequence with exactly 3 ones: x 1 , x 4 , x 5 } { ( 1 , , , 1 , 1 , , , 0 ) Therefore, the answer to this problem is the same as the answer to the earlier question about bit sequences. Rule 2 (Subset Rule). The number of kelement subsets of an nelement set is: n ! n = k ! ( n − k )! k The factorial expression in the Subset Rule comes up so often that there is a shorthand, . This is read “ n choose k ” since it denotes the number of ways to choose k items from among n . We can immediately knock off all three questions above using the Sum Rule: • I can select 5 books from 100 in 100 ways. 5 • There are 52 different Bridge hands. 13 n k Counting III 3 • There are 14 different 5topping pizzas, if 14 toppings are available....
View
Full
Document
This note was uploaded on 02/08/2011 for the course EECS 6.042 taught by Professor Dr.ericlehman during the Spring '11 term at MIT.
 Spring '11
 Dr.EricLehman
 Computer Science

Click to edit the document details