Hyperloglog, Probability, Hash Function, Cardinality Estimation, Dynamic Programming.
+= h*(y/x) print(e) The above code is for finding the expected cardinality when we have seen 300 input data points each of 10 bits and the maximum number of trailing zeros seen is 7. The expected cardinality is somehwere around 260. We can verify this is true by running a simulation. import random,