FAILURE MAP
← Case archive

FA-71926 / Error-correcting codes / Open access

Convolutional encoder omits the zero tail · case 01

Decoders cannot terminate in state 0 and the last bits decode unreliably.

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

ROOT CAUSE

The input is not followed by K-1 = 2 zero bits.

THE FAILURE

The input is not followed by K-1 = 2 zero bits.

Unsuccessful approach: A single tail bit leaves the register half flushed.

Case contract

Rate-1/2, constraint-length-3 convolutional encoder with generators 7 (111) and 5 (101) octal. The register holds the current bit in bit 2 and the two previous bits below it; for each input bit output the g=7 parity then the g=5 parity, then shift. Two zero tail bits terminate the trellis. Return the output bit list.

Why this case matters

Satellite and wireless links protect data with the classic K=3 (7,5) convolutional code.

1 / The failure

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

N = 1
observations = []
def solve(data):
    state = 0
    out = []
    for b in data:
        reg = (b << 2) | state
        out.append(bin(reg & 0b111).count('1') % 2)
        out.append(bin(reg & 0b101).count('1') % 2)
        state = reg >> 1
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression [[0]]', [[0]], [0, 0, 0, 0, 0, 0]], ['regression [[0, 0]]', [[0, 0]], [0, 0, 0, 0, 0, 0, 0, 0]], ['control [[1, 1, 0]]', [[1, 1, 0]], [1, 1, 0, 1, 0, 1, 1, 1, 0, 0]], ['control [[0, 1, 1, 0]]', [[0, 1, 1, 0]], [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0]], ['control [[0, 1, 1, 0, 0]]', [[0, 1, 1, 0, 0]], [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]], ['control [[1, 0, 1, 1, 1, 1]]', [[1, 0, 1, 1, 1, 1]], [1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1]], ['control [[1, 0, 0, 1, 1, 1, 1, 1]]', [[1, 0, 0, 1, 1, 1, 1, 1]], [1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1]], ['control [[1, 0, 1, 0, 0, 0, 1, 1, 0, 0]]', [[1, 0, 1, 0, 0, 0, 1, 1, 0, 0]], [1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]]], [['regression [[0, 1, 1, 0]]', [[0, 1, 1, 0]], [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0]], ['regression [[0, 1, 1, 0, 0]]', [[0, 1, 1, 0, 0]], [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]], ['control [[1, 0, 1, 1, 1, 1]]', [[1, 0, 1, 1, 1, 1]], [1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1]], ['control [[1, 0, 0, 1, 1, 1, 1, 1]]', [[1, 0, 0, 1, 1, 1, 1, 1]], [1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1]], ['control [[1, 0, 1, 0, 0, 0, 1, 1, 0, 0]]', [[1, 0, 1, 0, 0, 0, 1, 1, 0, 0]], [1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]], ['control [[0, 0, 1]]', [[0, 0, 1]], [0, 0, 0, 0, 1, 1, 1, 0, 1, 1]], ['control [[1, 1, 0, 1, 1, 0, 0]]', [[1, 1, 0, 1, 1, 0, 0]], [1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]], ['control [[]]', [[]], [0, 0, 0, 0]]], [['regression [[1, 0, 0, 1, 1, 1, 1, 1]]', [[1, 0, 0, 1, 1, 1, 1, 1]], [1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1]], ['regression [[1, 0, 1, 0, 0, 0, 1, 1, 0, 0]]', [[1, 0, 1, 0, 0, 0, 1, 1, 0, 0]], [1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]], ['control [[]]', [[]], [0, 0, 0, 0]], ['control [[1]]', [[1]], [1, 1, 1, 0, 1, 1]], ['control [[1, 0, 1, 1]]', [[1, 0, 1, 1]], [1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1]], ['control [[1, 1, 1, 1, 1]]', [[1, 1, 1, 1, 1]], [1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1]], ['control [[0]]', [[0]], [0, 0, 0, 0, 0, 0]], ['control [[0, 0]]', [[0, 0]], [0, 0, 0, 0, 0, 0, 0, 0]]], [['regression [[1, 1, 0, 1, 1, 0, 0]]', [[1, 1, 0, 1, 1, 0, 0]], [1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]], ['regression [[]]', [[]], [0, 0, 0, 0]], ['control [[0, 0]]', [[0, 0]], [0, 0, 0, 0, 0, 0, 0, 0]], ['control [[1, 1, 0]]', [[1, 1, 0]], [1, 1, 0, 1, 0, 1, 1, 1, 0, 0]], ['control [[0, 1, 1, 0]]', [[0, 1, 1, 0]], [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0]], ['control [[0, 1, 1, 0, 0]]', [[0, 1, 1, 0, 0]], [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]], ['control [[1, 0, 1, 1, 1, 1]]', [[1, 0, 1, 1, 1, 1]], [1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1]], ['control [[1, 0, 0, 1, 1, 1, 1, 1]]', [[1, 0, 0, 1, 1, 1, 1, 1]], [1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1]]], [['regression [[1, 0, 1, 1]]', [[1, 0, 1, 1]], [1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1]], ['regression [[1, 1, 1, 1, 1]]', [[1, 1, 1, 1, 1]], [1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1]], ['control [[1, 0, 0, 1, 1, 1, 1, 1]]', [[1, 0, 0, 1, 1, 1, 1, 1]], [1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1]], ['control [[1, 0, 1, 0, 0, 0, 1, 1, 0, 0]]', [[1, 0, 1, 0, 0, 0, 1, 1, 0, 0]], [1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]], ['control [[0, 0, 1]]', [[0, 0, 1]], [0, 0, 0, 0, 1, 1, 1, 0, 1, 1]], ['control [[1, 1, 0, 1, 1, 0, 0]]', [[1, 1, 0, 1, 1, 0, 0]], [1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]], ['control [[]]', [[]], [0, 0, 0, 0]], ['control [[1]]', [[1]], [1, 1, 1, 0, 1, 1]]]]
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 [[0]][0, 0][0, 0, 0, 0, 0, 0]Failed
regression [[0, 0]][0, 0, 0, 0][0, 0, 0, 0, 0, 0, 0, 0]Failed
control [[1, 1, 0]][1, 1, 0, 1, 0, 1][1, 1, 0, 1, 0, 1, 1, 1, 0, 0]Failed
control [[0, 1, 1, 0]][0, 0, 1, 1, 0, 1, 0, 1][0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0]Failed
control [[0, 1, 1, 0, 0]][0, 0, 1, 1, 0, 1, 0, 1, 1, 1][0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]Failed
control [[1, 0, 1, 1, 1, 1]][1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0][1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1]Failed
control [[1, 0, 0, 1, 1, 1, 1, 1]][1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0][1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1]Failed
control [[1, 0, 1, 0, 0, 0, 1, 1, 0, 0]][1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1][1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]Failed

