MAD method compression function
Posted
by Jacques
on Stack Overflow
See other posts from Stack Overflow
or by Jacques
Published on 2010-06-10T18:01:49Z
Indexed on
2010/06/10
18:22 UTC
Read the original article
Hit count: 360
I ran across the question below in an old exam. My answers just feels a bit short and inadequate. Any extra ideas I can look into or reasons I have overlooked would be great. Thanx
Consider the MAD method compression function, mapping an object with hash code i to element [(3i + 7)mod9027]mod6000 of the 6000-element bucket array. Explain why this is a poor choice of compression function, and how it could be improved.
I basically just say that the function could be improved by changing the value for p (or 9027) to an prime number and choosing an other constant for a (or 3) could also help.
© Stack Overflow or respective owner