PracHub
QuestionsCoachesLearningGuidesInterview Prep
|Home/Software Engineering Fundamentals/Jane Street

Alternating Die-Roll Game: Optimal Accept/Reject Strategy

Last updated: Jul 2, 2026

Alternating Die-Roll Game: Optimal Accept/Reject Strategy

Company: Jane Street

Role: Data Scientist

Category: Software Engineering Fundamentals

Difficulty: hard

Interview Round: Technical Screen

Two players, A and B, play the following game with a fair 21-sided die whose faces are labeled with the integers $-10, -9, \ldots, 9, 10$ (one integer per face, each face equally likely). Player A moves first. On a player's turn, that player rolls the die, observes the face value $v$, and then chooses one of two actions: - **Accept.** The game ends immediately, and the opposing player pays the roller $v$. (If $v$ is negative, this means the roller pays the opponent $|v|$.) - **Reject.** Nothing is paid, and the turn passes to the other player, who now rolls and faces exactly the same accept/reject choice. Turns alternate this way indefinitely until some player accepts. What is the optimal strategy for each player, and what is the expected payoff to A when both players play optimally? ```hint Where to start After any rejection, the roles simply swap and the remaining game looks **identical** to the original one. Look for a *stationary* strategy — and ask whether A's and B's decision rules should really differ at all. ``` ```hint Value recursion Let $V$ be the expected payoff, under optimal play, to whichever player is *about to roll*. Rejecting hands your opponent a position worth $V$ to them (so worth $-V$ to you). Write $V$ as an expectation over the roll of the better of accepting and rejecting, and solve the resulting fixed-point equation. ``` ```hint Common pitfall "Accept anything $\ge 0$" feels natural but is **not** optimal. Compare taking a small guaranteed loss now against the expected cost of handing your opponent the move. ``` ### Constraints & Assumptions - The die is fair: each of the 21 integer values $-10$ through $10$ has probability $1/21$, and successive rolls are independent. - The game is zero-sum: whatever the accepting player receives, the other player pays. - There is no bound on the number of turns, no discounting, and no cost to reject. - Both players are risk-neutral expected-value maximizers, and both play optimally (each knows the other is rational). ### Clarifying Questions to Ask - Is every face equally likely, and are successive rolls independent of earlier ones? - When B accepts, does A pay B the face value — i.e., is the game fully symmetric under a role swap? - Is there any limit on the number of rounds, or any per-round cost or time discounting? - Can a player accept a negative value, and does that mean the roller pays out of pocket? - Are we maximizing expected value (risk-neutral), or should risk aversion factor into the strategy? ### What a Strong Answer Covers - Recognizing the stationary, symmetric structure: after any rejection the opponent faces the identical game, so the continuation value is the same at every turn and both players share one decision rule. - Formulating the mover's expected payoff as a fixed-point equation and deriving a threshold (accept/reject) policy from it. - Handling the discrete faces correctly: identifying the integer cutoff, checking the threshold is self-consistent, and computing the exact game value. - Sanity checks: indifference reasoning at the boundary, comparison against the naive threshold-at-zero policy, and an argument that the game terminates with probability 1. ### Follow-up Questions - How do the strategy and the game value change if the roll is continuous, uniform on $[-10, 10]$? - Suppose each rejection costs the rolling player a fee $c > 0$. How does that shift the thresholds and the value? - What happens if every face is positive — say the faces are $1$ through $20$? What does that reveal about where the accept/reject tension actually comes from? - How would you verify your closed-form answer numerically?

Related Interview Questions

  • Turning Interview Code into a Reusable Library or API - Jane Street (medium)
  • Build a Web Calculator That Matches a Reference App - Jane Street (medium)
  • Which Dice Game Wins More Often: One Six in 4 Rolls, or Double Sixes in 24 Rolls? - Jane Street (medium)
  • Five Pumpkins Weighed in Every Pair: Find the Total Weight - Jane Street (medium)
|Home/Software Engineering Fundamentals/Jane Street

Alternating Die-Roll Game: Optimal Accept/Reject Strategy

Jane Street logo
Jane Street
Nov 20, 2025, 12:00 AM
hardData ScientistTechnical ScreenSoftware Engineering Fundamentals
0
0

Two players, A and B, play the following game with a fair 21-sided die whose faces are labeled with the integers −10,−9,…,9,10-10, -9, \ldots, 9, 10−10,−9,…,9,10 (one integer per face, each face equally likely).

Player A moves first. On a player's turn, that player rolls the die, observes the face value vvv, and then chooses one of two actions:

  • Accept. The game ends immediately, and the opposing player pays the roller vvv . (If vvv is negative, this means the roller pays the opponent ∣v∣|v|∣v∣ .)
  • Reject. Nothing is paid, and the turn passes to the other player, who now rolls and faces exactly the same accept/reject choice.

Turns alternate this way indefinitely until some player accepts.

What is the optimal strategy for each player, and what is the expected payoff to A when both players play optimally?

Constraints & Assumptions

  • The die is fair: each of the 21 integer values −10-10−10 through 101010 has probability 1/211/211/21 , and successive rolls are independent.
  • The game is zero-sum: whatever the accepting player receives, the other player pays.
  • There is no bound on the number of turns, no discounting, and no cost to reject.
  • Both players are risk-neutral expected-value maximizers, and both play optimally (each knows the other is rational).

Clarifying Questions to Ask

  • Is every face equally likely, and are successive rolls independent of earlier ones?
  • When B accepts, does A pay B the face value — i.e., is the game fully symmetric under a role swap?
  • Is there any limit on the number of rounds, or any per-round cost or time discounting?
  • Can a player accept a negative value, and does that mean the roller pays out of pocket?
  • Are we maximizing expected value (risk-neutral), or should risk aversion factor into the strategy?

What a Strong Answer Covers

  • Recognizing the stationary, symmetric structure: after any rejection the opponent faces the identical game, so the continuation value is the same at every turn and both players share one decision rule.
  • Formulating the mover's expected payoff as a fixed-point equation and deriving a threshold (accept/reject) policy from it.
  • Handling the discrete faces correctly: identifying the integer cutoff, checking the threshold is self-consistent, and computing the exact game value.
  • Sanity checks: indifference reasoning at the boundary, comparison against the naive threshold-at-zero policy, and an argument that the game terminates with probability 1.

Follow-up Questions

  • How do the strategy and the game value change if the roll is continuous, uniform on [−10,10][-10, 10][−10,10] ?
  • Suppose each rejection costs the rolling player a fee c>0c > 0c>0 . How does that shift the thresholds and the value?
  • What happens if every face is positive — say the faces are 111 through 202020 ? What does that reveal about where the accept/reject tension actually comes from?
  • How would you verify your closed-form answer numerically?
Loading comments...

Browse More Questions

More Software Engineering Fundamentals•More Jane Street•More Data Scientist•Jane Street Data Scientist•Jane Street Software Engineering Fundamentals•Data Scientist Software Engineering Fundamentals

Write your answer

Your first approved answer each day earns 20 XP.

Sign in to write your answer.
PracHub

Master your tech interviews with 8,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.