FA-12746 / Voting rule computation / Open access
Two omitted candidates acquire a fictitious pairwise preference · case 01
Two omitted candidates acquire a fictitious pairwise preference.
ROOT CAUSE
A missing candidate receives an ordinary rank index.
VERIFIED REPAIR
Treat omitted candidates as tied below every ranked candidate.
Unsuccessful approach: Counting a tie as a preference awards both-omitted ballots to the first candidate.
Case contract
Return number of partial unique rankings preferring a over b; both omitted are tied, one ranked beats one omitted.
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(ballots, a, b):
return sum((r.index(a) if a in r else -1) < (r.index(b) if b in r else -1) for r in ballots)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('ranked beats missing', solve([[0]]*N,0,1), N)
check('both missing tie', solve([[]]*N,0,1), 0)
check('missing loses', solve([[1]]*N,0,1), 0)
check('rank order', solve([[1,0],[0,1]],0,1), 1)
check('unrelated rank', solve([[2],[2,0]],0,1), 1)
check('no ballots', solve([],0,1), 0)
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 |
|---|---|---|---|
| ranked beats missing | 0 | 1 | Failed |
| both missing tie | 0 | 0 | Passed |
| missing loses | 1 | 0 | Failed |
| rank order | 1 | 1 | Passed |
| unrelated rank | 0 | 1 | Failed |
| no ballots | 0 | 0 | Passed |
SHA-256 / 9364b025e32e149a33fe7ee9c647f55188ab115087402595e14c7406284b02ea
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(ballots, a, b):
return sum((r.index(a) if a in r else len(r)) <= (r.index(b) if b in r else len(r)) for r in ballots)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('ranked beats missing', solve([[0]]*N,0,1), N)
check('both missing tie', solve([[]]*N,0,1), 0)
check('missing loses', solve([[1]]*N,0,1), 0)
check('rank order', solve([[1,0],[0,1]],0,1), 1)
check('unrelated rank', solve([[2],[2,0]],0,1), 1)
check('no ballots', solve([],0,1), 0)
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 |
|---|---|---|---|
| ranked beats missing | 1 | 1 | Passed |
| both missing tie | 1 | 0 | Failed |
| missing loses | 0 | 0 | Passed |
| rank order | 1 | 1 | Passed |
| unrelated rank | 2 | 1 | Failed |
| no ballots | 0 | 0 | Passed |
SHA-256 / d4c99e15ffc133b82e2033c7243977efd9c83b6a760083dc74eecacb375ff6ae
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(ballots, a, b):
return sum((r.index(a) if a in r else len(r)) < (r.index(b) if b in r else len(r)) for r in ballots)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('ranked beats missing', solve([[0]]*N,0,1), N)
check('both missing tie', solve([[]]*N,0,1), 0)
check('missing loses', solve([[1]]*N,0,1), 0)
check('rank order', solve([[1,0],[0,1]],0,1), 1)
check('unrelated rank', solve([[2],[2,0]],0,1), 1)
check('no ballots', solve([],0,1), 0)
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 |
|---|---|---|---|
| ranked beats missing | 1 | 1 | Passed |
| both missing tie | 0 | 0 | Passed |
| missing loses | 0 | 0 | Passed |
| rank order | 1 | 1 | Passed |
| unrelated rank | 1 | 1 | Passed |
| no ballots | 0 | 0 | Passed |
SHA-256 / 90935265adedb4cd7045739e95fcc75d4f59d70e44ab8d15c4b3691f23217097
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.790775+00:00.
Case digest / 47da9eaa14ac80be453393847de0c76279a0a0422fcd3d31789e1a957def06a8