GateAI
Searching, Sorting and Hashing

GATE CSE 2014 Set 3 · Q40

MCQ2 marksEasy

Time

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?

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: A) (97 × 97 × 97)/1003

Searching, Sorting and Hashing

Under the assumption of simple uniform hashing, any given key is equally likely to hash into any of the 100 slots, independently of where any other key has hashed.

There are 100 total slots. For the first 3 slots to remain unfilled after an insertion, the key must be placed into any of the remaining 100−3=97100 - 3 = 97 slots.

For each insertion, the probability of choosing one of the other 97 slots is:

P(slot≥4)=97100P(\text{slot} \ge 4) = \frac{97}{100}

Since 3 independent insertions are performed, the joint probability that all 3 keys hash into the remaining 97 slots is:

P=(97100)×(97100)×(97100)=97×97×971003P = \left(\frac{97}{100}\right) \times \left(\frac{97}{100}\right) \times \left(\frac{97}{100}\right) = \frac{97 \times 97 \times 97}{100^3}

Thus, option (A) is the correct answer.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Searching, Sorting and Hashing previous year question is Q40 of the GATE CSE 2014 Set 3 paper. Find more GATE CSE PYQs on Searching, Sorting and Hashing in Algorithms, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Searching, Sorting and Hashing PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Searching, Sorting and Hashing in GATE CSE

Searching, Sorting and Hashing has 27 GATE CSE PYQs across 20 papers from 2012 to 2026. 7 of them are 2-mark MCQs like this one, and GATE CSE 2014 Set 3 has 3.

How GATE tests Searching, Sorting and Hashing

More from GATE CSE 2014 Set 3

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2014 Set 3 · Q40 · MCQ

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?

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.