Hats Off
Hats Off
Comments by Professor Miller and Rebecca Silva
Problem stated below:
“Three mathematicians are applying for a job. There are five hats, three white, two black. They’re lined up, and a hat is placed on each. The first person in line cannot see any hat; the second in line sees only the hat of the person in front of him; the third person sees only the hats of the two people in front of her. The first person to correctly figure out what color hat he has gets the job; you guess wrong and you are killed. Assume these are INTELLIGENT mathematicians, and that they will do the logically correct thing at each stage – if something can be deduced, they will figure it out. After a long pause, the first person, who cannot see any hats, says he knows the color of his hat. What is the color and how does he know?”
First hint:
The first thing we must do after reading a problem is pull out the facts and clues. It’s important to note that there are three mathematicians and five hats. Specifically, there are two black hats and three white hats. The three mathematicians are in a line and they can only see the hats in front of them. Thus one person sees no hats, another sees just one and the third sees two. We’re also told that through deductions, the first person in line will eventually know the color of his hat while the second and third persons will not. Think about various configurations of hats – are some easier to analyze than others?
Second hint:
A good first step is to write out all of the possible scenarios using the fact that there is a total of two black hats and three white hats.
For example, if the first person’s hat is white, the second person’s hat could be black or white and the third person’s hat could be black or white. This gives us four possibilities:
- the first and second persons have white hats and third person has a black hat,
- the first and second persons have white hats and third person has a white hat,
- the first and third persons have white hats and the second has a black hat, or
- the first person has a white hat and the second and third have black hats.
We can work in a similar fashion to see what the possible scenarios are when the first person has a black hat. It is important to note that because there are more people than black hats we cannot have the case where all have a black hat; while we can’t know for sure yet, this is probably an important observation in solving the problem. There are seven cases.
Third hint:
Try to work backwards. This is a very powerful idea in mathematics; frequently start from the end and see what must be done to get there! First think about the third person, then the second, and then the first. For example, if the third person sees two black hats, do we know the color of his hat? For more help, look at the picture above and make sure you realize why his hat must be that color.
Fourth Hint:
We will give you an idea about how starting with the third person can help move you forward. The third person can see two hats and therefore they begin with the most information. The two hats could both be black, both be white, or one could be black and one white. If the person sees two white hats, there is one white hat left and two black hats left. So, the third person could have either a white or a black hat. If the person sees one black hat and one white hat, two white hats and one black hat are left. So again, the person could have a white or black hat. If the person sees two black hats, three white hats and zero black hats are left. In this scenario the third person in line would be able to deduce that his hat must be white. Because the third person is not the first to say his color, we can deduce that this third scenario does not happen. It is crucial to understand that the second and first persons in line can deduce this as well.
We were able to eliminate a scenario that would have let the third person win. See if you can eliminate more scenarios using the fact that the second person did not win.
Fifth Hint:
Eliminating the scenario where the first and third persons both have black hats, we still have the following six scenarios.
Next, we move on to the second person. The second person can only see one hat and that hat could either be white or black. We must assume that everything we have deduced from the fact that the third person was not the first to speak, the second mathematician has also deduced. This means that because the third person did not know the color of his hat, he did not see two black hats. Therefore, if the second person saw a black hat on the first person, he would know that his own hat were not black. Take a look above at the possible scenarios. How many scenarios can we eliminate if we know the second person would have won if they saw a black hat?
Solution:
If the second person saw a black hat, he would know his hat were white. This means he would have been the first to speak and would have gotten the job. This does not happen so we know we can eliminate two more possible scenarios.
Since the first person in line is the first to speak and is correct, we know the second person saw a white hat and was not able to deduce anything.
Meanwhile, the first person has noticed that the third person and the second person in line have not spoken, which means they could not deduce anything from what they saw in front of them. This would tell the first person that he did not have a black hat. (If he had had a black hat, the second person would have known he had a white hat, or if the first and second persons had black hats, the third person would have known he had a white hat.)
We now know from looking at the above scenarios that the first person’s hat is white. The only cases left show the first person with a white hat.
Thoughts:
The first key to this problem was noticing that the only way to deduce information was by looking at the hats in front of the third and second persons. The second key to this problem was knowing to work backwards. In order to find out how the first person knew the color of his hat, we needed to start by thinking logically about what happened with the third person and second person tried to figure out the color of their hats. This problem is tricky because even though we knew the third person and second person did not speak first, in order to find the answer we had to figure out what scenarios would have needed to occur in order for the third person or the second person to win. After finding what would have needed to happen in both those scenarios, we could eliminate those situations and were left with only one possible scenario for the first person. This problem is also tricky because you must assume the mathematicians know everything you are thinking about. For example, we must assume that the first person knows why the third and second persons did not speak.


