Consider a hash table with slots. Collisions are resolved using chaining. Assuming simple uniform hashing, what is the probability that the first slots are unfilled after the first insertions?
View worked solution
Answer: A
Under the assumption of simple uniform hashing, each key is equally likely to hash to any of the slots, independently of where other keys are hashed.
We want to find the probability that the first slots remain unfilled after insertions. This means all inserted keys must hash to any of the remaining slots (slots to ).
- For the insertion, the probability of landing in one of the allowed slots is .
- For the insertion, the probability of landing in one of the allowed slots is .
- For the insertion, the probability of landing in one of the allowed slots is .
Since the insertions are independent, the joint probability is the product of these individual probabilities:
Therefore, the correct option is A.
Free practice · Your answers on this page are not saved.
