retagged by
3,455 views
2 votes
2 votes
What is the average number of probe required when inserting an element with load factor alpha (assume uniform hashing)

a) 1 / 1-alpha

b) 1/1+alpha

c)1/alpha

d)2/2-alpha
retagged by

3 Answers

Best answer
2 votes
2 votes

answer a) 

The number of elements in a hash table divided by the number of slots gives load factor denoted by alpha. 

With open addressing the load factor cannot exceed 1. 

So ( 1- alpha)  gives no of free slots. 

avg no of probes = total_#slots/#free_slots

= 1 / (1 - alpha) 

selected by
1 votes
1 votes
edited by
0 votes
0 votes
we can also go by this method i got in a stanford's coursera  course

Now given is that a(alpha) is the probability of getting the filled blocks , thus (1-a) is the probability of getting the empty blocks.

now let E(N) be the expectation of the average number of probe required when inserting an element .

Thus E(N) comes out to be 1 + (a*E(N)).

here 1 is added for the operation of going and probing while "a" is multiplied so that when the probe comes out. to be having an element already , it can be done all over again and thus E(N) is multiplied

solving E(N)=1 + (a*E(N))

E(N)=1/(1-a). the required answer.

Related questions

1 votes
1 votes
1 answer
1
s_dr_13 asked Mar 6, 2019
971 views
Consider an open address hash table with uniform hashing. Out of 10 locations, 8 are occupied. What are the expected number of probes in an unsuccessful and successful se...
1 votes
1 votes
1 answer
2
Shivi rao asked Oct 31, 2017
894 views
The average number of probe required when inserting an element with load factor alpha (assume uniform hashing) 1 / 1-alpha how? Please explain
16 votes
16 votes
2 answers
3
2 votes
2 votes
1 answer
4