FAILURE MAP
← Case archive

FA-14271 / Numerical aggregation / Open access

Three row count sketch: Updates omit the third independent hash row. · case 01

The reduction disagrees with its explicit aggregation oracle.

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

ROOT CAUSE

Updates omit the third independent hash row.

THE FAILURE

Updates omit the third independent hash row.

Unsuccessful approach: Skipping the first row instead still creates an unupdated zero counter.

Case contract

A stipulated nonnegative weighted count-min table has exactly three independent rows of positive width, with bucket functions k%w,(3*k+1)%w,(k//w)%w for nonnegative integer keys. Add all block contributions, then estimate each query by the minimum of its three cells. Return [table,estimates]; no probabilistic error guarantee is claimed.

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(blocks, width, queries):
    table=[[0]*width for _ in range(3)]
    for block in blocks:
        for key,weight in block:
            buckets=[key%width,(3*key+1)%width,(key//width)%width]
            for row,col in list(enumerate(buckets))[:2]:
                table[row][col]+=weight
    estimates=[]
    for key in queries:
        buckets=[key%width,(3*key+1)%width,(key//width)%width]
        estimates.append(min(table[row][col] for row,col in enumerate(buckets)))
    return [table,estimates]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([[(0, 2), (1, 3)], [(4, 1)]], 4, [0, 1, 4, 8])), [[[3, 3, 0, 0], [3, 3, 0, 0], [5, 1, 0, 0]], [3, 3, 1, 0]])
check('regression 2', solve(*([], 3, [0, 1])), [[[0, 0, 0], [0, 0, 0], [0, 0, 0]], [0, 0]])
check('regression 3', solve(*([[(2, 5)], [], [(2, 2)]], 3, [2, 5])), [[[0, 0, 7], [0, 7, 0], [7, 0, 0]], [7, 0]])
check('regression 4', solve(*([[(0, 1), (0, 1)]], 1, [0, 3])), [[[2], [2], [2]], [2, 2]])
check('regression 5', solve(*([[(7, 0), (2, 4), (5, 1)]], 4, [2, 5, 7])), [[[0, 1, 4, 0], [1, 0, 0, 4], [4, 1, 0, 0]], [4, 1, 0]])
check('regression 6', solve(*([[(1, 2)], [(8, 5), (3, 4)]], 5, [1, 8, 3, 13])), [[[0, 2, 0, 9, 0], [9, 0, 0, 0, 2], [6, 5, 0, 0, 0]], [2, 5, 6, 0]])
check("variable sketch contribution",solve([[(0,N)]],2,[0]),[[[N,0],[0,N],[N,0]],[N]])
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 1[[[3, 3, 0, 0], [3, 3, 0, 0], [0, 0, 0, 0]], [0, 0, 0, 0]][[[3, 3, 0, 0], [3, 3, 0, 0], [5, 1, 0, 0]], [3, 3, 1, 0]]Failed
regression 2[[[0, 0, 0], [0, 0, 0], [0, 0, 0]], [0, 0]][[[0, 0, 0], [0, 0, 0], [0, 0, 0]], [0, 0]]Passed
regression 3[[[0, 0, 7], [0, 7, 0], [0, 0, 0]], [0, 0]][[[0, 0, 7], [0, 7, 0], [7, 0, 0]], [7, 0]]Failed
regression 4[[[2], [2], [0]], [0, 0]][[[2], [2], [2]], [2, 2]]Failed
regression 5[[[0, 1, 4, 0], [1, 0, 0, 4], [0, 0, 0, 0]], [0, 0, 0]][[[0, 1, 4, 0], [1, 0, 0, 4], [4, 1, 0, 0]], [4, 1, 0]]Failed
regression 6[[[0, 2, 0, 9, 0], [9, 0, 0, 0, 2], [0, 0, 0, 0, 0]], [0, 0, 0, 0]][[[0, 2, 0, 9, 0], [9, 0, 0, 0, 2], [6, 5, 0, 0, 0]], [2, 5, 6, 0]]Failed
variable sketch contribution[[[1, 0], [0, 1], [0, 0]], [0]][[[1, 0], [0, 1], [1, 0]], [1]]Failed

SHA-256 / 309fde7607afd7fa3f72ec1c38cdee358c59b85e4cc814018b2a93e236779ad7

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(blocks, width, queries):
    table=[[0]*width for _ in range(3)]
    for block in blocks:
        for key,weight in block:
            buckets=[key%width,(3*key+1)%width,(key//width)%width]
            for row,col in list(enumerate(buckets))[1:]:
                table[row][col]+=weight
    estimates=[]
    for key in queries:
        buckets=[key%width,(3*key+1)%width,(key//width)%width]
        estimates.append(min(table[row][col] for row,col in enumerate(buckets)))
    return [table,estimates]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([[(0, 2), (1, 3)], [(4, 1)]], 4, [0, 1, 4, 8])), [[[3, 3, 0, 0], [3, 3, 0, 0], [5, 1, 0, 0]], [3, 3, 1, 0]])
check('regression 2', solve(*([], 3, [0, 1])), [[[0, 0, 0], [0, 0, 0], [0, 0, 0]], [0, 0]])
check('regression 3', solve(*([[(2, 5)], [], [(2, 2)]], 3, [2, 5])), [[[0, 0, 7], [0, 7, 0], [7, 0, 0]], [7, 0]])
check('regression 4', solve(*([[(0, 1), (0, 1)]], 1, [0, 3])), [[[2], [2], [2]], [2, 2]])
check('regression 5', solve(*([[(7, 0), (2, 4), (5, 1)]], 4, [2, 5, 7])), [[[0, 1, 4, 0], [1, 0, 0, 4], [4, 1, 0, 0]], [4, 1, 0]])
check('regression 6', solve(*([[(1, 2)], [(8, 5), (3, 4)]], 5, [1, 8, 3, 13])), [[[0, 2, 0, 9, 0], [9, 0, 0, 0, 2], [6, 5, 0, 0, 0]], [2, 5, 6, 0]])
check("variable sketch contribution",solve([[(0,N)]],2,[0]),[[[N,0],[0,N],[N,0]],[N]])
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 1[[[0, 0, 0, 0], [3, 3, 0, 0], [5, 1, 0, 0]], [0, 0, 0, 0]][[[3, 3, 0, 0], [3, 3, 0, 0], [5, 1, 0, 0]], [3, 3, 1, 0]]Failed
regression 2[[[0, 0, 0], [0, 0, 0], [0, 0, 0]], [0, 0]][[[0, 0, 0], [0, 0, 0], [0, 0, 0]], [0, 0]]Passed
regression 3[[[0, 0, 0], [0, 7, 0], [7, 0, 0]], [0, 0]][[[0, 0, 7], [0, 7, 0], [7, 0, 0]], [7, 0]]Failed
regression 4[[[0], [2], [2]], [0, 0]][[[2], [2], [2]], [2, 2]]Failed
regression 5[[[0, 0, 0, 0], [1, 0, 0, 4], [4, 1, 0, 0]], [0, 0, 0]][[[0, 1, 4, 0], [1, 0, 0, 4], [4, 1, 0, 0]], [4, 1, 0]]Failed
regression 6[[[0, 0, 0, 0, 0], [9, 0, 0, 0, 2], [6, 5, 0, 0, 0]], [0, 0, 0, 0]][[[0, 2, 0, 9, 0], [9, 0, 0, 0, 2], [6, 5, 0, 0, 0]], [2, 5, 6, 0]]Failed
variable sketch contribution[[[0, 0], [0, 1], [1, 0]], [0]][[[1, 0], [0, 1], [1, 0]], [1]]Failed

SHA-256 / 5e8730a681d4fa77907a1547b2c52e8b1d7e85f71e66e4bee7391e41e8e3ab78

HELD IN THE MEMBER ARCHIVE

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

This mechanism has 7 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:15.451416+00:00.

Case digest / 6f39af912220930674156a9d1d7e38314cd42882b522f68df5f93523f7fd4991