Hyperloglog, Probability, Hash Function, Cardinality Estimation, Dynamic Programming.
above) and take their sum. n = 300 N = 10 k = 7 q = (1 << N) x = int((q*(1-(1/2)**k))**n - (q*(1-(1/2)**(k-1)))**n) a = (1 << (N-k)) b = int(q*(1-(1/2)**(k-1))) dp = {} e = 0 for h in range(1, n+1): y = 0 for j in range(1, h+1): y += H(n, j, h-j, dp) if (n, j, h-j) not in dp else dp[(n, j, h-j)] e