The unexpected hanging
A judge tells a prisoner: "You will be hanged at noon on one of the five weekdays next week, and the day will be a surprise: when the executioner knocks at your door, you will not have known the night before that it would be that day."
The prisoner reasons: "It cannot be Friday, because if I am still alive on Thursday night I will know it must be Friday, so it would not be a surprise. So Friday is out. But then it cannot be Thursday either, because if I am alive on Wednesday night, Friday being out, I will know it must be Thursday. By the same argument Wednesday, Tuesday and Monday are all out. The sentence cannot be carried out."
The executioner knocks on Wednesday. The prisoner is completely surprised.
Where does the prisoner's argument go wrong? There is no universally accepted answer; give the best account you can.
Show a hint
Notice that the prisoner's conclusion, "it cannot happen", is exactly what makes every day a surprise. Ask whether "I will not know the night before" can be treated as a fixed fact that the prisoner is allowed to reason from.
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.