FAILURE MAP
← Case archive

FA-72266 / Error-correcting codes / Open access

Burst capability rounds the symbol correction up · case 01

Codes with an odd number of parity symbols are credited with an extra correctable symbol.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

t is computed as ceil((n - k) / 2).

VERIFIED REPAIR

Use t = floor((n - k) / 2); the odd parity symbol only helps with erasures.

Unsuccessful approach: Using n - k counts erasure capability, not error capability.

Case contract

Guaranteed burst correction of an RS(n, k) code with m-bit symbols interleaved to depth D. Each codeword corrects t = floor((n - k) / 2) symbol errors; D interleaved codewords correct any burst of at most (t*D - 1)*m + 1 bits (a burst that straddles symbol boundaries touches one extra symbol). t = 0 gives 0. Invalid parameters return None.

Why this case matters

Optical, DVB and storage link budgets quote the longest correctable burst for an interleaved RS code.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(n, k, m, depth):
    if not 0 < k < n or m < 1 or depth < 1:
        return None
    t = (n - k + 1) // 2
    burst = (t * depth - 1) * m + 1 if t else 0
    return [t, burst]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression [255, 254, 8, 5]', [255, 254, 8, 5], [0, 0]], ['regression [10, 7, 2, 3]', [10, 7, 2, 3], [1, 5]], ['partial-repair [255, 223, 8, 1]', [255, 223, 8, 1], [16, 121]], ['partial-repair [255, 223, 8, 4]', [255, 223, 8, 4], [16, 505]], ['control [5, 5, 8, 1]', [5, 5, 8, 1], None], ['control [5, 2, 0, 1]', [5, 2, 0, 1], None], ['control [255, 239, 8, 2]', [255, 239, 8, 2], [8, 121]], ['control [204, 188, 8, 12]', [204, 188, 8, 12], [8, 761]]], [['regression [255, 254, 8, 5]', [255, 254, 8, 5], [0, 0]], ['regression [10, 7, 2, 3]', [10, 7, 2, 3], [1, 5]], ['partial-repair [204, 188, 8, 12]', [204, 188, 8, 12], [8, 761]], ['partial-repair [15, 11, 4, 3]', [15, 11, 4, 3], [2, 21]], ['control [5, 2, 0, 1]', [5, 2, 0, 1], None], ['control [5, 5, 8, 1]', [5, 5, 8, 1], None], ['control [31, 25, 5, 1]', [31, 25, 5, 1], [3, 11]], ['control [15, 9, 4, 1]', [15, 9, 4, 1], [3, 9]]], [['regression [255, 254, 8, 5]', [255, 254, 8, 5], [0, 0]], ['regression [10, 7, 2, 3]', [10, 7, 2, 3], [1, 5]], ['partial-repair [31, 25, 5, 1]', [31, 25, 5, 1], [3, 11]], ['control [5, 5, 8, 1]', [5, 5, 8, 1], None], ['control [5, 2, 0, 1]', [5, 2, 0, 1], None], ['control [20, 10, 1, 1]', [20, 10, 1, 1], [5, 5]], ['control [7, 6, 1, 1]', [7, 6, 1, 1], [0, 0]], ['control [255, 223, 8, 1]', [255, 223, 8, 1], [16, 121]]], [['regression [255, 254, 8, 5]', [255, 254, 8, 5], [0, 0]], ['regression [10, 7, 2, 3]', [10, 7, 2, 3], [1, 5]], ['partial-repair [255, 253, 8, 1]', [255, 253, 8, 1], [1, 1]], ['control [5, 2, 0, 1]', [5, 2, 0, 1], None], ['control [5, 5, 8, 1]', [5, 5, 8, 1], None], ['control [255, 223, 8, 4]', [255, 223, 8, 4], [16, 505]], ['control [255, 239, 8, 2]', [255, 239, 8, 2], [8, 121]], ['control [204, 188, 8, 12]', [204, 188, 8, 12], [8, 761]]], [['regression [255, 254, 8, 5]', [255, 254, 8, 5], [0, 0]], ['regression [10, 7, 2, 3]', [10, 7, 2, 3], [1, 5]], ['partial-repair [20, 10, 1, 1]', [20, 10, 1, 1], [5, 5]], ['partial-repair [7, 6, 1, 1]', [7, 6, 1, 1], [0, 0]], ['control [5, 5, 8, 1]', [5, 5, 8, 1], None], ['control [5, 2, 0, 1]', [5, 2, 0, 1], None], ['control [31, 25, 5, 1]', [31, 25, 5, 1], [3, 11]], ['control [15, 9, 4, 1]', [15, 9, 4, 1], [3, 9]]]]
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 fixtureActualExpectedOutcome
regression [255, 254, 8, 5][1, 33][0, 0]Failed
regression [10, 7, 2, 3][2, 11][1, 5]Failed
partial-repair [255, 223, 8, 1][16, 121][16, 121]Passed
partial-repair [255, 223, 8, 4][16, 505][16, 505]Passed
control [5, 5, 8, 1]NoneNonePassed
control [5, 2, 0, 1]NoneNonePassed
control [255, 239, 8, 2][8, 121][8, 121]Passed
control [204, 188, 8, 12][8, 761][8, 761]Passed

