Hostname: page-component-cd9895bd7-gxg78 Total loading time: 0 Render date: 2024-12-23T15:19:59.479Z Has data issue: false hasContentIssue false

Hashing with Linear Probing under Nonuniform Probabilities

Published online by Cambridge University Press:  27 July 2009

David Aldous
Affiliation:
Department of StatisticsUniversity of California, Berkeley Berkeley, California 94720

Abstract

Probabilistic analyses of hashing algorithms usually assume that hash values are uniformly distributed over addresses. We study how one of the simplest schemes, hashing with linear probing, behaves in the nonuniform case. A simple measure μ of nonuniformity is the probability two keys hash to the same address, divided by this probability in the uniform case. It turns out that the effect of nonuniformity is to multiply mean search lengths by μ. For high loads, the longest search is multiplied by approximately μ also. Our theoretical results are asymptotics: simulations show good fits with predictions for mean search lengths, but bad fits for longest search lengths.

Type
Articles
Copyright
Copyright © Cambridge University Press 1988

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

Billingsley, P. (1979). Probability and measure. New York: Wiley.Google Scholar
Chow, Y.S. & Teicher, H. (1978). Probability theory. New York: Springer.CrossRefGoogle Scholar
Devroye, L. (1985). The expected length of the longest probe sequence for bucket searching when the distribution is not uniform. Journal of Algorithms 6: 19.CrossRefGoogle Scholar
Gonnet, G.H. (1981). Expected length of the longest probe sequence in hash code searching. J. Assoc. Comp. Mach., 28: 289304.CrossRefGoogle Scholar
Guibas, L.J. & Szemeredi, E. (1978). The analysis of double hashing. J. Comp. Sys. Sci., 16:226274.CrossRefGoogle Scholar
Knuth, D.E. (1973). The art of computer programming, Vol. 3. Reading, MA.: Addison— Wesley.Google Scholar
Pittel, B. (1987). Linear probing: the probable longest search time grows logarithmically with the number of records. Journal of Algorithms 8: 236249.CrossRefGoogle Scholar
Pittel, B. (1978). On probabilistic analysis of a coalesced hashing algorithm. Annals of Probability 15: to appear.Google Scholar
Pittel, B. & Yu, J-H. (1987). On search times for early-insertion standard coalesced hashing. Preprint.Google Scholar
Ross, S.M. (1983). Stochastic processes. New York: Wiley.Google Scholar