Prisoner’s and hats interview puzzle
Suppose there are 4 prisoners named W, X, Y, and Z. Prisoner W is standing on one side of a wall, and prisoners X Y and Z are standing on the other side of the wall. Prisoners X, Y, and Z are all standing in a straight line facing right – so X can see prisoner Y and Z, and Y can see prisoner Z. This is what their arrangement looks like:
W(cann’t see anything) || X(can see both Y&Z) Y(can see z) Z(cann’t see anything)
Where the “||” represents a wall. The wall has no mirrors. So, prisoner W can see the wall and nothing else.
There are 2 white hats and 2 black hats. Each prisoner has a hat on his head. Each prisoner can not see the color of his own hat, and can not remove the hat from his own head. But the prisoners do know that there are 2 white hats and 2 black hats amongst themselves.
The prison guard says that if one of the prisoners can correctly guess the color of his hat then the prisoners will be set free and released.
Question :Figure out which prisoner would know the color of his own hat?
Note that the prisoners are not allowed to signal to each other, nor speak to each other to give each other hints. But, they can all hear each other if one of them tries to answer the question. Also, you can assume that every prisoner thinks logically and knows that the other prisoners think logically as well.
Clearly prisoners W and Z can not immediately know anything since neither of those prisoners can see any of the other prisoners. So, let’s instead focus on prisoners X and Y.Suppose we have the following scenario with the arrangement of different hat colors:
W(B) || X(B) Y(W) Z(W)
In the scenario above, prisoner X will clearly see that Y and Z both have white hats, and logically deduce that he must have a black hat since there are 2 white hats and 2 black hats all together – and he would be correct. Very simple! And this simple logic would also apply to this scenario as well:
W(W) || X(W) Y(B) Z(B)
But let’s consider another example:
W(B) || X (W) Y(B) Z(W)
In this case Z cann’t say what colour hat he is wearing .Y also knows that if the colour’s of Y and Z hats were same he would have shouted immediately.So he will guess that he and Z are wearing opposite color hats..So Y will wait till the time is about to over and then he will shout the opposite colour which Z is wearing.
Your Answer
More puzzles to try-
Crossing the Fire Pit
A man wants to cross the pit of fire which is 25 feet in length and he has 2 planks(fire ...Read More »Mathematics Puzzle
Can you make the number 24 by utilizing the numbers 1, 3, 4 and 6? You must use one number ...Read More »With a neck but no head
Who is with a neck and no head, two arms and no hands?Read More »LuisSuarez\’s Puzzle
What is LuisSuarez\’s (Soccer Player) favourite tea?Read More »Horse Race Puzzle
There are 25 horses among which you need to find out the fastest 3 horses. You can conduct race among ...Read More »Spy in Canada
A spy was in Canada trying to steal insider information on how to set up new Maple Syrup factories in ...Read More »APPLY MATHS AND LOGIC
A frog is at the bottom of a 30 meter well. Each day he summons enough energy for one 3 ...Read More »Card Probability
What’s the probability of getting a king or a queen from a pack of 52 cards?Read More »Five Hand Creature
I am a normal creature, but I have five hands. I can even have more but even then I will ...Read More »Train and Bird riddle
One train leaves Los Vegas at 15 mph heading for New York. Another train leaves from New York at 20 ...Read More »Tricky Logical Number
Analyze and find the missing item in the sequence: 16, 06, 68, 88, __, 98Read More »Triplets but differ
Tally, Lisa, and Bernad are triplets. But Tally and Lisa share something that Berand does not. What is it?Read More »Grasshopper falls in pond and multiplies to 15 in an hour, how many will be in 3 hours?
Grasshopper falls in pond and multiplies to 15 in an hour, how many will be in pond after 3 hours?Read More »ITITNCENTCENT Unique Puzzle
For this puzzle, you might have to find logic in something illogical. But hey, it’s fun and a healthy little ...Read More »To which one will the needle touch 1 OR 2
In the gear arrangement, To which one will the needle touch, 1 OR 2Read More »A person was born in 1940 having his 18th birthday
A person was born in 1940. Today is his 18th birthday. How is that possible?Read More »What part of the chicken has the most feathers?
What part of the chicken has the most feathers?Read More »Who are the killers?
A very famous chemist was found murdered in his kitchen today. The police have narrowed it down to six suspects. ...Read More »Make the Word TEN
As you can see that fifteen matches have been used to form an arrangement. What you have to do is ...Read More »Funny Good Puzzle
What does the rebus below mean? TEN BADTIONRead More »