You're looking at Less Wrong's discussion board. This includes all posts, including those that haven't been promoted to the front page yet. For more information, see About Less Wrong.

Resolving the unexpected hanging paradox

5 Post author: AlexMennen 25 January 2011 07:32PM

The unexpected hanging paradox: The warden tells a prisoner on death row that he will be executed on some day in the following week (last possible day is Friday) at noon, and that he will be surprised when he gets hanged. The prisoner realizes that he will not be hanged on Friday, because that being the last possible day, he would see it coming. It follows that Thursday is effectively the last day that he can be hanged, but by the same reasoning, he would then be unsurprised to be hanged on Thursday, and Wednesday is the last day he can be hanged. He follows this reasoning all the way back and realizes that he cannot be hanged any day that week at noon without him knowing it in advance. The hangman comes for him on Wednesday, and he is surprised.

Supposedly, even though the warden's statement to the prisoner was paradoxical, it ended up being true anyway. However, if the prisoner is no better at making inferences than he is in the problem, the warden's statement is true and not paradoxical; the prisoner was executed at noon within the week, and was surprised. This just shows that you can mess with the minds of people who can't make inferences properly. Nothing new there.

If the prisoner can evaluate the warden's statement properly, then the prisoner follows the same logic, realizes that he will not be hanged at noon within the week, remembers that the warden told him that he would be, and concludes that the warden's statements must be unreliable, and does not use them to predict actual events with confidence. If the hangman comes for him at noon any day that week, he will be unsurprised, even though he is not confident that he will be executed that week at all either. The warden's statement is then false and unparadoxical. This is similar to the one-day analogue, where the warden says "You will be executed tomorrow at noon, and will be surprised" and the prisoner says "wtf?".

Now let's assume that the prisoner can make these inferences, the warden always tells the truth, and the prisoner knows this. Well then, yes, that's a paradox. But assigning 100% probability to each of two propositions that contradict each other completely destroys any probability distribution, making the prisoner still unable to make predictions, and thus still not letting the warden’s statement be both paradoxical and correct.

If someone actually tried the unexpected hanging paradox, the closest simple model of what would actually be going on is probably that the warden chose a probability distribution so that, if the prisoner knew what the distribution was, the prisoner’s average expected assessment of the probability that he is about to get executed on the day that he does is minimized. This is a solvable and unparadoxical problem.

Comments (36)

Comment author: nerzhin 25 January 2011 08:28:19PM 8 points [-]

There is an enormous (far too enormous for its value to the world, in my opinion) literature on the unexpected hanging paradox (also known as the surprise exam paradox) in the philosophy and mathematics literature. The best treatments are:

Timothy Y. Chow, The surprise examination or unexpected hanging paradox, American Mathematical Monthly 105 (1998) pp. 41-51. (ungated)

Elliot Sober, To give a surprise exam, use game theory, Synthese 115 (1998) pp. 355-373. (ungated)

Comment author: SilasBarta 26 January 2011 04:35:22PM *  2 points [-]

far too enormous for its value to the world, in my opinion

The paradox actually has practical implications. It shows a general mechanism by which you can "surprise" someone despite a predictable outcome. It goes like this:

1) You tell someone they will be "surprised" by an upcoming event (e.g., what gift you will buy them).
2) They start to suspect it will be one of a number of unusual outcomes.
3) The event actually has its regular, boring, predictable outcome.
4) But the other person is still surprised, since they did not expect the boring outcome (when before your statement, they did)!

I know of a major case where this reasoning was applied: on one season of the TV show The Apprentice. (The show where people try to get a job with Donald Trump and one person is eliminated from consideration ["fired"] each week.) During the second episode/competition, one contestant walked out due to frustration, and she didn't come back until evaluation time.

Then, in ads for the next episode, they said, "Next time, on The Apprentice, one candidate will quit the competition -- and you'll never guess who it is!"

