FA-12726 / Auction allocation rules / Open access
Marginal pro-rata allocation loses residual units · case 01
Marginal pro-rata allocation loses residual units.
ROOT CAUSE
Every fractional allocation is independently floored.
VERIFIED REPAIR
Implement the stated toy allocation contract directly: For positive integer requests and capacity between zero and their sum, floor proportional shares then give one remaining unit to each largest fractional remainder, breaking ties by input order. Empty requests require zero capacity.
Unsuccessful approach: Giving all residual units to the first participant ignores fractional entitlement.
Case contract
For positive integer requests and capacity between zero and their sum, floor proportional shares then give one remaining unit to each largest fractional remainder, breaking ties by input order. Empty requests require zero capacity.
Why this case matters
Deterministic teaching model for reviewing auction allocation software; not a representation of any venue or financial advice.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(requests, capacity):
return [capacity*q//sum(requests) for q in requests]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('largest remainder is not first', solve([N,3*N], 2), [1,1])
check('strict larger remainder later', solve([1,2], 1), [0,1])
check('multiple residual units', solve([1,1,1], 2), [1,1,0])
check('zero capacity', solve([1,2], 0), [0,0])
check('full capacity', solve([2,3], 5), [2,3])
check('single bidder', solve([5], 3), [3])
check('empty', solve([], 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 |
|---|---|---|---|
| largest remainder is not first | [0, 1] | [1, 1] | Failed |
| strict larger remainder later | [0, 0] | [0, 1] | Failed |
| multiple residual units | [0, 0, 0] | [1, 1, 0] | Failed |
| zero capacity | [0, 0] | [0, 0] | Passed |
| full capacity | [2, 3] | [2, 3] | Passed |
| single bidder | [3] | [3] | Passed |
| empty | [] | [] | Passed |
SHA-256 / 56a38a38f59928302b2304cda71dfa8fba8dd437d98bd2dbcde29be6118801a5
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(requests, capacity):
if not requests: return []
result=[capacity*q//sum(requests) for q in requests]
result[0]+=capacity-sum(result)
return result
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('largest remainder is not first', solve([N,3*N], 2), [1,1])
check('strict larger remainder later', solve([1,2], 1), [0,1])
check('multiple residual units', solve([1,1,1], 2), [1,1,0])
check('zero capacity', solve([1,2], 0), [0,0])
check('full capacity', solve([2,3], 5), [2,3])
check('single bidder', solve([5], 3), [3])
check('empty', solve([], 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 |
|---|---|---|---|
| largest remainder is not first | [1, 1] | [1, 1] | Passed |
| strict larger remainder later | [1, 0] | [0, 1] | Failed |
| multiple residual units | [2, 0, 0] | [1, 1, 0] | Failed |
| zero capacity | [0, 0] | [0, 0] | Passed |
| full capacity | [2, 3] | [2, 3] | Passed |
| single bidder | [3] | [3] | Passed |
| empty | [] | [] | Passed |
SHA-256 / 511dd8731675666a8ca1e601bc4367efe1795bcfda34966d27465f04ef833763
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(requests, capacity):
total=sum(requests)
if not total: return []
result=[capacity*q//total for q in requests]
order=sorted(range(len(requests)),key=lambda i:-(capacity*requests[i]%total))
for i in order[:capacity-sum(result)]: result[i]+=1
return result
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('largest remainder is not first', solve([N,3*N], 2), [1,1])
check('strict larger remainder later', solve([1,2], 1), [0,1])
check('multiple residual units', solve([1,1,1], 2), [1,1,0])
check('zero capacity', solve([1,2], 0), [0,0])
check('full capacity', solve([2,3], 5), [2,3])
check('single bidder', solve([5], 3), [3])
check('empty', solve([], 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 |
|---|---|---|---|
| largest remainder is not first | [1, 1] | [1, 1] | Passed |
| strict larger remainder later | [0, 1] | [0, 1] | Passed |
| multiple residual units | [1, 1, 0] | [1, 1, 0] | Passed |
| zero capacity | [0, 0] | [0, 0] | Passed |
| full capacity | [2, 3] | [2, 3] | Passed |
| single bidder | [3] | [3] | Passed |
| empty | [] | [] | Passed |
SHA-256 / 54f148fd1ab26666b2525e3618b8d62cf308c91b409f71d7c10fa8b69185f242
Verification & scope
Offline toy model with explicit integer inputs; no strategic behavior or real market execution. 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.439096+00:00.
Case digest / 51bb05a212a39e75506017482f6dce735383663e0343ee4c285b4f018d7d59d1