FAILURE MAP
← Case archive

FA-73298 / Probabilistic sketches / Member archive

DGIM sliding-window bit counting: merged bucket keeps the older timestamp · case 03

Merged buckets expire too early and the window count drops below the true value.

Member previewVariant 3 · 3 implementations · 7 checks per implementation

Case contract

Input {W, bits, queries}; timestamps start at 1. Buckets are [size, timestamp of most recent 1], newest first. Before processing time t, buckets with timestamp <= t - W expire. A 1 bit adds [1, t]; while more than two buckets share a size, the two oldest of that size merge into one of double size keeping the more recent timestamp, cascading upward. At a query time the estimate is the total size minus floor(oldest size / 2). Return [[t, estimate] per query, final buckets].

Why this case matters

Exponential-histogram counters approximate "events in the last W ticks" in logarithmic memory for streaming monitors; merge and expiry rules determine the error bound.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
stream 0 W=10[[[15, 4], [27, 5], [30, 5]], [[1, 29], [1, 28], [2, 25], [2, 22]]][[[15, 5], [27, 6], [30, 5]], [[1, 29], [1, 28], [2, 27], [2, 24]]]Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

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

Sign in to the archive ↗