Prisoner and Hats puzzle (variation)

  • Context: Undergrad 
  • Thread starter Thread starter The Outsider
  • Start date Start date
  • Tags Tags
    Puzzle Variation
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 6K views
The Outsider
Messages
2
Reaction score
0
Here is a brain teaser I came across recently.

Ten prisoners are arranged single file in a line. They are sorted so that the shortest prisoner (prisoner #1) is in the front, and the tallest prisoner (prisoner #10) is in the back. The are all looking forward (in the direction of #1). They all close their eyes. Another man (not in line) has ten hats, three white and seven red. This man gives each prisoner a hat. The prisoners then put on their hats. The prisoners then open their eyes. They can only see the hat colors of the prisoners in front of them (i.e. Prisoner #6 can see the hats and colors of 1-5, but not 6-10). They cannot see the color of their own hat. The prisoners are aware that there are three white hats and seven red.

Prisoner #5 says: "I don't know the color of my hat."
Prisoner #4 says: "I don't know the color of my hat."
Prisoner #3 says: "I don't know the color of my hat."
Prisoner #2 says nothing.
Prisoner #1 says: "I know what color hat I have."

What color hat did Prisoner #1 have and how did he figure it out?
 
Last edited:
Mathematics news on Phys.org
The #1´s hat is:
Red

Logic:
#5 didn´t see 3 white hats. #4 didn´t see 2 white hats. #3 didn´t see 1 white hat. #2 should know that there was no white hats with #2 and #1.
 
Red
Logic: #5 didn't see 3 white hats, meaning he saw one of these combinations: RRRR,RRRW,RRWR,RRWW,RWRR, RWRW,RWWR, WRRR, WRRW, WRWR,WWRR.

Of these 11 possibilities, 3 have no pair that #4 would see. In other words, #4 didn't see RWW, RWRW, WWR.

Which means #3 knows the possibilities are: RRRR, WRRR, RRRW, WRRW, RRWR, WRWR, RWRR, or WWRR. Only two of those possibilities have #1 wearing a white hat and both of those possibilities have #3 wearing a red hat. If #3 didn't know his color, then #1 had to be wearing a red hat. Not only is #1 wearing a red hat, but #2 is wearing a red hat, as well.