A Solution to the Paradox of the Surprise Exam
The paradox of the surprise exam is stated as follows. You have to put a surprise exam in a book. You can't put it on the last page because when readers turn to the second last page, they'll know beforehand that the surprise exam is on the last page. The exam is thus not on the last page. If it is on the second last page, when readers turn to the third last page, they'll know beforehand the exam is on the second last page because it can't be on the last. So it's not on the second last page either. Repeat the same reasoning until you run out of pages and conclude that the surprise exam can't be on any page. But everyone knows that there are surprise exams, so what went wrong ?
First, there is a contradiction between the two premises in the surprise exam paradox. The explicit premise is that there exists a surprise exam in the book. The implicit premise is that the reader knows of its existence. Taking an extreme case shows that these premises contradict. You can never be given a page and honestly told "There is a surprise exam on one side of the page". It is either a bad attempt at surprise, or a lie. In a case with two pages, it is no different. As a digression, it is funny that most readers forget that books have pages printed on both sides. The paradox faces an interesting complication in this case where you can't exactly tell which page the exam will be on. I'll assume that the pages in the book are printed only on the front.
There is a clear contradiction in the case with one page. Either such an exam can't exist, or it is not preannounced to the person [1]. Probably the latter - since we know that surprise exams exist. Surprise exam paradox deals with exams which are guaranteed to both happen and be a surprise. That can be impossible though, as the simple case of one page shows. In the case with multiple pages, the elaborate argument may distract from this error, but it still remains and is the cause of paradox. Preannounced surprise exams just can't exist.
When they do exist, and the reader still gets surprised, the roots of surprise are different - and more concern how paradoxes can lead to anything (reductio ad absurdum), as well as the meaning of the word surprise, where illogical things can also be rather surprising. The paradoxical conclusion states that there both exists and doesn't exist a surprise exam in this book. Now, is there a surprise exam in this book ? In the formal system, once we run into the contradiction we reject one of the premises, for otherwise we can conclude anything. In reality, the definition of surprise where illogical things can be surprising comes into play. Once we have reasoned there can't be a surprise exam on any of the pages, if the teacher puts it on one of the pages - could be any page - it is extremely surprising. This surprise exam is surprising on the virtue of showing up in the book at all, and not in the basic way that we were talking about the surprise exam in the paragraph above. This exam surprises, because it is illogical, not because it is logical and unforeseen - like the way we assumed when we started.
If you have pointed out a flaw in my reasoning, or want to share something, please email me. You can find my email in the footer.
[1] https://math.stackexchange.com/questions/97331/surprise-exam-paradox