Tuesday, April 16, 2013

The Problem of the Quick Detectives


Problem:

Three quick detectives require a second to think and a second to act. In a single second, they have grabbed their hats and coats and rushed out the door of Police Headquarters to join their chief, who is waiting for them beside his car. In their haste, all three detectives have put their hats on backwards.

"I observe that at least one of you gentlemen has his hat on
  backwards," said the chief. "I'm sure I don't have to tell you who you are."

Each detective looked at the other two, thought to himself, waited for
 a second, and then turned his hat around.

How did the three detectives know their hats were on backwards?


Solution:

This is a logical problem, but the solution requires imagination as well as logical thinking. The method can be seen more easily by first considering a simpler problem, where there are only two quick detectives, rather than three.

For Two Detectives: Name the detectives A and B, and consider what A does and thinks.

In the first second, A sees that B has his hat on backwards.

In the next second, A considers what B would think and do if A's hat were on forwards. Since at least one hat is on backwards, B would realize that his own hat must be on backwards, and in the third second he would turn his hat around.

But in the third second, B does not turn his hat around because A's hat is not on forwards. 

In the fourth second, therefore, A knows that his hat is on backwards and he turns it around.

At the same time, B would be using the same reasoning, and he would also turn his hat around in the fourth second.

For Three Detectives: Name the detectives A, B, and C, and consider what A does and thinks.

In the first second, A sees that both B and C have their hats on backwards.

In the next second, A considers what B would think and do if A's hat were on forwards. Seeing that A's hat is on forwards, B considers what C would think and do if B's hat were also on forwards. Since at least one hat is on backwards, C would realize that his own hat must be on backwards, and in the third second he would turn his hat around.

If C does not turn his hat around in the third second, then B knows that his hat is on backwards, and in the third second he would turn his hat around.

But in the third second, B does not turn his hat around because A's hat is not on forwards. 

In the fourth second, therefore, A knows that his hat is on backwards and he turns it around.

At the same time, B and C would be using the same reasoning, and they would also turn their hat around in the fourth second.

Eugene Paul