Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Homework Week 2 Solutions 1. How many license plates involving one, two, or three letters and one, two, or three digits are there if the letters must appear in a consecutive grouping? Since the letters have to appear in a consecutive grouping, we can think of them as one big letter. If there are 3 digits, then there are 4 spots for where the big letter goes (no matter if there are one two or three letters). Thus, the answer is: (no. of license plates with one digit) + (no. of license plates with two digits) + (no. of license plates with three digits) = 2 · 10 · (26 + 262 + 263 ) + 3 · 102 · (26 + 262 + 263 ) + 4 · 103 · (26 + 262 + 263 ) = 4320 · 18278 = 78960960 2. How many different five-letter sequences can be made using the letters A, B, C, D with repetition such that the sequence does not include the word BAD, i.e., sequences such as ABADD are excluded? Number of total words - Number of “BAD” words: Number of total words is 45 = 1024. Number of BAD words look like BADxx, xBADx, xxBAD (where x is any letter). There are 16 choices for each time of BAD word; for a total of 48 BAD words. Thus, there are 976 good sequences. 3. Consider the identity µ ¶µ ¶ µ ¶µ ¶ n m n n−k = . m k k m−k (a) Prove this identity using an “algebraic” proof. (b) LHS = m! n! n! · = m!(n − m)! k!(m − k)! k!(n − m)!(m − k)! RHS = (n − k)! n! n! · = = LHS k!(n − k)! (m − k)!(n − m)! k!(m − k)!(n − k)! ∗ Prove this identity using a “combinatorial” proof. Suppose you have n objects and you want to select m − k “sort of special” items and k ‘very special” items. To do this, you can either (a) choose m items to be considered “special.” From those m, you choose k of them to be “very special.” The rest (m − k) are just “sort of special.” ¡ n ¢¡m¢ The number of ways to choose these items in that manner is the LHS of the equality: m k Option (b) is to choose the k “very special” items first. Then you can choose from the remaining n − k items, the ¡m¢¡ − k ”sort ¢ of special” items. The number of ways to do option (b) is the RHS n−k of the equality: nk m−k . 4. How many 10-letter “words” are there using 5 different vowels and 5 different consonants? Choose which places the vowels occupy among the 10 spots: ¡10¢ 5 . Now choose which vowels are used and where they go (well, you’ll be using all 5 of them): 5! ways to do this. Now choose which consonants are used and where they go: P (26, 5) = 26 · 25 · 24 · 23 · 22 ¡ ¢ The grand total is: 10 5 · 5! · 26 · 25 · 24 · 23 · 22. HW pp. 60 − 68 : #5b The number of zeros in 1000! is just the number of 5’s that appear in the product. Every 5th number has a 5 in its prime factorization, so that leads to 200 zeroes. Every 25th number has another 5 in its prime factorization, so that leads to 1000 / 25 = 40 more zeroes. Every 125th number (53 ) has another 5 in its prime factorization, so that leads to 1000 / 125 = 8 more zeroes. Every 625th number (54 ) has another 5 in its prime factorization, so that leads to b1000/625c = 1 more zero. The total number of zeroes is 249. #6 If the number has 4 digits and the first digit is a 5, then we have 1 · 4 · 6 · 5 choices. This is because the 2nd digit cannot be a 0, 1, 2, 3, 5, or 7. If the number has 4 digits and the first digit is not a 5, then we have 3 · 7 · 6 · 5 choices. Here, we don’t have as many restrictions on the 2nd digit. It cannot be a 2, 7, or the 1st digit. If the number has 5 digits, then we have 7 · 7 · 6 · 5 · 4 choices. If the number has 6 digits, then we have 7 · 7 · 6 · 5 · 4 · 3 choices. If the number has 7 digits, then we have 7 · 7 · 6 · 5 · 4 · 3 · 2 choices. If the number has 8 digits, then we have 7 · 7 · 6 · 5 · 4 · 3 · 2 · 1 choices. (There cannot be a 9 digit number with distinct digits if there are no 2’s or 7’s.) Add up the numbers above to get the grand total. #7 Place a man (say the 1st man alphabetically). The rest of the table must go 2W, 1M, 2W, 1M, 2W, 1M, 2W. The number of ways to do this is: 8 · 7 · 3 · 6 · 5 · 2 · 4 · 3 · 1 · 2 · 1 = 8! · 3! #10a: Number of ¡total Number of committees with one woman - Number of committees ¢ committees ¡12¢ ¡10¢ -¡10 ¢ with no women = 22 − · − = 23562. OR 5 1 4 5 Number of 5 member committees with either 2, 3, 4, or 5 women: µ ¶µ ¶ µ ¶µ ¶ µ ¶µ ¶ µ ¶µ ¶ 12 10 12 10 12 10 12 10 + + + . 2 3 3 2 4 1 5 0 #10b: Number of committees with man (not woman) + Number of committees with woman (not man) + Number of committees with neither man nor woman = ·µ ¶µ ¶ µ ¶µ ¶ µ ¶µ ¶¸ ·µ ¶µ ¶ µ ¶µ ¶ µ ¶µ ¶ µ ¶µ ¶¸ 11 9 11 9 11 9 11 9 11 9 11 9 11 9 + + + + + + + 2 2 3 1 4 0 1 3 2 2 3 1 4 0 ·µ ¶µ ¶ µ ¶µ ¶ µ ¶µ ¶ µ ¶µ ¶¸ 11 9 11 9 11 9 11 9 + + + 2 3 3 2 3 1 5 0 #14: ¡¢ Choose which seats the front row people occupy and arrange those people in those 5 seats: 85 · 5! = P (8, 5) ¡¢ Choose which seats the back row people occupy and arrange those people in those 4 seats: 84 · 4! = P (8, 4) Choose¡ which of the 7 unoccupied seats the other 5 people occupy and arrange those people in those 5 ¢ 7 seats: 5 · 5! = P (7, 5) Multiply all these numbers together to get your answer: P (8, 5) · P (8, 4) · P (7, 5) µ #21a. ¶ 9 9! = 3, 2, 2, 1, 1 3!2!2!1!1! #21b. You are either missing an S, E (same as missing a D), or an R (same as missing an A). The total is therefore: µ ¶ µ ¶ µ ¶ 8 8 8 +2· +2· 2, 2, 2, 1, 1 3, 2, 1, 1, 1 3, 2, 2, 1 #25a: Here is one way. There are many ways to solve this. I will give you my first method, which is rather slow actually. Choose a guy to sit in a car. Since all cars are the same, it does not matter which car he sits in. Now choose the 3 people (of the 19 remaining) to sit with him and arrange all 4 people in his car, choose the 4 people (of the µ 16 remaining) and arrange them, ..... ¶ in the next car 5 19 19!(4!) 1 This ends up being (4!)5 = = 19! · 4 = 20!. This final number makes sense because 4 3, 4, 4, 4, 4 3!(4!) 5 you can order all of the 20 people in a line (20! ways), put them in a car 4 at a time. Since it does not matter which car is first, we can divide by 5. ¡ ¢ #25b: Choose 3 people to go in the car with Jerk 1 and arrange the people: 19 3 4! Choose which car Jerk 2 is in and choose which 3 people to go in the car with Jerk 1 and arrange the ¡ ¢ people: 4 · 15 4! 3 ¡ 12 ¢ Arrange the other people as above: 4,4,4 (4!)3 ) ¡19¢ ¡15¢ ¡ 12 ¢ Grand total: 3 · 4 · 3 · 4,4,4 (4!)5 µ ¶ 17 #28 : He has to go 17 blocks. 9 times he chooses to go east, 8 times north. Thus there are ways to 8 do it without the flood. If there is a flood, then he cannot go up 3, over 4 and then go on the east µ ¶bound µ ¶ street to that corner, 7 9 which is 5 blocks north and 4 blocks east of the office. Thus we get rid of · ways. Thus the total 3 5 number of legal routes is: µ ¶ µ ¶ µ ¶ 17 7 9 − · 8 3 5