Please Show me how to do this problem. Your Help is greatly appreciated. Conside
ID: 3552469 • Letter: P
Question
Please Show me how to do this problem. Your Help is greatly appreciated.
Explanation / Answer
a.
22mod5=2---in poition 2
14mod5=4---in position 4
7mod5=2 --- in position 3 as position 2 is filled and we are using linear probing so we go to next bucket
3mod5=3--in position 0 as position 3,4 are filled we go to 0
27mod5=2--position 1 as 2,3,4,0 are filled
b.
for 22 -- 1 we search at position 2 as 22mod5=2
for 14--1 we search at position 4 as 14mod5=4
for 7 --2 we search at position 2 as 7mod5=2 but we do not have our value there so then we check at position 3
for 3 --3 we search at position 3 as 3mod5=3 but we do not have our value there so then we check at position 4 and then at position 0 and we find it there
for 27-5 we search at positions 2,3,4,0 and then finally at 1
average=1+1+2+3+5/5 = 2.4
c.number of search * its probability
1*1/16 + 1*1/16 + 2*1/8 + 3*1/4 + 5*1/2 = 3.625
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.