FAILURE MAP
← Case archive

FA-5631 / Combinatorics / Open access

Circular labelled arrangements · case 01

Rotations are treated as different circular arrangements.

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

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 fixtureActualExpectedOutcome
fixture 1: (0,)11Passed
fixture 2: (1,)11Passed
fixture 3: (3,)62Failed
fixture 4: (5,)12024Failed

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 fixtureActualExpectedOutcome
fixture 1: (0,)01Failed
fixture 2: (1,)01Failed
fixture 3: (3,)32Failed
fixture 4: (5,)6024Failed

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 fixtureActualExpectedOutcome
fixture 1: (0,)11Passed
fixture 2: (1,)11Passed
fixture 3: (3,)22Passed
fixture 4: (5,)2424Passed

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