FA-15261 / Numerics / Open access
Restricted growth strings: highest used block tracking · case 01
The exact restricted growth strings result violates the stated contract at highest used block tracking.
ROOT CAUSE
The highest used block tracking step uses v instead of max(m,v).
VERIFIED REPAIR
Use max(m,v) at the highest used block tracking step.
Unsuccessful approach: The partial repair m+1 still violates the highest used block tracking invariant.
Case contract
Input length n (1..6), maximum blocks B>=1; return lexicographic restricted-growth strings a0=0, a_i<=1+max(prefix), using exactly B blocks.
Why this case matters
Exact discrete arithmetic with observable algorithmic state; no floating point approximation is used.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
import itertools
from fractions import Fraction
N = 1
observations = []
def solve(x):
n,B=x;out=[]
def visit(prefix,m):
if len(prefix)==n:
if m+1==B:out.append(prefix)
return
for v in range(m+2):
if v>=B:continue
visit(prefix+[v],v)
visit([0],0)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([3, 2], [[0, 0, 1], [0, 1, 0], [0, 1, 1]]), ([2, 1], [[0, 0]]), ([1, 1], [[0]]), ([6, 7], []), ([1, 2], []), ([2, 2], [[0, 1]]), ([2, 3], []), ([3, 1], [[0, 0, 0]])], [([4, 2], [[0, 0, 0, 1], [0, 0, 1, 0], [0, 0, 1, 1], [0, 1, 0, 0], [0, 1, 0, 1], [0, 1, 1, 0], [0, 1, 1, 1]]), ([3, 2], [[0, 0, 1], [0, 1, 0], [0, 1, 1]]), ([1, 1], [[0]]), ([6, 7], []), ([5, 4], [[0, 0, 1, 2, 3], [0, 1, 0, 2, 3], [0, 1, 1, 2, 3], [0, 1, 2, 0, 3], [0, 1, 2, 1, 3], [0, 1, 2, 2, 3], [0, 1, 2, 3, 0], [0, 1, 2, 3, 1], [0, 1, 2, 3, 2], [0, 1, 2, 3, 3]]), ([5, 5], [[0, 1, 2, 3, 4]]), ([5, 6], []), ([6, 1], [[0, 0, 0, 0, 0, 0]])], [([4, 3], [[0, 0, 1, 2], [0, 1, 0, 2], [0, 1, 1, 2], [0, 1, 2, 0], [0, 1, 2, 1], [0, 1, 2, 2]]), ([4, 2], [[0, 0, 0, 1], [0, 0, 1, 0], [0, 0, 1, 1], [0, 1, 0, 0], [0, 1, 0, 1], [0, 1, 1, 0], [0, 1, 1, 1]]), ([1, 1], [[0]]), ([6, 7], []), ([3, 3], [[0, 1, 2]]), ([3, 4], []), ([4, 1], [[0, 0, 0, 0]]), ([4, 4], [[0, 1, 2, 3]])], [([5, 2], [[0, 0, 0, 0, 1], [0, 0, 0, 1, 0], [0, 0, 0, 1, 1], [0, 0, 1, 0, 0], [0, 0, 1, 0, 1], [0, 0, 1, 1, 0], [0, 0, 1, 1, 1], [0, 1, 0, 0, 0], [0, 1, 0, 0, 1], [0, 1, 0, 1, 0], [0, 1, 0, 1, 1], [0, 1, 1, 0, 0], [0, 1, 1, 0, 1], [0, 1, 1, 1, 0], [0, 1, 1, 1, 1]]), ([5, 1], [[0, 0, 0, 0, 0]]), ([1, 1], [[0]]), ([6, 7], []), ([6, 5], [[0, 0, 1, 2, 3, 4], [0, 1, 0, 2, 3, 4], [0, 1, 1, 2, 3, 4], [0, 1, 2, 0, 3, 4], [0, 1, 2, 1, 3, 4], [0, 1, 2, 2, 3, 4], [0, 1, 2, 3, 0, 4], [0, 1, 2, 3, 1, 4], [0, 1, 2, 3, 2, 4], [0, 1, 2, 3, 3, 4], [0, 1, 2, 3, 4, 0], [0, 1, 2, 3, 4, 1], [0, 1, 2, 3, 4, 2], [0, 1, 2, 3, 4, 3], [0, 1, 2, 3, 4, 4]]), ([6, 6], [[0, 1, 2, 3, 4, 5]]), ([1, 2], []), ([2, 1], [[0, 0]])], [([5, 3], [[0, 0, 0, 1, 2], [0, 0, 1, 0, 2], [0, 0, 1, 1, 2], [0, 0, 1, 2, 0], [0, 0, 1, 2, 1], [0, 0, 1, 2, 2], [0, 1, 0, 0, 2], [0, 1, 0, 1, 2], [0, 1, 0, 2, 0], [0, 1, 0, 2, 1], [0, 1, 0, 2, 2], [0, 1, 1, 0, 2], [0, 1, 1, 1, 2], [0, 1, 1, 2, 0], [0, 1, 1, 2, 1], [0, 1, 1, 2, 2], [0, 1, 2, 0, 0], [0, 1, 2, 0, 1], [0, 1, 2, 0, 2], [0, 1, 2, 1, 0], [0, 1, 2, 1, 1], [0, 1, 2, 1, 2], [0, 1, 2, 2, 0], [0, 1, 2, 2, 1], [0, 1, 2, 2, 2]]), ([5, 4], [[0, 0, 1, 2, 3], [0, 1, 0, 2, 3], [0, 1, 1, 2, 3], [0, 1, 2, 0, 3], [0, 1, 2, 1, 3], [0, 1, 2, 2, 3], [0, 1, 2, 3, 0], [0, 1, 2, 3, 1], [0, 1, 2, 3, 2], [0, 1, 2, 3, 3]]), ([1, 1], [[0]]), ([6, 7], []), ([5, 1], [[0, 0, 0, 0, 0]]), ([5, 2], [[0, 0, 0, 0, 1], [0, 0, 0, 1, 0], [0, 0, 0, 1, 1], [0, 0, 1, 0, 0], [0, 0, 1, 0, 1], [0, 0, 1, 1, 0], [0, 0, 1, 1, 1], [0, 1, 0, 0, 0], [0, 1, 0, 0, 1], [0, 1, 0, 1, 0], [0, 1, 0, 1, 1], [0, 1, 1, 0, 0], [0, 1, 1, 0, 1], [0, 1, 1, 1, 0], [0, 1, 1, 1, 1]]), ([5, 5], [[0, 1, 2, 3, 4]]), ([5, 6], [])]]
for i, (args, expected) in enumerate(fixtures[N-1]):
check("explicit oracle %d" % i, 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 |
|---|---|---|---|
| explicit oracle 0 | [[0, 0, 1], [0, 1, 1]] | [[0, 0, 1], [0, 1, 0], [0, 1, 1]] | Failed |
| explicit oracle 1 | [[0, 0]] | [[0, 0]] | Passed |
| explicit oracle 2 | [[0]] | [[0]] | Passed |
| explicit oracle 3 | [] | [] | Passed |
| explicit oracle 4 | [] | [] | Passed |
| explicit oracle 5 | [[0, 1]] | [[0, 1]] | Passed |
| explicit oracle 6 | [] | [] | Passed |
| explicit oracle 7 | [[0, 0, 0]] | [[0, 0, 0]] | Passed |
SHA-256 / b83827db4043d952335fe9adbd955e6a6a08e41e727bf6a146a8fc7675d07dc8
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
import itertools
from fractions import Fraction
N = 1
observations = []
def solve(x):
n,B=x;out=[]
def visit(prefix,m):
if len(prefix)==n:
if m+1==B:out.append(prefix)
return
for v in range(m+2):
if v>=B:continue
visit(prefix+[v],m+1)
visit([0],0)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([3, 2], [[0, 0, 1], [0, 1, 0], [0, 1, 1]]), ([2, 1], [[0, 0]]), ([1, 1], [[0]]), ([6, 7], []), ([1, 2], []), ([2, 2], [[0, 1]]), ([2, 3], []), ([3, 1], [[0, 0, 0]])], [([4, 2], [[0, 0, 0, 1], [0, 0, 1, 0], [0, 0, 1, 1], [0, 1, 0, 0], [0, 1, 0, 1], [0, 1, 1, 0], [0, 1, 1, 1]]), ([3, 2], [[0, 0, 1], [0, 1, 0], [0, 1, 1]]), ([1, 1], [[0]]), ([6, 7], []), ([5, 4], [[0, 0, 1, 2, 3], [0, 1, 0, 2, 3], [0, 1, 1, 2, 3], [0, 1, 2, 0, 3], [0, 1, 2, 1, 3], [0, 1, 2, 2, 3], [0, 1, 2, 3, 0], [0, 1, 2, 3, 1], [0, 1, 2, 3, 2], [0, 1, 2, 3, 3]]), ([5, 5], [[0, 1, 2, 3, 4]]), ([5, 6], []), ([6, 1], [[0, 0, 0, 0, 0, 0]])], [([4, 3], [[0, 0, 1, 2], [0, 1, 0, 2], [0, 1, 1, 2], [0, 1, 2, 0], [0, 1, 2, 1], [0, 1, 2, 2]]), ([4, 2], [[0, 0, 0, 1], [0, 0, 1, 0], [0, 0, 1, 1], [0, 1, 0, 0], [0, 1, 0, 1], [0, 1, 1, 0], [0, 1, 1, 1]]), ([1, 1], [[0]]), ([6, 7], []), ([3, 3], [[0, 1, 2]]), ([3, 4], []), ([4, 1], [[0, 0, 0, 0]]), ([4, 4], [[0, 1, 2, 3]])], [([5, 2], [[0, 0, 0, 0, 1], [0, 0, 0, 1, 0], [0, 0, 0, 1, 1], [0, 0, 1, 0, 0], [0, 0, 1, 0, 1], [0, 0, 1, 1, 0], [0, 0, 1, 1, 1], [0, 1, 0, 0, 0], [0, 1, 0, 0, 1], [0, 1, 0, 1, 0], [0, 1, 0, 1, 1], [0, 1, 1, 0, 0], [0, 1, 1, 0, 1], [0, 1, 1, 1, 0], [0, 1, 1, 1, 1]]), ([5, 1], [[0, 0, 0, 0, 0]]), ([1, 1], [[0]]), ([6, 7], []), ([6, 5], [[0, 0, 1, 2, 3, 4], [0, 1, 0, 2, 3, 4], [0, 1, 1, 2, 3, 4], [0, 1, 2, 0, 3, 4], [0, 1, 2, 1, 3, 4], [0, 1, 2, 2, 3, 4], [0, 1, 2, 3, 0, 4], [0, 1, 2, 3, 1, 4], [0, 1, 2, 3, 2, 4], [0, 1, 2, 3, 3, 4], [0, 1, 2, 3, 4, 0], [0, 1, 2, 3, 4, 1], [0, 1, 2, 3, 4, 2], [0, 1, 2, 3, 4, 3], [0, 1, 2, 3, 4, 4]]), ([6, 6], [[0, 1, 2, 3, 4, 5]]), ([1, 2], []), ([2, 1], [[0, 0]])], [([5, 3], [[0, 0, 0, 1, 2], [0, 0, 1, 0, 2], [0, 0, 1, 1, 2], [0, 0, 1, 2, 0], [0, 0, 1, 2, 1], [0, 0, 1, 2, 2], [0, 1, 0, 0, 2], [0, 1, 0, 1, 2], [0, 1, 0, 2, 0], [0, 1, 0, 2, 1], [0, 1, 0, 2, 2], [0, 1, 1, 0, 2], [0, 1, 1, 1, 2], [0, 1, 1, 2, 0], [0, 1, 1, 2, 1], [0, 1, 1, 2, 2], [0, 1, 2, 0, 0], [0, 1, 2, 0, 1], [0, 1, 2, 0, 2], [0, 1, 2, 1, 0], [0, 1, 2, 1, 1], [0, 1, 2, 1, 2], [0, 1, 2, 2, 0], [0, 1, 2, 2, 1], [0, 1, 2, 2, 2]]), ([5, 4], [[0, 0, 1, 2, 3], [0, 1, 0, 2, 3], [0, 1, 1, 2, 3], [0, 1, 2, 0, 3], [0, 1, 2, 1, 3], [0, 1, 2, 2, 3], [0, 1, 2, 3, 0], [0, 1, 2, 3, 1], [0, 1, 2, 3, 2], [0, 1, 2, 3, 3]]), ([1, 1], [[0]]), ([6, 7], []), ([5, 1], [[0, 0, 0, 0, 0]]), ([5, 2], [[0, 0, 0, 0, 1], [0, 0, 0, 1, 0], [0, 0, 0, 1, 1], [0, 0, 1, 0, 0], [0, 0, 1, 0, 1], [0, 0, 1, 1, 0], [0, 0, 1, 1, 1], [0, 1, 0, 0, 0], [0, 1, 0, 0, 1], [0, 1, 0, 1, 0], [0, 1, 0, 1, 1], [0, 1, 1, 0, 0], [0, 1, 1, 0, 1], [0, 1, 1, 1, 0], [0, 1, 1, 1, 1]]), ([5, 5], [[0, 1, 2, 3, 4]]), ([5, 6], [])]]
for i, (args, expected) in enumerate(fixtures[N-1]):
check("explicit oracle %d" % i, 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 |
|---|---|---|---|
| explicit oracle 0 | [] | [[0, 0, 1], [0, 1, 0], [0, 1, 1]] | Failed |
| explicit oracle 1 | [] | [[0, 0]] | Failed |
| explicit oracle 2 | [[0]] | [[0]] | Passed |
| explicit oracle 3 | [] | [] | Passed |
| explicit oracle 4 | [] | [] | Passed |
| explicit oracle 5 | [[0, 0], [0, 1]] | [[0, 1]] | Failed |
| explicit oracle 6 | [] | [] | Passed |
| explicit oracle 7 | [] | [[0, 0, 0]] | Failed |
SHA-256 / 8ed3f6364ee7b8a51068b9b6f7fcaeb834b09bcdbfd43a1a9daac5cc6f132674
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
import itertools
from fractions import Fraction
N = 1
observations = []
def solve(x):
n,B=x;out=[]
def visit(prefix,m):
if len(prefix)==n:
if m+1==B:out.append(prefix)
return
for v in range(m+2):
if v>=B:continue
visit(prefix+[v],max(m,v))
visit([0],0)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([3, 2], [[0, 0, 1], [0, 1, 0], [0, 1, 1]]), ([2, 1], [[0, 0]]), ([1, 1], [[0]]), ([6, 7], []), ([1, 2], []), ([2, 2], [[0, 1]]), ([2, 3], []), ([3, 1], [[0, 0, 0]])], [([4, 2], [[0, 0, 0, 1], [0, 0, 1, 0], [0, 0, 1, 1], [0, 1, 0, 0], [0, 1, 0, 1], [0, 1, 1, 0], [0, 1, 1, 1]]), ([3, 2], [[0, 0, 1], [0, 1, 0], [0, 1, 1]]), ([1, 1], [[0]]), ([6, 7], []), ([5, 4], [[0, 0, 1, 2, 3], [0, 1, 0, 2, 3], [0, 1, 1, 2, 3], [0, 1, 2, 0, 3], [0, 1, 2, 1, 3], [0, 1, 2, 2, 3], [0, 1, 2, 3, 0], [0, 1, 2, 3, 1], [0, 1, 2, 3, 2], [0, 1, 2, 3, 3]]), ([5, 5], [[0, 1, 2, 3, 4]]), ([5, 6], []), ([6, 1], [[0, 0, 0, 0, 0, 0]])], [([4, 3], [[0, 0, 1, 2], [0, 1, 0, 2], [0, 1, 1, 2], [0, 1, 2, 0], [0, 1, 2, 1], [0, 1, 2, 2]]), ([4, 2], [[0, 0, 0, 1], [0, 0, 1, 0], [0, 0, 1, 1], [0, 1, 0, 0], [0, 1, 0, 1], [0, 1, 1, 0], [0, 1, 1, 1]]), ([1, 1], [[0]]), ([6, 7], []), ([3, 3], [[0, 1, 2]]), ([3, 4], []), ([4, 1], [[0, 0, 0, 0]]), ([4, 4], [[0, 1, 2, 3]])], [([5, 2], [[0, 0, 0, 0, 1], [0, 0, 0, 1, 0], [0, 0, 0, 1, 1], [0, 0, 1, 0, 0], [0, 0, 1, 0, 1], [0, 0, 1, 1, 0], [0, 0, 1, 1, 1], [0, 1, 0, 0, 0], [0, 1, 0, 0, 1], [0, 1, 0, 1, 0], [0, 1, 0, 1, 1], [0, 1, 1, 0, 0], [0, 1, 1, 0, 1], [0, 1, 1, 1, 0], [0, 1, 1, 1, 1]]), ([5, 1], [[0, 0, 0, 0, 0]]), ([1, 1], [[0]]), ([6, 7], []), ([6, 5], [[0, 0, 1, 2, 3, 4], [0, 1, 0, 2, 3, 4], [0, 1, 1, 2, 3, 4], [0, 1, 2, 0, 3, 4], [0, 1, 2, 1, 3, 4], [0, 1, 2, 2, 3, 4], [0, 1, 2, 3, 0, 4], [0, 1, 2, 3, 1, 4], [0, 1, 2, 3, 2, 4], [0, 1, 2, 3, 3, 4], [0, 1, 2, 3, 4, 0], [0, 1, 2, 3, 4, 1], [0, 1, 2, 3, 4, 2], [0, 1, 2, 3, 4, 3], [0, 1, 2, 3, 4, 4]]), ([6, 6], [[0, 1, 2, 3, 4, 5]]), ([1, 2], []), ([2, 1], [[0, 0]])], [([5, 3], [[0, 0, 0, 1, 2], [0, 0, 1, 0, 2], [0, 0, 1, 1, 2], [0, 0, 1, 2, 0], [0, 0, 1, 2, 1], [0, 0, 1, 2, 2], [0, 1, 0, 0, 2], [0, 1, 0, 1, 2], [0, 1, 0, 2, 0], [0, 1, 0, 2, 1], [0, 1, 0, 2, 2], [0, 1, 1, 0, 2], [0, 1, 1, 1, 2], [0, 1, 1, 2, 0], [0, 1, 1, 2, 1], [0, 1, 1, 2, 2], [0, 1, 2, 0, 0], [0, 1, 2, 0, 1], [0, 1, 2, 0, 2], [0, 1, 2, 1, 0], [0, 1, 2, 1, 1], [0, 1, 2, 1, 2], [0, 1, 2, 2, 0], [0, 1, 2, 2, 1], [0, 1, 2, 2, 2]]), ([5, 4], [[0, 0, 1, 2, 3], [0, 1, 0, 2, 3], [0, 1, 1, 2, 3], [0, 1, 2, 0, 3], [0, 1, 2, 1, 3], [0, 1, 2, 2, 3], [0, 1, 2, 3, 0], [0, 1, 2, 3, 1], [0, 1, 2, 3, 2], [0, 1, 2, 3, 3]]), ([1, 1], [[0]]), ([6, 7], []), ([5, 1], [[0, 0, 0, 0, 0]]), ([5, 2], [[0, 0, 0, 0, 1], [0, 0, 0, 1, 0], [0, 0, 0, 1, 1], [0, 0, 1, 0, 0], [0, 0, 1, 0, 1], [0, 0, 1, 1, 0], [0, 0, 1, 1, 1], [0, 1, 0, 0, 0], [0, 1, 0, 0, 1], [0, 1, 0, 1, 0], [0, 1, 0, 1, 1], [0, 1, 1, 0, 0], [0, 1, 1, 0, 1], [0, 1, 1, 1, 0], [0, 1, 1, 1, 1]]), ([5, 5], [[0, 1, 2, 3, 4]]), ([5, 6], [])]]
for i, (args, expected) in enumerate(fixtures[N-1]):
check("explicit oracle %d" % i, 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 |
|---|---|---|---|
| explicit oracle 0 | [[0, 0, 1], [0, 1, 0], [0, 1, 1]] | [[0, 0, 1], [0, 1, 0], [0, 1, 1]] | Passed |
| explicit oracle 1 | [[0, 0]] | [[0, 0]] | Passed |
| explicit oracle 2 | [[0]] | [[0]] | Passed |
| explicit oracle 3 | [] | [] | Passed |
| explicit oracle 4 | [] | [] | Passed |
| explicit oracle 5 | [[0, 1]] | [[0, 1]] | Passed |
| explicit oracle 6 | [] | [] | Passed |
| explicit oracle 7 | [[0, 0, 0]] | [[0, 0, 0]] | Passed |
SHA-256 / 68bded60f0190686bc0a31ad6eceab4a1c06e834105b79a8e6f43e7906aaf063
Verification & scope
A deterministic bounded teaching model. Inputs are restricted to the explicit contract; this is not a production algebra library. 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:39:24.970641+00:00.
Case digest / 234f378a7a9a1cbdc122cdd904c65c485ddc07dfc4e3308f1458a9da700effe2