FA-12761 / Voting rule computation / Open access
An exact quotient omits the final quota increment · case 01
An exact quotient omits the final quota increment.
ROOT CAUSE
Ceiling division is substituted for floor plus one.
VERIFIED REPAIR
Always floor valid ballot count divided by seats plus one, then add one.
Unsuccessful approach: Dividing by seats instead changes the allocation rule.
Case contract
For nonnegative integer valid count and positive seats return floor(valid/(seats+1))+1, including when the quotient is integral.
Why this case matters
A deterministic toy ballot model makes the stated counting convention executable.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(valid, seats):
return (valid+seats)//(seats+1)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('exact division', solve(6*N,2), 2*N+1)
check('fractional division', solve(6*N+1,2), 2*N+1)
check('zero ballots', solve(0,N), 1)
check('one seat', solve(2*N,1), N+1)
check('more seats than ballots', solve(1,N+2), 1)
check('several seats', solve(20,3), 6)
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 |
|---|---|---|---|
| exact division | 2 | 3 | Failed |
| fractional division | 3 | 3 | Passed |
| zero ballots | 0 | 1 | Failed |
| one seat | 1 | 2 | Failed |
| more seats than ballots | 1 | 1 | Passed |
| several seats | 5 | 6 | Failed |
SHA-256 / 1e52accbef0981595cfec304a8e72bec67ce6d431715de9dedc78e9816a5330d
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(valid, seats):
return valid//seats+1
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('exact division', solve(6*N,2), 2*N+1)
check('fractional division', solve(6*N+1,2), 2*N+1)
check('zero ballots', solve(0,N), 1)
check('one seat', solve(2*N,1), N+1)
check('more seats than ballots', solve(1,N+2), 1)
check('several seats', solve(20,3), 6)
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 |
|---|---|---|---|
| exact division | 4 | 3 | Failed |
| fractional division | 4 | 3 | Failed |
| zero ballots | 1 | 1 | Passed |
| one seat | 3 | 2 | Failed |
| more seats than ballots | 1 | 1 | Passed |
| several seats | 7 | 6 | Failed |
SHA-256 / a7dd2dfb4cc1ef36cdc79a010b621160aff904eefe6fea5286ee54aac93c907e
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(valid, seats):
return valid//(seats+1)+1
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('exact division', solve(6*N,2), 2*N+1)
check('fractional division', solve(6*N+1,2), 2*N+1)
check('zero ballots', solve(0,N), 1)
check('one seat', solve(2*N,1), N+1)
check('more seats than ballots', solve(1,N+2), 1)
check('several seats', solve(20,3), 6)
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 |
|---|---|---|---|
| exact division | 3 | 3 | Passed |
| fractional division | 3 | 3 | Passed |
| zero ballots | 1 | 1 | Passed |
| one seat | 2 | 2 | Passed |
| more seats than ballots | 1 | 1 | Passed |
| several seats | 6 | 6 | Passed |
SHA-256 / fab86365ddbe9535a718f9f2b5c5738dd8d5830c253980ca8dc0f72cea66a86c
Verification & scope
Abstract counting rules only; excludes jurisdictional law, ballot authentication and election operations. 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:38:59.926043+00:00.
Case digest / 30816489f41fd6a528c68bf47fcc6be512213fc5c7b111e8894f1e2c70163dd8