(a) Explain possible drawbacks of using the following hashing method: m = 32, h(
ID: 3853036 • Letter: #
Question
(a) Explain possible drawbacks of using the following hashing method: m = 32, h(k) = (kA) mod m, where A is a large integer. All keys in U are integers whose last digit (in decimal representation) is 8. (b) Does the drawback that you pointed out exist even if we use the multiplication method, as described in the slides (but with the same value of A)? If not, explain exactly why. (c) Does the drawback that you pointed out exist even if we use the function h(k) = (kA) mod m but A is an long float number? if you have to use this method, which values of A would you prefer, and whyExplanation / Answer
(a) As the value of m=32 , so we have only 32 unique possible hash values. Further all the keys have last digit is 8 so, the possible hash value will be 8, 18 and 28 only. due to last condition out of 32 possible hash values only three can used only.
(b) You have not give the said multiprication method so, i can write the answer for this part. please give the multipication method in comment so that I can answer it.
(c)Yes the drawback exist even if we use A as an long float number. The value of A should be large prime number.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.