FA-72721 / Check-digit algorithms / Open access
Container weights start at two · case 01
Every container number fails its check.
ROOT CAUSE
Weights are 2^(i+1), doubling every term.
THE FAILURE
Weights are 2^(i+1), doubling every term.
Unsuccessful approach: Reversing the exponent assigns 2^9 to the owner code instead of the serial number.
Case contract
Shipping container identification check digit: three uppercase owner letters, category U, J or Z, six serial digits and a check digit (else "malformed"). Letter values start at A=10 and skip every multiple of 11 (so B=12, L=23, V=34, Z=38). Position i (0-based) has weight 2^i; the check digit is (sum mod 11) mod 10. Return [check, match].
Why this case matters
Terminal gate systems validate container numbers read by OCR cameras before booking moves.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(s):
if len(s) != 11 or not s.isascii() or not s[:3].isalpha() or not s[:3].isupper():
return 'malformed'
if s[3] not in 'UJZ' or not s[4:].isdigit():
return 'malformed'
vals = {}
v = 10
for ch in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ':
if v % 11 == 0:
v += 1
vals[ch] = v
v += 1
total = 0
for i, ch in enumerate(s[:10]):
total += (vals[ch] if ch.isalpha() else int(ch)) * 2 ** (i + 1)
check = total % 11 % 10
return [check, check == int(s[10])]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression ["HRNU7843702"]', ['HRNU7843702'], [9, False]], ['regression ["BYYJ6917585"]', ['BYYJ6917585'], [8, False]], ['control ["VQAJ3159690"]', ['VQAJ3159690'], [0, True]], ['control ["CSQU305438"]', ['CSQU305438'], 'malformed'], ['control ["CSQX3054383"]', ['CSQX3054383'], 'malformed'], ['control ["csqu3054383"]', ['csqu3054383'], 'malformed'], ['control ["C1QU3054383"]', ['C1QU3054383'], 'malformed'], ['control ["YQEU5793145"]', ['YQEU5793145'], [6, False]]], [['regression ["MUHJ6260452"]', ['MUHJ6260452'], [4, False]], ['regression ["GEDJ3497886"]', ['GEDJ3497886'], [3, False]], ['partial-repair ["YQEU5793145"]', ['YQEU5793145'], [6, False]], ['control ["VQAJ3159690"]', ['VQAJ3159690'], [0, True]], ['control ["CSQU305438"]', ['CSQU305438'], 'malformed'], ['control ["CSQX3054383"]', ['CSQX3054383'], 'malformed'], ['control ["csqu3054383"]', ['csqu3054383'], 'malformed'], ['control ["C1QU3054383"]', ['C1QU3054383'], 'malformed']], [['regression ["CTZU8384457"]', ['CTZU8384457'], [2, False]], ['regression ["CYVU1050697"]', ['CYVU1050697'], [7, True]], ['partial-repair ["FLAU0380833"]', ['FLAU0380833'], [7, False]], ['control ["VQAJ3159690"]', ['VQAJ3159690'], [0, True]], ['control ["CSQU305438"]', ['CSQU305438'], 'malformed'], ['control ["CSQX3054383"]', ['CSQX3054383'], 'malformed'], ['control ["csqu3054383"]', ['csqu3054383'], 'malformed'], ['control ["C1QU3054383"]', ['C1QU3054383'], 'malformed']], [['regression ["OQHU9278051"]', ['OQHU9278051'], [8, False]], ['regression ["TRVJ4468592"]', ['TRVJ4468592'], [8, False]], ['partial-repair ["LGSU0173454"]', ['LGSU0173454'], [8, False]], ['control ["VQAJ3159690"]', ['VQAJ3159690'], [0, True]], ['control ["CSQU305438"]', ['CSQU305438'], 'malformed'], ['control ["CSQX3054383"]', ['CSQX3054383'], 'malformed'], ['control ["csqu3054383"]', ['csqu3054383'], 'malformed'], ['control ["C1QU3054383"]', ['C1QU3054383'], 'malformed']], [['regression ["RGOU0215685"]', ['RGOU0215685'], [3, False]], ['regression ["LBRU3332332"]', ['LBRU3332332'], [4, False]], ['partial-repair ["TSAZ4635083"]', ['TSAZ4635083'], [9, False]], ['control ["VQAJ3159690"]', ['VQAJ3159690'], [0, True]], ['control ["CSQU305438"]', ['CSQU305438'], 'malformed'], ['control ["CSQX3054383"]', ['CSQX3054383'], 'malformed'], ['control ["csqu3054383"]', ['csqu3054383'], 'malformed'], ['control ["C1QU3054383"]', ['C1QU3054383'], 'malformed']]]
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 ["HRNU7843702"] | [7, False] | [9, False] | Failed |
| regression ["BYYJ6917585"] | [5, True] | [8, False] | Failed |
| control ["VQAJ3159690"] | [0, True] | [0, True] | Passed |
| control ["CSQU305438"] | malformed | malformed | Passed |
| control ["CSQX3054383"] | malformed | malformed | Passed |
| control ["csqu3054383"] | malformed | malformed | Passed |
| control ["C1QU3054383"] | malformed | malformed | Passed |
| control ["YQEU5793145"] | [1, False] | [6, False] | Failed |
SHA-256 / 4f4d248c5f4f591e62883b4d937ba204a123b6167d753521142fd85bc709e5a7
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(s):
if len(s) != 11 or not s.isascii() or not s[:3].isalpha() or not s[:3].isupper():
return 'malformed'
if s[3] not in 'UJZ' or not s[4:].isdigit():
return 'malformed'
vals = {}
v = 10
for ch in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ':
if v % 11 == 0:
v += 1
vals[ch] = v
v += 1
total = 0
for i, ch in enumerate(s[:10]):
total += (vals[ch] if ch.isalpha() else int(ch)) * 2 ** (9 - i)
check = total % 11 % 10
return [check, check == int(s[10])]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression ["HRNU7843702"]', ['HRNU7843702'], [9, False]], ['regression ["BYYJ6917585"]', ['BYYJ6917585'], [8, False]], ['control ["VQAJ3159690"]', ['VQAJ3159690'], [0, True]], ['control ["CSQU305438"]', ['CSQU305438'], 'malformed'], ['control ["CSQX3054383"]', ['CSQX3054383'], 'malformed'], ['control ["csqu3054383"]', ['csqu3054383'], 'malformed'], ['control ["C1QU3054383"]', ['C1QU3054383'], 'malformed'], ['control ["YQEU5793145"]', ['YQEU5793145'], [6, False]]], [['regression ["MUHJ6260452"]', ['MUHJ6260452'], [4, False]], ['regression ["GEDJ3497886"]', ['GEDJ3497886'], [3, False]], ['partial-repair ["YQEU5793145"]', ['YQEU5793145'], [6, False]], ['control ["VQAJ3159690"]', ['VQAJ3159690'], [0, True]], ['control ["CSQU305438"]', ['CSQU305438'], 'malformed'], ['control ["CSQX3054383"]', ['CSQX3054383'], 'malformed'], ['control ["csqu3054383"]', ['csqu3054383'], 'malformed'], ['control ["C1QU3054383"]', ['C1QU3054383'], 'malformed']], [['regression ["CTZU8384457"]', ['CTZU8384457'], [2, False]], ['regression ["CYVU1050697"]', ['CYVU1050697'], [7, True]], ['partial-repair ["FLAU0380833"]', ['FLAU0380833'], [7, False]], ['control ["VQAJ3159690"]', ['VQAJ3159690'], [0, True]], ['control ["CSQU305438"]', ['CSQU305438'], 'malformed'], ['control ["CSQX3054383"]', ['CSQX3054383'], 'malformed'], ['control ["csqu3054383"]', ['csqu3054383'], 'malformed'], ['control ["C1QU3054383"]', ['C1QU3054383'], 'malformed']], [['regression ["OQHU9278051"]', ['OQHU9278051'], [8, False]], ['regression ["TRVJ4468592"]', ['TRVJ4468592'], [8, False]], ['partial-repair ["LGSU0173454"]', ['LGSU0173454'], [8, False]], ['control ["VQAJ3159690"]', ['VQAJ3159690'], [0, True]], ['control ["CSQU305438"]', ['CSQU305438'], 'malformed'], ['control ["CSQX3054383"]', ['CSQX3054383'], 'malformed'], ['control ["csqu3054383"]', ['csqu3054383'], 'malformed'], ['control ["C1QU3054383"]', ['C1QU3054383'], 'malformed']], [['regression ["RGOU0215685"]', ['RGOU0215685'], [3, False]], ['regression ["LBRU3332332"]', ['LBRU3332332'], [4, False]], ['partial-repair ["TSAZ4635083"]', ['TSAZ4635083'], [9, False]], ['control ["VQAJ3159690"]', ['VQAJ3159690'], [0, True]], ['control ["CSQU305438"]', ['CSQU305438'], 'malformed'], ['control ["CSQX3054383"]', ['CSQX3054383'], 'malformed'], ['control ["csqu3054383"]', ['csqu3054383'], 'malformed'], ['control ["C1QU3054383"]', ['C1QU3054383'], 'malformed']]]
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 ["HRNU7843702"] | [1, False] | [9, False] | Failed |
| regression ["BYYJ6917585"] | [0, False] | [8, False] | Failed |
| control ["VQAJ3159690"] | [0, True] | [0, True] | Passed |
| control ["CSQU305438"] | malformed | malformed | Passed |
| control ["CSQX3054383"] | malformed | malformed | Passed |
| control ["csqu3054383"] | malformed | malformed | Passed |
| control ["C1QU3054383"] | malformed | malformed | Passed |
| control ["YQEU5793145"] | [5, True] | [6, False] | Failed |
SHA-256 / 3237f4c01e0c56b12c89332e0a6bedd571cd63cdb6320888ff3602e119c4dbc4
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 scheme under the stated contract; not a certified validator. 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:41.012753+00:00.
Case digest / e670952e29ff52a649340094ee2330fa061067611f6a8fa1345eb2b376823f8c