Consider the following hash function: h(k, i) = (h′(k) + 1
2 (i + i2)) mod m, where m = 2p
and h′(k) = k mod m for some positive integer p. Prove or disprove that for any k, the
probe sequence < h(k, 0), h(k, 1), ..., h(k, m–1) > is a permutation of < 0, 1, 2, ..., m
Assistant
To determine whether the probe sequence (\langle h(k, 0), h(k, 1), \ldots, h(k, m-1) \rangle) is a permutation of (\langle 0, 1, 2, \ldots, m-1 \rangle), we need to check if the hash function produces a full cycle of distinct values before repeating any of the values within one cycle of evaluations, which would show that it is indeed a permutation.
This would imply:
[ \frac{1}{2}(i + i^2) \equiv \frac{1}{2}(j + j^2) \mod m ]
[ i + i^2 \equiv j + j^2 \mod 2m ]
Given that (i) and (j) are distinct within the range of ({0, 1, 2, \ldots, m-1}), and since adding distinct (i) values squared (as a part of (i + i^2)) will not yield non-distinct results modulo (2m) (since both linear and quadratic terms guarantee differentiation to some extent), the resulting expressions differ modulo (m).
Now, since (m = 2^p), it implies (h(k, i)) and (h(k, j)) will distinctly cover all residues from (0) to (m-1), hence the sequence indeed forms a permutation.
Thus, for any (k), the sequence (\langle h(k, 0), h(k, 1), \ldots, h(k, m-1) \rangle) is a permutation of (\langle 0, 1, 2, \ldots, m-1 \rangle).