SHA-256 / 8fe37eeb4cf6c6ac072e4d43270279273324555d208ddc6f4fcf95f3010a6f0f

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(n, k, m, depth):
    if not 0 < k < n or m < 1 or depth < 1:
        return None
    t = n - k
    burst = (t * depth - 1) * m + 1 if t else 0
    return [t, burst]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression [255, 254, 8, 5]', [255, 254, 8, 5], [0, 0]], ['regression [10, 7, 2, 3]', [10, 7, 2, 3], [1, 5]], ['partial-repair [255, 223, 8, 1]', [255, 223, 8, 1], [16, 121]], ['partial-repair [255, 223, 8, 4]', [255, 223, 8, 4], [16, 505]], ['control [5, 5, 8, 1]', [5, 5, 8, 1], None], ['control [5, 2, 0, 1]', [5, 2, 0, 1], None], ['control [255, 239, 8, 2]', [255, 239, 8, 2], [8, 121]], ['control [204, 188, 8, 12]', [204, 188, 8, 12], [8, 761]]], [['regression [255, 254, 8, 5]', [255, 254, 8, 5], [0, 0]], ['regression [10, 7, 2, 3]', [10, 7, 2, 3], [1, 5]], ['partial-repair [204, 188, 8, 12]', [204, 188, 8, 12], [8, 761]], ['partial-repair [15, 11, 4, 3]', [15, 11, 4, 3], [2, 21]], ['control [5, 2, 0, 1]', [5, 2, 0, 1], None], ['control [5, 5, 8, 1]', [5, 5, 8, 1], None], ['control [31, 25, 5, 1]', [31, 25, 5, 1], [3, 11]], ['control [15, 9, 4, 1]', [15, 9, 4, 1], [3, 9]]], [['regression [255, 254, 8, 5]', [255, 254, 8, 5], [0, 0]], ['regression [10, 7, 2, 3]', [10, 7, 2, 3], [1, 5]], ['partial-repair [31, 25, 5, 1]', [31, 25, 5, 1], [3, 11]], ['control [5, 5, 8, 1]', [5, 5, 8, 1], None], ['control [5, 2, 0, 1]', [5, 2, 0, 1], None], ['control [20, 10, 1, 1]', [20, 10, 1, 1], [5, 5]], ['control [7, 6, 1, 1]', [7, 6, 1, 1], [0, 0]], ['control [255, 223, 8, 1]', [255, 223, 8, 1], [16, 121]]], [['regression [255, 254, 8, 5]', [255, 254, 8, 5], [0, 0]], ['regression [10, 7, 2, 3]', [10, 7, 2, 3], [1, 5]], ['partial-repair [255, 253, 8, 1]', [255, 253, 8, 1], [1, 1]], ['control [5, 2, 0, 1]', [5, 2, 0, 1], None], ['control [5, 5, 8, 1]', [5, 5, 8, 1], None], ['control [255, 223, 8, 4]', [255, 223, 8, 4], [16, 505]], ['control [255, 239, 8, 2]', [255, 239, 8, 2], [8, 121]], ['control [204, 188, 8, 12]', [204, 188, 8, 12], [8, 761]]], [['regression [255, 254, 8, 5]', [255, 254, 8, 5], [0, 0]], ['regression [10, 7, 2, 3]', [10, 7, 2, 3], [1, 5]], ['partial-repair [20, 10, 1, 1]', [20, 10, 1, 1], [5, 5]], ['partial-repair [7, 6, 1, 1]', [7, 6, 1, 1], [0, 0]], ['control [5, 5, 8, 1]', [5, 5, 8, 1], None], ['control [5, 2, 0, 1]', [5, 2, 0, 1], None], ['control [31, 25, 5, 1]', [31, 25, 5, 1], [3, 11]], ['control [15, 9, 4, 1]', [15, 9, 4, 1], [3, 9]]]]
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 fixtureActualExpectedOutcome
regression [255, 254, 8, 5][1, 33][0, 0]Failed
regression [10, 7, 2, 3][3, 17][1, 5]Failed
partial-repair [255, 223, 8, 1][32, 249][16, 121]Failed
partial-repair [255, 223, 8, 4][32, 1017][16, 505]Failed
control [5, 5, 8, 1]NoneNonePassed
control [5, 2, 0, 1]NoneNonePassed
control [255, 239, 8, 2][16, 249][8, 121]Failed
control [204, 188, 8, 12][16, 1529][8, 761]Failed

