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?

This question was previously asked in
GATE CS 2014 Official Paper: Shift 3
View all GATE CS Papers >
  1. (97 × 97 × 97) / 1003
  2. (99 × 98 × 97) / 1003
  3. (97 × 96 × 95) / 1003
  4. (97 × 96 × 95) / (3! × 1003)

Answer (Detailed Solution Below)

Option 1 : (97 × 97 × 97) / 1003
Free
GATE CS Full Mock Test
65 Qs. 100 Marks 180 Mins

Detailed Solution

Download Solution PDF

Chaining:

  • Each slot may contain a chain of elements but in linear probing, we can insert only one element in every slot.

 

  • In order to insert element 1, we have 4 to 100 = 97 slots out of 100 slots
  • In order to insert second element, we have 4 to 100 = 97 slots out of 100 slots
  • In order to insert third element, we have 4 to 100 = 97 slots out of 100 slots
  • Required probability 


Hence option 1 is the correct option.

Latest GATE CS Updates

Last updated on Jan 8, 2025

-> GATE CS 2025 Admit Card has been released on 7th January 2025.

-> The exam will be conducted on 1st February 2025 in 2 shifts.

-> Candidates applying for the GATE CE must satisfy the GATE Eligibility Criteria.

-> The candidates should have BTech (Computer Science). Candidates preparing for the exam can refer to the GATE CS Important Questions to improve their preparation.

-> Candidates must check their performance with the help of the GATE CS mock tests and GATE CS previous year papers for the GATE 2025 Exam.

More Searching Questions

Hot Links: teen patti all game online teen patti real money teen patti win teen patti glory teen patti gold new version 2024