in
December 2008

## The coloured hat exam

This puzzle was kindly provided by Christopher Dowden.

Three students have been put in detention by their evil maths teacher, Mr Chalk. The pupils (Alice, Ben and Chris) have been unfairly accused of not liking probability! Now they will all be expelled unless they can prove Chalk wrong by passing his bizarre test.

In a moment, the crazy Chalk will lead the students blindfolded to his secret exam hall, where he will place mysterious coloured hats on their heads. The blindfolds will then be removed, enabling the three pupils to see each other's hats, but not their own. Finally, the students will sit an exam with only one cunning question: what colour is your hat?

Of course, normal exam regulations will apply, so the students won't be allowed to communicate with each other in any way once they are in the hall. They only know that the colours will be red and yellow, and that all eight possible combinations (RRR, RRY, RYR, YRR, RYY, YRY, YYR and YYY) are equally likely.

Alice, Ben and Chris will each be allowed to write one of three words "red", "yellow", or "pass". They will not be allowed to see each other's answers. If at least one student guesses his hat colour correctly and none guess incorrectly, they all win. Otherwise (if at least one guesses incorrectly or they all write "pass"), all three will be expelled.

The pupils are currently in the headmaster's office, waiting nervously for Chalk's arrival. This gives them a few precious minutes together to devise their strategy. They can see that if they decide now that Alice and Ben will both write "pass" and that Chris will write "red", then this will give them a 50% chance of winning (as this tactic will succeed if Chris is given a red hat and fail if he is given a yellow one, regardless of the colours that Alice and Ben have). Can they do any better than that?

Here is a hint

This problem has recently been circulating around universities all over the world. It was written up for Plus in this format by Christopher Dowden, who studied maths at Gonville and Caius College, Cambridge, and then Merton College, Oxford, where he recently completed a DPhil on random graphs. He is currently a postdoctoral research fellow at the University of Canterbury in Christchurch, New Zealand.

If you are stumped by last issue's puzzle, here is the solution.

For some challenging mathematical puzzles, see the NRICH puzzles from this month or last month.