The Infinite Prisoners with Real Colored Hats Problem

Consider that you have an infinite number of prisoners; each lined up and they all get a distinct real colored hat (think of it as a real number); they can look at everyone else’s hat but their own.

They can go free if they guess the color of their hat right; What’s a strategy to maximize the number of prisoners that go free?


Beforehand, they discuss with each other and place the infinitely many possibly sequences of real numbers (hat colors — ignore the constraint that I don’t know if we can see uncountably infinite colors of the EM spectrum) into equivalence classes.


That is, they look at the Infinitely many possible sequences, and find ones that differ by only finitely many digits and place them in the same group called an equivalence class and call the relation that they differ only by finitely many digits an equivalence relation; they memorize an arbitrary sequence in each equivalence class (and there are infinitely many equivalence classes); this memorization of an arbitrary sequence in each equivalence class is called the axiom of choice in set theory. 


Now once they are in trial and have to call out the color of their own hat (a real number) they look at all the hats around them, see the tail end of the terms, and then call out the number their spot would be in the arbitrarily chosen sequence of the equivalence class they’ve identified (note a problem here is that even if the nth person sees that people before him/her don’t have hat colors that correspond neatly into the arbitrarily chosen sequence, he/she says the nth term of the arbitrarily chosen sequence anyway — can we do better?); In this manner they collectively only make a finite number of mistakes. Which is a huge win!! 


But now say you wanted to make these bounds even better, you wanted to minimize the number of mistakes you make what do you do? Idk about the reals. 


But say, in a similar but slightly different situation, the hat colors are only black and white and you can only see the people in front of you in the line and not before you; in this case you can guarantee that all but one prisoner will go free (and if you’re lucky with a fifty percent probability all will go free).


There are infinitely (countable or uncountable?) many possible sequences of black and white (say they correspond to 0 and 1), once again you group all sequences that differ only by a finite number of terms into groups (equivalence classes); then choose an arbitrary sequence to represent the equivalence class.


Now the person going first counts the number of terms that differ in the hat sequence that he sees from the arbitrarily chosen sequence (there are only finitely many hats that differ so he can count them); he then says black, if the number is odd and white if the number is even; there’s a 50% his hat is either color; but everyone after him then counts the number of differences that they observe in the sequence from the arbitrarily chosen sequence, if the next person counts the same number of differences, then his hat color is the nth term of the sequence, but if he counts a different number of differences (namely, one less) then his hat differs from the nth term of chosen sequence (and because the only options are black and white, if he counts the same number he goes with the term in the chosen sequence say black, but if he doesn’t a different number he goes with the opposite color (or complement of the term) which is white). 


But what happens after the first even number of differences is reached, if the first person called out white while the two after him called out black (the the actual color of their terms in the chosen sequence was white white) how does the next person know if they’re different or not? The next person looks below and sees that he only counts an odd number of differences, considering the differences should be (even-2 = even (the two is for the differences that were vocalized by the two people before him/her)) which is even he knows his term differs from chosen sequence (since even (2) + odd = odd BUT even (2) + 1 (him) + odd (what he sees after him)); if, however, he counts an even number of differences ahead of him, and 2(before)+ 1 (him) + even (after) = odd # of differences, he knows that his term corresponds directly to the term in chosen sequence. 


This applies inductively to all prisoners and guarantees that every prisoner after the first one will get their hat color right. When you eventually start reaching prisoners in the tail end of the sequence, they realize that all differences have been accounted for and then just call out the terms of the arbitrarily chosen sequence. 


Is this affected by whether there are infinite or finite people? I think not, I think the parity of the hats (I.e they can only be black and white) allows the same level of precision in both the finite and infinite case. 

Comments