Another hats and prisoners puzzle

  • Thread starter micromass
  • Start date
  • #1
22,089
3,296
a674nLq_460s_v3.jpg
 

Answers and Replies

  • #2
402
120
Prisoner 2 will yell out first
2 see's that 3 has a black hat
IF 2 was also wearing a black hat 1 could yell out he has a white hat since he see's both black hats and would know he must have a white hat.
Since 1 doesn't yell. He can assume that 1 see's both a white and black hat in front of him

Hope that's right :) makes sense though
 
  • Like
Likes micromass
  • #3
Samy_A
Science Advisor
Homework Helper
1,241
510
If man 1 sees that men 2 and 3 have hats of the same color, he knows that he has a hat of the other color. So he can shout out the color of his hat.
If after a while man 1 remains silent, man 2 understands that man 1 is seeing hats of different colors on him and on man 3. As man 2 sees the color of man 3's hat, he knows that his hat has the other color, and can shout it.
In the setup of the question, it would thus be man 2 who shouts first.
 
  • Like
Likes micromass
  • #4
Borek
Mentor
28,635
3,110
Are the hats placed as drawn, or is it just an example?
 
  • #5
22,089
3,296
Are the hats placed as drawn, or is it just an example?
As drawn. But you can of course try to find the solution of every permutation of hats!
 
  • #6
117
43
1) If man 1 does not yell, then man 2 knows his hat is opposite of man 3
2) Given the picture, man 2 will yell first
3) This will indicate that man 1 and 3 have the same color hat, prompting man 1 to yell
4) Man 3 will then yell
5) Man 4 is sh*t out of luck because even if he did yell he is still stuck behind that wall
 
  • #7
Borek
Mentor
28,635
3,110
As drawn. But you can of course try to find the solution of every permutation of hats!
I think there are just two solutions.
 
  • #8
489
189
1) If man 1 does not yell, then man 2 knows his hat is opposite of man 3
2) Given the picture, man 2 will yell first
3) This will indicate that man 1 and 3 have the same color hat, prompting man 1 to yell
4) Man 3 will then yell
5) Man 4 is sh*t out of luck because even if he did yell he is still stuck behind that wall
There's a minor mistake in there.
In step 3 you say man 1 should yell, but how would he know if he has the same color as 2 or 3?
In fact the only one that can yell (with certainty) is number 3 knowing he has the opposite color of 2.

Let me introduce some shorthand notation for the setup, the nth letter in the string "BWB | W" indicates the color of person n.

Case 1: "BWB | W" or "WBW | B"
The answer has been given above, number 1 and 4 have to gamble if they want to go free (I think?)

Case 2: "WWB | B" or "BBW | W"
See case 1 :P

Case 3: "WBB | W" or "BWW | B"

- Person 1 can yell out its color immediately since he sees both hats of the color opposite to his in front of him.
- Person 2 and 3 know their hat has the opposite color
- Person 4 knows he has the same color as person 2

That's about it. Although I recall a different puzzle, those that call out their color correctly go free, those that are wrong or silent get sentenced to death.

How many of you clicked to see the 3 cases?
 
  • #9
117
43
There's a minor mistake in there.
In step 3 you say man 1 should yell, but how would he know if he has the same color as 2 or 3?
In fact the only one that can yell (with certainty) is number 3 knowing he has the opposite color of 2.

Let me introduce some shorthand notation for the setup, the nth letter in the string "BWB | W" indicates the color of person n.

Case 1: "BWB | W" or "WBW | B"
The answer has been given above, number 1 and 4 have to gamble if they want to go free (I think?)

Case 2: "WWB | B" or "BBW | W"
See case 1 :P

Case 3: "WBB | W" or "BWW | B"

- Person 1 can yell out its color immediately since he sees both hats of the color opposite to his in front of him.
- Person 2 and 3 know their hat has the opposite color
- Person 4 knows he has the same color as person 2

That's about it. Although I recall a different puzzle, those that call out their color correctly go free, those that are wrong or silent get sentenced to death.

How many of you clicked to see the 3 cases?
I disagree with you.
If man 1 does not yell, man 2 can see man 3's hat. Therefore, man 2 knows that he must have the opposite color of man 3. Man 2 can then shout his color. Since man 2 has left the area, and there are only two colors of hats, by process of elimination man 3 must have the same color hat as man 1. Man 1 can confirm this but man 3 cannot. When man 1 leaves, man 3 knows that man 1 cannot see over the wall, so therefore the only way man 1 could have known his hat color is if the color of man 3's hat matched the color of man 1. Man three therefore knows his color and can leave too. Man 4, I don't think he can do anything.
 
  • #10
402
120
@OrangeDog are you sure?


Guy 2 has left.
So at this point Guy 1 knows the colour of #3 and #2. He has no additional info than he did at the start....
 
  • #11
117
43
Oops. I saw it in my head somehow though. Maybe I was thinking of the picture as I said it lol.
 
  • #12
Choppy
Science Advisor
Education Advisor
Insights Author
4,636
1,778
If prisoner number one sees that two and three have hats of the same colour, he can conclude that his hat is of the opposite colour and will shout first.

If prisoner number one sees that two and three have hats of different colours, the probability of a correct guess on his part is 0.5, so he will not shout.

Hearing no shout (after a long enough period of time), prisoner number two can conclude that his hat is a different colour than that on prisoner number three. So, once he has not heard anything from number one (assuming that he can count on number one to be timely with an accurate answer if one is available), he will be the first to shout out the colour of his hat - opposite to that of prisoner number three.

As drawn, prisoner number two would be the first to shout.
 
  • #13
402
120
Instead of sleeping in this morning like normal people do on a Saturday. My brain woke me up and insisted on thinking of this problem. Realized that my solution (and the ones I checked. All missed something (in the setup as shown)

After 2 yells and is let go
Number 3 can assume since 1 didn't yell he has a different colour hat than 2, and can yell opposite from whatever 2 had.

1 and 4 are up the creek with out a paddle
 
  • #14
489
189
Well the exact rules aren't very clear. It asks who would shout first. But does this mean all go free if they are correct?
Or do they go free upon shouting the colour of their own hat?
 

Related Threads on Another hats and prisoners puzzle

  • Last Post
Replies
2
Views
5K
  • Last Post
Replies
9
Views
4K
  • Last Post
2
Replies
35
Views
3K
Replies
14
Views
968
  • Last Post
Replies
7
Views
2K
  • Last Post
Replies
2
Views
3K
  • Last Post
2
Replies
36
Views
7K
  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
15
Views
4K
  • Last Post
Replies
5
Views
2K
Top