The impossible chessboard puzzle
Based on 3Blue1Brown's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.
Model each coin configuration as a vertex of an n-dimensional hypercube; flipping one coin moves along an edge to a neighboring vertex.
Briefing
A prisoner-style chessboard puzzle turns into a sharp impossibility result: if the board size (the number of squares) is not a power of two, no strategy can guarantee success against an adversarial warden. The setup forces prisoner 2 to deduce the key’s location after seeing only the coin pattern that remains after prisoner 1 flips exactly one coin. Because the warden can choose the coin layout and key position adversarially, the only way to win is to ensure that from every starting coin configuration, a single coin flip can move the observed pattern into the “region” corresponding to any of the possible key locations.
To make that requirement concrete, the puzzle is reframed as geometry on a hypercube. With two squares and two coins, the four coin states become the corners of a unit square; flipping one coin moves along an edge. The winning condition becomes a coloring problem: assign each corner a color representing which key location prisoner 2 should infer, and require that from any corner, the neighboring corners include the full set of colors. The same translation scales up: with three squares, three coins, and three key locations, the eight coin states become the corners of a cube in 3D, and each coin flip corresponds to moving to an adjacent vertex.
Counting strategies becomes a combinatorial “haystack” exercise—each vertex can be colored in three ways, giving 3^8 possible colorings for the 3-square case (and, by analogy, 2^64–style growth for the original 64-square puzzle). Some colorings work for certain starting corners but fail for others. A simple “mod 3 sum” strategy illustrates the failure mode: even if it lets you reach all three colors from some starting states, it leaves at least one corner where two neighboring vertices share the same color, preventing access to one key location. An adversarial warden can exploit that blind spot by choosing the key to lie under the unreachable color.
That observation leads to a general counting argument that blocks success in most dimensions. Suppose a hypercube coloring exists with the property that every vertex has neighbors of all colors (one for each possible key location). Then, by counting how many “red-adjacent” edges exist in two different ways—once by summing over vertices and once by summing over red vertices—one derives a divisibility constraint. In n dimensions, the total number of vertices is 2^n, each vertex has n neighbors, and the required neighbor-color balance forces the number of red vertices to be exactly 2^n / n. Since the left-hand side is a power of two, n must itself be a power of two for the arithmetic to work out. If n is not a power of two, the needed equal partitioning of vertices among colors becomes impossible, so no strategy can guarantee the puzzle’s goal.
The result explains why “making it easier” by removing squares or changing the board size can actually make the task hopeless: the impossibility proof doesn’t just rule out clever tricks—it rules out all strategies when the number of squares isn’t a power of two. The remaining power-of-two cases are not automatically solvable, but they are no longer excluded by this symmetry-and-counting obstruction. The discussion then points to an especially symmetric construction for the 4-dimensional case, where the hypercube can be projected into 3D for visualization, and where each vertex’s neighbors can be colored to match all four key locations—an outcome that the counting argument says is at least not forbidden when the dimension is a power of two.
Cornell Notes
The chessboard puzzle can be translated into a hypercube coloring problem. Each coin configuration is a vertex of an n-dimensional cube, and flipping one coin moves to a neighboring vertex. A winning strategy corresponds to coloring vertices by key locations so that from any vertex, the set of neighboring colors includes every possible key location. For n not equal to a power of two, a counting argument shows such a coloring cannot exist: double-counting “red-neighbor” incidences forces the number of vertices per color to be 2^n/n, which can only be an integer when n is a power of two. Therefore, no strategy can guarantee success for board sizes whose square-count isn’t a power of two, even against the most carefully planned adversarial warden.
How does flipping exactly one coin become a statement about moving on a hypercube?
Why can a strategy be viewed as coloring vertices with key-location labels?
What goes wrong with a “mod 3 sum” style strategy in the 3-square case?
What is the core counting contradiction that rules out solutions when n is not a power of two?
Does the power-of-two condition guarantee a solution?
Review Questions
- In the hypercube model, what exact property must the vertex coloring satisfy so that prisoner 2 can always deduce any key location after one flip?
- Reproduce the double-counting argument for one color (e.g., red): what two quantities are counted, and why must they match?
- Why does the requirement that 2^n/n be an integer force n to be a power of two?
Key Points
- 1
Model each coin configuration as a vertex of an n-dimensional hypercube; flipping one coin moves along an edge to a neighboring vertex.
- 2
A guaranteed-winning strategy corresponds to coloring vertices by key locations so that every vertex’s neighbors collectively cover all colors.
- 3
Not every coloring works: some strategies succeed from certain starting corners but fail from others, leaving at least one key location unreachable after one flip.
- 4
A double-counting argument on “red-neighbor” edges forces the number of vertices per color to equal 2^n/n.
- 5
Because 2^n is a power of two, the divisibility condition implies n must be a power of two; otherwise, no strategy can guarantee success.
- 6
Changing the puzzle by removing squares or altering the board size can make the task impossible by breaking the power-of-two condition.
- 7
Power-of-two cases are not automatically solvable, but they are the only sizes not eliminated by this symmetry-and-counting obstruction.