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-
power to rule
I am a ten letters word The first four letters have the power to rule, Next, four-letter can be eaten. ...Read More »Water flowing puzzle
A large volume of water is gushing through a pipe which narrows at the outlet. At which point, A, B, ...Read More »Can you find out the missing number?
Can you find out the missing number? ? 4 5 3 5 9 5 7 10 3Read More »Become Normal!!
Robi is a very serious student. On the first day of this year his seriousness for study was 1 hour. ...Read More »I am a nice word composed of five letters
I am a nice word composed of five letters, but the Romans would call me a numbers. What am I?Read More »Long hand of clock
How many times does the long hand of the clock pass the short hand between midnight one day and midnight ...Read More »Bungled heist riddlB
After a local bungled heist, five suspects were being interviewed by the police. Eventually the police managed to get a ...Read More »Minimum number of persons needed to cross a Desert
In the middle of the confounded desert, there is the lost city of “Ash”. To reach it, you will have ...Read More »i am beautiful
I am pretty beautiful, fluttering in the pale-blue sky. Delicate, fragile on the wing, indeed I am a pretty thing. ...Read More »Decode the name of the month in the picture puzzle
Decode the name of the month in this picture-Read More »Hobbit Riddle
Its something that each of us devours, Not just us but birds, beats, trees, and flowers, Frets iron and nibbles ...Read More »How did the murderer kill the wife?
A wife and her husband were driving in their car on the highway. All of a sudden, they ran out ...Read More »Maximum runs that can be scored by a batsman in one day cricket
How many maximum runs can a batsman score in a normal one day match? Consider the fact that the conditions ...Read More »Find the sub-array with the largest sum. [ALGORITHM PUZZLE Technical]
You are given an array with integers (both positive and negative) in any random order. Find the sub-array with the ...Read More »Crack the code puzzle
A numeric lock has a 3 digit key- HINT- A. 6 8 2 – One Number is correct and well ...Read More »Mrs. Holmes and her pen theft investigation puzzle
Mrs. Holmes is a primary school teacher and One of her students took her Pen. Mrs. Holmes has narrowed the ...Read More »Raw and Boiled Egg Riddle
How can you tell a raw egg from a hard-boiled egg?Read More »What is the smallest possible amount of money ?
A grocer in a small business had managed to put aside (apart from his legitimate profits) little sum in dollar bills, ...Read More »Never resting, never still
Never resting, never still, Moving silently from hill to hill. It does not walk, run or trot, All is cool ...Read More »50 red marbles and 50 blue marbles Puzzle
You have two jars, 50 red marbles and 50 blue marbles. A jar will be picked at random, and then ...Read More »