SHA-256 / f9e179bc1f96f42fdda793359bac623345124d9b4c8ee2e592fb48130a5389ba

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(data):
    state = 0
    out = []
    for b in data + [0]:
        reg = (b << 2) | state
        out.append(bin(reg & 0b111).count('1') % 2)
        out.append(bin(reg & 0b101).count('1') % 2)
        state = reg >> 1
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression [[0]]', [[0]], [0, 0, 0, 0, 0, 0]], ['regression [[0, 0]]', [[0, 0]], [0, 0, 0, 0, 0, 0, 0, 0]], ['control [[1, 1, 0]]', [[1, 1, 0]], [1, 1, 0, 1, 0, 1, 1, 1, 0, 0]], ['control [[0, 1, 1, 0]]', [[0, 1, 1, 0]], [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0]], ['control [[0, 1, 1, 0, 0]]', [[0, 1, 1, 0, 0]], [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]], ['control [[1, 0, 1, 1, 1, 1]]', [[1, 0, 1, 1, 1, 1]], [1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1]], ['control [[1, 0, 0, 1, 1, 1, 1, 1]]', [[1, 0, 0, 1, 1, 1, 1, 1]], [1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1]], ['control [[1, 0, 1, 0, 0, 0, 1, 1, 0, 0]]', [[1, 0, 1, 0, 0, 0, 1, 1, 0, 0]], [1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]]], [['regression [[0, 1, 1, 0]]', [[0, 1, 1, 0]], [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0]], ['regression [[0, 1, 1, 0, 0]]', [[0, 1, 1, 0, 0]], [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]], ['control [[1, 0, 1, 1, 1, 1]]', [[1, 0, 1, 1, 1, 1]], [1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1]], ['control [[1, 0, 0, 1, 1, 1, 1, 1]]', [[1, 0, 0, 1, 1, 1, 1, 1]], [1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1]], ['control [[1, 0, 1, 0, 0, 0, 1, 1, 0, 0]]', [[1, 0, 1, 0, 0, 0, 1, 1, 0, 0]], [1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]], ['control [[0, 0, 1]]', [[0, 0, 1]], [0, 0, 0, 0, 1, 1, 1, 0, 1, 1]], ['control [[1, 1, 0, 1, 1, 0, 0]]', [[1, 1, 0, 1, 1, 0, 0]], [1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]], ['control [[]]', [[]], [0, 0, 0, 0]]], [['regression [[1, 0, 0, 1, 1, 1, 1, 1]]', [[1, 0, 0, 1, 1, 1, 1, 1]], [1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1]], ['regression [[1, 0, 1, 0, 0, 0, 1, 1, 0, 0]]', [[1, 0, 1, 0, 0, 0, 1, 1, 0, 0]], [1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]], ['control [[]]', [[]], [0, 0, 0, 0]], ['control [[1]]', [[1]], [1, 1, 1, 0, 1, 1]], ['control [[1, 0, 1, 1]]', [[1, 0, 1, 1]], [1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1]], ['control [[1, 1, 1, 1, 1]]', [[1, 1, 1, 1, 1]], [1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1]], ['control [[0]]', [[0]], [0, 0, 0, 0, 0, 0]], ['control [[0, 0]]', [[0, 0]], [0, 0, 0, 0, 0, 0, 0, 0]]], [['regression [[1, 1, 0, 1, 1, 0, 0]]', [[1, 1, 0, 1, 1, 0, 0]], [1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]], ['regression [[]]', [[]], [0, 0, 0, 0]], ['control [[0, 0]]', [[0, 0]], [0, 0, 0, 0, 0, 0, 0, 0]], ['control [[1, 1, 0]]', [[1, 1, 0]], [1, 1, 0, 1, 0, 1, 1, 1, 0, 0]], ['control [[0, 1, 1, 0]]', [[0, 1, 1, 0]], [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0]], ['control [[0, 1, 1, 0, 0]]', [[0, 1, 1, 0, 0]], [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]], ['control [[1, 0, 1, 1, 1, 1]]', [[1, 0, 1, 1, 1, 1]], [1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1]], ['control [[1, 0, 0, 1, 1, 1, 1, 1]]', [[1, 0, 0, 1, 1, 1, 1, 1]], [1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1]]], [['regression [[1, 0, 1, 1]]', [[1, 0, 1, 1]], [1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1]], ['regression [[1, 1, 1, 1, 1]]', [[1, 1, 1, 1, 1]], [1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1]], ['control [[1, 0, 0, 1, 1, 1, 1, 1]]', [[1, 0, 0, 1, 1, 1, 1, 1]], [1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1]], ['control [[1, 0, 1, 0, 0, 0, 1, 1, 0, 0]]', [[1, 0, 1, 0, 0, 0, 1, 1, 0, 0]], [1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]], ['control [[0, 0, 1]]', [[0, 0, 1]], [0, 0, 0, 0, 1, 1, 1, 0, 1, 1]], ['control [[1, 1, 0, 1, 1, 0, 0]]', [[1, 1, 0, 1, 1, 0, 0]], [1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]], ['control [[]]', [[]], [0, 0, 0, 0]], ['control [[1]]', [[1]], [1, 1, 1, 0, 1, 1]]]]
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 [[0]][0, 0, 0, 0][0, 0, 0, 0, 0, 0]Failed
regression [[0, 0]][0, 0, 0, 0, 0, 0][0, 0, 0, 0, 0, 0, 0, 0]Failed
control [[1, 1, 0]][1, 1, 0, 1, 0, 1, 1, 1][1, 1, 0, 1, 0, 1, 1, 1, 0, 0]Failed
control [[0, 1, 1, 0]][0, 0, 1, 1, 0, 1, 0, 1, 1, 1][0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0]Failed
control [[0, 1, 1, 0, 0]][0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0][0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]Failed
control [[1, 0, 1, 1, 1, 1]][1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1][1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1]Failed
control [[1, 0, 0, 1, 1, 1, 1, 1]][1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1][1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1]Failed
control [[1, 0, 1, 0, 0, 0, 1, 1, 0, 0]][1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0][1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]Failed

SHA-256 / d33774d4ce7d48f12036012dae819f568d17482a0916950cfd1ddb2ddf5650cd

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

Case digest / 301ba2ca1131152167df558e8ca2f8634b9c82dc3f3d9a3efb2d3ba3ff96be45