Prisoner’s Hat Puzzle

Four prisoners are caught and are to be punished. The judge allows them to be freed if they can solve a puzzle. If they do not, they will be hanged. They all agree.

The four prisoners are lined up on some steps (shown below). They are all facing in the same direction. A wall separates the fourth prisoner from the other three.

To summarize:-
Man 1 can see men 2 and 3.
Man 2 can see man 3.
Man 3 can see none of the others.
Man 4 can see none of the others.

The prisoners are wearing hats. They are told that there are two white hats and two black hats. The men initially don’t know what colour hat they are wearing. They are told to shout out the color of the hat that they are wearing as soon as they know for certain what colour it is.

They are not allowed to turn round or move.
They are not allowed to talk to each other.
They are not allowed to take their hats off.
Who is the first person to shout out and why?

You may also like...

15 Responses

  1. Deepali says:

    2 person will shout first

  2. Anonymous says:

    Deepali is right…. person 2 will shout first………

  3. Pilot-Pooja says:

    When 2 and 3 wear same color, 1 will shout first. Order 1-2-3-4

    When 2 and 3 wear different color, 2 will shout first. Order 2-3, still 1 and 4 cant shout

  4. Jayant Kumar says:

    The prisoners know that there are only two hats of each colour. So if 1 observes that 2 and 3 have hats of the same colour, 1 would deduce that his own hat is the opposite colour. However, if 2 and 3 have hats of different colours, then 1 can say nothing. The key is that prisoner 2, after allowing an appropriate interval, and knowing what 1 would do, can deduce that if 1 says nothing the hats on 2 and 3 must be different. Being able to see 3's hat he can deduce his own hat colour.

  5. Akshat says:

    As per the given picture , 2nd person will shout first . He will easily know that had he and third person were wearing the hats , the 1st person would have easily shouted "white" but since , he hasn't done so , the only possibility is that they are wearing diffrerent hats and as 3 is wearing a "black" , his own cap is "white". Now , the 4th person would easily understand that the person shouting knows other two colours , his colour is the same as the one who's shouting.As soon as he shouts the 1st person will know his cap's colourand lastly 3 can shout. So , the order is 2-4-1-3.

  6. Anonymous says:

    i seriously enjoy your own posting type, very attractive,
    don't quit and also keep creating due to the fact it just good worth to follow it,
    looking forward to look over even more of your current content pieces, have a pleasant day!

  7. Anonymous says:

    1 will shout first bcause he sees the order of the other two

  8. sathya says:

    @akshat hey wat u hav said is correct…2nd person will shout first…but i think sequence is not correct…2nd person shouts first but how can he know d wat 1st person is wearing…so d 4th person cannot decide wat color his hat is???

    plzzz do clear my doubt….

  9. saurabh says:

    (1-A,2-B and 3-C)The prisoners know that there are only two hats of each colour. So if C observes that A and B have hats of the same colour, C would deduce that his own hat is the opposite colour. However, if A and B have hats of different colours, then C can say nothing. The key is that prisoner B, after allowing an appropriate interval, and knowing what C would do, can deduce that if C says nothing the hats on A and B must be different. Being able to see A's hat he can deduce his own hat colour. (The fourth prisoner is irrelevant to the puzzle: his only purpose is to wear the fourth hat).
    In common with many puzzles of this type, the solution relies on the assumption that all participants are totally rational and are intelligent enough to make the appropriate deductions.
    After solving this puzzle, some insight into the nature of communication can be gained by pondering whether the meaningful silence of prisoner C violates the "No communication" rule (given that communication is usually defined as the "transfer of information").

  10. Anonymous says:

    Obviously its the second person who shouts first…..C is wearing a black color hat….If he also wears a black color hat then A must shout that his cap is of white color….But he hasnt done like that….The reason is that he is wearing a white color cap and A was confused…So he will shout first…:)Hope this helps

  11. Anonymous says:

    If 1 sees that 2 & 3 are wearing same colour hats then he will shout first followed by all other 3 together who can deduce their colours. However, if 2 & 3 are wearing diff coloured hats then 2 can deduce his colour by the silence of 1 and no-one else can deduce their colours unless they gamble.

  12. Anonymous says:

    there is nothing about order and sequence.
    then why we r talking abt order and sequence.
    clear it??

  13. Sunil Kumar says:

    By deducing the order, the puzzle is taken to newer level on how all of them can deduce the color of their hats in what order.

  14. Anonymous says:

    1 would shout if the color of the hat of 2 and 3 are the same, but since he hasn't, 2 can deduce that their hats are different – and so he will shout. By shouting of 2, 3 can realize his hat is different from 2 just like how 2 did, and so he can shout too. I can't think of anything for 1 and 4.

  15. Sequence of this puzzle is 2-3-1-4.
    1st is confused bcos 2 nd 3 have whit nd black hats so he doesn't shout, so 2 nd thinks as 3rd is black and I should be white so only 1st got confused.So 2nd shouts as white.So now 3rd think that as 2nd had white nd myself had black hat so only 1st was confused, so 3rd shouts as black.Now 1st thinks dat as 3rd is black so only 2nd has considered himself as white.So first shouts as black.Now 4th had left with no option than white so he shouts as white.

Comments