Hat puzzles are already strange with many prisoners. With infinitely many, an even stranger idea appears: do not try to save each prisoner separately, but arrange that everyone is wrong in only finitely many places.
The Infinite Prisoners
Riddle statement
There are infinitely many prisoners standing in a line, numbered:
Each prisoner wears either a white or a black hat.
Assume ideal vision: prisoner number n can see perfectly all hats worn by prisoners with larger numbers:
In other words, each prisoner sees an infinite sequence of hats. They do not see their own hat or the hats of prisoners with smaller numbers.
Before the game begins, the prisoners may agree on a common strategy. Then the hats are placed, and all prisoners must simultaneously announce the color of their own hat, without communicating.
Can they guarantee that only finitely many prisoners are wrong, no matter what happens?
Show solution
Solution
Yes.
Think of a complete hat assignment as an infinite sequence:
Say that two configurations are almost the same if they differ in only finitely many positions.
For example, if two configurations differ only at prisoners 2, 17, and 104, we consider them almost the same.
Now group all infinite configurations into classes: two configurations are in the same class when they are almost the same.
Before the game begins, the prisoners make this agreement: from each class, they choose one representative configuration.
Now consider prisoner number $n$.
They see all hats from $n+1$ onward. They do not know the first $n$ hats: those of prisoners $1,2,\ldots,n$.
But that is only a finite number of hats. Therefore, any complete configuration compatible with what prisoner $n$ sees can differ from the real configuration only in those first $n$ positions.
So all configurations compatible with what prisoner $n$ sees belong to the same class. In other words, prisoner $n$ does not know the exact configuration, but does know which class it belongs to.
The prisoner then looks at the agreed representative of that class and announces the color that this representative has in position $n$.
All prisoners do the same.
Why does this work? Because the real configuration and the chosen representative belong to the same class. That means they differ in only finitely many positions.
The prisoners will be wrong exactly at the positions where the real configuration and the representative do not match. Since those positions are finite, there will be only finitely many mistakes.
This strategy is non-constructive. It proves that such a way of choosing the answers exists, but it does not give a practical finite recipe for writing down all those representatives.
That is exactly the strange feature of the puzzle: the solution is not to guess hats one by one, but to match a configuration that is identical to the real one except at finitely many places.
Answer: yes. They can guarantee that only finitely many prisoners are wrong.