Lecture notes for CS 503, Advanced Programming I

Advanced Programming I Lecture Notes

4 April 2006 • Hashing Basics


As usual, some values of A work better than others and it depends on the keys being hashed. Also as usual Knuth (The Art of Computer Programming, Vol. 3, Section 6.4) has an extensive discussion of apropriate values for A. After an interesting discussion of the golden ratio φ, Knuth starts by recommending

A = φ-1 = (√5 - 1)/2 = 0.61803398874989484820...
and then goes on to develop several other possible good, general-purpose values for A.


This page last modified on 24 January 2006.