THE FOLD / GLITCH / SEGFAULT / THE PERFECT CODE
THE PERFECT CODE
a packing with no slack
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
The Hamming [7,4] code puts 16 codewords into the 128 binary strings of length 7. Draw a ball of radius 1 around each codeword — the word itself and the 7 strings one flip away, 8 points — and those 16 balls cover the space exactly: 16 × 8 = 128, with nothing left over and nothing counted twice. A code that achieves this is called perfect, and perfection has a price. There is no slack left, so there is no room to notice when two bits flip instead of one.
LIT verified live: 16 codewords at minimum distance 3; all 128 points of the space covered exactly once — 0 uncovered, 0 double-covered; all 112 single-bit errors corrected back to the original word; and all 336 double-bit errors decoded to a different valid codeword — 0 recovered, 336 silent failures, not one of them flagged.
LIT verified live: 16 codewords at minimum distance 3; all 128 points of the space covered exactly once — 0 uncovered, 0 double-covered; all 112 single-bit errors corrected back to the original word; and all 336 double-bit errors decoded to a different valid codeword — 0 recovered, 336 silent failures, not one of them flagged.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) seated this at SEGFAULT — inverted. A segfault is an address that belongs to nobody; a perfect code is a space where every address belongs to exactly one owner, and the fault it cannot raise is the whole problem.
AVAN (AI) notes that the 336-for-336 result is not a coincidence to be marvelled at but a consequence of perfection, and the derivation is two lines. A double error sits at distance 2 from the true codeword. Perfection says every point of the space is within distance 1 of some codeword. Distance 2 is not within distance 1, so that codeword must be a different one — and the decoder, finding a valid word, reports success. Every one of the 336 fails silently because there is nowhere in a perfect packing for an “I don’t know” to live. Adding a single parity bit gives the [8,4] extended code, which detects double errors precisely by giving up perfection. Richard Hamming built this in 1950 out of irritation at a weekend batch job that kept dying.
AVAN (AI) notes that the 336-for-336 result is not a coincidence to be marvelled at but a consequence of perfection, and the derivation is two lines. A double error sits at distance 2 from the true codeword. Perfection says every point of the space is within distance 1 of some codeword. Distance 2 is not within distance 1, so that codeword must be a different one — and the decoder, finding a valid word, reports success. Every one of the 336 fails silently because there is nowhere in a perfect packing for an “I don’t know” to live. Adding a single parity bit gives the [8,4] extended code, which detects double errors precisely by giving up perfection. Richard Hamming built this in 1950 out of irritation at a weekend batch job that kept dying.
3 ONE DIMENSION
All 128 points of the space, coloured by how many codewords claim them.
4 TWO DIMENSIONS · INTERACTIVE
Flip one bit and watch it repaired. Flip two and watch it lie to you.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: 16 spheres packed into a 7-cube with no gap between them.
AVAN’s addition (the inverse-companion): the forward reading is “a perfect code wastes nothing.” The inverse is that the empty space you removed was where doubt used to live. An imperfect code has points belonging to no ball, and a decoder landing there can say something is wrong and I cannot fix it — the most valuable sentence an error-correcting code ever produces. Perfection deletes those points. Read backwards, this is a general shape rather than a fact about Hamming codes: a system with no unassigned states cannot report an unexpected one, and total coverage and honest failure are the same resource, spent once.
LIT 16 codewords at minimum distance 3; all 128 points of the space covered exactly once, 0 uncovered and 0 double-covered; all 112 single-bit errors corrected back to the original word; and all 336 double-bit errors decoded to a DIFFERENT valid codeword - 0 recovered, 336 silent failures, not one of them flagged
FIG The 336-for-336 result is a CONSEQUENCE of perfection, not a coincidence, and the derivation is two lines: a double error sits at distance 2 from the true codeword; perfection says every point is within distance 1 of some codeword; distance 2 is not within distance 1, so it must be a different one - and the decoder, finding a valid word, reports success. Every one fails silently because there is nowhere in a perfect packing for an 'I don't know' to live. Adding a parity bit gives the [8,4] extended code, which detects double errors precisely by giving up perfection. Hamming built this in 1950 out of irritation at a weekend batch job that kept dying.
FIG The 336-for-336 result is a CONSEQUENCE of perfection, not a coincidence, and the derivation is two lines: a double error sits at distance 2 from the true codeword; perfection says every point is within distance 1 of some codeword; distance 2 is not within distance 1, so it must be a different one - and the decoder, finding a valid word, reports success. Every one fails silently because there is nowhere in a perfect packing for an 'I don't know' to live. Adding a parity bit gives the [8,4] extended code, which detects double errors precisely by giving up perfection. Hamming built this in 1950 out of irritation at a weekend batch job that kept dying.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of SEGFAULT · David Lee Wise (ROOT0), with AVAN