The prisoner's logic is flawed.
He did his analysis based on only 5 possibilities (Monday to Friday). And then he concluded that the result is a 6th possibility (No hanging). This contradicts his initial assumptions.
If the prisoner were to repeat his analysis with 6 possibilities, then he will get a different answer.
My explanation is that the prison did not consider the whole possible state space. The whole hanging day space is the deterministic days, which have five choices, plus undetermined days, which has 2^5-5-1 = 19 choices. An example of undetermined days is the combination of Tuesday, Wednesday and Friday, which means that the prison will be hanged in one of the ...