Problem 11.1 Easy Free 4 variations

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 TT be the number of rolls and split it into stages: T=T1+⋯+T6T=T_1+\dots+T_6, where TiT_i is the number of rolls taken to see the iith distinct face once i−1i-1 faces have appeared.

While i−1i-1 faces have been seen, each roll shows a new face with probability 7−i6\frac{7-i}{6}, independently of earlier rolls. So Ti∼Geom ⁣(7−i6)T_i\sim\mathrm{Geom}\!\left(\frac{7-i}{6}\right) and E[Ti]=67−i\mathbb{E}[T_i]=\frac{6}{7-i}. In particular T1=1T_1=1.

By linearity of expectation,

E[T]=∑i=1667−i=6∑j=161j=6⋅4920=14710.\mathbb{E}[T]=\sum_{i=1}^{6}\frac{6}{7-i}=6\sum_{j=1}^{6}\frac1j=6\cdot\frac{49}{20}=\frac{147}{10}.
E[T]=6H6=14710=14.7\boxed{\mathbb{E}[T]=6H_6=\tfrac{147}{10}=14.7}

Generalisation. For nn equally likely types the same argument gives E[T]=nHn=n∑j=1n1j≈nln⁡n\mathbb{E}[T]=nH_n=n\sum_{j=1}^n\frac1j\approx n\ln n.

Variations

The same idea with a twist. Each solution gives only the changed step.

Variation 11.1a

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 kk types already held, a draw is new with probability 4−k4\frac{4-k}{4}. The expected number of draws is therefore

1+43+42=133≈4.33.1+\frac43+\frac42=\frac{13}{3}\approx 4.33.
133\boxed{\tfrac{13}{3}}
Variation 11.1b

A farmer examines goats one at a time; each goat is independently male with probability 3/43/4 and female with probability 1/41/4. He stops as soon as he has examined a male and a female (in either order). Letting NN be the number of goats examined when he stops, find E[N]\mathbb{E}[N].

Work it out, then compare with the answer.

Solution

Condition on the first goat.

  • If it is male (probability 34\frac34), the farmer then waits a Geom(14)\mathrm{Geom}(\frac14) number of goats for a female, so E[N∣M]=1+4=5\mathbb{E}[N\mid M]=1+4=5.
  • If it is female (probability 14\frac14), he waits a Geom(34)\mathrm{Geom}(\frac34) number for a male, so E[N∣F]=1+43=73\mathbb{E}[N\mid F]=1+\frac43=\frac73.

Hence

E[N]=34⋅5+14⋅73=4512+712=133.\mathbb{E}[N]=\tfrac34\cdot 5+\tfrac14\cdot\tfrac73=\tfrac{45}{12}+\tfrac{7}{12}=\tfrac{13}{3}.
E[N]=133\boxed{\mathbb{E}[N]=\tfrac{13}{3}}
Variation 11.1c

Consider the complete directed graph on 1111 nodes (no self-loops): from any node, each of the other 1010 nodes is reached with probability 1/101/10 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 00.

When kk nodes have been visited, the walker stands on one of them. Its next step goes to one of the 11−k11-k unvisited nodes with probability 11−k10\frac{11-k}{10}, since self-loops are excluded. The wait for the next new node is therefore Geom ⁣(11−k10)\mathrm{Geom}\!\left(\frac{11-k}{10}\right).

Summing the means over k=1,…,10k=1,\dots,10,

∑k=1101011−k=10H10=7381252≈29.29.\sum_{k=1}^{10}\frac{10}{11-k}=10H_{10}=\frac{7381}{252}\approx 29.29.
10H10=7381252≈29\boxed{10H_{10}=\tfrac{7381}{252}\approx 29}

If one also counted the initial placement as a step, the total would be 1+10H10≈301+10H_{10}\approx 30.

Variation 11.1d

An ant starts at a vertex of a regular nn-simplex (so there are n+1n+1 vertices in total). At each step it jumps to one of the other nn 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 nn.

Work it out, then compare with the answer.

Solution

Covering stage. The start vertex is visited at time 00. With kk vertices visited (1≤k≤n1\le k\le n), a jump lands on a new vertex with probability n+1−kn\frac{n+1-k}{n}. Visiting all n+1n+1 vertices therefore takes expected time

∑k=1nnn+1−k=nHn.\sum_{k=1}^{n}\frac{n}{n+1-k}=nH_n.

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 00. From any non-start vertex it jumps to the start with probability 1n\frac1n. The return time is thus Geom(1n)\mathrm{Geom}(\frac1n), with mean nn.

Adding the two stages,

 nHn+n=n(1+∑j=1n1j) \boxed{\,nH_n+n=n\left(1+\sum_{j=1}^n\frac1j\right)\,}

Check. For n=1n=1 the formula gives 22, which is correct: one step out and one step back.