Value of K hash functions so that probability of false positive is at most 1/n

99 Views Asked by At

We have n elements , m=2n and k, where K is the number of hash functions, m being the size of bit array and n the number of elements. What will be the value of k such that the probability of getting a false positive will at most be 1/n

I am working on finding the probability of finding the value of k such that the false positive probability at most is 1/n. What I have done so far is the following.

Pr(bit = 0) = 1-1/m == e^(-kn/m)

then:

Pr(bit = 1) = (1-e^(-kn/m))^k

Now I am stuck at this point and I am unable to get the value of k for which my at most false-positive probability will be 1/n.

Also please let me know if someone thinks what I did so far is an error.

0

There are 0 best solutions below