FAILURE MAP
← Case archive

FA-5616 / Combinatorics / Open access

Proper nonempty subsets count · case 01

The whole set is retained among proper subsets.

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

ROOT CAUSE

The whole set is retained among proper subsets.

THE FAILURE

The whole set is retained among proper subsets.

Unsuccessful approach: Subtracting two distinct exclusions on an empty ground set double-counts one object.

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. Proper nonempty subsets count. Exact operational definition: max(0,2**n-2)

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-1
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (0,)', solve(*(0,)), 0)
check('fixture 2: (1,)', solve(*(1,)), 0)
check('fixture 3: (2,)', solve(*(2,)), 2)
check('fixture 4: (4,)', solve(*(4,)), 14)
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,)00Passed
fixture 2: (1,)10Failed
fixture 3: (2,)32Failed
fixture 4: (4,)1514Failed

SHA-256 / 66ccd7d68964c67f6c0b843709c03310685428661ea3cca4b0484feb672cdbf0

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-2
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (0,)', solve(*(0,)), 0)
check('fixture 2: (1,)', solve(*(1,)), 0)
check('fixture 3: (2,)', solve(*(2,)), 2)
check('fixture 4: (4,)', solve(*(4,)), 14)
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,)-10Failed
fixture 2: (1,)00Passed
fixture 3: (2,)22Passed
fixture 4: (4,)1414Passed

SHA-256 / a6c972410632a20827dff35238ce5d6a7d5e9303ed2b7796d7b217a2f7b8f4cf

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

Case digest / b23b3101b58de849113c003885e3ea400d9a2235cd71e3445bd2851718a94146