The Paradox of the Surprise Quiz

Consider this scenario. The instructor of one of your classes promises you that there will be a surprise quiz next week. The class in question meets only on Mondays, Wednesdays, and Fridays, and a "surprise" quiz is one which, walking into the classroom, you have no idea whether it will be given on that day. The school week ends on Friday, so there are only three possible dates for the quiz: next Monday, next Wednesday, and next Friday.
  • If you came to class on both Monday and Wednesday, and on both days, there were no quizzes, then you would know, walking into class on Friday, that there must be a quiz, for Friday is the last remaining day in which the instructor could give a quiz as promised that week. Therefore, it would not be a surprise for the instructor to give a quiz on Friday.
  • Because Friday has now been eliminated, Monday and Wednesday are the only possibilities left for the surprise quiz. If you came to class on Monday and were not given a quiz, then Wednesday would become the last remaining day in which the instructor could give a quiz as promised. (Again, you have already eliminated Friday as a possibility.) Therefore, you would know, walking into the room on Wednesday, that there must be a quiz. Therefore, it would not be a surprise for the instructor to give a quiz on Wednesday.
  • Once you have eliminated Friday and Wednesday as possibilities, you are left with only one remaining possibility: Monday. Since there is now only one possibility for the quiz, you would know, walking into the room, that there must be a quiz on that day. Therefore, it would not be a surprise for the instructor to give a quiz on Monday.
    You smile, giggling with glee, and head off to have fun with your friends, empowered with the conclusions of logical deduction that there is no need to study for any "surprise" quiz, for the instructor cannot surprise you on any of the class days next week! Alas – on the morning of Wednesday, the instructor arrives in the room, a fresh stack of papers in her hand. It is a quiz, one which you did not study for, and one which came as a complete surprise to you. The instructor kept her promise to the very end.

    What happened? By pure intuition, it should be possible for a instructor to give a surprise quiz next week, but it seems that logic gave us a chain of reasonable arguments that concludes that it should not be possible to give a surprise quiz: it wouldn't be a surprise if it's on Friday, so it can't be on Friday, but if we knew it couldn't be on Friday, then it also wouldn't be a surprise if it's on Wednesday... This is a famous paradox commonly known as the unexpected hanging paradox, named after a conceptually identical scenario of a death row prisoner being told that his hanging would be next week, and that the hanging would be a surprise (i.e. he would not know for sure, waking up on the day of the hanging, that that day would be the day of the hanging). It's the same concept, except far more morbid.

    There is no academic consensus on how this paradox should be resolved. What complicates the problem is the nature of "surprise". Here, we defined surprise as not being able to know for sure upon walking into the classroom that you will be given a quiz. One potential problem with the argument is that it works backwards: it starts by assuming that there were no quizzes on any of the other days, but can we really make that assumption? If the classes on Monday and Wednesday pass without quizzes, then we would be able to deduce only right after class on Wednesday that there must be a quiz on Friday. The element of surprise seems to come from the initial uncertainty of whether there will be a quiz on Monday or Wednesday, so is it still logically sound to even consider hypothetically that Monday and Wednesday have passed without quizzes? To put it more simply: it was a surprise for you that there wasn't a quiz on Monday and Wednesday!

    I have no clever answers here, and it doesn't seem like anyone does yet.