Example 1.4: Suppose hash-keys are positive integers. A common and simple hash function is to pick h(x) = x mod B, that is, the remainder when x is divided by B. That choice works ﬁne if our population of hash-keys is all positive integers. 1/Bth of the integers will be assigned to each of the buckets. However, suppose our population is the even integers, and B = 10. Then only buckets 0, 2, 4, 6, and 8 can be the value of h(x), and the hash function is distinctly nonrandom in its behavior. On the other hand, if we picked B = 11, then we would ﬁnd that 1/11th of the even integers get sent to each of the 11 buckets, so the hash function would work very well.
I could not understand this statement
hen only buckets 0, 2, 4, 6, and 8 can
be the value of h(x), and the hash function is distinctly nonrandom in its behavior.
What is the example in this trying to say? The hash in my understanding is made by h(x)= x mod B , so if B=10 then x mod 10 will have all values from 0,1,2,3,4,5,6,7,8,9.