Quant Probability Brainteasers: Pizza Bounds, Coin Scores, Ant on a Cube, Shoelace Loops, and Paint Mixing
Company: Jane Street
Role: Data Scientist
Category: Machine Learning
Difficulty: medium
Interview Round: Technical Screen
You are in a quantitative research interview. The interviewer works through a series of short probability puzzles and expects you to reason out loud, state your assumptions explicitly, and land on exact answers where they exist. Solve each of the following.
### Constraints & Assumptions
- All coins are fair and all flips are independent unless stated otherwise.
- All random choices (edges, ends of laces) are uniform over the available options.
- Exact, closed-form answers are expected; you may sanity-check with approximations, but the final answer should be exact.
- Assume mixing is perfectly uniform in the paint puzzle, and that transfers conserve volume.
### Clarifying Questions to Ask
- In the pizza question, is any dependence structure between Saturday and Sunday given, or only the two marginal probabilities?
- In the coin question, are the coins fair, and is every coin flipped exactly once? Are we conditioning on the total score being exactly 900?
- In the ant question, does the ant choose uniformly among all 3 incident edges at every step — including immediately backtracking — and does each move take exactly one unit of time?
- In the shoelace question, are the two ends chosen uniformly at random among all free ends, so that the two ends of the same lace (or the same chained strand) can be picked together?
- In the paint question, how is "color change" measured — is the fraction of foreign paint in each bucket the right metric?
### Part 1 — Weekend pizza probability bounds
On Saturday you eat pizza with probability $0.4$; on Sunday you eat pizza with probability $0.3$. Nothing is stated about how the two days relate. What is the range of possible values for the probability that you eat pizza at least once over the weekend? For each extreme of the range, tell a short story describing a dependence structure that attains it.
```hint Union bounds
Only the marginals are given, so think Fréchet/Boole bounds: given $P(A)$ and $P(B)$ alone, how large and how small can $P(A \cup B)$ be?
```
```hint The extremes
The two extremes come from maximal overlap (one event containing the other) versus no overlap at all (mutually exclusive events). Ask which values of $P(A \cap B)$ are achievable.
```
#### What This Part Should Cover
- The correct interval, with an argument for why each endpoint cannot be beaten
- A concrete, believable story attaining each extreme
- A sanity check against the independence case and where it falls inside the interval
### Part 2 — Most likely coin-score combination
You flip 250 gold coins and 250 silver coins, all fair. Each gold head scores 3 points, each silver head scores 1 point, and tails score nothing. The total score comes out to exactly 900. Which combination (number of gold heads, number of silver heads) is the most likely?
```hint Reduce to one variable
The score constraint $3g + s = 900$ determines $s$ once you pick $g$. First work out which values of $g$ are even feasible given $0 \le s \le 250$.
```
```hint Mode of a product
Conditioned on the score, the probability of a combination is proportional to $\binom{250}{g}\binom{250}{s}$. Find the maximizer by checking where the ratio of consecutive terms $f(g+1)/f(g)$ crosses $1$.
```
#### What This Part Should Cover
- Deriving the feasible range of gold-head counts from the score equation
- Setting up the product of binomial coefficients and a disciplined argument (ratio test, log-concavity, or a continuous approximation refined to integers) for its mode
- Verifying the claimed maximizer against its integer neighbors
### Part 3 — Ant on a cube
An ant starts at a vertex of a unit cube. Every second it moves along one of the three edges incident to its current vertex, chosen uniformly at random. What is the expected time until it first reaches the vertex diagonally opposite its starting point?
```hint Collapse the state space
You do not need eight states. Group vertices by their edge-distance (0, 1, 2, or 3) from the target, argue the walk only depends on that distance, and write first-step equations.
```
#### What This Part Should Cover
- Using symmetry to reduce the chain to distance classes
- Correct one-step transition probabilities between the classes
- Solving the resulting linear system to an exact expected hitting time
### Part 4 — Expected number of shoelace loops
You have $N$ shoelaces in a pile, so $2N$ free ends. Repeatedly pick two free ends uniformly at random and tie them together, until no free ends remain. What is the expected number of closed loops at the end?
```hint Linearity
Do not track the whole configuration. When $k$ strands remain, compute the probability that the next tie closes a loop, and sum those probabilities.
```
```hint Counting the pick
With $k$ strands there are $2k$ free ends, hence $\binom{2k}{2}$ equally likely pairs — and exactly $k$ of those pairs are the two ends of the same strand. Also note that every tie, loop or not, reduces the number of strands by exactly one.
```
#### What This Part Should Cover
- The observation that each tie reduces the strand count by one regardless of outcome
- Reducing the problem to a per-step loop probability plus linearity of expectation
- The exact sum, and how it behaves asymptotically for large $N$
### Part 5 — Paint mixing
Two buckets hold equal volumes of paint: one pure white, one pure red. You pour a quarter of a bucket of red paint into the white bucket and mix thoroughly. Then you pour the same volume of the resulting mixture back into the red bucket and mix. Which bucket's color has changed more?
```hint Conservation
After the second transfer, both buckets are back at their original volumes. Any red paint missing from the red bucket must be sitting in the white bucket — and the space it left behind was filled by an equal volume of something.
```
#### What This Part Should Cover
- Careful volume bookkeeping through both transfers
- A conservation/symmetry argument that generalizes beyond the specific quarter-bucket amount
- A precise definition of "color change" (foreign-paint fraction) and a direct comparison
### What a Strong Answer Covers
Across all parts, the interviewer is judging how you attack probability puzzles, not just the final numbers:
- Stating assumptions (fairness, independence, uniformity) out loud before computing, and flagging when the problem deliberately omits one (Part 1)
- Reaching for the lightest tool that works — bounds, symmetry reductions, linearity of expectation, conservation arguments — instead of brute-force enumeration
- Sanity-checking exact answers against limiting cases, neighboring values, or quick approximations
- Communicating each result as a clean, memorable argument a colleague could replay
### Follow-up Questions
- Part 1: if Saturday and Sunday were independent, what is the weekend probability, and where does it sit inside your interval?
- Part 2: qualitatively, how does the most likely combination shift if the coins are biased toward heads with probability $p > 1/2$?
- Part 3: what is the expected time for the ant to return to its starting vertex, and why does it follow immediately from the stationary distribution?
- Part 4: how does the expected number of loops grow as $N \to \infty$?