← Morgan Stanley Interview Insights
I spent way too long trying to brute-force the state space in my head.
Model the game as a Markov chain with states representing the last flip (or start) and solve for the probability that A wins from each state. Set up equations using first-step analysis and solve for the desired probability, ensuring to account for the alternating turns.
Pro tip: Clearly define the states and turn ownership; a common mistake is to forget whose turn it is in each state, which can lead to incorrect equations. Also, verify your answer by checking that probabilities sum to 1 and are intuitive.
Identify the relevant states based on the last flip: Start (no flips yet), after a Head (H), and after a Tail (T). Also track whose turn it is (A or B) in each state.
Let p_A be the probability that A wins from the start. Write equations for the probability of A winning from each state, considering the next flip and the transition to other states with the turn switching.
Solve the linear equations for the unknown probabilities. Use substitution or matrix methods to find p_A.
Check that the probabilities are between 0 and 1 and that the sum of A's and B's winning probabilities is 1. Interpret the result in the context of the game.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.