Expected Tosses to Hit Box 4

Expected tosses to reach last box is a hard quant interview question on Markov Chains.

Difficulty Hard Topic Markov Chains

This question considers a simple random walk on a short line of boxes, where moves depend on repeated coin tosses and the process can wrap back to the starting state. The candidate is asked to determine how long, on average, it takes to reach a terminal box when each step moves the pebble forward by a random amount and occasionally returns it to the beginning. It is a compact example of a Markov chain with an absorbing state and nontrivial dynamics, because the process can both progress and reset, so intuition alone is unreliable without a careful setup.

Answering it leans on Markov chain hitting-time ideas and setting up recursive equations for expectations at each state. The candidate must translate the verbal rules into a small system of linear equations, recognize the absorbing structure, and correctly handle transitions that send the process backwards to the start. An interviewer is watching for comfort with conditioning on the next step, algebraic care in solving the coupled equations, and the ability to sanity-check the final expectation against extremes and symmetry considerations.

What it tests

This problem class is governed by the principle of Markov processes and the use of recursive expectation equations. When a process has memoryless transitions between discrete states, the expected time (or steps) to reach an absorbing state can be found by expressing the expected value at each state in terms of the expected values of subsequent states, weighted by transition probabilities. The key is that the process can revisit earlier states, and the expected value at each state must account for all possible paths, including cycles. The recursive structure arises because the process's future evolution depends only on the current state, not the path taken to reach it. This leads to systems of equations that can be solved algebraically or, in some cases, by recognizing patterns in infinite series.

Practise this question with written feedback, or hear it in a spoken mock interview.

Get started free