◀ THE FOLD0ROOT.AI // WORLD II · GLITCH · OFF BY ONE◆ .dlw.fold
THE FOLD / GLITCH / OFF BY ONE / THE DAMM

THE DAMM

the better scheme lost to the one a clerk could do
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
A check digit catches typing mistakes. Luhn — the one on every credit card — catches all single-digit errors but not all swaps of neighbouring digits. Damm catches both, using a lookup table instead of arithmetic.

LIT verified live. 4,000 numbers, each given a Damm digit and a Luhn digit, then attacked exhaustively. Single-digit substitutions: 324,000 tried, Damm catches 100% and Luhn also catches 100% — they are equal here. Adjacent transpositions are where they part: 28,810 tried against Damm, caught 100%; 28,760 against Luhn, caught 97.76%, missing 645.
2 HOW IT WAS WEAVED · AI + HUMAN
H. Michael Damm published this in 2004, built on a totally anti-symmetric quasigroup — a 10×10 table with no fixed points on its diagonal.

AVAN (AI) nearly published a false result here. My first harness skipped the no-op substitution for the Damm number and then applied the same replacement digit to the Luhn number, so whenever the two check digits differed, one “error” per position was no error at all — and got counted as a Luhn miss. It reported 98.88%, a believable number and a wrong one: doubling is a bijection mod 10, so Luhn cannot miss a single-digit substitution. The real difference is transpositions, and only transpositions.
3 ONE DIMENSION
Two schemes, two attacks. They differ in only one column.
4 TWO DIMENSIONS · INTERACTIVE
Mistype a number and see which scheme notices.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: a table with an empty diagonal.
AVAN’s addition (the inverse-companion): the forward reading is that Damm is strictly better than Luhn. The inverse is that Luhn won anyway, and being worse is why. Luhn is arithmetic you can do in your head on a paper slip in 1954; Damm needs a hundred-entry table nobody can memorise. The scheme that catches every transposition lost to the one that can be computed by a clerk with a pencil. Read backwards, a check digit is not a cryptographic choice but a logistical one, and the winning property was never detection strength.
LIT 4,000 numbers given both a Damm digit and a Luhn digit and attacked exhaustively: across 324,000 single-digit substitutions Damm catches 100% and Luhn also catches 100%, but adjacent transpositions part them - 28,810 tried against Damm and caught 100%, against 28,760 tried on Luhn and caught 97.76%, missing 645

FIG H. Michael Damm published this in 2004, built on a totally anti-symmetric quasigroup - a 10x10 table with no fixed points on its diagonal. AVAN nearly published a false result: my first harness skipped the no-op substitution for the Damm number and applied the same replacement digit to the Luhn number, so whenever the two check digits differed one error per position was no error at all and got counted as a Luhn miss. It reported 98.88%, a believable and wrong number - doubling is a bijection mod 10, so Luhn cannot miss a single-digit substitution. The real difference is transpositions, and only transpositions.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of OFF BY ONE · David Lee Wise (ROOT0), with AVAN