The swap duel from one to twenty
You and an opponent each secretly receive a number drawn uniformly at random from to (independent draws). You see yours. You may keep it or swap it for a fresh uniform draw from to , which you must then keep. The opponent never swaps. Higher number wins; a tie counts as a loss for you.
What is your optimal swap rule, and what is your probability of winning?
Your answer
Solving needs a free account
Answers, streaks and solutions unlock when you are signed in. Reading the question and the hint stays free.
Discussion
Sign in to join the discussion · reading is open to everyone
💡 Discussion rules
- No full solutions here. Hints and approaches only.
- Complexity, edge cases and intuition are the point.
- Interview experiences are welcome. Respect your NDAs.
Loading discussion…
Learn the concepts
The theory behind this question.
Related questions
Keep your card or swap to beat a hidden oneFair value of a die game with one rerollA die game with two rerollsReroll on a twenty-sided dieA reroll that costs a dollar
All questions →