
Generating Functions Worksheet
HMMT Combinatorics
TAS Math Team
Please note: The problems are presented approximately in increasing difficulty. While the introductory
problems is mandatory, the other problems are optional as they are rather difficult. Please feel free to work
together and submit one solution! Your solution and dedication will be recorded.
1 Mandatory Problems
1. (AIME) Jackie and Phil have two fair coins and a third coin that comes up heads with probability 4
7.
Jackie flips the three coins, and then Phil flips the three coins. Let m
nbe the probability that Jackie
gets the same number of heads as Phil, where mand nare relatively prime positive integers. Find
m+n.
2. (BMT) What is the expected size of a random subset of {1,2,· · · , n}
3. (Titu) Julia has two regular tetrahedrons, and she decides to make them into two fair dices. On each
face of the dice some positive integer is written such that the numbers 1, 2, 3, 4 do not appear on one
die. Julia is also interested in the distributions of the sums of the numbers on the bottom faces when
the dices are thrown. She wants the distributions to be the same as that of two tetrahedral dice when
the numbers 1, 2, 3, 4 are written on each face of the die. Can Julia achieve her goal?
4. (2015 HMMT Combinatorics #5) For positive integers x, let g(x) be the number of blocks of consecutive
1’s in the binary expansion of x. For example, g(19) = 2 because 19 = 100112has a block of one 1 at
the beginning and a block of two 1’s at the end, and g(7) = 1 because 7 = 1112only has a single block
of three 1’s. Compute g(1) + g(2) + g(3) + · · · +g(256).
2 Optional Problems
1. (2004 HMMT Combinatorics #10) In a game similar to three card monte, the dealer places three cards
on the table: the queen of spades and two red cards. The cards are placed in a row, and the queen
starts in the center; the card configuration is thus RQR. The dealer proceeds to move. With each move,
the dealer randomly switches the center card with one of the two edge cards (so the configuration after
the first move is either RRQ or QRR). What is the probability that, after 2004 moves, the center card
is the queen?
2. (2016 HMMT Combinatorics #7) Kelvin the Frog has a pair of standard fair 8-sided dice (each labelled
from 1 to 8). Alex the sketchy Cat also has a pair of fair 8-sided dice, but whose faces are labelled
differently (the integers on each Alex’s dice need not be distinct). To Alex’s dismay, when both Kelvin
and Alex roll their dice, the probability that they get any given sum is equal! Suppose that Alex’s two
dice have a and b total dots on them, respectively. Assuming that a a6=b, find all possible values of
min a, b.
1