Skip to content
Related Articles

Related Articles

GATE | GATE 2017 MOCK II | Question 25
  • Last Updated : 31 Jan, 2017

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
Recommended Articles
Page :