Hi there, here's another puzzle I've been looking at.

Suppose you are to guess the colour of the next card in an ordinary deck of 52 cards---red or black---one at a time. How many can you expect to get right?

Here's what I think. Let $E(r,b)$ denote the expected number you will get right given that there are $r$ red cards left and $b$ black cards left. Then

  • If $r \geq b$, then you would guess red (WLOG in the case of equality) and thus $$E(r,b) = \frac{r(1+E(r-1,b))+ b E(r,b-1)}{r+b}.$$

  • If $r < b$, then you would guess blue and thus $$E(r,b) = \frac{r E(r-1,b) + b(1+E(r,b-1))}{r+b}.$$

Thus, if we let $$F(r,b) = \frac{r E(r-1,b) + b E(r,b-1)}{r+b},$$ then for all $r,b$ we have $$E(r,b) = F(r,b) + \frac{max(r,b)}{r+b}.$$

How might one solve these equations? Simulation tells me that $E(26,26) = 30.0392...$.


closed as too localized by Bill Johnson, Chris Godsil, S. Carnahan Feb 13 '12 at 1:31

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ You can solve $E(r,b)$ by recursion. The base of the induction is when there is only one color left, and you are sure to be right. Then, your equations provide the value at $E(r,b)$ from smaller values. So the complete table of values can be exactly calculated. $\endgroup$ – Joel David Hamkins Feb 13 '12 at 1:19
  • $\begingroup$ You already set up a recursion, and the initial cases are not too hard to work out. Please feed this information to a computer algebra system. $\endgroup$ – S. Carnahan Feb 13 '12 at 1:31
  • $\begingroup$ Sure, so there is no explicit formula for a situation like this? $\endgroup$ – A Chuh Feb 13 '12 at 1:45
  • 2
    $\begingroup$ There is a big simplification possible. If there are $k>0$ more red cards than black cards, you will make $k$ more correct than incorrect guesses by the time the deck is even again. So, the expected number of correct minus incorrect guesses is a sum of $1$ for each time the deck changes from even to uneven. That is the expected number of times the deck will be even before the end, or the sum of the probabilities that the deck will be even at time $0, 2, 4, ... 2n-2$. $\endgroup$ – Douglas Zare Feb 13 '12 at 7:04
  • 3
    $\begingroup$ Perhaps the question was closed too quickly? Based on Douglas Zare's comment there is a clear answer: $E(r,b)$ can be computed as a single sum / recursion involving binomial coefficients (rather than over two variables). In particular it seems that $E(n+1,n+1) = E(n,n) + 1 + (1/2)\cdot (2\cdot 4 \cdots (2n))/(3\cdot 5 \cdots (2n+1))$, and that asymptotically, $E(n,n) = n + \sqrt{\pi n}/2 + o(\sqrt{n})$. $\endgroup$ – Johan Wästlund Feb 13 '12 at 10:54

Browse other questions tagged or ask your own question.