Problem Set 2. Counting 1. (Blitzstein: 1, Q3 Fred is planning to go out to dinner each night of a certain week, Monday through Friday, with each dinner being at one of his favorite ten restaurants. i How many possibilities are there for Fred s schedule of dinners for that week, if Fred is not willing to eat at the same restaurant more than once? ii How many possibilities are there for Fred s schedule of dinners for that week, if Fred is willing to eat at the same restaurant more than once, but not twice in a row (or more? i Since each night Fred is unwilling to dine in the restaurant he has dined before each consecutive day his option becomes one less. Thus he will have total of 10 9 8 7 6 = 30240 possibilities. ii The only restriction in this case that after Monday Fred will only choose from restaurants that he did not dine in the previous day. Thus there is a total of 10 9 9 9 9 = 65610 possibilities. 2. (Blitzstein: 1, Q4 A round-robin tournament is being held with n tennis players; this means that every player will play against every other player exactly once. i How many games are played in total? ii How many possible outcomes are there for the tournament (the outcomes list who won and who lost for each game. i (n 1 + (n 2 + + 1 = n (n 1/2 ii There are 2 results per game, so the total number of outcomes is 2 n (n 1/2. 3. (Blitzstein: 1, Q5 A knock-out tournament is being held with 2 n players. This means that for each round, the winners move on to the next round and the losers are eliminated, until only one person remains. For example, if initially there are 2 4 = 16 players, then there are 8 games in first round, then the 8 winners move on to round 2, then the 4 winners move on to round 1
3, then the 2 winners move in to round 4, the winner of which is declared the winner of the tournament. E.g. see below: i How many rounds are there for general 2 n players? ii Count how many games are played in total, by adding up the number of games in each round (Hint: it is a geometric series. iii Count how many games are played in total, by considering the number of players that need to be eliminated. iv Consider a knock-out tournament with n 2 where the two best players in the world participate. Assume these two players always win other players. If they are randomly assigned in the tournament table, what are the chances they will meet in the final (but not before? i n rounds. ii The i th round requires 2 i 1 games. = 2n 1 games are played. 2 n 1 2 1 Therefore a total of n i=1 2(i 1 = (n 1 i=0 2 i = iii The i th round eliminates 2 i 1 players. (n 1 i=0 2 i = 2 n 1 games are played. Alternatively, there is only one winner so 2 n 1 players have to be eliminated, so there are 2 n 1 games played. iv Each player can start off at any of the 2 n spots at the left side of the binary tree representing the tournament, like the one above. If the two best players always win other players, then they will meet in the final only if they start from different halfs of the tree, i.e. one in the top half and one in the bottom half. The probability of starting off in different halfs is calculated as follows: Without loss of generality fix the first best player in one half (i.e. one of 2 n 1 spots. The probability of the second best player being in the other half is 2n 1 2 n 1, because the other half has 2n 1 spots, out of 2 n 1 still available spots in general (i.e. excluding the spot of the first best player. 4. How many ways are there to split 12 people into 3 teams, where: i One team has 2 people and the other two have 5 people each. ii Every team has 4 people. Page 2
i This can be solved using the generalized version of the binomial coefficients, i.e. the multinomial coefficients. We want to split 12 objects into 3 groups of 2, 5, and 5 elements. This can be done in ( 12 2, 5, 5 = 2! 5! 5! ways, as long as the 3 teams are labeled (e.g. think of each team wearing a different jersey. If the teams are unlabeled however (e.g. all players wear the same jersey, then the two teams of 5 players are interchangeable. In that case we are double-counting the number of ways, so we have to divide the result by two, i.e. the answer is 1 ( 12 2 2, 5, 5 = 2! 2! 5! 5! ii In the case of labeled teams, the answer is ( 12 4,4,4 = 4! 4! 4!. In the case of unlabeled teams the answer is 1 ( 12 3! 4,4,4 = 3! 4! 4! 4!, i.e. divide by the number of ways to permute the 3 indistinguishable teams of 4 players. 5. (Evans 1.4.2 Suppose we roll 10 fair six-sided dice. i What is the probability there are exactly two 6 s showing? ii What is the probability there are at least two 6 s showing? i The number of possible 10-tuples of results is 6 10. For the number of favorable 10- tuples, you have 2 6 s that can appear in any of the 10 positions, i.e. in ( 10 2 ways. The remaining 8 positions can be filled with the 5 remaining faces (1-5 each, in a total of 5 8 ways. By the multiplication rule, the probability is: (10 2 5 8. 6 10 ii P ({at least two 6 s} = 1 P ({at least two 6 s} c = 1 P ({at most one 6} = = 1 P ({exactly one 6} P ({no 6 s} = 1 ( 10 5 9 1 6 10 510 6 10 6. (Birthday problem There are k people in a room. Assume each person s birthday is equally likely to be any of the 365 days of the year (we exclude February 29, and that people s birthdays are unrelated (no twins. What is the probability the two or more people in the group have the same birthday? The complement of the event that two or more people have the same birthday is no one in the room has the same birthday. The total number of (ordered possible ways to pick k birthdays out of 365 with replacement is 365 365 365 = 365 k. The total number of (ordered ways to pick k different birthdays out of 365 (i.e. without replacement is 365 364 (365 k + 1 = Pk 365. The probability is: 1 P k 365 365 k Page 3
For more information on the Birthday problem check: https://en.wikipedia.org/wiki/birthday_problem 7. i How many different ways are there to permute the letters of the word ABBA? ii How many different ways are there to permute the letters of the word STATISTICS? iii How many n-letter palindromes can you write (a palindrome is a word that reads the same backwards or forwards, e.g. STATS. iv How many n-character passwords are there that include at least one number? Possible characters include the 26 English alphabet letters, upper- & lower-case, and the ten digits 0-9 (no special characters. 4! i 2!2! = ( 4 2,2 If each letter are distinct there are 4! many ways to permute a word of length 4, but both letter A and B are repeated twice we need to discount the extra counting from 4! by the number of indistinguishable permutations amount the repeated letters. ii There is 3 S and T, 2 I and 1 A and C. Thus the number of different ways to permute the letters of the word STATISTICS is ( 10! 3!3!2! = 4. 3, 3, 2, 1, 1 iii Note that letters after the middle of a palindrome are determined by the previous letters. So, if n is even ( n 2 arbitrarily chosen letters there are 26 n 2 ways, whereas if n is odd there are 26 n+1 2 ways. iv There are (26 + 26 + 10 n = 62 n possible passwords in total, using any letters/digits. The number of passwords without any digits are (26 + 26 n = 52 n. This means that the number of passwords with at least one digit is 62 n 52 n (this is essentially the complement rule applied to the size function A = S A c. 8. (Poker 101 A standard deck has 52 cards. It consisting of four suits (,,, with 13 ranks each (A, 2,..., 10, J, Q, K. Suppose you are dealt five cards from a standard deck. What is the probability that you get: i Royal Flush? ii Straight Flush? iii Four of a Kind iv Full House v Flush Page 4
For a description of poker hands see below: Ways of choosing 5 card from 52 is 5. 4 i. There is one possible hand for royal flush for each of the 4 suits. 5 4 9 ii. There are 9 possible sequences (excluding Royal Flush and 4 possible suits. 5 iii ( 13 1 ( 48 1. There are 13 ways to choose the rank of the 4 cards, and 52-4=48 ways to pick 5 the remaining card. iv (13 1 ( 4 3( 12 1 ( 4 2 5. There are 13 ways to choose the first rank, and 4-choose-3 ways to choose the 3 cards of the same rank. Similarly, there are 12 ways left to choose the other rank, and 4-choose-2 ways to choose the 2 cards of the same rank. v (4 1( 13 5 4 10. There are 4 ways to choose a suit and 13-choose-5 ways to choose the cards, 5 from which you have to remove the Royal and Straight Flushes. For the probabilities of the other hands presented, see: https://en.wikipedia.org/wiki/poker_probability 9. i How many paths are there from the point (0, 0 to the point (m, n in the plane, for m, n N, such that each step consists of going one unit up or one unit to the right? ii How many paths are there from (0, 0 to (m, n, where each step consists of going one unit up or one unit to the right, and the path has to go through (k, l, for k, l, m, n N and k < m, l < n. Page 5
i Since we must have exactly m up and n right we need a total of exactly m + n steps. Out of the total m + n steps if we know when is each of the m up step is taken we know the rest of steps will be the n right steps. Now out of the m + n possible steps we need to assign m up steps thus there are total of ( m+n m ways for this assignment. paths going from (0, 0 to (k, l, and from (k, l to (m, n is the same ( m+n k l paths from (0, 0 ii There are ( k+l k as going from (0, 0 to (m k, n l. Thus there are ( k+l k to (m, n going through (k, l. m k Page 6