math - Compressed Bloom Filters with fixed false positive probability -


i trying implement compressed bloom filter implementation according paper compressed bloom filters michael mitzenmacher. need calculate m - number of bits , k - number of hash functions given fixed false positive probability. example: know if have n = 1000 elements(to inserted in bloom filter) , given probability p = 0.01, "optimal" number of bits bloom filter (-n * math.log(p) / (math.log(2) * math.log(2))) = 9585 , need k = (9585/1000)*math.log(2) = 7 - hash functions. is, false positive rate 0.01. "compress" bloom filter need build more "sparse" filter - lesser hash functions , more number of bits in vector. did not idea how calculate number of hash functions , number of bits sparse filter. if decrease k 1 how increase number of bits? ratio?

well, did not find concrete ratio between number of hash functions , number of bits fixed false positive rate. have found precalculated table of such values. here can find values of number of hash functions , bit vector length corresponding false positive rate. since have such table can find number of hash functions(less optimal) , corresponding bit vector length false positive rate less or equal given. here implementation building "sparse" bloom filters. hope save someone`s time in future.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -