After asking the question, the last person answered "I don't know", from which the following facts can be drawn:
At least one of the first two people is wearing a red hat. Otherwise, if the first two people wear white hats and there are only two white hats, the last person will know that he is wearing a red hat and will not say that he does not know. The person in the middle of this fact can also know that he answered "I don't know" on this basis, so it must be the person in the red hat in front. Otherwise, if the person in front wears a white hat, because at least one of him and the person in the middle wears a red hat, then the person in the middle must wear a red hat, and the person in the middle will not say that he doesn't know. Therefore, it is the correct conclusion that the person in front wears a red hat.
On the issue of hat color, the three people wearing hats to answer questions should all be smart people, who can make correct logical reasoning and make correct judgments. If a person has mental problems, or guesses and answers casually, then the whole thing cannot be explained correctly.
This problem is a traditional logical reasoning problem. People often use this question to examine intelligence to see if they can reason, whether the whole reasoning process is concise, and the time spent on reasoning. In front of a good question, people's thinking ability can be fully demonstrated.
Hua, a famous mathematician in China, reformed the color problem of the above hat and put forward the following questions:
(2) A teacher showed three clever students five hats prepared in advance: three white hats and two black hats. Then tell them to close their eyes. He puts one hat on each student and hides the other two so that students can tell the color of the hat when they open their eyes. The three men stared at each other, hesitated for a moment, felt embarrassed, and then said in unison that they were wearing white hats. Ask them how they deduced it. Look at the situation of wearing a hat first. There are three situations: two black and one white, two white and one black, and three white.
In the first case, the students wearing white hats can see the color of their hats at a glance, but in fact, all three of them looked at each other with their eyes open and hesitated for a while, and no one immediately said it, indicating that this situation is unrealistic.
In this way, all three people understand that at most only one person wears a black hat. If one of them wears a black hat, the other two will immediately say that they are wearing a white hat without hesitation and embarrassment. All three are embarrassed, which means that no one has ever seen anyone wearing a black hat, so all three are wearing white hats. So the three clever students said the color of their hats in unison.
At first glance, this question seems to be inadequate, but on reflection, "I hesitated for a while and felt embarrassed, and then I said it in unison", which is rich in meaning and endless in mystery. Based on this condition, the above reasoning can be carried out, which is in-depth and closely related.
This adaptation introduced by Hua made people deeply understand the inner skill of the master of mathematics and showed superb thinking skills.
If the number increases, you can also ask similar questions:
(3) Four brainy children take part in the teacher's intelligence test to see who can answer the questions fastest and most accurately. The teacher told them to close their eyes and put a hat on everyone, either white or blue. Then let them open their eyes and tell them, "Whoever sees more white hats than blue hats, raise your hand immediately." Then you say the color of your hat. "Everyone looked at each other (everyone can't see their hats, but they can see other people's hats), and no one raised their hands. After a while, no one said the color of the hat. A student named Xiaoguang saw that everyone was silent and guessed the color of the hat on his head. Ask Xiaoguang what kind of hat he is wearing.
Let's reconsider the situation.
If two people wear white hats, the other two will see two white hats and a police tactical unit. They will raise their hands at the same time, but no one actually raises their hands, which means that at most one of the four students wears a white hat.
If only one student wears a white hat, the other three will see a white hat and two police tactical unit, and no one will raise their hands. People in white hats will not raise their hands when they see three police tactical unit. Three people in blue hats will think, "I've seen white hats." If I wear a white hat, two people will raise their hands, but in fact they don't raise their hands, which means I am wearing a police tactical unit. "
But no one raised their hands, indicating that there was no white hat, and all four were from the police tactical unit.