Previously I tried to make a very difficult hat color deduction puzzle: Unseen prisoners figuring out their hats
It seems to be too hard for the interested, since I did not get a complete solution.
The central part of the logic was that the statement "Ernest does not know the color of his hat" told Ernest the color of his hat.
Below the simplest of such a problem I can think of:
The (same) premise: A number of people stands on a line playing a hat guessing game
- they may not move during the game, they can only look straight ahead (in one direction along the line, depending on their facings)
- they all wear a yellow, a red or a green hat.
- they see all people in front of them
- they do not know their own hat
- they do not know anything about the configuration behind them, except which people are there, and what is deduced from the content of the statements
- all statements are provably true for the person uttering them
Anna says: Everyone in front of Dennis wears a green hat
Bob says: Everyone behind Dennis wears a red hat
then Dennis says: Ernest does not know the color of his hat
then Ernest says: I know the color of my hat
What is the color of Ernest's hat?