Hyperloglog, Probability, Hash Function, Cardinality Estimation, Dynamic Programming.
each bucket but the final cardinality has to be multiplied by m. Because the input stream is divide into m sub-streams unlike m hash functions which are applied to all inputs, here each bucket corresponds to approximately n/m inputs. The updated code for using 1st p bits as a bucket identifier: