Recursion & Recurrences
Recursive Game Values
Overview
Recursive game value problems are the hardest class of quant interview questions. They require you to find the VALUE of the game, not just describe a strategy. The Bellman equation is the key tool: the value of the game today equals the cost of playing today plus the expected value of playing optimally tomorrow. For threshold games (like The Picking Hat), the optimal threshold is found by differentiating the expected payoff with respect to the threshold and setting to zero. The self-consistency condition V = V(ฯ) where ฯ = argmax V(ฯ) lets you verify your answer.
How to Recognize
- โ'You play optimally โ what is the expected value?'
- โGame where you choose between stop/continue at each step
- โMulti-stage games where future value depends on current state
- โ'The Picking Hat', dice-rolling games with stopping decisions
- โAny problem asking for 'value of the game with optimal strategy'
Step-by-Step Approach
- 1.Define V(state) = expected value from this state under optimal play
- 2.Bellman equation: V(s) = max(stop payoff, E[V(next state)] - cost)
- 3.Work backwards from terminal states (boundary conditions)
- 4.For threshold problems: stop if current draw exceeds continuation value
- 5.The threshold = value of future opportunities (set equal, solve)
Key Formulas
Worked Examples
Problem
A hat contains numbers 1โ100 (with replacement). Each round you draw a number, write it down, and pay $1. You may stop at any time; you receive the last number written. What is the optimal strategy and the fair value of this game?
Solution
Let ฯ = threshold: stop if current draw X โฅ ฯ.
P(stop each draw) = p = (101-ฯ)/100. Expected draws = 1/p = 100/(101-ฯ).
E[prize | stop] = mean of {ฯ, ฯ+1, ..., 100} = (ฯ+100)/2.
V(ฯ) = E[prize] โ E[cost] = (ฯ+100)/2 โ 100/(101โฯ).
Optimize: dV/dฯ = 1/2 โ 100/(101โฯ)ยฒ = 0 โ (101โฯ)ยฒ = 200 โ ฯ* = 101 โ 10โ2 โ 86.86 โ use ฯ=87.
V(87) = (87+100)/2 โ 100/(101โ87) = 187/2 โ 100/14 = 93.5 โ 50/7 = 1209/14 โ $86.36.
Answer
V \approx \86.36$. Optimal strategy: keep drawing until you draw โฅ 87. Expected number of draws โ 7.1. Verify self-consistency: V โ 86.36 < 87 = ฯ, confirming you should stop at exactly ฯ=87.
Common Mistakes
- !
Using the WRONG continuation value as the threshold. The threshold should equal the continuation value (net of costs), not just E[next draw].
- !
Not accounting for the per-round cost. If draws cost c each, the threshold is E[future game value], which is LOWER than E[prize] by the expected cost.
- !
Assuming the threshold is the same as the expected value of the final prize. The threshold ฯ and the game value V are related by V(ฯ) โ you need to optimize.
- !
For finite-horizon games, forgetting to work backwards. With N=3 rolls the threshold is different from Nโโ.
Practice Problems
Click "Show Answer" to revealA hat has numbers 1โ10 (with replacement). Each draw costs $0.50. What is the optimal threshold and expected net value?
You flip a fair coin repeatedly. You win 1. What is the expected net value? (Modified St. Petersburg)
You have a single fair die. You can roll it at most 3 times, and you keep the result of your LAST roll (you must declare 'last' before rolling). What is the optimal strategy?