FA-72026 / Error-correcting codes / Open access
RS single-error correction ignores a lone zero syndrome · case 01
Error patterns with exactly one zero syndrome are "corrected" using log(0).
ROOT CAUSE
The case where exactly one syndrome is zero is not rejected.
THE FAILURE
The case where exactly one syndrome is zero is not rejected.
Unsuccessful approach: Rejecting only S0 == 0 still lets S1 == 0 through.
Case contract
Correct at most one symbol error in a Reed-Solomon codeword with two parity symbols over GF(2^8) (0x11D, roots alpha^0 and alpha^1, alpha = 2). msg lists coefficients highest degree first, so index n-1-i holds degree i. With S0 = msg(1) and S1 = msg(alpha): both zero -> clean; one zero -> uncorrectable; else the error degree is log(S1/S0), which must be < n, and the error value is S0. Return [corrected symbols or None, status].
Why this case matters
Short-block RS codes in barcodes and radio headers correct a single corrupted symbol cheaply.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(msg):
EXP, LOG = [0] * 512, [0] * 256
x = 1
for i in range(255):
EXP[i] = EXP[i + 255] = x
LOG[x] = i
x <<= 1
if x & 0x100:
x ^= 0x11D
def mul(a, b):
return 0 if a == 0 or b == 0 else EXP[LOG[a] + LOG[b]]
n = len(msg)
def ev(root):
v = 0
for coef in msg:
v = mul(v, root) ^ coef
return v
s0, s1 = ev(1), ev(2)
if s0 == 0 and s1 == 0:
return [list(msg), 'clean']
loc = (LOG[s1] - LOG[s0]) % 255
if loc >= n:
return [None, 'uncorrectable']
out = list(msg)
out[n - 1 - loc] ^= s0
return [out, 'corrected']
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression [[24, 109, 190, 189, 118]]', [[24, 109, 190, 189, 118]], [None, 'uncorrectable']], ['regression [[183, 98, 190, 106, 24, 25]]', [[183, 98, 190, 106, 24, 25]], [None, 'uncorrectable']], ['partial-repair [[146, 202, 14, 25, 193]]', [[146, 202, 14, 25, 193]], [None, 'uncorrectable']], ['control [[197, 174, 1, 105, 3]]', [[197, 174, 1, 105, 3]], [[197, 174, 1, 105, 3], 'clean']], ['control [[197, 174, 1, 72, 3]]', [[197, 174, 1, 72, 3]], [[197, 174, 1, 105, 3], 'corrected']], ['control [[246, 174, 1, 105, 3]]', [[246, 174, 1, 105, 3]], [[197, 174, 1, 105, 3], 'corrected']], ['control [[197, 174, 1, 32, 233]]', [[197, 174, 1, 32, 233]], [None, 'uncorrectable']], ['control [[170, 170, 73, 201, 214, 86]]', [[170, 170, 73, 201, 214, 86]], [[170, 170, 73, 201, 214, 86], 'clean']]], [['regression [[190, 92, 54, 249, 159, 178]]', [[190, 92, 54, 249, 159, 178]], [None, 'uncorrectable']], ['regression [[146, 202, 14, 25, 193]]', [[146, 202, 14, 25, 193]], [None, 'uncorrectable']], ['control [[170, 170, 224, 201, 214, 86]]', [[170, 170, 224, 201, 214, 86]], [[170, 170, 73, 201, 214, 86], 'corrected']], ['control [[159, 170, 73, 201, 214, 86]]', [[159, 170, 73, 201, 214, 86]], [[170, 170, 73, 201, 214, 86], 'corrected']], ['control [[170, 108, 73, 201, 214, 197]]', [[170, 108, 73, 201, 214, 197]], [None, 'uncorrectable']], ['control [[95, 129, 216, 244, 158, 37, 73]]', [[95, 129, 216, 244, 158, 37, 73]], [[95, 129, 216, 244, 158, 37, 73], 'clean']], ['control [[95, 129, 216, 244, 184, 37, 73]]', [[95, 129, 216, 244, 184, 37, 73]], [[95, 129, 216, 244, 158, 37, 73], 'corrected']], ['control [[100, 129, 216, 244, 158, 37, 73]]', [[100, 129, 216, 244, 158, 37, 73]], [[95, 129, 216, 244, 158, 37, 73], 'corrected']]], [['regression [[183, 98, 190, 106, 24, 25]]', [[183, 98, 190, 106, 24, 25]], [None, 'uncorrectable']], ['regression [[39, 64, 216, 131, 60]]', [[39, 64, 216, 131, 60]], [None, 'uncorrectable']], ['partial-repair [[146, 202, 14, 25, 193]]', [[146, 202, 14, 25, 193]], [None, 'uncorrectable']], ['control [[100, 129, 216, 244, 158, 37, 73]]', [[100, 129, 216, 244, 158, 37, 73]], [[95, 129, 216, 244, 158, 37, 73], 'corrected']], ['control [[95, 129, 216, 148, 158, 46, 73]]', [[95, 129, 216, 148, 158, 46, 73]], [None, 'uncorrectable']], ['control [[29, 68, 82, 179, 193, 203, 215, 101]]', [[29, 68, 82, 179, 193, 203, 215, 101]], [[29, 68, 82, 179, 193, 203, 215, 101], 'clean']], ['control [[29, 68, 82, 251, 193, 203, 215, 101]]', [[29, 68, 82, 251, 193, 203, 215, 101]], [[29, 68, 82, 179, 193, 203, 215, 101], 'corrected']], ['control [[160, 68, 82, 179, 193, 203, 215, 101]]', [[160, 68, 82, 179, 193, 203, 215, 101]], [[29, 68, 82, 179, 193, 203, 215, 101], 'corrected']]], [['regression [[146, 202, 14, 25, 193]]', [[146, 202, 14, 25, 193]], [None, 'uncorrectable']], ['regression [[24, 109, 190, 189, 118]]', [[24, 109, 190, 189, 118]], [None, 'uncorrectable']], ['control [[224, 68, 82, 179, 193, 34, 215, 101]]', [[224, 68, 82, 179, 193, 34, 215, 101]], [None, 'uncorrectable']], ['control [[249, 14, 133, 199, 50, 217, 133, 156, 190, 249]]', [[249, 14, 133, 199, 50, 217, 133, 156, 190, 249]], [[249, 14, 133, 199, 50, 217, 133, 156, 190, 249], 'clean']], ['control [[249, 14, 133, 199, 50, 207, 133, 156, 190, 249]]', [[249, 14, 133, 199, 50, 207, 133, 156, 190, 249]], [[249, 14, 133, 199, 50, 217, 133, 156, 190, 249], 'corrected']], ['control [[101, 14, 133, 199, 50, 217, 133, 156, 190, 249]]', [[101, 14, 133, 199, 50, 217, 133, 156, 190, 249]], [[249, 14, 133, 199, 50, 217, 133, 156, 190, 249], 'corrected']], ['control [[249, 89, 133, 199, 50, 217, 133, 156, 84, 249]]', [[249, 89, 133, 199, 50, 217, 133, 156, 84, 249]], [None, 'uncorrectable']], ['control [[11, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52]]', [[11, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52]], [[11, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52], 'clean']]], [['regression [[39, 64, 216, 131, 60]]', [[39, 64, 216, 131, 60]], [None, 'uncorrectable']], ['regression [[190, 92, 54, 249, 159, 178]]', [[190, 92, 54, 249, 159, 178]], [None, 'uncorrectable']], ['partial-repair [[146, 202, 14, 25, 193]]', [[146, 202, 14, 25, 193]], [None, 'uncorrectable']], ['control [[11, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52]]', [[11, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52]], [[11, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52], 'clean']], ['control [[11, 173, 115, 26, 153, 95, 50, 118, 184, 32, 84, 52]]', [[11, 173, 115, 26, 153, 95, 50, 118, 184, 32, 84, 52]], [[11, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52], 'corrected']], ['control [[215, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52]]', [[215, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52]], [[11, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52], 'corrected']], ['control [[11, 173, 115, 26, 74, 155, 50, 118, 184, 32, 84, 52]]', [[11, 173, 115, 26, 74, 155, 50, 118, 184, 32, 84, 52]], [None, 'uncorrectable']], ['control [[83, 135, 139, 74, 148, 233, 28, 230, 113, 155, 213, 155, 184, 142]]', [[83, 135, 139, 74, 148, 233, 28, 230, 113, 155, 213, 155, 184, 142]], [[83, 135, 139, 74, 148, 233, 28, 230, 113, 155, 213, 155, 184, 142], 'clean']]]]
for label, args, expected in fixtures[N - 1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression [[24, 109, 190, 189, 118]] | [[24, 109, 190, 189, 118], 'corrected'] | [None, 'uncorrectable'] | Failed |
| regression [[183, 98, 190, 106, 24, 25]] | [[183, 98, 190, 106, 24, 25], 'corrected'] | [None, 'uncorrectable'] | Failed |
| partial-repair [[146, 202, 14, 25, 193]] | [[146, 202, 14, 151, 193], 'corrected'] | [None, 'uncorrectable'] | Failed |
| control [[197, 174, 1, 105, 3]] | [[197, 174, 1, 105, 3], 'clean'] | [[197, 174, 1, 105, 3], 'clean'] | Passed |
| control [[197, 174, 1, 72, 3]] | [[197, 174, 1, 105, 3], 'corrected'] | [[197, 174, 1, 105, 3], 'corrected'] | Passed |
| control [[246, 174, 1, 105, 3]] | [[197, 174, 1, 105, 3], 'corrected'] | [[197, 174, 1, 105, 3], 'corrected'] | Passed |
| control [[197, 174, 1, 32, 233]] | [None, 'uncorrectable'] | [None, 'uncorrectable'] | Passed |
| control [[170, 170, 73, 201, 214, 86]] | [[170, 170, 73, 201, 214, 86], 'clean'] | [[170, 170, 73, 201, 214, 86], 'clean'] | Passed |
SHA-256 / cedc9c5cfb82279dd6d523a1b1630d6d1691b6b79311561242a89d0f1a80d816
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(msg):
EXP, LOG = [0] * 512, [0] * 256
x = 1
for i in range(255):
EXP[i] = EXP[i + 255] = x
LOG[x] = i
x <<= 1
if x & 0x100:
x ^= 0x11D
def mul(a, b):
return 0 if a == 0 or b == 0 else EXP[LOG[a] + LOG[b]]
n = len(msg)
def ev(root):
v = 0
for coef in msg:
v = mul(v, root) ^ coef
return v
s0, s1 = ev(1), ev(2)
if s0 == 0 and s1 == 0:
return [list(msg), 'clean']
if s0 == 0:
return [None, 'uncorrectable']
loc = (LOG[s1] - LOG[s0]) % 255
if loc >= n:
return [None, 'uncorrectable']
out = list(msg)
out[n - 1 - loc] ^= s0
return [out, 'corrected']
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression [[24, 109, 190, 189, 118]]', [[24, 109, 190, 189, 118]], [None, 'uncorrectable']], ['regression [[183, 98, 190, 106, 24, 25]]', [[183, 98, 190, 106, 24, 25]], [None, 'uncorrectable']], ['partial-repair [[146, 202, 14, 25, 193]]', [[146, 202, 14, 25, 193]], [None, 'uncorrectable']], ['control [[197, 174, 1, 105, 3]]', [[197, 174, 1, 105, 3]], [[197, 174, 1, 105, 3], 'clean']], ['control [[197, 174, 1, 72, 3]]', [[197, 174, 1, 72, 3]], [[197, 174, 1, 105, 3], 'corrected']], ['control [[246, 174, 1, 105, 3]]', [[246, 174, 1, 105, 3]], [[197, 174, 1, 105, 3], 'corrected']], ['control [[197, 174, 1, 32, 233]]', [[197, 174, 1, 32, 233]], [None, 'uncorrectable']], ['control [[170, 170, 73, 201, 214, 86]]', [[170, 170, 73, 201, 214, 86]], [[170, 170, 73, 201, 214, 86], 'clean']]], [['regression [[190, 92, 54, 249, 159, 178]]', [[190, 92, 54, 249, 159, 178]], [None, 'uncorrectable']], ['regression [[146, 202, 14, 25, 193]]', [[146, 202, 14, 25, 193]], [None, 'uncorrectable']], ['control [[170, 170, 224, 201, 214, 86]]', [[170, 170, 224, 201, 214, 86]], [[170, 170, 73, 201, 214, 86], 'corrected']], ['control [[159, 170, 73, 201, 214, 86]]', [[159, 170, 73, 201, 214, 86]], [[170, 170, 73, 201, 214, 86], 'corrected']], ['control [[170, 108, 73, 201, 214, 197]]', [[170, 108, 73, 201, 214, 197]], [None, 'uncorrectable']], ['control [[95, 129, 216, 244, 158, 37, 73]]', [[95, 129, 216, 244, 158, 37, 73]], [[95, 129, 216, 244, 158, 37, 73], 'clean']], ['control [[95, 129, 216, 244, 184, 37, 73]]', [[95, 129, 216, 244, 184, 37, 73]], [[95, 129, 216, 244, 158, 37, 73], 'corrected']], ['control [[100, 129, 216, 244, 158, 37, 73]]', [[100, 129, 216, 244, 158, 37, 73]], [[95, 129, 216, 244, 158, 37, 73], 'corrected']]], [['regression [[183, 98, 190, 106, 24, 25]]', [[183, 98, 190, 106, 24, 25]], [None, 'uncorrectable']], ['regression [[39, 64, 216, 131, 60]]', [[39, 64, 216, 131, 60]], [None, 'uncorrectable']], ['partial-repair [[146, 202, 14, 25, 193]]', [[146, 202, 14, 25, 193]], [None, 'uncorrectable']], ['control [[100, 129, 216, 244, 158, 37, 73]]', [[100, 129, 216, 244, 158, 37, 73]], [[95, 129, 216, 244, 158, 37, 73], 'corrected']], ['control [[95, 129, 216, 148, 158, 46, 73]]', [[95, 129, 216, 148, 158, 46, 73]], [None, 'uncorrectable']], ['control [[29, 68, 82, 179, 193, 203, 215, 101]]', [[29, 68, 82, 179, 193, 203, 215, 101]], [[29, 68, 82, 179, 193, 203, 215, 101], 'clean']], ['control [[29, 68, 82, 251, 193, 203, 215, 101]]', [[29, 68, 82, 251, 193, 203, 215, 101]], [[29, 68, 82, 179, 193, 203, 215, 101], 'corrected']], ['control [[160, 68, 82, 179, 193, 203, 215, 101]]', [[160, 68, 82, 179, 193, 203, 215, 101]], [[29, 68, 82, 179, 193, 203, 215, 101], 'corrected']]], [['regression [[146, 202, 14, 25, 193]]', [[146, 202, 14, 25, 193]], [None, 'uncorrectable']], ['regression [[24, 109, 190, 189, 118]]', [[24, 109, 190, 189, 118]], [None, 'uncorrectable']], ['control [[224, 68, 82, 179, 193, 34, 215, 101]]', [[224, 68, 82, 179, 193, 34, 215, 101]], [None, 'uncorrectable']], ['control [[249, 14, 133, 199, 50, 217, 133, 156, 190, 249]]', [[249, 14, 133, 199, 50, 217, 133, 156, 190, 249]], [[249, 14, 133, 199, 50, 217, 133, 156, 190, 249], 'clean']], ['control [[249, 14, 133, 199, 50, 207, 133, 156, 190, 249]]', [[249, 14, 133, 199, 50, 207, 133, 156, 190, 249]], [[249, 14, 133, 199, 50, 217, 133, 156, 190, 249], 'corrected']], ['control [[101, 14, 133, 199, 50, 217, 133, 156, 190, 249]]', [[101, 14, 133, 199, 50, 217, 133, 156, 190, 249]], [[249, 14, 133, 199, 50, 217, 133, 156, 190, 249], 'corrected']], ['control [[249, 89, 133, 199, 50, 217, 133, 156, 84, 249]]', [[249, 89, 133, 199, 50, 217, 133, 156, 84, 249]], [None, 'uncorrectable']], ['control [[11, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52]]', [[11, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52]], [[11, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52], 'clean']]], [['regression [[39, 64, 216, 131, 60]]', [[39, 64, 216, 131, 60]], [None, 'uncorrectable']], ['regression [[190, 92, 54, 249, 159, 178]]', [[190, 92, 54, 249, 159, 178]], [None, 'uncorrectable']], ['partial-repair [[146, 202, 14, 25, 193]]', [[146, 202, 14, 25, 193]], [None, 'uncorrectable']], ['control [[11, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52]]', [[11, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52]], [[11, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52], 'clean']], ['control [[11, 173, 115, 26, 153, 95, 50, 118, 184, 32, 84, 52]]', [[11, 173, 115, 26, 153, 95, 50, 118, 184, 32, 84, 52]], [[11, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52], 'corrected']], ['control [[215, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52]]', [[215, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52]], [[11, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52], 'corrected']], ['control [[11, 173, 115, 26, 74, 155, 50, 118, 184, 32, 84, 52]]', [[11, 173, 115, 26, 74, 155, 50, 118, 184, 32, 84, 52]], [None, 'uncorrectable']], ['control [[83, 135, 139, 74, 148, 233, 28, 230, 113, 155, 213, 155, 184, 142]]', [[83, 135, 139, 74, 148, 233, 28, 230, 113, 155, 213, 155, 184, 142]], [[83, 135, 139, 74, 148, 233, 28, 230, 113, 155, 213, 155, 184, 142], 'clean']]]]
for label, args, expected in fixtures[N - 1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression [[24, 109, 190, 189, 118]] | [None, 'uncorrectable'] | [None, 'uncorrectable'] | Passed |
| regression [[183, 98, 190, 106, 24, 25]] | [None, 'uncorrectable'] | [None, 'uncorrectable'] | Passed |
| partial-repair [[146, 202, 14, 25, 193]] | [[146, 202, 14, 151, 193], 'corrected'] | [None, 'uncorrectable'] | Failed |
| control [[197, 174, 1, 105, 3]] | [[197, 174, 1, 105, 3], 'clean'] | [[197, 174, 1, 105, 3], 'clean'] | Passed |
| control [[197, 174, 1, 72, 3]] | [[197, 174, 1, 105, 3], 'corrected'] | [[197, 174, 1, 105, 3], 'corrected'] | Passed |
| control [[246, 174, 1, 105, 3]] | [[197, 174, 1, 105, 3], 'corrected'] | [[197, 174, 1, 105, 3], 'corrected'] | Passed |
| control [[197, 174, 1, 32, 233]] | [None, 'uncorrectable'] | [None, 'uncorrectable'] | Passed |
| control [[170, 170, 73, 201, 214, 86]] | [[170, 170, 73, 201, 214, 86], 'clean'] | [[170, 170, 73, 201, 214, 86], 'clean'] | Passed |
SHA-256 / af47e50ed39bc8d3ee28c7b1399ace2f480b5f262a771a896d58620b4acf6b1a
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
A deterministic, bounded teaching model of the named code under the stated contract; not a production codec. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:48:34.801734+00:00.
Case digest / bac9eab9facfec9c74064aa86a5335c1e147da9b601d567a839d2b46f75a2a54