Derivatives Foundation puzzles, solved step by step
- Puzzles
- 100
- Traced to a firm
- 66
- Topics
- 12
- Hard
- 29
091I deal a shuffled deck face up one card at a time. At any moment you may say stop; if the next card is red you win, otherwise you lose. What strategy maximises your chance of winning, and what is that chance?Jump TradingChicago · 2018
Try it first
You decide to wait until more reds than blacks remain, then stop. How does that compare with stopping straight away?
Show the worked solution
Every strategy wins with probability exactly 1/2, so there is nothing to optimise. The chance that the next card is red equals the share of red left in the deck, and that share is a fair game: whatever has been dealt, its expected value one card later is its value now. A neat way to see it: the card after you say stop has the same chance of being red as the last card in the deck, and the last card is red with probability 1/2 whatever you do.
Why can't waiting for a good moment help?
Imagine a jar of 26 red and 26 black sweets that a friend pulls out one at a time, and you bet on the colour of the next one. When more reds are left you feel you have edge, but the jar only gets red-heavy after blacks come out, and you do not control which comes out. The share of red remaining has the same expected value one card from now as it has now, so any rule for when to stop is a bet on a fair game and cannot beat 1/2. The fancy name is a martingale: a quantity whose best forecast of its next value is its current value.
Two simulated deals show the share of red among undealt cards wandering around 1/2, with deck A going red-heavy after 7 cards and deck B never going red-heavy and ending on a black card, and the rule of stopping when reds lead gets its chance in 26 deals out of 27 yet wins exactly 1/2, because the deals where it never comes are certain losses. What is the one-line proof the interviewer wants?
Whatever rule you use, you say stop at some point and win if the next card is red. Swap that bet for a bet on the last card of the deck. Given everything dealt so far, the next card and the last card are both a random draw from the same set of undealt cards, so they are red with the same probability. Every stopping rule wins with the same probability as a bet on the bottom card of the deck, and the bottom card is red half the time. That holds for any strategy, so 1/2 is both the best and the worst you can do. A full check of every position from 26 red and 26 black confirms that the best achievable chance from r red and b black is exactly r/(r + b), the chance of stopping right there.
The relationshipR_k red cards still undealt after k cards N_k all cards still undealt after k cards R_k / N_k the chance the next card is red if you stop now What it says in wordsYour winning chance at any moment has the same expected value tomorrow as today, so no rule for when to stop can raise its starting value of a half.Put a number on why the waiting rule fools people. Starting from an even deck, the first black card dealt leaves 26 red in 51, so reds lead immediately half the time, and over the whole deal the moment arrives in 26 deals out of 27. But it typically arrives at a share only just above 1/2, and in the 1 deal in 27 where it never arrives, the last card is black for certain. The edge in the good deals is paid for exactly by the sure loss in the bad ones. The limitation of the result is the payoff: if you were paid more for winning late, or could bet different amounts, the game would no longer be fair and timing could matter.
Where candidates lose it
The common loss is proposing the wait-for-reds-to-lead rule and claiming a small edge, usually around 51%. The interviewer then asks what happens if reds never lead, and the edge disappears. Count both branches before you claim anything.
The second loss is starting a dynamic programme over 27 by 27 states in the room. It works, but it takes far too long. The last-card argument settles it in one sentence and is what the question is testing.
What the interviewer asks next
- Now you win Rs 2 if the next card is red and lose Rs 1 if black, and you must stop at some point. Does timing matter?
- With 3 red and 1 black, what is your chance, and can any strategy change it?
- What changes if you may skip a card without it being revealed?
Asked at Jump Trading, Research, Chicago, 2018 (Wall Street Oasis):
I'm dealing a deck of poker, you can stop me anytime. If the next card is red, you win.
