Problem:
Rishabh has pairs of socks in a drawer. He draws socks from the drawer uniformly at random, without replacement, until he has drawn a pair of identical socks. Compute the expected number of unpaired socks he has drawn when he stops.
Problem:
Rishabh has pairs of socks in a drawer. He draws socks from the drawer uniformly at random, without replacement, until he has drawn a pair of identical socks. Compute the expected number of unpaired socks he has drawn when he stops.
Solution:
We solve for the expected number of total socks drawn and subtract two at the end.
Let be the expected number of socks drawn for pairs of socks, so that . Suppose there are pairs of socks, Rishabh continued to draw socks until the drawer was empty, and without loss of generality let the last sock drawn be red. If we ignore the two red socks, the process is equivalent to drawing from a drawer with pairs of socks. Let be the number of socks drawn until a pair of identical socks is found, after ignoring the two red socks. Then the first red sock has probability of being before this stopping point, so the expected value is . Since the expected value of is , we have
Applying this recurrence, we get
Subtracting two and plugging in gives a final answer of .
Solution:
Let denote the probability that Rishabh draws more than socks. We compute for all (and note for larger ).
The number of ways to draw socks, none identical to each other, is
while the total number of ways to draw socks is
Thus,
The expected number of socks drawn is
This sum is equivalent to Putnam 2020 A2. We claim that it is equal to . We do this via a counting argument: we count how many ways there are to choose at least half of the elements from the set . On the one hand that is . On the other hand, letting be the 2025th largest element chosen, there are ways to choose the elements larger than it, and ways to choose the elements smaller than it. Varying , we get
This means the expected number of socks is
and subtracting two for the matching pair gives .