A criminal is imprisoned on Monday, and told "you will have been hanged by the weekend, but you won't know which day we'll hang you."
If it gets to Thursday midnight and he's not been hanged yet, he knows they will hang him on Friday.
So they can't hang him on Friday, because they've told him he won't know when he'll be hanged.
That means he must be hanged before Friday, but if it gets to Wednesday midnight and he's not been hanged yet he knows he will be hanged on Thursday, but they can't do that because now he knows when he will be hanged. Etc.
I don't understand where the flaw in either the criminal's logical reasoning or in the guard's statement is, because I feel like the guards will turn up on any day and surprise the prisoner because he didn't "know" they'd be coming (he'd have ruled it off as impossible given what they told him at the start of the week).
Please can someone explain what's going on here.