How many prisoners find their number on average?
A hundred prisoners, a hundred boxes with their numbers inside in random order, each prisoner may open fifty boxes. With the famous follow-the-chain strategy, the probability that all hundred succeed is about 31 per cent, compared with essentially zero for random guessing.
Does the strategy also increase the average number of prisoners who find their own number? What is that average under random guessing, and under the chain strategy?
Show a hint
Think about one particular prisoner. Under the chain strategy, what is the chance that she personally finds her number? Then use linearity of expectation.
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.