This, of course, prompted speculation that someone other than the last episode's quitter would be the one to quit ... but no, it was the same woman who left, this time permanently, rather than being fired. Well, it was certainly a suprise by that point!

Comment author: cousin_it 26 January 2011 01:27:15AM 2 points [-]

Yeah, came here to say the same. Thanks.

When I tried to solve this problem about 10 years ago, I came up with the equivalent of Fitch's "Goedelized" solution, described on pages 5-6 of Chow's article. I'm still not sure why many people consider it wrong; it seems to utterly dissolve the "paradox" for me.

Comment author: Anatoly_Vorobey 25 January 2011 07:59:40PM *  2 points [-]

concludes that the warden's statements must be unreliable, and does not use them to predict actual events with confidence. If the hangman comes for him at noon any day that week, he will be unsurprised, even though he is not confident that he will be executed that week at all either.

"Surprised" in this paradox merely stands for "you will not be able to predict the hangman's appearance on any given day before the hangman appears". So if the prisoner chooses not to believe the warden's statement, that still leaves him surprised when the hangman comes.

Comment author: AlexMennen 25 January 2011 09:45:42PM *  0 points [-]

True. I was thinking of "surprised" as "assigned a small probability to" rather than "did not assign 100% probability to". If we use the latter interpretation, then there is more interesting contradiction. So much for my resolution.

Comment author: SilasBarta 26 January 2011 04:25:39PM *  1 point [-]

Information theory has useful concepts for this situation (as usual). It uses the term "surprisal" as a way to quantify how surprising an outcome is. It is equal to the log of the inverse of the probability ( log (1/p) ) you had assigned to an event before you learn that it happened. [1]

What surprisal value should the judge's statement be interpreted as meaning? One first approach would be to say that the judge means the prisoner will find the result more surprising than if he had simply assumed an equal probability to the seven days. Thus, the judge is saying that "the surprisal, or information gain, from learning your execution date will be greater than log(7)."

So, uh, how on earth are you supposed to move your probability distribution over execution days upon being given that kind of evidence? If you (wisely) start from a uniform probability distribution, you already have, in expectation, the maximum surprisal value. (Entropy is equal to the "expected" [i.e., probability-weighted] surprisal, and a uniform distribution is maximum entropy.)

No change in probability distribution can increase the expected surprisal -- unless, of course, you deliberately skew your PD so that it decreases the weight on when you "really" expect to be executed. But then that brings up the messy issue of what you really believe vs. what you believe you believe.

[1]Consequently, it is equal to how much information you get upon observing the event -- observing improbable events tells you more than observing probable ones. Intuitively, do you learn more from when a suspect says they're guilty, or when they claim innocence?

Comment author: Skatche 29 January 2011 07:16:11PM 3 points [-]

You know, I just don't understand why the prisoner is so surprised when he's executed on Wednesday - I mean, the executioner comes on Wednesday every single time I read about this thing, and it's just not that surprising anymore.

Comment author: Dufaer 26 January 2011 01:48:29AM 1 point [-]

OK, let’s look at this: The prisoner receives 2 pieces of information from the warden at the beginning:

  • The first piece of information is: He will be killed at noon of one day of the next five days.

Assuming that the warden's claim is true, there are 5 possible outcomes:

Death at noon of Mon, Tue, Wed, Thu or Fri.

Assuming furthermore that the prisoner has no other information that and that he uses probability theory, he will construct the following uniform probability distribution:

P(Death at noon of X.)=1/5 where X can be Mon, Tue, Wed, Thu or Fri.

Furthermore he can now also infer the conditional probabilities

P(Death at noon of X.|Not dead after noon of Mon.)=1/4 for X = Tue, Wed, Thu or Fri.

P(Death at noon of X.|Not dead after noon of Tue.)=1/3 for X = Wed, Thu or Fri.

P(Death at noon of X.|Not dead after noon of Wed.)=1/2 for X = Thu or Fri.

And finally:

