FA-72296 / Error-correcting codes / Open access
Weight distribution takes the minimum row weight as the distance · case 01
Minimum distance is overstated when a combination of rows is lighter than every row.
ROOT CAUSE
dmin is computed from the generator rows rather than from all nonzero codewords.
THE FAILURE
dmin is computed from the generator rows rather than from all nonzero codewords.
Unsuccessful approach: Including weight 0 in the search always reports distance 0.
Case contract
Weight distribution of the binary linear code spanned by the rows of generator matrix G (rows may be dependent). Enumerate all 2^k messages including the zero message, form codewords as XOR combinations of rows, and histogram their Hamming weights (index 0..n). dmin is the smallest nonzero weight present (0 if the code is only the zero word). Return [histogram, dmin].
Why this case matters
Code designers use weight enumerators to estimate undetected-error probability and minimum distance.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(G):
k, n = len(G), len(G[0])
hist = [0] * (n + 1)
for msg in range(2 ** k):
c = [0] * n
for i in range(k):
if msg >> i & 1:
c = [a ^ b for a, b in zip(c, G[i])]
hist[sum(c)] += 1
dmin = min(sum(row) for row in G)
return [hist, dmin]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression [[[1, 1, 0, 0, 0], [1, 1, 0, 0, 1], [0, 0, 1, 1, 1], [1, 1, 0, 0, 1]]]', [[[1, 1, 0, 0, 0], [1, 1, 0, 0, 1], [0, 0, 1, 1, 1], [1, 1, 0, 0, 1]]], [[2, 2, 4, 4, 2, 2], 1]], ['regression [[[0, 0, 0, 1, 0, 1, 1], [1, 0, 0, 1, 1, 1, 0], [0, 0, 0, 1, 1, 0, ...', [[[0, 0, 0, 1, 0, 1, 1], [1, 0, 0, 1, 1, 1, 0], [0, 0, 0, 1, 1, 0, 1], [0, 0, 0, 1, 1, 0, 0]]], [[1, 1, 6, 6, 1, 1, 0, 0], 1]], ['partial-repair [[[1, 0, 0, 0, 1, 1, 0], [0, 1, 0, 0, 1, 0, 1], [0, 0, 1, 0, 0, 1, ...', [[[1, 0, 0, 0, 1, 1, 0], [0, 1, 0, 0, 1, 0, 1], [0, 0, 1, 0, 0, 1, 1], [0, 0, 0, 1, 1, 1, 1]]], [[1, 0, 0, 7, 7, 0, 0, 1], 3]], ['partial-repair [[[1, 1, 1]]]', [[[1, 1, 1]]], [[1, 0, 0, 1], 3]], ['control [[[0, 0, 0]]]', [[[0, 0, 0]]], [[2, 0, 0, 0], 0]], ['control [[[1, 1, 0, 0], [0, 1, 1, 0], [0, 0, 1, 1]]]', [[[1, 1, 0, 0], [0, 1, 1, 0], [0, 0, 1, 1]]], [[1, 0, 6, 0, 1], 2]], ['control [[[1, 0, 1, 1, 0], [0, 1, 1, 1, 1]]]', [[[1, 0, 1, 1, 0], [0, 1, 1, 1, 1]]], [[1, 0, 0, 2, 1, 0], 3]], ['control [[[1, 1, 0], [1, 1, 0]]]', [[[1, 1, 0], [1, 1, 0]]], [[2, 0, 2, 0], 2]]], [['regression [[[0, 0, 1, 0, 1, 1, 1], [0, 1, 0, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, ...', [[[0, 0, 1, 0, 1, 1, 1], [0, 1, 0, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 0], [0, 1, 1, 1, 1, 0, 1]]], [[1, 1, 1, 4, 5, 3, 1, 0], 1]], ['regression [[[0, 1, 1, 1, 1, 0, 0], [0, 1, 1, 0, 1, 1, 1], [1, 0, 0, 0, 1, 1, ...', [[[0, 1, 1, 1, 1, 0, 0], [0, 1, 1, 0, 1, 1, 1], [1, 0, 0, 0, 1, 1, 1]]], [[1, 0, 0, 3, 2, 1, 1, 0], 3]], ['partial-repair [[[1, 0, 1, 1, 0], [0, 1, 1, 1, 1]]]', [[[1, 0, 1, 1, 0], [0, 1, 1, 1, 1]]], [[1, 0, 0, 2, 1, 0], 3]], ['partial-repair [[[1, 1, 0], [1, 1, 0]]]', [[[1, 1, 0], [1, 1, 0]]], [[2, 0, 2, 0], 2]], ['control [[[0, 0, 0]]]', [[[0, 0, 0]]], [[2, 0, 0, 0], 0]], ['control [[[1, 1, 0, 0, 0], [1, 1, 0, 0, 1], [0, 0, 1, 1, 1], [1, 1, 0, 0, 1]]]', [[[1, 1, 0, 0, 0], [1, 1, 0, 0, 1], [0, 0, 1, 1, 1], [1, 1, 0, 0, 1]]], [[2, 2, 4, 4, 2, 2], 1]], ['control [[[0, 0, 0, 1, 0, 1, 1], [1, 0, 0, 1, 1, 1, 0], [0, 0, 0, 1, 1, 0, ...', [[[0, 0, 0, 1, 0, 1, 1], [1, 0, 0, 1, 1, 1, 0], [0, 0, 0, 1, 1, 0, 1], [0, 0, 0, 1, 1, 0, 0]]], [[1, 1, 6, 6, 1, 1, 0, 0], 1]], ['control [[[1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 0, 0], [0, 1, 1, 0, 0, 0, ...', [[[1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 0, 0], [0, 1, 1, 0, 0, 0, 0], [1, 1, 1, 0, 0, 1, 0]]], [[1, 0, 2, 5, 5, 2, 0, 1], 2]]], [['regression [[[0, 0, 0, 1, 0, 1, 1], [1, 0, 0, 1, 1, 1, 0], [0, 0, 0, 1, 1, 0, ...', [[[0, 0, 0, 1, 0, 1, 1], [1, 0, 0, 1, 1, 1, 0], [0, 0, 0, 1, 1, 0, 1], [0, 0, 0, 1, 1, 0, 0]]], [[1, 1, 6, 6, 1, 1, 0, 0], 1]], ['regression [[[1, 0, 0, 1, 1, 0], [1, 1, 1, 0, 0, 0], [1, 0, 1, 1, 1, 0]]]', [[[1, 0, 0, 1, 1, 0], [1, 1, 1, 0, 0, 0], [1, 0, 1, 1, 1, 0]]], [[1, 1, 1, 3, 2, 0, 0], 1]], ['partial-repair [[[1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 0, 0], [0, 1, 1, 0, 0, 0, ...', [[[1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 0, 0], [0, 1, 1, 0, 0, 0, 0], [1, 1, 1, 0, 0, 1, 0]]], [[1, 0, 2, 5, 5, 2, 0, 1], 2]], ['control [[[0, 0, 0]]]', [[[0, 0, 0]]], [[2, 0, 0, 0], 0]], ['control [[[1, 1, 1, 0, 0, 0, 1]]]', [[[1, 1, 1, 0, 0, 0, 1]]], [[1, 0, 0, 0, 1, 0, 0, 0], 4]], ['control [[[1, 0, 1, 1], [0, 0, 0, 1]]]', [[[1, 0, 1, 1], [0, 0, 0, 1]]], [[1, 1, 1, 1, 0], 1]], ['control [[[1, 0]]]', [[[1, 0]]], [[1, 1, 0], 1]], ['control [[[0, 0, 1, 0, 1, 1, 1], [0, 1, 0, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, ...', [[[0, 0, 1, 0, 1, 1, 1], [0, 1, 0, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 0], [0, 1, 1, 1, 1, 0, 1]]], [[1, 1, 1, 4, 5, 3, 1, 0], 1]]], [['regression [[[0, 1, 1, 1, 1, 0, 0], [0, 1, 1, 0, 1, 1, 1], [1, 0, 0, 0, 1, 1, ...', [[[0, 1, 1, 1, 1, 0, 0], [0, 1, 1, 0, 1, 1, 1], [1, 0, 0, 0, 1, 1, 1]]], [[1, 0, 0, 3, 2, 1, 1, 0], 3]], ['regression [[[1, 1, 0, 0, 0], [1, 1, 0, 0, 1], [0, 0, 1, 1, 1], [1, 1, 0, 0, 1]]]', [[[1, 1, 0, 0, 0], [1, 1, 0, 0, 1], [0, 0, 1, 1, 1], [1, 1, 0, 0, 1]]], [[2, 2, 4, 4, 2, 2], 1]], ['partial-repair [[[1, 0, 0, 1, 1, 0], [1, 1, 1, 0, 0, 0], [1, 0, 1, 1, 1, 0]]]', [[[1, 0, 0, 1, 1, 0], [1, 1, 1, 0, 0, 0], [1, 0, 1, 1, 1, 0]]], [[1, 1, 1, 3, 2, 0, 0], 1]], ['partial-repair [[[1, 1, 1, 0, 0, 0, 1]]]', [[[1, 1, 1, 0, 0, 0, 1]]], [[1, 0, 0, 0, 1, 0, 0, 0], 4]], ['control [[[0, 0, 0]]]', [[[0, 0, 0]]], [[2, 0, 0, 0], 0]], ['control [[[0, 1, 0, 0, 1, 0, 0], [1, 1, 1, 0, 1, 1, 0], [1, 1, 0, 1, 1, 1, ...', [[[0, 1, 0, 0, 1, 0, 0], [1, 1, 1, 0, 1, 1, 0], [1, 1, 0, 1, 1, 1, 0]]], [[1, 0, 2, 2, 1, 2, 0, 0], 2]], ['control [[[0, 0, 1], [1, 1, 0]]]', [[[0, 0, 1], [1, 1, 0]]], [[1, 1, 1, 1], 1]], ['control [[[0, 0, 1, 0]]]', [[[0, 0, 1, 0]]], [[1, 1, 0, 0, 0], 1]]], [['regression [[[1, 0, 0, 1, 1, 0], [1, 1, 1, 0, 0, 0], [1, 0, 1, 1, 1, 0]]]', [[[1, 0, 0, 1, 1, 0], [1, 1, 1, 0, 0, 0], [1, 0, 1, 1, 1, 0]]], [[1, 1, 1, 3, 2, 0, 0], 1]], ['regression [[[0, 0, 1, 0, 1, 1, 1], [0, 1, 0, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, ...', [[[0, 0, 1, 0, 1, 1, 1], [0, 1, 0, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 0], [0, 1, 1, 1, 1, 0, 1]]], [[1, 1, 1, 4, 5, 3, 1, 0], 1]], ['partial-repair [[[1, 0]]]', [[[1, 0]]], [[1, 1, 0], 1]], ['control [[[0, 0, 0]]]', [[[0, 0, 0]]], [[2, 0, 0, 0], 0]], ['control [[[1, 0, 0, 0, 1, 1, 0], [0, 1, 0, 0, 1, 0, 1], [0, 0, 1, 0, 0, 1, ...', [[[1, 0, 0, 0, 1, 1, 0], [0, 1, 0, 0, 1, 0, 1], [0, 0, 1, 0, 0, 1, 1], [0, 0, 0, 1, 1, 1, 1]]], [[1, 0, 0, 7, 7, 0, 0, 1], 3]], ['control [[[1, 1, 1]]]', [[[1, 1, 1]]], [[1, 0, 0, 1], 3]], ['control [[[1, 1, 0, 0], [0, 1, 1, 0], [0, 0, 1, 1]]]', [[[1, 1, 0, 0], [0, 1, 1, 0], [0, 0, 1, 1]]], [[1, 0, 6, 0, 1], 2]], ['control [[[1, 0, 1, 1, 0], [0, 1, 1, 1, 1]]]', [[[1, 0, 1, 1, 0], [0, 1, 1, 1, 1]]], [[1, 0, 0, 2, 1, 0], 3]]]]
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 [[[1, 1, 0, 0, 0], [1, 1, 0, 0, 1], [0, 0, 1, 1, 1], [1, 1, 0, 0, 1]]] | [[2, 2, 4, 4, 2, 2], 2] | [[2, 2, 4, 4, 2, 2], 1] | Failed |
| regression [[[0, 0, 0, 1, 0, 1, 1], [1, 0, 0, 1, 1, 1, 0], [0, 0, 0, 1, 1, 0, ... | [[1, 1, 6, 6, 1, 1, 0, 0], 2] | [[1, 1, 6, 6, 1, 1, 0, 0], 1] | Failed |
| partial-repair [[[1, 0, 0, 0, 1, 1, 0], [0, 1, 0, 0, 1, 0, 1], [0, 0, 1, 0, 0, 1, ... | [[1, 0, 0, 7, 7, 0, 0, 1], 3] | [[1, 0, 0, 7, 7, 0, 0, 1], 3] | Passed |
| partial-repair [[[1, 1, 1]]] | [[1, 0, 0, 1], 3] | [[1, 0, 0, 1], 3] | Passed |
| control [[[0, 0, 0]]] | [[2, 0, 0, 0], 0] | [[2, 0, 0, 0], 0] | Passed |
| control [[[1, 1, 0, 0], [0, 1, 1, 0], [0, 0, 1, 1]]] | [[1, 0, 6, 0, 1], 2] | [[1, 0, 6, 0, 1], 2] | Passed |
| control [[[1, 0, 1, 1, 0], [0, 1, 1, 1, 1]]] | [[1, 0, 0, 2, 1, 0], 3] | [[1, 0, 0, 2, 1, 0], 3] | Passed |
| control [[[1, 1, 0], [1, 1, 0]]] | [[2, 0, 2, 0], 2] | [[2, 0, 2, 0], 2] | Passed |
SHA-256 / 7418cc3e62934522aca00556eb2408f1a100f2347795c03c9c8a1d93fbf38509
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(G):
k, n = len(G), len(G[0])
hist = [0] * (n + 1)
for msg in range(2 ** k):
c = [0] * n
for i in range(k):
if msg >> i & 1:
c = [a ^ b for a, b in zip(c, G[i])]
hist[sum(c)] += 1
dmin = min(w for w in range(0, n + 1) if hist[w]) if any(hist[1:]) else 0
return [hist, dmin]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression [[[1, 1, 0, 0, 0], [1, 1, 0, 0, 1], [0, 0, 1, 1, 1], [1, 1, 0, 0, 1]]]', [[[1, 1, 0, 0, 0], [1, 1, 0, 0, 1], [0, 0, 1, 1, 1], [1, 1, 0, 0, 1]]], [[2, 2, 4, 4, 2, 2], 1]], ['regression [[[0, 0, 0, 1, 0, 1, 1], [1, 0, 0, 1, 1, 1, 0], [0, 0, 0, 1, 1, 0, ...', [[[0, 0, 0, 1, 0, 1, 1], [1, 0, 0, 1, 1, 1, 0], [0, 0, 0, 1, 1, 0, 1], [0, 0, 0, 1, 1, 0, 0]]], [[1, 1, 6, 6, 1, 1, 0, 0], 1]], ['partial-repair [[[1, 0, 0, 0, 1, 1, 0], [0, 1, 0, 0, 1, 0, 1], [0, 0, 1, 0, 0, 1, ...', [[[1, 0, 0, 0, 1, 1, 0], [0, 1, 0, 0, 1, 0, 1], [0, 0, 1, 0, 0, 1, 1], [0, 0, 0, 1, 1, 1, 1]]], [[1, 0, 0, 7, 7, 0, 0, 1], 3]], ['partial-repair [[[1, 1, 1]]]', [[[1, 1, 1]]], [[1, 0, 0, 1], 3]], ['control [[[0, 0, 0]]]', [[[0, 0, 0]]], [[2, 0, 0, 0], 0]], ['control [[[1, 1, 0, 0], [0, 1, 1, 0], [0, 0, 1, 1]]]', [[[1, 1, 0, 0], [0, 1, 1, 0], [0, 0, 1, 1]]], [[1, 0, 6, 0, 1], 2]], ['control [[[1, 0, 1, 1, 0], [0, 1, 1, 1, 1]]]', [[[1, 0, 1, 1, 0], [0, 1, 1, 1, 1]]], [[1, 0, 0, 2, 1, 0], 3]], ['control [[[1, 1, 0], [1, 1, 0]]]', [[[1, 1, 0], [1, 1, 0]]], [[2, 0, 2, 0], 2]]], [['regression [[[0, 0, 1, 0, 1, 1, 1], [0, 1, 0, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, ...', [[[0, 0, 1, 0, 1, 1, 1], [0, 1, 0, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 0], [0, 1, 1, 1, 1, 0, 1]]], [[1, 1, 1, 4, 5, 3, 1, 0], 1]], ['regression [[[0, 1, 1, 1, 1, 0, 0], [0, 1, 1, 0, 1, 1, 1], [1, 0, 0, 0, 1, 1, ...', [[[0, 1, 1, 1, 1, 0, 0], [0, 1, 1, 0, 1, 1, 1], [1, 0, 0, 0, 1, 1, 1]]], [[1, 0, 0, 3, 2, 1, 1, 0], 3]], ['partial-repair [[[1, 0, 1, 1, 0], [0, 1, 1, 1, 1]]]', [[[1, 0, 1, 1, 0], [0, 1, 1, 1, 1]]], [[1, 0, 0, 2, 1, 0], 3]], ['partial-repair [[[1, 1, 0], [1, 1, 0]]]', [[[1, 1, 0], [1, 1, 0]]], [[2, 0, 2, 0], 2]], ['control [[[0, 0, 0]]]', [[[0, 0, 0]]], [[2, 0, 0, 0], 0]], ['control [[[1, 1, 0, 0, 0], [1, 1, 0, 0, 1], [0, 0, 1, 1, 1], [1, 1, 0, 0, 1]]]', [[[1, 1, 0, 0, 0], [1, 1, 0, 0, 1], [0, 0, 1, 1, 1], [1, 1, 0, 0, 1]]], [[2, 2, 4, 4, 2, 2], 1]], ['control [[[0, 0, 0, 1, 0, 1, 1], [1, 0, 0, 1, 1, 1, 0], [0, 0, 0, 1, 1, 0, ...', [[[0, 0, 0, 1, 0, 1, 1], [1, 0, 0, 1, 1, 1, 0], [0, 0, 0, 1, 1, 0, 1], [0, 0, 0, 1, 1, 0, 0]]], [[1, 1, 6, 6, 1, 1, 0, 0], 1]], ['control [[[1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 0, 0], [0, 1, 1, 0, 0, 0, ...', [[[1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 0, 0], [0, 1, 1, 0, 0, 0, 0], [1, 1, 1, 0, 0, 1, 0]]], [[1, 0, 2, 5, 5, 2, 0, 1], 2]]], [['regression [[[0, 0, 0, 1, 0, 1, 1], [1, 0, 0, 1, 1, 1, 0], [0, 0, 0, 1, 1, 0, ...', [[[0, 0, 0, 1, 0, 1, 1], [1, 0, 0, 1, 1, 1, 0], [0, 0, 0, 1, 1, 0, 1], [0, 0, 0, 1, 1, 0, 0]]], [[1, 1, 6, 6, 1, 1, 0, 0], 1]], ['regression [[[1, 0, 0, 1, 1, 0], [1, 1, 1, 0, 0, 0], [1, 0, 1, 1, 1, 0]]]', [[[1, 0, 0, 1, 1, 0], [1, 1, 1, 0, 0, 0], [1, 0, 1, 1, 1, 0]]], [[1, 1, 1, 3, 2, 0, 0], 1]], ['partial-repair [[[1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 0, 0], [0, 1, 1, 0, 0, 0, ...', [[[1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 0, 0], [0, 1, 1, 0, 0, 0, 0], [1, 1, 1, 0, 0, 1, 0]]], [[1, 0, 2, 5, 5, 2, 0, 1], 2]], ['control [[[0, 0, 0]]]', [[[0, 0, 0]]], [[2, 0, 0, 0], 0]], ['control [[[1, 1, 1, 0, 0, 0, 1]]]', [[[1, 1, 1, 0, 0, 0, 1]]], [[1, 0, 0, 0, 1, 0, 0, 0], 4]], ['control [[[1, 0, 1, 1], [0, 0, 0, 1]]]', [[[1, 0, 1, 1], [0, 0, 0, 1]]], [[1, 1, 1, 1, 0], 1]], ['control [[[1, 0]]]', [[[1, 0]]], [[1, 1, 0], 1]], ['control [[[0, 0, 1, 0, 1, 1, 1], [0, 1, 0, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, ...', [[[0, 0, 1, 0, 1, 1, 1], [0, 1, 0, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 0], [0, 1, 1, 1, 1, 0, 1]]], [[1, 1, 1, 4, 5, 3, 1, 0], 1]]], [['regression [[[0, 1, 1, 1, 1, 0, 0], [0, 1, 1, 0, 1, 1, 1], [1, 0, 0, 0, 1, 1, ...', [[[0, 1, 1, 1, 1, 0, 0], [0, 1, 1, 0, 1, 1, 1], [1, 0, 0, 0, 1, 1, 1]]], [[1, 0, 0, 3, 2, 1, 1, 0], 3]], ['regression [[[1, 1, 0, 0, 0], [1, 1, 0, 0, 1], [0, 0, 1, 1, 1], [1, 1, 0, 0, 1]]]', [[[1, 1, 0, 0, 0], [1, 1, 0, 0, 1], [0, 0, 1, 1, 1], [1, 1, 0, 0, 1]]], [[2, 2, 4, 4, 2, 2], 1]], ['partial-repair [[[1, 0, 0, 1, 1, 0], [1, 1, 1, 0, 0, 0], [1, 0, 1, 1, 1, 0]]]', [[[1, 0, 0, 1, 1, 0], [1, 1, 1, 0, 0, 0], [1, 0, 1, 1, 1, 0]]], [[1, 1, 1, 3, 2, 0, 0], 1]], ['partial-repair [[[1, 1, 1, 0, 0, 0, 1]]]', [[[1, 1, 1, 0, 0, 0, 1]]], [[1, 0, 0, 0, 1, 0, 0, 0], 4]], ['control [[[0, 0, 0]]]', [[[0, 0, 0]]], [[2, 0, 0, 0], 0]], ['control [[[0, 1, 0, 0, 1, 0, 0], [1, 1, 1, 0, 1, 1, 0], [1, 1, 0, 1, 1, 1, ...', [[[0, 1, 0, 0, 1, 0, 0], [1, 1, 1, 0, 1, 1, 0], [1, 1, 0, 1, 1, 1, 0]]], [[1, 0, 2, 2, 1, 2, 0, 0], 2]], ['control [[[0, 0, 1], [1, 1, 0]]]', [[[0, 0, 1], [1, 1, 0]]], [[1, 1, 1, 1], 1]], ['control [[[0, 0, 1, 0]]]', [[[0, 0, 1, 0]]], [[1, 1, 0, 0, 0], 1]]], [['regression [[[1, 0, 0, 1, 1, 0], [1, 1, 1, 0, 0, 0], [1, 0, 1, 1, 1, 0]]]', [[[1, 0, 0, 1, 1, 0], [1, 1, 1, 0, 0, 0], [1, 0, 1, 1, 1, 0]]], [[1, 1, 1, 3, 2, 0, 0], 1]], ['regression [[[0, 0, 1, 0, 1, 1, 1], [0, 1, 0, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, ...', [[[0, 0, 1, 0, 1, 1, 1], [0, 1, 0, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 0], [0, 1, 1, 1, 1, 0, 1]]], [[1, 1, 1, 4, 5, 3, 1, 0], 1]], ['partial-repair [[[1, 0]]]', [[[1, 0]]], [[1, 1, 0], 1]], ['control [[[0, 0, 0]]]', [[[0, 0, 0]]], [[2, 0, 0, 0], 0]], ['control [[[1, 0, 0, 0, 1, 1, 0], [0, 1, 0, 0, 1, 0, 1], [0, 0, 1, 0, 0, 1, ...', [[[1, 0, 0, 0, 1, 1, 0], [0, 1, 0, 0, 1, 0, 1], [0, 0, 1, 0, 0, 1, 1], [0, 0, 0, 1, 1, 1, 1]]], [[1, 0, 0, 7, 7, 0, 0, 1], 3]], ['control [[[1, 1, 1]]]', [[[1, 1, 1]]], [[1, 0, 0, 1], 3]], ['control [[[1, 1, 0, 0], [0, 1, 1, 0], [0, 0, 1, 1]]]', [[[1, 1, 0, 0], [0, 1, 1, 0], [0, 0, 1, 1]]], [[1, 0, 6, 0, 1], 2]], ['control [[[1, 0, 1, 1, 0], [0, 1, 1, 1, 1]]]', [[[1, 0, 1, 1, 0], [0, 1, 1, 1, 1]]], [[1, 0, 0, 2, 1, 0], 3]]]]
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 [[[1, 1, 0, 0, 0], [1, 1, 0, 0, 1], [0, 0, 1, 1, 1], [1, 1, 0, 0, 1]]] | [[2, 2, 4, 4, 2, 2], 0] | [[2, 2, 4, 4, 2, 2], 1] | Failed |
| regression [[[0, 0, 0, 1, 0, 1, 1], [1, 0, 0, 1, 1, 1, 0], [0, 0, 0, 1, 1, 0, ... | [[1, 1, 6, 6, 1, 1, 0, 0], 0] | [[1, 1, 6, 6, 1, 1, 0, 0], 1] | Failed |
| partial-repair [[[1, 0, 0, 0, 1, 1, 0], [0, 1, 0, 0, 1, 0, 1], [0, 0, 1, 0, 0, 1, ... | [[1, 0, 0, 7, 7, 0, 0, 1], 0] | [[1, 0, 0, 7, 7, 0, 0, 1], 3] | Failed |
| partial-repair [[[1, 1, 1]]] | [[1, 0, 0, 1], 0] | [[1, 0, 0, 1], 3] | Failed |
| control [[[0, 0, 0]]] | [[2, 0, 0, 0], 0] | [[2, 0, 0, 0], 0] | Passed |
| control [[[1, 1, 0, 0], [0, 1, 1, 0], [0, 0, 1, 1]]] | [[1, 0, 6, 0, 1], 0] | [[1, 0, 6, 0, 1], 2] | Failed |
| control [[[1, 0, 1, 1, 0], [0, 1, 1, 1, 1]]] | [[1, 0, 0, 2, 1, 0], 0] | [[1, 0, 0, 2, 1, 0], 3] | Failed |
| control [[[1, 1, 0], [1, 1, 0]]] | [[2, 0, 2, 0], 0] | [[2, 0, 2, 0], 2] | Failed |
SHA-256 / 6373818cfdafff9294471df28800dfb34617b6247be96faeef441b4df1cd0eea
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:37.279988+00:00.
Case digest / 24965b26dc003731a3011afbef3be0ff95703277a824b7395a6d79472d8a0047