Problem of the Day
A new programming or logic puzzle every Mon-Fri

Four Hats

A classic logic puzzle to end out the week.

There are 4 women of reasonable intelligence getting lined up for an execution. The executioner gives them a way out by presenting them with a logic puzzle. The 4 women are split in to rooms, 3 in one room and 1 in the other. The 3 women are lined up and told not to look around. The executioner grabs 2 black hats and 2 white hats.

A hat of either white or black is placed on each ones head. The women at the back of the line can see the color of the two women in front of here. The woman in the middle can only see the color of the hat of the one in front. The other two women (the one in front of the line and the one isolated in her room) can only see a brick wall.

The challenge is for one of the women to guess the color of their hat. If one of them can do it without a signal being given out then all 4 get to go free. If the person is wrong or a signal is given out then all of them will die. Which one gets them out and how?

Enjoy your weekend!

Permalink: http://problemotd.com/problem/four-hats/

Comments:

  • Anonymous - 9 years, 9 months ago

    It depends on how the hats are placed. If two hats of the same color are placed in front of the woman in the back of the line she will declare her color correctly. However if she remains quiet the woman in the middle can safely assume that the color she is wearing is the opposite of the one she is seeing in front of her and will thus declare her color.

    reply permalink

  • Akshay Bist - 9 years, 9 months ago

    The woman at the back of the line, if she sees that the women in front of her both are wearing hats of the same color, can easily guess the color of her hat.

    If she stays silent, then the woman in the middle can assume that the woman at the front and she are wearing hats of different color.

    reply permalink

Content curated by @MaxBurstein