6,923 views
5 votes
5 votes
consider an open address hash table with a total of 10000 slots containing 9800 entries.
a) 2
b) 3
c) 4
d) 4.5

1 Answer

Best answer
17 votes
17 votes

Given, Open address hash table

No of slots (m) = 10000

No of Keys (n) = 9800

Then

Load factor ($\alpha$) = ($\frac{n}{m}$) = ($\frac{9800}{10000}$) = $0.98$

and There is a theorem in CLRS, (you can check that.) which states that, expected number of probes in a successful search is at most ($\frac{1}{\alpha} ln \frac{1}{1-\alpha}$)

Hence answer will be =  ($\frac{1}{0.98} ln \frac{1}{1-0.98}$)

                                = 3.991860..

                                = 4

Hence Answer will be (C). 4

selected by

Related questions

2 votes
2 votes
3 answers
1
Sankaranarayanan P.N asked Jun 4, 2015
748 views
a binary search tree with n elements are constructed by randomly taking the elements one by one. What is the expected height of the tree
0 votes
0 votes
2 answers
3
anonymous asked Mar 26, 2016
1,011 views
If two teams A and B play a best-of-five series, and if team A has a 1/4 chance of winning any game (and team B has 3/4 chance of winning any game), then what is the expe...