FAILURE MAP
← Case archive

FA-5736 / Combinatorics / Open access

Even subset count · case 01

Odd-cardinality subsets are included.

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

ROOT CAUSE

Odd-cardinality subsets are included.

VERIFIED REPAIR

Apply the specified mathematical contract directly, preserving all terms and boundary cases: return 1 if n==0 else 2**(n-1)

Unsuccessful approach: The empty-set boundary loses its unique even subset.

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. Even subset count. Exact operational definition: 1 if n==0 else 2**(n-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 2**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,)), 4)
check('fixture 4: (5,)', solve(*(5,)), 16)
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,)21Failed
fixture 3: (3,)84Failed
fixture 4: (5,)3216Failed

SHA-256 / 96cfb8203d7f9e1e46e05f7ce8d08bc55e5bae47151f07ab1d3a566097044b67

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 2**(n-1) if n else 0
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,)), 4)
check('fixture 4: (5,)', solve(*(5,)), 16)
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,)11Passed
fixture 3: (3,)44Passed
fixture 4: (5,)1616Passed

SHA-256 / 28d087daabf3f1860ffa95aa085a1e0aa0b3da9ec18e44b2773a73303489f774

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 1 if n==0 else 2**(n-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,)), 4)
check('fixture 4: (5,)', solve(*(5,)), 16)
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,)44Passed
fixture 4: (5,)1616Passed

SHA-256 / 8d695ef101d87b1a75cad84f365ca460f39ced67e7f7b6ae53fab072482f75b0

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:53.012935+00:00.

Case digest / bf1b8bba21d904a6fd7a555a7f94f7e57a7c8cc950ed6de151421d33fc309860