FAILURE MAP
← Case archive

FA-13411 / Numerical aggregation / Open access

Empirical cdf supremum: Each distinct support value receives one count regardless of duplicates. · case 01

The reduction disagrees with its explicit aggregation oracle.

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

ROOT CAUSE

Each distinct support value receives one count regardless of duplicates.

THE FAILURE

Each distinct support value receives one count regardless of duplicates.

Unsuccessful approach: Normalizing by distinct support count also ignores multiplicity.

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(int(ca[x]>0),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 42/30Failed
regression 5NoneNonePassed
regression 600Passed
regression 75/125/12Passed
regression 83/103/10Passed
regression 91/21/2Passed
variable support1/21/2Passed

SHA-256 / e7c7998cd55f66cfb1cb7e1df6bb55abb2be7738d8ac91d3bbdb83da8f8d86bf

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],max(1,len(ca)))
        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 312/3Failed
regression 420Failed
regression 5NoneNonePassed
regression 600Passed
regression 75/125/12Passed
regression 83/103/10Passed
regression 93/21/2Failed
variable support1/21/2Passed

SHA-256 / bc6dc0e92455d1b1073d4772ccbfc6c670d68192cef290c909dd7c14d21e9e81

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 10 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

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 / cd1a553154b109cc047cf9b6e08b611caa723f1da034493e163e0406dc1d787f