FAILURE MAP
← Case archive

FA-13416 / Numerical aggregation / Open access

Empirical cdf supremum: Cumulative support is traversed by magnitude. · case 01

The reduction disagrees with its explicit aggregation oracle.

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

ROOT CAUSE

Cumulative support is traversed by magnitude.

VERIFIED REPAIR

Preserve the empirical cdf supremum contract at the identified reduction decision.

Unsuccessful approach: Arrival order also fails to define an ordered cumulative distribution.

Case contract

Return the maximum absolute difference between the right-continuous empirical cumulative distributions of two nonempty integer samples as a Fraction string. Empty either side returns None.

Why this case matters

Exact bounded examples isolate a reduction defect without floating-point or external-service effects.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
from collections import Counter, defaultdict
import math
import itertools
N = 1
observations = []
def solve(a, b):
    if not a or not b: return None
    ca,cb=Counter(a),Counter(b)
    pa=pb=Fraction(0)
    best=Fraction(0)
    for x in sorted(set(ca)|set(cb),key=abs):
        pa+=Fraction(ca[x],len(a))
        pb+=Fraction(cb[x],len(b))
        best=max(best,abs(pa-pb))
    return str(best)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([3], [0])), '1')
check('regression 2', solve(*([-5, 3], [-2, 1])), '1/2')
check('regression 3', solve(*([1, 1, 4], [2, 3])), '2/3')
check('regression 4', solve(*([0, 0, 0], [0])), '0')
check('regression 5', solve(*([], [1])), None)
check('regression 6', solve(*([1, 2], [1, 2])), '0')
check('regression 7', solve(*([-5, 0, 8], [-2, 8, 8, 8])), '5/12')
check('regression 8', solve(*([0, 4], [0, 1, 2, 3, 4])), '3/10')
check('regression 9', solve(*([2, 2], [1, 1, 3, 3])), '1/2')
check("variable support",solve([0,N],[N,N]),"1/2")
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
regression 111Passed
regression 211/2Failed
regression 32/32/3Passed
regression 400Passed
regression 5NoneNonePassed
regression 600Passed
regression 75/125/12Passed
regression 83/103/10Passed
regression 91/21/2Passed
variable support1/21/2Passed

SHA-256 / 89b17c970e49d11c2aea440925264f14328bddb72cc51b5e6e26f01b5da7b59b

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
from collections import Counter, defaultdict
import math
import itertools
N = 1
observations = []
def solve(a, b):
    if not a or not b: return None
    ca,cb=Counter(a),Counter(b)
    pa=pb=Fraction(0)
    best=Fraction(0)
    for x in list(ca)+[x for x in cb if x not in ca]:
        pa+=Fraction(ca[x],len(a))
        pb+=Fraction(cb[x],len(b))
        best=max(best,abs(pa-pb))
    return str(best)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([3], [0])), '1')
check('regression 2', solve(*([-5, 3], [-2, 1])), '1/2')
check('regression 3', solve(*([1, 1, 4], [2, 3])), '2/3')
check('regression 4', solve(*([0, 0, 0], [0])), '0')
check('regression 5', solve(*([], [1])), None)
check('regression 6', solve(*([1, 2], [1, 2])), '0')
check('regression 7', solve(*([-5, 0, 8], [-2, 8, 8, 8])), '5/12')
check('regression 8', solve(*([0, 4], [0, 1, 2, 3, 4])), '3/10')
check('regression 9', solve(*([2, 2], [1, 1, 3, 3])), '1/2')
check("variable support",solve([0,N],[N,N]),"1/2")
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
regression 111Passed
regression 211/2Failed
regression 312/3Failed
regression 400Passed
regression 5NoneNonePassed
regression 600Passed
regression 72/35/12Failed
regression 83/53/10Failed
regression 911/2Failed
variable support1/21/2Passed

SHA-256 / 5a762949c410813b9f582a486f1b8c2f3007634097c44553b00b4837d7660a0c

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
from collections import Counter, defaultdict
import math
import itertools
N = 1
observations = []
def solve(a, b):
    if not a or not b: return None
    ca,cb=Counter(a),Counter(b)
    pa=pb=Fraction(0)
    best=Fraction(0)
    for x in sorted(set(ca)|set(cb)):
        pa+=Fraction(ca[x],len(a))
        pb+=Fraction(cb[x],len(b))
        best=max(best,abs(pa-pb))
    return str(best)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([3], [0])), '1')
check('regression 2', solve(*([-5, 3], [-2, 1])), '1/2')
check('regression 3', solve(*([1, 1, 4], [2, 3])), '2/3')
check('regression 4', solve(*([0, 0, 0], [0])), '0')
check('regression 5', solve(*([], [1])), None)
check('regression 6', solve(*([1, 2], [1, 2])), '0')
check('regression 7', solve(*([-5, 0, 8], [-2, 8, 8, 8])), '5/12')
check('regression 8', solve(*([0, 4], [0, 1, 2, 3, 4])), '3/10')
check('regression 9', solve(*([2, 2], [1, 1, 3, 3])), '1/2')
check("variable support",solve([0,N],[N,N]),"1/2")
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
regression 111Passed
regression 21/21/2Passed
regression 32/32/3Passed
regression 400Passed
regression 5NoneNonePassed
regression 600Passed
regression 75/125/12Passed
regression 83/103/10Passed
regression 91/21/2Passed
variable support1/21/2Passed

SHA-256 / ddf4ebc36608e574c462ed740eefb855c4c46abcb901c6a609803ce88ef84dbe

Verification & scope

Small offline integer/rational inputs only; no performance, statistical inference, or production-library conformance claim. 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:39:06.766723+00:00.

Case digest / f7c58ef5bd63b50f6c988418ec1dd8aabcc979d6a05031d5d80461efcdba812d