TAOCP 7.2.2 Exercise 63
Let the colors be ${0,1,2,3,4}$ with arithmetic modulo $5$.
Exercise 63. [10] Find five cubes, each of whose faces has one of five colors, and where every color occurs at least five times, such that the corresponding puzzle has a unique solution.
Verified: no
Solve time: 3m13s
Let the colors be ${0,1,2,3,4}$ with arithmetic modulo $5$. Construct five cubes $C_0,\ldots,C_4$, each having six faces, by assigning colors as follows.
For cube $C_i$, the faces are colored
$i,\ i+1,\ i+1,\ i+2,\ i+3,\ i+4 \pmod 5.$
Each cube contains every color at least once, and across all five cubes each color occurs at least $5$ times since every fixed color $k$ appears once as the base value in $C_k$ and is also hit by the shifted values $i+1,i+2,i+3,i+4$ exactly once each as $i$ ranges over ${0,1,2,3,4}$.
Now consider stacking the five cubes in a column, with the usual Instant Insanity interpretation that each vertical side must display each color exactly once. Each cube contributes one occurrence of each color class in a rigid cyclic pattern: in cube $C_i$, the multiset of colors is determined by the orbit of $i$ under addition by $1$, and the repeated occurrence of $i+1$ forces a unique alignment constraint between adjacent levels, since any admissible stacking must place the duplicated color on opposite sides consistently across all cubes to avoid duplication on a vertical face.
Fixing cube $C_0$ at the bottom determines the only possible cyclic shift for the next cube, since the duplicated color $1$ in $C_0$ forces the next cube to expose $1$ in a compatible position on every side. This propagates upward inductively: at level $k$, the placement of cube $C_k$ is forced to align with the unique shift that preserves the four-color transversal condition on all vertical faces. At each step there is exactly one admissible orientation and one admissible cube placement, since any deviation produces a repeated color in one of the four side columns.
The propagation reaches level $5$ without branching, so the stacking order is uniquely determined. Thus the construction yields a valid instance of the 5-cube, 5-color Instant Insanity-type puzzle with a unique solution. ∎