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

asked in Algorithms by Loyal (3.1k points)  
edited by | 65 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 Feb 2017
  1. Arjun

    4704 Points

  2. Bikram

    4004 Points

  3. Habibkhan

    3738 Points

  4. Aboveallplayer

    2966 Points

  5. sriv_shubham

    2278 Points

  6. Smriti012

    2212 Points

  7. Arnabi

    1814 Points

  8. Debashish Deka

    1788 Points

  9. sh!va

    1444 Points

  10. mcjoshi

    1444 Points

Monthly Topper: Rs. 500 gift card

20,788 questions
25,938 answers
59,535 comments
21,929 users