Two prisoners, two boxes, one look each
Two prisoners, Ann and Ben. In a room are two closed boxes, one containing a slip reading "Ann" and the other a slip reading "Ben", placed in a random order. Each prisoner, alone and in turn, may open one box, then must close it and leave everything as it was. They cannot communicate after the first one enters. Both go free only if each finds the slip with their own name.
- If each opens a box at random, what is the chance both succeed?
- What is the best strategy, and what chance does it give?
Show a hint
The two boxes are either "in order" or "swapped". Can the prisoners arrange that they both succeed in one of those two cases?
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
Three prisoners, three boxes, two looks eachThe warden knows the chain strategyOne helper who may swap two slipsHow many prisoners find their number on average?100 prisoners and 100 boxes
All questions →