FAILURE MAP
← Case archive

FA-13401 / Numerical aggregation / Open access

Empirical cdf supremum: The discrepancy is measured between simultaneous equal-value jumps. · case 01

The reduction disagrees with its explicit aggregation oracle.

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

ROOT CAUSE

The discrepancy is measured between simultaneous equal-value jumps.

VERIFIED REPAIR

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

Unsuccessful approach: Reversing the tied jump order still introduces a nonexistent intermediate CDF state.

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)):
        pa+=Fraction(ca[x],len(a))
        pb+=Fraction(cb[x],len(b))
        best=max(best,abs(pa-pb),abs(pa-(pb-Fraction(cb[x],len(b)))))
    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 410Failed
regression 5NoneNonePassed
regression 61/20Failed
regression 73/45/12Failed
regression 81/23/10Failed
regression 91/21/2Passed
variable support11/2Failed

SHA-256 / b859dfb545267c09836dfcdadc080fa2936907b2913060663bb8987675dc01c5

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 sorted(set(ca)|set(cb)):
        pa+=Fraction(ca[x],len(a))
        pb+=Fraction(cb[x],len(b))
        best=max(best,abs(pa-pb),abs((pa-Fraction(ca[x],len(a)))-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 410Failed
regression 5NoneNonePassed
regression 61/20Failed
regression 75/125/12Passed
regression 81/23/10Failed
regression 91/21/2Passed
variable support1/21/2Passed

SHA-256 / 42830f4a45ff5714db59acd33244257baa7885174667bd083a866950d7a9ee6f

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.718235+00:00.

Case digest / 9a673d6504f72114035dbded48d72efa6434b08e18041b3617165d63ce462d82