Choosing the hash function
Key = small integer
- For M prime h(K) = K mod M;
- For M non-prime
h(K) = floor(M {0.616161*K});
{x} = x – floor(x)
Based on mathematical fact that if A is irrational, then for large n
{A}, {2A},…,{nA} distributed uniformly across 0..1