P(Death at noon of Fri.|Not dead after noon of Thu.)=1

Thus the prisoner will now be not 'surprised' only by a death at noon of Friday. As in: The occurring event had P>1/2.

Is this the proper notion of 'surprise'?

I don't think so. - Surprise should be always measured quantitatively.

But observe that in the 'death at noon of Friday' scenario there is no surprise whatsoever. It is qualitatively absent under the condition that the warden speaks the truth:

P(Death at noon of Fri.|Not dead after noon of Thu., The warden speaks truth.)=1 P(Death at noon of Fri.|Death at noon of Fri.)=1 (duh) There is no updating.

The second piece of information from the warden is:

  • The prisoner will be surprised by his death.

What does this mean, anyway? Can we actually alter our probability distribution based on this datum?

I highly doubt that, but the prisoner in the canonical treatment certainly does update: As it holds that:

P(Death at noon of Fri.|Not dead after noon of Thu.)=1

He concludes:

P(Not dead after noon of Thu. AND The prisoner will be surprised by his death.)=0

And:

P(Death at noon of Fri.|Not dead after noon of Thu., The prisoner will be surprised by his death. )=0

As a special case of 'P(Anything.|Contradiction.)=0'

He then runs a few iterations and concludes that all outcomes have the P=0 under all conditions.

Here the background assumption is still that the warden's words are true. This assumption however is contradictory if the updating procedure of the prisoner is correct. But we can easily see that the new belief structure of the prisoner will be surprised by any of the outcomes; rendering the warden correct. Thus the paradox.

The solution is simply that the prisoner's updating procedure is incorrect.

The datum 'The prisoner will be surprised by his death.' does not warrant the update. The warden's statements are contradictory if the original belief structure is retained and if the only remaining outcome is death at noon of Friday. However, after the first change of the belief structure by the prisoner this no longer holds. The further 'iterations' make even less sense and the whole 'update' is unstable, as our simple reflection shows - now the prisoner will be surprised by any outcome.

So obviously, this is not Bayesian updating.

The prisoner tried to reason. Concluded that he couldn't be killed without proving the warden wrong. Changed his probability distribution over outcomes to reflect this. Thus changing the prerequisites for his initial conclusion. He did not examine the implications of the changed prerequisites. Ensuring that the warden could always be right.

He thus updated wrongly - his believes do not reflect reality.

Observe that the outcome 'The warden was correct.' and it's negation 'The warden was incorrect.' regarding the proposition 'The prisoner will be surprised by his death.', given 'He will be killed at noon of one day of the next five days.' depend solely on the belief structure of the prisoner.

Given that a belief structure is normally used by an agent to maximize utility and yet the prisoner is not an agent (he lacks a utility function), the belief structure is inconsequential apart from proving the warden right or wrong. The shaping of the structure is the only choice given to the prisoner and as such it can be hardly called a structure of belief at all.

If there was a non-constant utility function over 'The warden was correct.' and 'The warden was incorrect.', this would be a 'belief-determined problem' which is likely an inconsistent class of problems by itself - an agent trying to maximize such a problem would have to simultaneously represent the problem and 'believe' in things which generally contradicting this representation in order to maximize the payoff, thus making the 'belief' something indistinguishable from a 'mere' decision.

Nevertheless, in the canonical treatment the prisoner ensured by 'incorrect' updating that the warden was always right.

Likewise, we can construct an 'incorrect' belief structure that ensures that the warden will always be incorrect:

