Tue 13 Mar 2012

## A hat puzzle

Posted by Happy under Fun, puzzle

Comments Off on A hat puzzle

This is a hat problem. The participants are supposed to be infinitely clever Mensa members, each wearing a hat bearing a number, such that they can see each other’s numbers but not their own. The hat numbers are integers, greater than zero. There are 3 participants (A, B and C, or Albert, Brian and Clarence if you prefer), and the number on one of the hats is the sum of the numbers on the other two. They take turns as follows:

A: I don’t know my number.

B: I don’t know my number.

C: I don’t know my number.

A: My number is 25.

What are the numbers on the other two hats?

This is a general solution for 3 hats. The 3 players are A,B,C. Hat numbers are expressed as triples in that order eg (1,2,3). Player order is A,B,C, and A2 means player A second turn.

We start out by finding solutions for the smallest possible hat numbers. The logic is unchanged if all hat numbers are then multiplied by the same

factor: (1,2,3) is logically equivalent to (10,20,30).

Solutions

A1: (2,1,1)

Interpretation: If A1 knows his hat number, then (2,1,1) is the only solution; if he is silent, then (2,1,1) is excluded as a solution.

Rationale: If A1 sees two identical hats he knows his must be the sum, not the difference. Otherwise he must pass, since his hat is ambiguous.

Example: On the first round, A announces his hat is number 50. The other two hats must both be 25.

B1: (1,2,1) (2,3,1)

Interpretation: If B1 knows his hat number, then these are the only solutions; if he is silent, then these are excluded as solutions.

Rationale: (1,2,1) as for A1; (2,3,1) because (2,1,1) was excluded so B1 knows his must be the sum, not the difference. Otherwise he must pass, since his hat is ambiguous.

Example: On the first round, B announces his hat is number 33. The other two hats must 22 and 11 (in that order).

C1: (1,1,2) (2,1,3) (1,2,3) (2,3,5)

Interpretation: If C1 knows his hat number, then these are the only solutions; if he is silent, then these are excluded as solutions.

Rationale: (1,1,2) as for A1; (2,1,3) because (2,1,1) was excluded so B1 knows his must be the sum, not the difference; (1,2,3) because (1,2,1) was excluded; (2,3,5) because (2,3,1) was excluded. Otherwise he must pass, since his hat is ambiguous.

Example: On the first round, C announces his hat is number 25. The other two hats must 10 and 15 (in that order).

A2: (3,2,1) (4,3,1) (3,1,2) (4,1,3) (5,2,3) (8,3,5)

Interpretation: If A2 knows his hat number, then these are the only solutions; if he is silent, then these are excluded as solutions.

Rationale: For the previous 2 sets of excluded solutions, replace the A value by the sum of the other two values. The general principle is that a previously ambiguous possible solution (sum or difference) has become unambiguous (sum only), and is either the solution or is excluded.

Example: On the second round, A announces his hat number is 25. The other two hats are 10 and 15 (in order).

Example: On the second round, A announces his hat number is 60. The other two hats could be 40,20; 45,15; 20,40; 15, 45; 24, 36. He knows, but we don’t.

This system of numbering can be extended to arbitrarily large puzzles as a purely mechanical exercise. Hopefully I made no mistakes in the calculations, but in any case I am confident the method is correct. This puzzle has been presented elsewhere, but so far I have not seen this particular method for solving it described elsewhere.