[Math] Optimal strategy for card drawing game

probability

You are given a pile of 10 shuffled cards, 5 with P and 5 with N. You draw one at a time; if you get a "P" you win a dollar, and if you get an "N" you lose a dollar. You can choose to stop drawing at any point. What's the optimal strategy and expected value of the game?

I have the brute force solution of
$$E_{5,5} = \max\{1/2(1+E_{4,5}) + 1/2(-1+E_{5,4}),0\}$$
and continuing recursively. Is there a clever way to generalize the final answer or strategy for $n$ cards?

Best Answer

The expected value has to be at least $\frac 12$ because that is the value of the following strategy. Draw the first card, if P quit (winning $1$), if N draw all the others (breaking even). You can do better. If you have drawn an equal number of cards of each type you are at $0$ and the same logic applies, so you should draw. If you are ahead the expected value of the next draw is negative, so you should quit. The correct strategy is to draw any time you are even or behind and to quit if you ever hit $+1$ or run out of cards.

The number of sequences that get you $0$ are counted by the Catalan number $C_{10}=\frac 16{10 \choose 5}=42$ The number of sequences is ${10\choose 5}=252$, so the chance you get $0$ is $\frac 16$ and the value of the game is $\frac 56$

Related Question