Three prisoners, three boxes, two looks each
Three prisoners are numbered 1, 2 and 3. Three boxes, also numbered 1, 2 and 3, each contain one slip bearing a prisoner's number, arranged in a random order. Each prisoner in turn enters alone, may open two of the three boxes, and must leave everything as found. All three go free only if every prisoner finds their own number.
The strategy: each prisoner first opens the box bearing their own number, then opens the box bearing whatever number they found inside.
- What is the probability that all three succeed with this strategy?
- What is the probability if each prisoner instead opens two boxes at random?
Show a hint
Write down the six possible arrangements of the slips. For each one, follow the chain for each prisoner and see whether it reaches their number within two boxes.
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
💡 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.