Open In App

GATE | GATE 2017 MOCK II | Question 25

Last Updated : 28 Jun, 2021
Like Article
Like
Save
Share
Report

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


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads