Quadratic search for hash tables of sizes P n
- 1 March 1974
- journal article
- Published by Association for Computing Machinery (ACM) in Communications of the ACM
- Vol. 17 (3) , 164
- https://doi.org/10.1145/360860.360907
Abstract
It has previously been claimed [1 and 2] that the quadratic hash table search method of Maurer cannot usefully be applied to tables of size 2 n . This is not so; the method can in fact be applied to tables of size p n for any prime p . It is shown below that rather simple conditions on the coefficients suffice to guarantee that all table locations will be examined once and only once. Specifically, if the equation is k + bi 2 + ai mod p n (*) where k is the initial hash address and 0 ≤ i < p n , then, if p divides b but not a , the range of values is all the least positive residues of p n . To prove that all values are covered, we consider some fixed value, say k + bi 2 0 + ai 0 mod p n and ask, what conditions must be true if the congruence equation k + bi 2 + ai ≡ k + bi 0 2 + ai 0 mod p n is to have solutions i , 0 ≤ i < p n , other than i 0 ?Keywords
This publication has 3 references indexed in Scilit:
- Full table quadratic searching for scatter storageCommunications of the ACM, 1970
- The quadratic quotient methodCommunications of the ACM, 1970
- Programming Technique: An improved hash code for scatter storageCommunications of the ACM, 1968