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

asked in Algorithms by Veteran (11.1k points)  
edited by | 92 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 (11.1k 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 Sep 2017
  1. Habibkhan

    6362 Points

  2. Warrior

    2234 Points

  3. Arjun

    2212 Points

  4. nikunj

    1980 Points

  5. manu00x

    1726 Points

  6. SiddharthMahapatra

    1718 Points

  7. Bikram

    1716 Points

  8. makhdoom ghaya

    1660 Points

  9. A_i_$_h

    1528 Points

  10. rishu_darkshadow

    1512 Points


25,988 questions
33,561 answers
79,406 comments
31,026 users