FA-72974 / Probabilistic sketches / Member archive
HyperLogLog register update: register overwritten by the latest rank · case 04
A later small rank erases the maximum, making estimates depend on arrival order.
Case contract
Input {p, hashes}. Each hash is reduced to its low 32 bits. The register index is the top p bits; the remaining 32-p bits, left-aligned in a 32-bit word, give rho = leading zeros + 1, and an all-zero remainder gives rho = 32 - p + 1. Each register keeps the maximum rho seen. Return the list of 2^p registers.
Why this case matters
Every HyperLogLog estimate and merge depends on registers being filled with exactly the same index and rank rule on every node.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| random hashes p=4 | [1, 0, 1, 4, 0, 1, 0, 2, 0, 3, 0, 0, 5, 2, 0, 0] | [3, 0, 2, 4, 0, 1, 0, 2, 0, 3, 0, 0, 5, 3, 0, 0] | 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 ↗