I've been researching Ebert's hat puzzle and I keep reading that the 7 person case can be optimized using the [7,4] Hamming code. Can someone explain to me how the players could use Hamming codes to maximize their chances of winning?
2026-04-24 08:04:04.1777017844
Ebert's Hat puzzle with [7,4] hamming code
1.7k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
There are 1 best solutions below
Related Questions in PUZZLE
- Maximum number of guaranteed coins to get in a "30 coins in 3 boxes" puzzle
- Interesting number theoretical game
- Number of divisors 888,888.
- Who has built the house of Mason?
- Is there any tri-angle ?
- In what position , the dogs will reside?
- Number of ways to go from A to I
- Who is the truth teller (logic puzzle)
- How many solutions are there if you draw 14 Crosses in a 6x6 Grid?
- Symmetric latin square diagonal elements
Trending Questions
- Induction on the number of equations
- How to convince a math teacher of this simple and obvious fact?
- Find $E[XY|Y+Z=1 ]$
- Refuting the Anti-Cantor Cranks
- What are imaginary numbers?
- Determine the adjoint of $\tilde Q(x)$ for $\tilde Q(x)u:=(Qu)(x)$ where $Q:U→L^2(Ω,ℝ^d$ is a Hilbert-Schmidt operator and $U$ is a Hilbert space
- Why does this innovative method of subtraction from a third grader always work?
- How do we know that the number $1$ is not equal to the number $-1$?
- What are the Implications of having VΩ as a model for a theory?
- Defining a Galois Field based on primitive element versus polynomial?
- Can't find the relationship between two columns of numbers. Please Help
- Is computer science a branch of mathematics?
- Is there a bijection of $\mathbb{R}^n$ with itself such that the forward map is connected but the inverse is not?
- Identification of a quadrilateral as a trapezoid, rectangle, or square
- Generator of inertia group in function field extension
Popular # Hahtags
second-order-logic
numerical-methods
puzzle
logic
probability
number-theory
winding-number
real-analysis
integration
calculus
complex-analysis
sequences-and-series
proof-writing
set-theory
functions
homotopy-theory
elementary-number-theory
ordinary-differential-equations
circles
derivatives
game-theory
definite-integrals
elementary-set-theory
limits
multivariable-calculus
geometry
algebraic-number-theory
proof-verification
partial-derivative
algebra-precalculus
Popular Questions
- What is the integral of 1/x?
- How many squares actually ARE in this picture? Is this a trick question with no right answer?
- Is a matrix multiplied with its transpose something special?
- What is the difference between independent and mutually exclusive events?
- Visually stunning math concepts which are easy to explain
- taylor series of $\ln(1+x)$?
- How to tell if a set of vectors spans a space?
- Calculus question taking derivative to find horizontal tangent line
- How to determine if a function is one-to-one?
- Determine if vectors are linearly independent
- What does it mean to have a determinant equal to zero?
- Is this Batman equation for real?
- How to find perpendicular vector to another vector?
- How to find mean and median from histogram
- How many sides does a circle have?
Here is one strategy. Number the players from 1 to 2^k-1 in binary (for instance with seven players we would have Anna = 001, Bethany = 010,..Fred =110, George = 111. Each player plays according to the following algorithm: Look at the players you can see who are wearing black hats. Xor their numbers together (add the digits mod 2, with no carry) to get a subtotal. If you do not see any black hats the subtotal is zero. Having computed the subtotal you should
Basically we are betting that if we XOR together the numbers of ALL the players with black hats (call this the total) then we get something other than zero. Two things can happen. If the total is something other than zero then exactly one person guess correctly and the rest pass. If the total is zero then EVERY player guesses incorrectly. Exactly 1/2^k of the bit patterns total to zero in this way, so you lose with probability 1/2^k.
In terms of the Hamming code the strategy is as follows. Lets say black hats are 1 bits and white hats are zero bits, and assign each person a bit number in some way. For instance if Anna and Bethany have black hats and the rest of the players have white hats we have the hat word 0000011. We are betting that the hat word is NOT a code word for the Hamming (7,4) code. Your strategy is to look at the bit pattern of your friends. If the bit pattern you see is consistent with one of the (7,4) code words you guess that your hat is the color that would make the hat word NOT be a code word. If the bit pattern is not consistent with a (7,4) code word you pass. For instance
This has the same property: if the hat word is a code word then every player guesses incorrectly. If the hat word is not a code word then EXACTLY one player guesses right and the rest pass. There are 16 (7,4) code words, and 2^7 = 128 hat words, so your odds of losing are 16/128 = 1/8.
This is really two slightly different descriptions of the same strategy since the Hamming code words are exactly those where, if you XOR the numbers of the set bits together you get zero.