FA-5631 / Combinatorics / Open access
Circular labelled arrangements · case 01
Rotations are treated as different circular arrangements.
ROOT CAUSE
Rotations are treated as different circular arrangements.
VERIFIED REPAIR
Apply the specified mathematical contract directly, preserving all terms and boundary cases: return math.factorial(n-1) if n else 1
Unsuccessful approach: Dividing by reflection symmetry does not quotient rotations.
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. Rotations are identified but reflections remain distinct; the empty arrangement has count one. Exact operational definition: math.factorial(n-1) if n else 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(n):
return math.factorial(n)
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,)), 1)
check('fixture 3: (3,)', solve(*(3,)), 2)
check('fixture 4: (5,)', solve(*(5,)), 24)
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,) | 1 | 1 | Passed |
| fixture 3: (3,) | 6 | 2 | Failed |
| fixture 4: (5,) | 120 | 24 | Failed |
SHA-256 / 725ccb040d0cac7e15dd481879105e14e559dae6bc69f43a7ff19a07778173f8
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(n):
return math.factorial(n)//2
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,)), 1)
check('fixture 3: (3,)', solve(*(3,)), 2)
check('fixture 4: (5,)', solve(*(5,)), 24)
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,) | 0 | 1 | Failed |
| fixture 3: (3,) | 3 | 2 | Failed |
| fixture 4: (5,) | 60 | 24 | Failed |
SHA-256 / eb35271269f1644cc11484c43278a78a20bed62da6f9af291116f133836b9353
3 / The verified repair
Exit 0"""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(n):
return math.factorial(n-1) if n else 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,)), 1)
check('fixture 3: (3,)', solve(*(3,)), 2)
check('fixture 4: (5,)', solve(*(5,)), 24)
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,) | 1 | 1 | Passed |
| fixture 3: (3,) | 2 | 2 | Passed |
| fixture 4: (5,) | 24 | 24 | Passed |
SHA-256 / 0c3da93f2126543208c98777e3043c0943aff5ca61aee01a09c15cf392841ef3
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:51.816797+00:00.
Case digest / 24c3a18c0129e8fb5fac74a1cdaacaed30da1e0ee1bca262b81b12607bef81ad