Hyperloglog, Probability, Hash Function, Cardinality Estimation, Dynamic Programming.
and 2^N-1 hsh = mmh3.hash(h, seeds[j], signed=False) & ((1<<N)-1) # number of leading zeros in binary of hsh b = get_trailing_zeros(hsh, N) g[j] = max(g[j], b) # Estimated cardinality w = sum(g)/m a = 0.79402*2**w print(a) In the above code, we are multiplying estimated cardinality by 0.79402. This