Expected number of runs in a card flip game

140 Views Asked by At

Given $n$ matching pairs of cards ($2n$ cards in total) all facing down, I start picking 2 at a time randomly and turn them up. If I land up with a matching pair, these two are discarded and I continue with the remaining. If not, I keep these two cards back facing down and forget what I had picked and start. What is the expected number of flips?

My attempt

Consider $I_i=1$ if the flip is 1 in the $i^{th}$ turn. Then number of turns = $\sum_{i=1}^\infty E[I_i]$

$P(I_1=1) = \frac{{n \choose 1}}{{2n \choose 2}}$

\begin{align*} $P(I_2=1) &= P(I_2=1|I_1=1)P(I_1=1) + P(I_2=1|I_1=0)P(I_1=0)\\ &= \frac{{n-1 \choose 1}}{{2n-2 \choose 2}} P(I_1=1) + \frac{{n \choose 1}}{{2n \choose 2}} P(I_1=0) \end{align*}

But I cant't see it getting reduced to any tangible form.

1

There are 1 best solutions below

1
On

You have found that if there are $2n$ cards then the probability of a successful pick of a pair is $\dfrac{n \choose 1}{2n \choose 2} = \dfrac{n }{\frac{2n(2n-1)}{2}} = \dfrac{1}{2n-1}$

So (with a geometric distribution) the expected number of pair-picks to get the first successful pair is $2n-1$, and this will leave you with $2n-2$ cards for the next stage

So the expected total number of pair-picks to match everything is $$(2n-1)+(2n-3)+(2n-5)+\cdots+3+1 =n^2$$