1

This question is a follow up to one of the answers to below question. Why should hash functions use a prime number modulus?

Steve Jessop, in his answer states that "So you get striking relationships modulo 2^32 between strings that are the same except near the end."

I tried for the last couple of days to come up with an explanation for the above statement, but I came up with nothing.

If any one of you know the explanation, please let me know.

FYI: since I don't have enough points I was not able to post this as a comment to Steve's answer.

Community
  • 1
  • 1
Eisenheim
  • 11
  • 1
  • The answer is based on a simple (and rather uncommon) additive hashfunction. The modulo-prime table size merely serves to compensate this. – joop Feb 14 '17 at 10:29
  • If you don't mind, can you please provide me an example like Steve did with a string and k=31. – Eisenheim Feb 14 '17 at 15:25

0 Answers0