Resolving The Unexpected Hanging Paradox

The Prisoner Testing His Contingency Plan

A judge tells a condemned prisoner that he will be hanged at noon on one weekday in the following week but that the execution will be a surprise to the prisoner. He will not know the day of the hanging until the executioner knocks on his cell door at noon that day.

Having reflected on his sentence, the prisoner draws the conclusion that he will escape from the hanging. His reasoning is in several parts. He begins by concluding that the “surprise hanging” can’t be on Friday, as if he hasn’t been hanged by Thursday, there is only one day left — and so it won’t be a surprise if he’s hanged on Friday. Since the judge’s sentence stipulated that the hanging would be a surprise to him, he concludes it cannot occur on Friday.

He then reasons that the surprise hanging cannot be on Thursday either, because Friday has already been eliminated and if he hasn’t been hanged by Wednesday noon, the hanging must occur on Thursday, making a Thursday hanging not a surprise either. By similar reasoning, he concludes that the hanging can also not occur on Wednesday, Tuesday or Monday. Joyfully he retires to his cell confident that the hanging will not occur at all.

The next week, the executioner knocks on the prisoner’s door at noon on Wednesday — which, despite all the above, was an utter surprise to him. Everything the judge said came true.


In further evaluation of this written story, we do battle with the interpretive flexibility of language, which will change the evaluation. Within a language there are expressions that are highly imprecise, and others that are more precise. Context also matters. When we constrain the boundary of language to words on a page, in reduction or generalization we arrive at the risk of absurdity, as absurdity is most often deduced in inheritance of interfaces that appear useless as defined by human valued discernment of relationships that when operated upon with formal logic or other forms of “knowing” deduce to forms that appear both “true” and “false” notably. We have expanded our sensemaking and logic to allow simultaneous appearance of true and false to be permissible because in the context of separate observers.

There are other examples like saying “my computer is happy” is an absurd statement. Not because it is true and false, but because the interface “happy” we imagine only inheritable by biological life forms. In attempting to recompose the “happy” interface as something that could be inherited by computers, we could attempt to generalize happy, but this then may lose value as a sensemaking expression when applied to humans.

So paradoxes and absurdity in so far as practical concern are relevant in the context that the single point of reference encounters reality that is both true and false. Hard to operate on the desire “cook my vegetables” if despite my efforts at deduction it appears equally apparently that I both have vegetables and don’t have vegetables in my kitchen. I’ll give up and order food, we must avoid this crisis.

Following this pattern, the prisoner is perhaps frustrated it appears he has deduced that the judge is ordering a conditional unpleasant operation on his life he thought he had reprieve in his confidence in his ability to refute his will because the rules of his execution transpiring could not be met.

In our amusing audit of this executed prisoner, we endeavor to be more scrupulous than the fictional observers in this story. Does the prisoner deserve justice? Can he claim the law of surprise was indeed violated on all days of his week and therefore the judge will not be able to play with his food at the very least next time of sentencing?

We first encounter the challenge of clarifying. What pops out is “but”, “know”, “surprise”, and “will”.

When the judge says “will”, we are tasked with intuiting his intention, in so far as contextual with the usage of the “but” conjunction, there is usage of the phrase “will be” here that is absurd (in likeness to “my computer is happy”).

“Will” implies a likelihood or assumed certainty, a desired action and sometimes outcome. From the perspective of traditional formal logic, chained expressions halt on unknown true or false values, we get a null exception at time of evaluation so to speak. What we do is imagine both possibilities, and analyze the bifurcation of these expression chains at that point. Our judge is too loose in his order, so it appears.

Our first step is to substitute but as an “ONLY IF” conjunction. Therefore if we were to say:

A judge tells a condemned prisoner that he’s ordered an executioner to hang him at noon on a weekday in the following week AND the executioner will fulfill this order ONLY IF the day of execution is a surprise to the prisoner.

This seems integrous to the intention of the author proposed dilemma.

What remains now is “know”, which in ascertaining clarity on this, it should follow that recursively we will demystify “surprise”.

Interestingly our prisoner doesn’t at first refute the judge that if he casts his ballot that he will executed everyday, he will never be surprised, he may be wrong but not surprised. We’ll leave that alone because surprise is later clarified in which this approach would not be sufficient.

We run into a situation where the narrative point of view is obscured. It appears we don’t know if the judge is conflating surprise with knowledge, or simply adding another conditional. We don’t know if this is the narrator musing. The formalities of syntax here would coerce the latter interpretation. We could formally interpret the second statement and“will” this time as the narrator’s interpretation of the judge’s order. The narrator deduces surprise in his own language. For sake of not halting the inquiry on a syntactical error, I’ll further the expression in a manner that I believe the narrator intended to express this problem:

A judge tells a condemned prisoner that he’s ordered an executioner to hang him at noon on a weekday in the following week AND the executioner will fulfill this order ONLY IF the day of execution is a surprise to the prisoner. The judge clarifies the prisoner is in fact “surprised” if does not know the day of the hanging until the executioner knocks on his cell door at noon that day


A judge tells a condemned prisoner that he’s ordered an executioner to hang him at noon on a weekday in the following week AND the executioner will fulfill this order ONLY IF the prisoner does not know the day of the hanging by the time executioner knocks on his cell door at noon that day

So the whole “surprise” issue is resolved now. The last thing to resolve is “know” in the above statement.

If the prisoner “knows” the day of hanging prior to the decided execution date, that would clearly violate the only if clause, so next we have to discern how that “knowing” is going to be measured.

We have to observe how the prisoner’s influence on the judge could make things messy. Let’s feign a lack of awareness of the logical deduction proof the prisoner has in his back pocket at this point and run the experiment.

Let’s say all goes according to plan. It’s Thursday afternoon, and the prisoner smiles. Next day comes… the executioner comes to his door and says “today’s the day, but first I have to confirm that you knew this was coming between the hours of 12:01PM yesterday and 11:59AM today”. The prisoner says he did, he knew it was the last day he could be executed, and so knew that it had to be today. The executioner countenance falls and he does back to the judge and says he can’t do it because the clearly failed to control for this situation.

Now let’s analyze another example. Same deal, but it’s Thursday 12:00PM and the prisoner hears the door knock. This time the prisoner responds to the executioner knowledge check with “well, figured you wouldn’t let it wait until Thursday afternoon because then I would know for certain, so I knew it had to be today”.

The executioner this time scratches his head. “I think you mean to say you expected it would be today, you didn’t necessarily know that. Sorry to say bud but we were not as thought out as you think we were. We just picked a random day and I’m carrying out the duty. You got lucky with your prediction, coincidence I’m afraid, boss isn’t going to buy that you knew it was going to happen today because we came at our decision from two entirely different sets of logic. You didn’t know how we were making this decision”

Aha, an insight. If we analyze carefully here, we realize that knowledge (at least in our humble executioner perspective here) is not necessarily prediction of events, but a subjective degree of true awareness of the deterministic methodologies of all actors in the context. There are more definitions, but this is our executioners.


What we can say is that the prisoner has his case, and the judge has his case. The prisoner only has his way if the judge follows the same rationale as the prisoner, in so far his definition of what knowing is. The judge had no interest in his order being executed flawlessly, he just picked a random date, handed it off to the executioner, and dismissed the prisoner. In disagreeing with the prisoner’s fortunate prediction being a case of knowing, he has no qualms with carrying the execution out.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store