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

asked in Algorithms by Boss (5.8k points)  
edited by | 79 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.9k 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 Jul 2017
  1. Bikram

    3782 Points

  2. manu00x

    2464 Points

  3. Debashish Deka

    1832 Points

  4. joshi_nitish

    1494 Points

  5. Arnab Bhadra

    1096 Points

  6. Arjun

    1054 Points

  7. Hemant Parihar

    1050 Points

  8. Shubhanshu

    972 Points

  9. Ahwan

    876 Points

  10. akash.dinkar12

    642 Points


23,953 questions
30,895 answers
70,107 comments
29,272 users