Prisoners and Hats Puzzle - Variants - Countably Infinite Hat Problem With Hearing - Countably Infinite-Hat With Hearing Solution

Countably Infinite-Hat With Hearing Solution

It turns out that, if one allows the prisoners to hear the colors called out by the other prisoners, it is possible to guarantee the life of every prisoner except the first, who dies with a 50% probability.

To do this, we define the same equivalence relation as above and again select a representative sequence from each equivalence class. Now, we label every sequence in each class with either a 0 or a 1. First, we label the representative sequence with a 0. Then, we label any sequence which differs from the representative sequence in an even number of places with a 0, and any sequence which differs from the representative sequence in an odd number of places with a 1. In this manner, we have labeled every possible infinite sequence with a 0 or a 1 with the important property that any two sequences which differ by only one digit have opposite labels.

Now, when the warden asks the first person to say a color, or in our new interpretation, a 0 or a 1, he simply calls out the label of the sequence he sees. Given this information, everyone after him can determine exactly what his own hat color is. The second person sees all but the first digit of the sequence that the first person sees. Thus, as far as he knows, there are two possible sequences the first person could have been labeling: one starting with a 0, and one starting with a 1. Because of our labeling scheme, these two sequences would receive opposite labels, so based on what the first person says, the second person can determine which of the two possible strings the first person saw, and thus he can determine his own hat color. Similarly, every later person in the line knows every digit of the sequence except the one corresponding to his own hat color. He knows those before him because they were called out, and those after him because he can see them. With this information, he can use the label called out by the first person to determine his own hat color. Thus, everyone except the first person always guesses correctly.

Read more about this topic:  Prisoners And Hats Puzzle, Variants, Countably Infinite Hat Problem With Hearing

Famous quotes containing the words hearing and/or solution:

    Orpheus with his Lute made Trees,
    And the Mountaine tops that freeze,
    Bow themselves when he did sing.
    To his Musicke, Plants and Flowers
    Ever spring; as Sunne and Showres,
    There had been a lasting Spring.
    Every thing that heard him play,
    Even the Billowes of the Sea,
    Hung their heads, and then lay by.
    In sweet Musicke is such Art,
    Killing care, and griefe of heart,
    Fall asleepe, or hearing dye.
    William Shakespeare (1564–1616)

    There is a lot of talk now about metal detectors and gun control. Both are good things. But they are no more a solution than forks and spoons are a solution to world hunger.
    Anna Quindlen (b. 1953)