# Infinitary Hat Puzzles and the Aftermath

### What color is your hat? The hat puzzle genre of logic puzzle grows from easy finite cases to absurd spectacular settings with infinitely many people in hats and whimsical uses of the axiom of choice.

## The Midnight Ball

We are all at the festive ball with infinitely many guests. Midnight approaches, and in preparation for the special event every guest has just had a natural number written on their forehead with black lipstick. Perhaps some numbers are repeated, others absent—we can't be sure. We can all plainly see everyone else's number, however, but nobody knows their own number or how the numbers were chosen. Nevertheless, at the stroke of midnight, one amongst us will be designated as Queen of the Ball, who will be allowed to erase her number and replace it with any number of her choosing. And then, immediately after this, we shall all simultaneously announce our best predictions of our own numbers, as well as we are able to do so. We had had time at the afternoon garden party earlier in the day to plan and agree upon a strategy, but naturally once the numbers were imprinted, all communication of any sort is forbidden. The Queen, of course, will guess correctly, but can we somehow guarantee that others also guess correctly? Surely it would be hopeless for any significant number of us to guess correctly, right? What if it had been real numbers on our foreheads? Or ordinals? Would it matter if the number of guests had been a much larger uncountable infinity?

These conundrums exist in the genre of logic puzzle known as the *hat puzzles*, in which invariably you find yourself placed into a curious situation where everyone is wearing a hat of a certain color—or a number on their forehead, you get the idea—but nobody knows their own hat color, and everyone must make a guess as to their own hat color or to try to deduce it somehow. A distinctive common feature of these puzzles is that by means of clever mathematical strategizing, people can guess correctly far more often than one might naively expect. At the midnight ball, for example, we shall describe a mathematical strategy ensuring that **absolutely everyone guesses correctly**—it is incredible. The original hat puzzles featured just a few people perhaps standing in a circle, but soon enough there were variations with dozens of people and then hundreds, and ultimately, of course, we find ourselves with puzzles such as the midnight ball with infinitely many people. The infinitary hat puzzles often become mathematically subtle and sophisticated, and it is a core part of the genre to assume that everyone inhabiting the puzzle is capable of perfect logical reasoning and furthermore able to implement any mathematically possible strategy, such as announcing a real number with perfect accuracy and precision or mounting a collective application of the axiom of choice. Meanwhile, to attempt hand signals or other communication outside the stated channels of a puzzle is totally against the spirit and style of the genre.

Let's have some fun! We shall warm up with some easy finite puzzles, but we'll have the solution to the midnight ball puzzle and much more by the chapter's end.

*Enjoy this new installment from The Book of Infinity, a series of vignettes on infinity with all my favorite puzzles and paradoxes, serialized over the past year.*

This edition features a variety of logic puzzles involving whimsical applications of the axiom of choice.

## Keep reading with a 7-day free trial

Subscribe to Infinitely More to keep reading this post and get 7 days of free access to the full post archives.