FA-5641 / Combinatorics / Open access
Rectangular grid cell rectangle count · case 01
Only unit rectangles are counted.
ROOT CAUSE
Only unit rectangles are counted.
THE FAILURE
Only unit rectangles are counted.
Unsuccessful approach: Cell counts are used where grid-line counts are required.
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. Rectangular grid cell rectangle count. Exact operational definition: rows*(rows+1)*cols*(cols+1)//4
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(rows, cols):
return rows*cols
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (1, 1)', solve(*(1, 1)), 1)
check('fixture 2: (2, 3)', solve(*(2, 3)), 18)
check('fixture 3: (0, 4)', solve(*(0, 4)), 0)
check('fixture 4: (3, 3)', solve(*(3, 3)), 36)
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: (1, 1) | 1 | 1 | Passed |
| fixture 2: (2, 3) | 6 | 18 | Failed |
| fixture 3: (0, 4) | 0 | 0 | Passed |
| fixture 4: (3, 3) | 9 | 36 | Failed |
SHA-256 / 3636bb9f40d3b435fa4076ce9a1fffdde751280155ffb60687ab93d5f23dd9b7
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(rows, cols):
return math.comb(rows,2)*math.comb(cols,2)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (1, 1)', solve(*(1, 1)), 1)
check('fixture 2: (2, 3)', solve(*(2, 3)), 18)
check('fixture 3: (0, 4)', solve(*(0, 4)), 0)
check('fixture 4: (3, 3)', solve(*(3, 3)), 36)
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: (1, 1) | 0 | 1 | Failed |
| fixture 2: (2, 3) | 3 | 18 | Failed |
| fixture 3: (0, 4) | 0 | 0 | Passed |
| fixture 4: (3, 3) | 9 | 36 | Failed |
SHA-256 / 6ce306557731ac00fd35cccc5d4e7dd1156657073c0f7dbfbf24546841d09215
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.863984+00:00.
Case digest / fdc8ff6e3a33f5b88a11113e15d2d85feb916da5689e51016a93aa534a20ca10