Get the best out of our app
GFG App
Open App
Browser
Continue

# GATE | GATE-CS-2014-(Set-3) | Question 65

Consider a hash table with 100 slots. Collisions are resolved using chaining. Assuming simple uniform hashing, what is the probability that the first 3 slots are unfilled after the first 3 insertions?

(A)

(97 Ă— 97 Ă— 97)/1003

(B)

(99 Ă— 98 Ă— 97)/1003

(C)

(97 Ă— 96 Ă— 95)/1003

(D)

(97 Ă— 96 Ă— 95)/(3! Ă— 1003)

Answer: (A)

Explanation:

Simple Uniform hashing function is a hypothetical hashing function that evenly distributes items into the slots of a hash table. Moreover, each item to be hashed has an equal probability of being placed into a slot, regardless of the other elements already placed.

```Probability that the first 3 slots are unfilled after the first 3 insertions =
(probability that first item doesn\'t go in any of the first 3 slots)*
(probability that second item doesn\'t go in any of the first 3 slots)*
(probability that third item doesn\'t go in any of the first 3 slots)

= (97/100) * (97/100) * (97/100) ```

Quiz of this Question
Please comment below if you find anything wrong in the above post

My Personal Notes arrow_drop_up
Similar Reads