← SIG (Susquehanna) Interview Insights
This one took me a minute to set up properly.
Model the problem as a Markov chain with states representing the number of tokens (0 to 5), where 0 and 5 are absorbing. Set up equations for the probability of reaching 5 from each state, using the betting rule to determine transitions, and solve recursively or iteratively.
Pro tip: After solving, verify your answer with a quick simulation or by checking edge cases (e.g., starting with 4 tokens) to ensure the logic is sound and catch any off-by-one errors.
Identify the possible token counts (0,1,2,3,4,5) and note that 0 (broke) and 5 (goal) are absorbing states with probabilities 0 and 1 respectively.
For each non-absorbing state, compute the bet size as the minimum of current tokens and the amount needed to reach 5 without overshooting. Then define the win/loss transitions based on the bet.
Let P(i) be the probability of reaching 5 from state i. Write equations: P(i) = p * P(i + bet) + (1-p) * P(i - bet), with p=3/5, and boundary conditions P(0)=0, P(5)=1.
Solve the linear equations for P(1), P(2), P(3), P(4) either by substitution or matrix methods. Focus on P(3) as the desired probability.
Check the solution by ensuring probabilities are between 0 and 1 and by testing with a simple simulation or alternative method (e.g., dynamic programming).
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.