Next:
Up:
Previous:
Quadratic Probing
h(k,i) = (h(k) +
c
1
i +
c
2
i
2
) mod m
Only certain combination of
c
1
,
c
2
, and m use the entire hash table.
h(
k
1
,0) = h(
k
2
,0) implies h(
k
1
,i) = h(
k
2
,i). This leads to secondary clustering.
There are only m (<<
m
!) distinct probe sequences.
Example
h(
k
1
,i) = (h(k) + i +
i
2
) mod m,
c
1
=
c
2
= 1
In this example, the probe sequence is
h(k)
h(k) + 2
h(k) + 6
h(k) + 12
...
What if m = 20?
Next:
Up:
Previous: