MDS error correction exists at every rung k ≥ 7 of the primorial tower. Rate improves as you climb: 4/7 → 5/8 → 6/9 → 7/10. The demos below use k = 7 (Z/510,510): 4 data channels + 3 parity channels.
Type a message. Each character decomposes into the 7 channels. Click any data cell to corrupt it, or use the buttons below.
Corrupt 1 damages one channel per character — the ring detects, locates, and corrects every one.
Corrupt 2 or Corrupt 3 damages more channels — the ring still detects the error, but can no longer correct it. The code is maximum distance separable (d = 4): correct any 1, detect up to 3. No [7,4] code can do better.
mod 11 — detects: syndrome S11 = stored − computed. If S11 ≠ 0, something's wrong.
mod 13 — locates: syndrome S13 + S11 together identify which channel failed.
mod 17 — corrects: all three syndromes → unique original value.
Data ring: Z/210 = Z/2 × Z/3 × Z/5 × Z/7. Every channel is a prime field.
Parity: mod 11, mod 13, mod 17. Product = 2431. Rate 4/7.
CRT reconstruction from the four residues (r2, r3, r5, r7):
n = 105r2 + 70r3 + 126r5 + 120r7 (mod 210)
Parity: n mod 11, n mod 13, n mod 17. Stored alongside the data.
Correction: for each candidate channel, try each value until all three parities match. Max data modulus is 7, parity product is 2431 — exactly one solution exists for any single-channel error. 100% correction rate.
The code is MDS: minimum distance d = 4 = n − k + 1 = 7 − 4 + 1. Any 4 of 7 channels reconstruct the original. This is optimal — the Singleton bound says no [7,4] code can achieve d > 4.
The guarantee itself is a bound — a size fact. No channel sees size (that wall has its own page), yet any 4 of 7 channels determine the data value precisely because that value is below 210 = 2·3·5·7 and any four of the seven moduli multiply to at least 210: two values agreeing in four channels would differ by a multiple of all four moduli, impossible under the bound. The size window the construction deletes comes back in exactly one place: the correction guarantee is uniqueness under a bound.
Why d = 4 holds: two distinct data values can agree in at most 3 channels — agreeing in 4 would make their difference divisible by four ring primes whose product is at least 2·3·5·7 = 210, impossible for values below 210. And any 4 channels have modulus product ≥ 210, enough to pin the value down (all 35 four-channel subsets verified). The fattened ring fails exactly here: 8·9·11·13 = 10,296 < 88,200 lets four channels agree, so its distance drops to 3.
Each parity channel sees every data channel with a specific weight: the CRT idempotent of each data prime, reduced mod each parity prime. If any weight were zero, that data channel would be invisible to that parity channel.
mod 2 mod 3 mod 5 mod 7 mod 11: 6 4 5 10 mod 13: 1 5 9 3 mod 17: 3 2 7 1
All 12 entries nonzero. Every single-channel data error produces a nonzero syndrome in all 3 parity channels. No channel combination is blind.
This is guaranteed for squarefree rings: if a data idempotent were zero mod a parity prime q, then q would divide the idempotent, but since parity primes are larger than data primes, this is impossible. Fattened rings lose this guarantee — a fattened ring (Z/88200 data) had mod 5 invisible to mod 17 (weight = 0).