Three people are lined up behind each other, from shortest to tallest. They are shown five hats, three blues, and two red. The people are blindfolded and placed on their heads. The two extra hats were kept and the blindfolds were removed. All of them were asked if they knew what hat they were wearing, starting from the tallest. The tallest and the middleperson both answered that he knows. How did he know and what color is the hat he is wearing?
Slide: 2
The tallest person, seeing the middle person's hat and knowing there are only three blue hats and two red hats, would realize that if the middle person saw two blue hats in front of them, they would immediately know their own hat is red because there are only two red hats. But if the middle person saw one blue and one red hat in front of them, they would not be able to determine their own hat color. Since the middle person didn't know their hat color, the tallest person deduces that they must have seen one blue and one red hat in front of them.
Slide: 3
Therefore, the tallest person is wearing a red hat.
Knowing this, the tallest person, who can see the hats of both the middle and shortest person, must have deduced their own hat color based on the fact that the middle person, who saw one blue and one red hat in front of them, didn't immediately know their own hat color. This means that the tallest person's hat cannot be blue (because if it were, the middle person would know their hat is red). So, the tallest person deduces that his own hat must be red.