GATE | GATE 2017 MOCK II | Question 25

Given a hash table with n keys and m slots with simple uniform hashing. If collisions are resolved by chaining then what is the probability that the first slot ends up empty ?

(A) (1 / m)n
(B) [1 – (1/m)]n
(C) (1/n)m
(D) [1 – (1/n)]m


Answer: (B)

Explanation: Probability of one particular slot = 1/m ( because total m slots)
Probability that a value should not go in one particular slot = 1 – (1/m)
For n values (keys) probability = [1 – (1/m)]n


Quiz of this Question

My Personal Notes arrow_drop_up
Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.