Sunday, 13 December 2015

logical deduction - Guessing hat colors. 4 prisoners


This is a variant about guessing hat colors. You may want to try Hats and alien or Guessing hat colors or Four prisoners wearing black and white hats.


Statement


4 prisoners are to be executed. The warden proposed a new challenge: he will distribute four hats amongst them, chosen from two colors at most. One hat will be distributed to each prisoner and they won't be able to see their own (but they will see each other's hats).


They will have to state the color of their own hat, all at the same time. They will be released if all their answers are True or if all their answers are False.


Question


As they have one night to prepare their strategy, is there a way they can be released for sure?


EDIT: Prisoners are not aware of the colors, they can't communicate with each other after the hats are distributed. And there is no predetermined number of hats of each color (could be 0-4, 1-3 or 2-2). They also have to announce one of the one or two colors chosen by the warden, otherwise they will be executed.



Answer




This is a bit of a stretch and I'm not sure it'd even work, but...



Each prisoner should shout the one you see the least colors of.
If all colors the same, you shout the same color you see.

For convenience, I'll use black and white to represent the two possible different colors.
If the distribution is 2 whites and 2 blacks the prisoner sees 2 of one color and 1 of the other. The prisoner will always be right by this approach.
If the distribution is 3 whites and 1 black, the white ones will have all been wrong. If you're the 1 black in that scenario, you'll be wrong too.
Last but not least, if all are the same color, all will be right.



No comments:

Post a Comment

Understanding Stagnation point in pitot fluid

What is stagnation point in fluid mechanics. At the open end of the pitot tube the velocity of the fluid becomes zero.But that should result...