Ooh, nice idea! So, if the bits of the whole group represent a valid Hamming code, everyone guesses wrong together. Otherwise, everyone passes except the one person who could bit-flip themselves into a Hamming code, who guesses correctly. and since there are n non-Hamming numbers for every valid Hamming number (since there are n ways to be off by 1 of the n bits), the chances of success are n out of n+1.

That’s very clever. Thanks for explaining!

]]>The short explanation is that because the Hamming codes are perfect, all of the 2^n assignments of hats are either a codeword or within 1 flipped hat of a codeword. If you assign everyone a bit in the word, the algorithm is “if what I see could be a codeword, I set my bit so that it’s not a codeword”. Else, I pass. The only case where everyone passes is if you’re on a codeword, with probability 2^k/2^n which ends up being 2^(-r) e.g. 1/(n+1).

]]>