Students with Hats

Professor Vivek decided to test three of his students, Frank, Gary and Henry. The teacher took three hats, wrote on each hat a positive integer, and put the hats on the heads of the students. Each student could see the numbers written on the hats of the other two students but not the number written on his own hat.

The teacher said that one of the numbers is sum of the other two and started asking the students:

— Frank, do you know the number on your hat?
— No, I don’t.
— Gary, do you know the number on your hat?
— No, I don’t.
— Henry, do you know the number on your hat?
— Yes, my number is 5.

What were the numbers which the teacher wrote on the hats?

The numbers are 2, 3, and 5. First, we check that these numbers work.

Indeed, Frank would not be able to figure out whether his number is 2 or 8. Then, Gary would not be able to figure out whether his number is 3 or 7, since with numbers 2, 7, 5, Frank still would not have been able to figure his number out. Finally, Henry can conclude that his number is 5, because if it was 1, then Gary would have been able to conclude that his number is 3, due to Frank’s inability to figure his number out.

Next, we we check that there are no other solutions. We note that if the numbers are 1, 4, 3, or 3, 2, 1, or 4, 1, 3, neither Frank nor Gary would have been able to figure their number out. Therefore, if the numbers were 1, 4, 5, or 3, 2, 5, or 4, 1, 5, Henry would not have been able to figure his number out. Thus, 5 is not the largest number.

Similarly, if the numbers are X, X + 5, X + 10, or X + 5, X, X + 10, once again, neither Frank nor Gary would have been able to figure their number out. Therefore, if the numbers were X, X + 5, 5, or X + 5, X, 5, Henry would not have been able to figure his number out.

Discuss this puzzle in the forum.

We do not know where this puzzle originated from. If you have any information, please let us know via email.

Subscribe
Notify of
guest
2 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View All Comments