Four Agents in Hats

Four arrow-headed agents are positioned to stand in a single line, all facing the same direction, but then the agent at the back of the line is then told to turn and face the other direction, taking the form illustrated below...

Puzzle0002.png

Next, 2 white hats, and 2 black hats are placed onto the heads of these agents, the order is completely stochastic.

Each agent cannot see anything behind them, nor can they see the the colour of their own hat. They can however see the colour of the hats of all agents that are standing in front of them (if any).

They are then informed that two of these hats are black, while the other two are white.

Their goal is to determine what colour hats they are wearing, and the only action that they are allowed to perform, is to state the colour of their own hat, once. They need to be absolutely certain of their decision as they are only granted one chance to speak. Each time any agent speaks, all other agents can hear what has been said, and if the voice is from in-front, or behind.

No other form of communication is allowed.

Given these circumstances, is is possible for the agents to correctly and logically deduct what the colour of their hats are regardless of how the hats are placed on their heads?

  • Posted: 2008-06-24 20:51 (Updated: 2008-06-25 17:00)
  • Author: nima
  • Categories: (none)

Comments

1. Gil -- 2008-06-25 08:40

Guy #1 (from left) says nothing (he can't see any hats). Guy #2 says nothing, he can see one black hat. Guy #3 says nothing, he can see one black and one grey. Guy #4 says nothing, he can't see any hats.

Guy#2 having been to uni, realises that if his hat was black, then Guy#3 would *know* his hat was grey.

Guy#2 announces to the world that his hat is grey.

This doesn't help Guy#1 or Guy#3 except that the lack of any claim from Guy#3 tells Guy#1 that his hat colour is different to Guy#2.

Guy#1 announces that his hat is black.

Next?

2. nima -- 2008-06-25 16:55

I can't see a complete solution existing for this problem either... if form left to right, we use Gil's numbering, 1 and 2 have the same coloured hats, then 3 will speak, and 1 and 2 will immediately know that the only reason 3 could have had to be certain was that they're the same, so the also shout out, 4 figures it out from there.

However, if the colours are as above in the illustration, then 3 would be silent, unable to decided. After some time, 2 would figure out that he and 1 must be opposites, and announces the opposite colour to 1. One also understands this and hence figures out he is opposite to 2... but 3 and 4 have no additional information to work with.