Expected flips to get all heads

Expected moves to get all heads is a medium quant interview question on Combinatorics, reported to have been seen at Jane Street.

Difficulty Medium Topic Combinatorics Reported at Jane Street

MyQuantPartner is not affiliated with, endorsed by, or sponsored by these companies, and all trademarks belong to their respective owners.

This combinatorics question is about modeling a small but nontrivial stochastic process and tracking how its state evolves under controlled, partially random actions. You must understand how choices interact with randomness when pursuing a specific configuration, and how different states of the system relate to one another. For quant prep, it sits at the intersection of probability, discrete math, and careful state classification, which shows up again and again in quant interviews.

It trains conditional expectation, Markov-style state thinking, and the ability to write and manipulate recursive relationships between expected costs from different configurations. You practice turning an informal game description into a clean probabilistic model, with well-defined states and transitions, and then pushing that model through to a numerical answer.

This matters in quant interviews because many trading and risk problems have exactly this flavor: a complex but finite state space, probabilistic transitions, and a need to reason about future costs or payoffs. Being fluent with this kind of recursive expectation reasoning is core to high-level quant interview performance.

What it tests

This problem class is governed by the principle of recursive state analysis: when a process evolves in discrete steps toward a well-defined goal, and each action probabilistically alters the state, the expected cost to completion can be decomposed by conditioning on the current state. The Law of Total Expectation allows us to partition the overall expectation by the possible initial states, weighting each by its probability. For each state, the expected cost to finish is the immediate cost of an action plus the expected cost from the resulting new state, averaged over all possible outcomes of that action. This recursive structure arises because each step both consumes resources (like movements) and reshapes the problem into a smaller or similar subproblem. The pattern holds because the Markov property ensures that the future evolution depends only on the current state, not the path taken to reach it.

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

Get started free