FA-5721 / Combinatorics / Open access
Perfect binary tree total nodes · case 01
The root-at-height-zero convention is shifted by one.
ROOT CAUSE
The root-at-height-zero convention is shifted by one.
THE FAILURE
The root-at-height-zero convention is shifted by one.
Unsuccessful approach: Only the last level is counted.
Case contract
Nonnegative integer counts. Permutation and combination counts are zero when a requested selection exceeds the available objects. Shape sizes satisfy the preconditions stated below. Every level is full and the root has height zero; count all vertices through height. Exact operational definition: 2**(height+1)-1
Why this case matters
Small exact fixtures expose this error without platform timing, external services, or probabilistic observations. Combinatorics results depend on the stated convention.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR
N = 1
observations = []
def solve(height):
return 2**height-1
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (0,)', solve(*(0,)), 1)
check('fixture 2: (1,)', solve(*(1,)), 3)
check('fixture 3: (3,)', solve(*(3,)), 15)
check('fixture 4: (5,)', solve(*(5,)), 63)
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 |
|---|---|---|---|
| fixture 1: (0,) | 0 | 1 | Failed |
| fixture 2: (1,) | 1 | 3 | Failed |
| fixture 3: (3,) | 7 | 15 | Failed |
| fixture 4: (5,) | 31 | 63 | Failed |
SHA-256 / ebbdd1769cd1f9fad5d82cec9668fe874460fa04e9cfe8aab9446b1a9fd6fc2c
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR
N = 1
observations = []
def solve(height):
return 2**height
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (0,)', solve(*(0,)), 1)
check('fixture 2: (1,)', solve(*(1,)), 3)
check('fixture 3: (3,)', solve(*(3,)), 15)
check('fixture 4: (5,)', solve(*(5,)), 63)
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 |
|---|---|---|---|
| fixture 1: (0,) | 1 | 1 | Passed |
| fixture 2: (1,) | 2 | 3 | Failed |
| fixture 3: (3,) | 8 | 15 | Failed |
| fixture 4: (5,) | 32 | 63 | Failed |
SHA-256 / 9be10b6e9e7730c3bc20dafdea68a0c30710e094e8a4e5c71f7dbf2ea3ab204f
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 4 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
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:37:52.825180+00:00.
Case digest / 254f019e9977e7cc96fed11a1da03b38050e77e646ca592e554d3769db8be164