In a harsh totalitarian country an innocent person is arrested on Sunday evening and summarily condemned to execution, which they are told will take place on one of the following five mornings. To make matters worse, they are told that they will not know the day before which morning it will be. After several hours torment the prisoner fails into a peaceful sleep as they realize that such a threat cannot be carried out. They reasoned thus: The execution cannot take place on Friday morning; for if they are still alive on Thursday night then the execution must take place on Friday. But they were told that they would not know the day before which day it would be. So it cannot be Friday, and so Friday can be counted out as a possibility. But by the same reasoning it cannot be Thursday either. For if they are still alive on Wednesday night then the execution must take place on Thursday. But they were told that they would not know the day before which day it would be. So it cannot be Thursday, and so Thursday can be counted out as a possibility. But by the same reasoning it cannot be Wednesday either... The same reasoning covers Wednesday, Tuesday and Monday and so the prisoner can have a sound nights sleep.
The prisoner is, however, greatly surprised to find themselves facing the executioner on Wednesday (or indeed any other) morning.
What went wrong with the prisoner’s reasoning?
I tried but I am not able to figure out how his reasoning is flawed.