Keep your card or swap to beat a hidden one
You and an opponent each secretly receive a number drawn uniformly at random from to (the two draws are independent). You get to look at yours. You may keep it, or swap it for one fresh uniform draw from to (and you must keep the new one). The opponent never changes their number. Whoever ends with the higher number wins; ties count as a loss for you.
What is your optimal swap rule, and what is your resulting 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
The swap duel from one to twentyFair 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 →