A professor tells his class that he will give them a surprise examination sometime next week.
For our purposes, an examination is considered a "surprise" if on that day, the class is not 100% sure that they will get an examination. (If they only suspect it, the examination can still be a surprise.)
Having given the class this warning, is it still possible for the professor to give them a surprise examination next week? (Assume that he will not give them an exam if it will not be a surprise.)
The students would reason as follows. If the exam is not held during the first four days, then taking the said examination on Friday would be a certainty. So taking the examination on Friday would not constitute a surprise examination.
Accordingly, the exam can only be taken during the first four days, and so, taking the exam on a Thursday would, in that case, be a certainty- violating the "element of surprise" condition.
In a similar vein, taking the exam on a ny of the first three days,
that is, Monday, Tuesday and Wednesday would similarly violate the condition of uncertainty, and accordingly, taking the examination on any of the first five days will never correspond to a surprise examination.
Now that it has been deduced by the students that their professor cannot take a surprise examination in any of the five days; the professor can take the examination in any of the five days, which from the viewpoint of the students will constitute a surprise examination.