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

asked in Algorithms by Active (2.5k points)  
edited by | 58 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.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 Jan 2017
  1. Debashish Deka

    8126 Points

  2. sudsho

    5042 Points

  3. Habibkhan

    4706 Points

  4. Vijay Thakur

    4458 Points

  5. Bikram

    4348 Points

  6. saurabh rai

    4212 Points

  7. Arjun

    4010 Points

  8. santhoshdevulapally

    3722 Points

  9. GateSet

    3292 Points

  10. Sushant Gokhale

    3286 Points

Monthly Topper: Rs. 500 gift card

19,122 questions
24,034 answers
52,724 comments
20,276 users