GATE CSE
First time here? Checkout the FAQ!
x
0 votes
66 views

asked in Algorithms by Loyal (3.1k points)  
edited by | 66 views

1 Answer

+3 votes
Best answer

Hash function is h(i)=(2i+1)mod11.After applying hashing 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

No of free slots are=5. 

Total no of slots=11.

Probability of not occuring collision=5/11.

                                      =0.45

 

answered by Veteran (10.6k points)  
selected by
I also solved the same way,but in solution they mentioned as 1/5. Sample space here would be all the slots or just the 5 vacant slots?
It is wrong.

how u know newly inserted element occupies one of the 5 slots.

consider all slots in which how many slots are free.


Top Users Mar 2017
  1. rude

    4018 Points

  2. sh!va

    2994 Points

  3. Rahul Jain25

    2804 Points

  4. Kapil

    2608 Points

  5. Debashish Deka

    2104 Points

  6. 2018

    1414 Points

  7. Vignesh Sekar

    1336 Points

  8. Bikram

    1218 Points

  9. Akriti sood

    1186 Points

  10. Sanjay Sharma

    1016 Points

Monthly Topper: Rs. 500 gift card

21,445 questions
26,757 answers
60,936 comments
22,954 users