GATE | Gate IT 2007 | Question 28
Consider a hash function that distributes keys uniformly. The hash table size is 20. After hashing of how many keys will the probability that any new key hashed collides with an existing one exceed 0.5.
(A)
5
(B)
6
(C)
7
(D)
10
Answer: (D)
Explanation:
For each entry probability of collision is 1/20 {as possible total spaces =20, and an entry will go into only 1 place}
Say after inserting x values probability becomes ½
(1/20).x = ½
X=10
Quiz of this Question
Please comment below if you find anything wrong in the above post
Please Login to comment...