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.
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)
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 ... (read more)