Hyperloglog, Probability, Hash Function, Cardinality Estimation, Dynamic Programming.
import random, mmh3, math, numpy as np, string N = 32 p = 10 m = 1 << p k = 51236 # Generate k random strings data = list(set([''.join(\ random.choices(string.ascii_lowercase + string.digits, k=random.randint(1, 20))) for _ in range(k)])) # True cardinality print(len(data)) g = [-1]*m for i in