386 views
3 votes
3 votes
Suppose that you store $6$ records in a hash table of size $8$ by chaining, and suppose that you have a good hash function so that the probability that a key is hashed into any of the $8$ slots is $1/8.$ For a particular slot in the hash table, what is the probability that this slot is empty, that is, none of the $6$ keys hashes into this slot?
  1. $0.125^6$
  2. $0.875^6$
  3. $0.166^8$
  4. $0.833^8$

1 Answer

Best answer
2 votes
2 votes
We want all the $n$ keys to go to $m-1$ locations only. Probability for this will be $\dfrac{(m-1)^n}{m^n} \implies (1-0.125)^6 = 0.875^6 $
selected by
Answer:

Related questions

4 votes
4 votes
1 answer
2
gatecse asked Aug 18, 2020
638 views
In a hashtable with $20$ slots $30$ records are inserted with collisions being resolved by chaining. What is the expected number of key comparisons in an unsuccessful sea...