SHA-256 / c25c9eb8fd008fc0f0ee5f5e410ec630803317b034ccac8151212ab9e3d1ece8

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(n, k, m, depth):
    if not 0 < k < n or m < 1 or depth < 1:
        return None
    t = (n - k) // 2
    burst = (t * depth - 1) * m + 1 if t else 0
    return [t, burst]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression [255, 254, 8, 5]', [255, 254, 8, 5], [0, 0]], ['regression [10, 7, 2, 3]', [10, 7, 2, 3], [1, 5]], ['partial-repair [255, 223, 8, 1]', [255, 223, 8, 1], [16, 121]], ['partial-repair [255, 223, 8, 4]', [255, 223, 8, 4], [16, 505]], ['control [5, 5, 8, 1]', [5, 5, 8, 1], None], ['control [5, 2, 0, 1]', [5, 2, 0, 1], None], ['control [255, 239, 8, 2]', [255, 239, 8, 2], [8, 121]], ['control [204, 188, 8, 12]', [204, 188, 8, 12], [8, 761]]], [['regression [255, 254, 8, 5]', [255, 254, 8, 5], [0, 0]], ['regression [10, 7, 2, 3]', [10, 7, 2, 3], [1, 5]], ['partial-repair [204, 188, 8, 12]', [204, 188, 8, 12], [8, 761]], ['partial-repair [15, 11, 4, 3]', [15, 11, 4, 3], [2, 21]], ['control [5, 2, 0, 1]', [5, 2, 0, 1], None], ['control [5, 5, 8, 1]', [5, 5, 8, 1], None], ['control [31, 25, 5, 1]', [31, 25, 5, 1], [3, 11]], ['control [15, 9, 4, 1]', [15, 9, 4, 1], [3, 9]]], [['regression [255, 254, 8, 5]', [255, 254, 8, 5], [0, 0]], ['regression [10, 7, 2, 3]', [10, 7, 2, 3], [1, 5]], ['partial-repair [31, 25, 5, 1]', [31, 25, 5, 1], [3, 11]], ['control [5, 5, 8, 1]', [5, 5, 8, 1], None], ['control [5, 2, 0, 1]', [5, 2, 0, 1], None], ['control [20, 10, 1, 1]', [20, 10, 1, 1], [5, 5]], ['control [7, 6, 1, 1]', [7, 6, 1, 1], [0, 0]], ['control [255, 223, 8, 1]', [255, 223, 8, 1], [16, 121]]], [['regression [255, 254, 8, 5]', [255, 254, 8, 5], [0, 0]], ['regression [10, 7, 2, 3]', [10, 7, 2, 3], [1, 5]], ['partial-repair [255, 253, 8, 1]', [255, 253, 8, 1], [1, 1]], ['control [5, 2, 0, 1]', [5, 2, 0, 1], None], ['control [5, 5, 8, 1]', [5, 5, 8, 1], None], ['control [255, 223, 8, 4]', [255, 223, 8, 4], [16, 505]], ['control [255, 239, 8, 2]', [255, 239, 8, 2], [8, 121]], ['control [204, 188, 8, 12]', [204, 188, 8, 12], [8, 761]]], [['regression [255, 254, 8, 5]', [255, 254, 8, 5], [0, 0]], ['regression [10, 7, 2, 3]', [10, 7, 2, 3], [1, 5]], ['partial-repair [20, 10, 1, 1]', [20, 10, 1, 1], [5, 5]], ['partial-repair [7, 6, 1, 1]', [7, 6, 1, 1], [0, 0]], ['control [5, 5, 8, 1]', [5, 5, 8, 1], None], ['control [5, 2, 0, 1]', [5, 2, 0, 1], None], ['control [31, 25, 5, 1]', [31, 25, 5, 1], [3, 11]], ['control [15, 9, 4, 1]', [15, 9, 4, 1], [3, 9]]]]
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 fixtureActualExpectedOutcome
regression [255, 254, 8, 5][0, 0][0, 0]Passed
regression [10, 7, 2, 3][1, 5][1, 5]Passed
partial-repair [255, 223, 8, 1][16, 121][16, 121]Passed
partial-repair [255, 223, 8, 4][16, 505][16, 505]Passed
control [5, 5, 8, 1]NoneNonePassed
control [5, 2, 0, 1]NoneNonePassed
control [255, 239, 8, 2][8, 121][8, 121]Passed
control [204, 188, 8, 12][8, 761][8, 761]Passed

SHA-256 / c714ed2cdf5fa47110d17ed14e416bddbd7d55c3f2b629cd1c509290769f0337

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:37.022147+00:00.

Case digest / c133f8858563df083fafbb7b90027898bc94e1623cac8f9742b92eeb0c66e0ca