Today’s puzzle retrospectively commemorates UNESCO’s World Logic Day, which took place last week. (The date, January 14, is both the day Kurt Gödel died and the day Alfred Tarski was born, a calendrical coincidence that links the pre-eminent logicians of the twentieth century.)
It is a logic puzzle and, as is typical for the genre, concerns a group of clever people wearing colourful headwear.
Despite the whimsy of the set-up, however, the puzzle is a neat exposition of a mathematical idea with interesting real-world applications. Hold onto your hats, everyone!
Queue eye
1. Ten logicians are put in a line, all facing in the same direction. A red or green hat is put on each of their heads. The logicians do not know which colour is on their heads, nor the colour of the hats of the people behind them in the line. Each logician can look only forwards, and so only knows the hat colour of the person or people in front them.
One by one, each logician says aloud either the word ‘red’ or the word ‘green’. Every logician says one of these words, and no logician speaks twice.
Can you think of a strategy – which the logicians will have agreed on before the line up – that results in at least nine of them saying the colour word that correctly describes the hat on their head?
There are no mirrors or reflective materials. The knowledge about their own hat colour is deduced entirely from what they can see and what is said.
2. The same set up as before, but now there are three hat colours: red, green and yellow.
Can you think of a strategy in which each logician says a single word, now either ‘red’, ‘green’ or ‘yellow’, and results in at least nine of them saying the correct colours of their own hats.
I’ll be back at 5pm UK with the solutions – and an explanation about what this has all got to do with stuff in the real world.
PLEASE NO SPOILERS. Instead, please talk about hats or logicians.
Thanks to Deniz Sarikaya, of the Vrije Universiteit Brussel and Universität zu Lübeck, who is coordinator of World Logic Day.
I’ve been setting a puzzle here on alternate Mondays since 2015. I’m always on the look-out for great puzzles. If you would like to suggest one, email me.