In a room, there are three people, each wearing a hat. The hats are either red or blue, and each person can see the colors of the other two people's hats but not their own. They are told that at least one of them is wearing a different color hat. They must guess the color of their own hat, but if they guess incorrectly, they will face dire consequences. They cannot communicate each other. How can they ensure that at least one person guesses their hat color correctly?
Solution:
The first person looks at the other two people's hats. If they see two hats of the same color (both red or both blue), they know their own hat must be of the opposite color. In this case, they guess the opposite color of the two they see.
If the first person observes two hats of different colors, they remain silent.
The second person, upon hearing the silence from the first person, reasons that if they see two hats of different colors, their own hat must be the same color as the one the first person didn't mention.
If the second person doesn't hear any guesses after some time, they conclude that their own hat must be the same color as the other person's hat.
By following this strategy, at least one person will guess their hat color correctly, ensuring their safety.