The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
0 votes

asked in Algorithms by Veteran (17.5k points)
edited by | 111 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.



answered by Veteran (12.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.

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

29,017 questions
36,844 answers
34,723 users