Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

http://www.chegg.com/homework-help/questions-and-answers/thanks-please-show-work

ID: 3556227 • Letter: H

Question

http://www.chegg.com/homework-help/questions-and-answers/thanks-please-show-work-q5364448

Consider open-address hashing with the standard quadratic-probing rule that if the initial slot k =hashFun(item) is occupied, the i-th retry is in slot k + i2 (modulo the table size). Use the (admittedly poor) hash function that simply adds up the number values of letters a = 1, b = 2, etc. For table-size 8, attempt to insert the words bad bed bid dad fed gag in that order. Does your table get fed up? Or does it gag on gag? Now change the table size to the prime number 7 and try again. (9 pts. total)

Explanation / Answer

0->bid

1->dad

3->bed

4->

5->fed

6->

7->bad

since increasing i upto 7 doesnot lead to any unoccupied position gag cannot be placed on table ie gag on gag....table doesn't fade up