Back to Paradoxes

The Unexpected Hanging Paradox

A prisoner uses flawless logic to prove a "surprise" execution is impossible. Then the executioner arrives and he's completely surprised.

The Judge's Decree

"You shall be hanged at noon on one weekday next week. However, the execution will be a surprise you will not know which day until the executioner arrives at your cell door."

?

"Let me think about this carefully..."

M
Monday
Possible
T
Tuesday
Possible
W
Wednesday
Possible
Th
Thursday
Possible
F
Friday
Possible

The Prisoner's "Perfect" Logic

1

Friday is impossible. If I'm still alive Thursday night, Friday is the only day left. I'd KNOW it's Friday so it wouldn't be a surprise. Therefore, not Friday.

2

Thursday is impossible. Having eliminated Friday, if I'm alive Wednesday night, Thursday is the last possible day. I'd know no surprise. Therefore, not Thursday.

3

Wednesday is impossible. With Thursday and Friday eliminated, Wednesday becomes predictable by Tuesday night. No surprise possible. Therefore, not Wednesday.

4

Tuesday is impossible. Only Tuesday and Monday remain. By Monday night, I'd know it must be Tuesday. No surprise. Therefore, not Tuesday.

5

Monday is impossible. It's the only day left! I'd know right now it must be Monday. That's no surprise at all. Therefore, not Monday!

6

Conclusion: The execution cannot happen on ANY day without violating the "surprise" condition. The judge's decree is self-contradictory! I'm safe!

The Prisoner's Triumph!

Through pure logic, the prisoner has proven the execution cannot happen. He goes to sleep confident in his reasoning...

KNOCK KNOCK KNOCK!

Wednesday noon. The executioner arrives. The prisoner is utterly shocked he truly didn't expect it! The judge's conditions were perfectly satisfied. The prisoner's "perfect" logic failed him.

Be the Judge: Choose the Execution Day

Click on a day to secretly select it for the execution. Then advance through the week to see if the prisoner is surprised.

M Mon
->
T Tue
->
W Wed
->
Th Thu
->
F Fri

Phase 1: Select Execution Day

Click on any day to secretly choose when the execution will happen.

Backward Induction Decision Tree

This tree shows the prisoner's backward reasoning process. Watch how eliminating Friday cascades to eliminate all days.

Starting Point
Current Analysis
Eliminated Day
Prisoner's Conclusion
The Paradox

Step 0: Initial State

The prisoner knows the execution will happen on one of the five weekdays and will be a "surprise."

Where Did the Logic Go Wrong?

Self-Reference Problem

The prisoner's reasoning depends on knowing the judge speaks truth. But if he "knows" the execution will be a surprise, and uses that to prove no day works, he's created a contradiction. You can't simultaneously know a surprise will happen AND reason about it.

Knowledge vs. Belief

The prisoner confuses what he can deduce with what he will know. His backward reasoning assumes he'll maintain certainty about his deductions but his own conclusion ("it can't happen") undermines the premises.

Temporal Paradox

The prisoner reasons from "what I'll know Thursday night" but his conclusion (no execution) prevents him from ever reaching that state of knowledge. The reasoning is valid only in worlds where the conclusion is false!

The Key Insight

Once the prisoner concludes "it can't happen," he stops expecting it. This makes EVERY day a potential surprise again! His logical victory is self-defeating by proving it impossible, he makes it possible.

Origins of the Paradox

The paradox was discovered by Swedish mathematician Lennart Ekbom in 1943-1944, inspired by a real announcement: Swedish radio declared a civil defense drill would occur the following week, but the exact day would be a surprise.

It was popularized by Martin Gardner in his March 1963 Scientific American column, sparking decades of philosophical debate.

The "surprise examination" variant is commonly used in philosophy courses: a professor announces a surprise quiz next week. Students use the same reasoning and are always surprised when the quiz arrives!

Sources

Wikipedia: Unexpected Hanging Paradox | Wolfram MathWorld | Stanford Encyclopedia of Philosophy