P(Death at noon of day #(N).|Not dead after noon of #(N-1).)=1

This structure will be 'surprised' by any survival, as it expects certain death each day.

Of course, this is total BS from the perspective of probability theory, but so is the original updating scheme.

Comment author: Ultima 25 January 2011 07:57:53PM *  0 points [-]

I'm totally confused.

Why would anybody in that situation ever be surprised?

I mean, they would know that somebody will execute them at noon on one of the days (monday, tuesday, wednesday, thursday, or friday). No matter what day it come on, why would they be surprised? If it comes at noon on monday, they would think, "Oh, it's noon on monday, and I'm about to die; nothing surprising here." If it doesn't come at noon on monday, they would think, "Oh, it's noon on monday, and I'm not about to die; nothing surprising here (I guess that it will come on one of the other days)." Or whatever.

(Assuming that the the warden told the truth, and the prisoner assumed that.)

Comment author: Costanza 25 January 2011 08:23:39PM 9 points [-]

This is an old problem, and apparently it's a lot harder than it looks. Wikipedia says 'no consensus on its correct resolution has yet been established.'

My preferred solution, if the question is posed in vague enough language, is for the warden to show up just before noon on Friday to hang the prisoner, while wearing a sequined evening gown and scuba gear in place of his usual uniform. The prisoner didn't see that coming!

Comment author: Ultima 25 January 2011 08:53:09PM 1 point [-]

Perfect!

Comment author: benelliott 25 January 2011 08:32:47PM 0 points [-]

For the purposes of the problem, to be surprised just means that something happened to you which you didn't predict beforehand.

Its not the usual definition (among other things it implies I should be 'surprised' if a coin I flip comes up heads) but presumably whoever first came up with the paradox couldn't think of a better word to express whatever they meant.

Comment author: Ultima 25 January 2011 08:59:03PM *  0 points [-]

For the purposes of the problem, to be surprised just means that something happened to you which you didn't predict beforehand.

Okay, I understand that.

Its not the usual definition (among other things it implies I should be 'surprised' if a coin I flip comes up heads) but presumably whoever first came up with the paradox couldn't think of a better word to express whatever they meant.

But I don't understand that.

I mean, why couldn't I simply predict that it would be heads or tails?

Comment author: benelliott 25 January 2011 09:55:06PM 0 points [-]

Can you accurately predict whether a coin will come up heads or tails? I can't.

Comment author: Ultima 25 January 2011 10:04:03PM 0 points [-]

No, but I can accurately predict that a coin will come heads or tails.

Comment author: benelliott 25 January 2011 10:05:39PM 0 points [-]

Okay, it seems we have hit another problem with words.

For the purposes of this definition to predict something means to have sufficient evidence to assign it a probability very close to 1.

Comment author: Ultima 25 January 2011 10:10:09PM *  0 points [-]

Oh okay.

Comment author: Ultima 25 January 2011 08:49:21PM *  0 points [-]

Then wouldn't the prisoner be surprised no matter what?

But, wait, when exactly are we judging whether he's surprised?

Let's say that it's thursday in the afternoon, and he's sitting around saying to himself, "I'm totally surprised that it's going to come on friday. I was online reading about this exact situation, and I thought that it couldn't come on friday, because it would be the last available day, and I would know that it would be coming." Or are we waiting for that surprise to dissipate, and turn into "well, I guess that I'm going to die tomorrow"?

From what I can see at this point, I think that the "paradox" comes of an equivocation between those two situations (being surprised right after it doesn't happen, and then having that surprise dissipate into expectation). But I could be wrong.

Comment author: benelliott 25 January 2011 09:00:22PM 2 points [-]

The improper use of surprise is distracting you from the main point here, so I suggest you ignore it.

Allow me to rephrase:

The warden tells a prisoner on death row that he will be executed on some day in the following week (last possible day is Friday) at noon, and that on the day he is hanged he will not know he is going to be hanged until he sees the man with the noose at his cell door.

Not as pithy, but that's the price you sometimes pay to avoid ambiguity.

Comment author: Ultima 25 January 2011 09:08:05PM *  0 points [-]

Sounds like a garden variety contradiction.

(If it's past noon on thursday, obviously he would know that it's going to come the next day at noon; the warden simply would have been wrong.)

Or am I still misunderstanding it?

Comment author: prase 25 January 2011 09:40:27PM 0 points [-]

If the warden is wrong, the paradox is no more. The paradox depends on the assumption that the warden tells the truth, and the prisoner knows for certain that the warden tells the truth.

Comment author: Ultima 25 January 2011 09:45:11PM *  0 points [-]

Then here's an analogous "paradox":

  • There were two men standing in front of me. One said that the ground was red, and the other said that it was blue. Neither of them are ever wrong.

So, yeah, that's why I said that it sounds like a garden variety contradiction.

Comment author: prase 25 January 2011 10:17:15PM 0 points [-]

That's not exactly like that, is it? In the hanging paradox the warden was correct in the end. There was no contradiction, at least not one easy to pinpoint.

Comment author: Ultima 25 January 2011 10:18:50PM 0 points [-]

the warden was correct in the end

Where?

Comment author: prase 25 January 2011 10:30:48PM 0 points [-]

The warden had made two statements:

  1. The prisoner will be hanged on one of the five specified occasions.
  2. The prisoner will never know for sure when he is going to be hanged before the hangman comes.

Both statements are true. In your "paradox" at least one man is wrong.

Comment author: AlexMennen 25 January 2011 09:32:30PM 0 points [-]

Benelliott worded it well. Your objections are similar to the ones I was raising.

Comment author: Ultima 25 January 2011 10:02:17PM 0 points [-]

Oh, I see.

At first, I missed the significance of this passage:

The warden's statement is then false and unparadoxical. This is similar to the one-day analogue, where the warden says "You will be executed tomorrow at noon, and will be surprised" and the prisoner says "wtf?".

Comment author: TheOtherDave 25 January 2011 08:04:34PM 0 points [-]

(blink?)

Does the same reasoning not tell you that nobody is ever surprised by their death? I mean, I know I will die on some day, but if I have a fatal heart attack right now I'd certainly be surprised.

Comment author: Ultima 25 January 2011 08:31:16PM *  1 point [-]

Sure, you would be surprised that you were about to die now.

But would you also be surprised that your life didn't end up being eternal? No, because you know that you will die someday.

But what's the significance of this distinction for this problem? Well, I don't understand how the prisoner could think anything other than, "I guess that I'm going to end up dead one of these days around noon (monday, tuesday, wednesday, thursday, or friday)." It's not like he has any reason to think that it would be more likely to happen one of the days rather than another. But, in your example, you do have a reason for that (dying now would be less likely than dying later).

But, wait, isn't that the whole issue in contention (whether he has any reason to think that it would be more likely to happen one of the days rather than another)? Yeah, so let me get back to that.

Let's say that the hangman shows up on the first day at noon (monday). Would the prisoner be "surprised" that it was monday rather than one of the other days? Why would he? He wouldn't have any information besides that it would be on one of those days. Or let's say that the hangman shows up on the second day at noon (tuesday). Would the prisoner be "surprised" that it was tuesday instead of one of the other days? I mean, why would he? He wouldn't have any knowledge except that it would be on one of the next 3 days.

I'm completely confused by this "paradox".

Maybe you could help me out?

Comment author: MinibearRex 04 February 2011 09:42:19PM 0 points [-]

The main issue is how intelligent the prisoner is. As it is, the prisoner used some clever logic to prove that he will not be executed that week, failing to consider the possibility that the judge will predict that. If he thought about it a bit more, he might realize that in fact the judge might well be anticipating that, and therefore, expect the hangman to come on any given day.

Then, if he kept thinking, it might occur to him that it is possible that the judge predicted that too, and so might not send the hangman. However, the judge is capable of making mistakes. He is human. So, the prisoner can come to the conclusion that he may well be hanged this week, even though it won't be a surprise, or that the hangman will not come, and in fact the judge has predicted him perfectly.

This paradox is only confusing (from the prisoner's standpoint) if you consider the judge to be infallible. He's not. If the judge were Omega, on the other hand, we might run into some problems.