Coupon Collector
A standard fair six-sided die is rolled repeatedly. Find the expected number of rolls needed for every face to have appeared at least once.
Work it out, then compare with the answer.
SolutionShow the worked solution
Let be the number of rolls and split it into stages: , where is the number of rolls taken to see the th distinct face once faces have appeared.
While faces have been seen, each roll shows a new face with probability , independently of earlier rolls. So and . In particular .
By linearity of expectation,
Generalisation. For equally likely types the same argument gives .
Variations
The same idea with a twist. Each solution gives only the changed step.
A collector draws stamps one at a time, each independently and uniformly one of four types. Find the expected number of stamps she must draw until she has collected three distinct types (not necessarily all four).
Work it out, then compare with the answer.
Solution
Keep only the first three stages of the four-type collector. With types already held, a draw is new with probability . The expected number of draws is therefore
A farmer examines goats one at a time; each goat is independently male with probability and female with probability . He stops as soon as he has examined a male and a female (in either order). Letting be the number of goats examined when he stops, find .
Work it out, then compare with the answer.
Solution
Condition on the first goat.
- If it is male (probability ), the farmer then waits a number of goats for a female, so .
- If it is female (probability ), he waits a number for a male, so .
Hence
Consider the complete directed graph on nodes (no self-loops): from any node, each of the other nodes is reached with probability on each step. Starting from one node and taking such steps repeatedly, find the expected number of steps needed to have visited every node at least once, rounded to the nearest integer.
Work it out, then compare with the answer.
Solution
The starting node counts as visited at step .
When nodes have been visited, the walker stands on one of them. Its next step goes to one of the unvisited nodes with probability , since self-loops are excluded. The wait for the next new node is therefore .
Summing the means over ,
If one also counted the initial placement as a step, the total would be .
An ant starts at a vertex of a regular -simplex (so there are vertices in total). At each step it jumps to one of the other vertices, chosen uniformly at random (no self-loops). The ant stops the first time it has visited every vertex at least once and returned to its starting vertex. Find the expected number of steps, as a function of .
Work it out, then compare with the answer.
Solution
Covering stage. The start vertex is visited at time . With vertices visited (), a jump lands on a new vertex with probability . Visiting all vertices therefore takes expected time
Return stage. At the moment the last vertex is first reached, the ant is not at the start, because the start was visited at time . From any non-start vertex it jumps to the start with probability . The return time is thus , with mean .
Adding the two stages,
Check. For the formula gives , which is correct: one step out and one step back.