Advertisement

Algorithmica

, Volume 75, Issue 4, pp 724–781 | Cite as

A Unified Approach to Linear Probing Hashing with Buckets

  • Svante Janson
  • Alfredo ViolaEmail author
Article
  • 181 Downloads

Abstract

We give a unified analysis of linear probing hashing with a general bucket size. We use both a combinatorial approach, giving exact formulas for generating functions, and a probabilistic approach, giving simple derivations of asymptotic results. Both approaches complement nicely, and give a good insight in the relation between linear probing and random walks. A key methodological contribution, at the core of Analytic Combinatorics, is the use of the symbolic method (based on q-calculus) to directly derive the generating functions to analyze.

Keywords

Hashing Linear probing Buckets Generating functions Analytic combinatorics 

Mathematics Subject Classification

60W40 68P10 68P20 

Notes

Acknowledgments

Philippe Flajolet has had a strong influence in our scientific careers. The core of the use of the symbolic method in hashing problems has been taken from [13]. Thank you Philippe for all the work you have left to inspire our research. We also thank Alois Panholzer for interesting discussions, Mark Wilson for comments on multivariate singularity analysis, and Hsien-Kuei Hwang for suggesting us the derivation that leads to Theorem 50. Last but not least, we thank an anonymous referee for useful comments oriented to improve the presentation of the paper.

References

  1. 1.
    Amble, O., Knuth, D.E.: Ordered hash tables. Comput. J. 17(2), 135–142 (1974)MathSciNetCrossRefzbMATHGoogle Scholar
  2. 2.
    Billingsley, P.: Convergence of Probability Measures. Wiley, New York (1968)zbMATHGoogle Scholar
  3. 3.
    Blake, I.F., Konheim, A.G.: Big buckets are (are not) better!. J. Assoc. Comput. Mach. 24(4), 591–606 (1977)MathSciNetCrossRefzbMATHGoogle Scholar
  4. 4.
    Brent, R.P.: Reducing the retrieval time of scatter storage techniques. Commun. ACM 16(2), 105–109 (1973)MathSciNetCrossRefzbMATHGoogle Scholar
  5. 5.
    Celis, P.: Robin Hood Hashing. PhD thesis, Computer Science Department, University of Waterloo. Technical Report CS-86-14, April (1986)Google Scholar
  6. 6.
    Celis, P., Larson, P., Munro, I.J.: Robin hood hashing. In: 26th IEEE Symposium on the Foundations of Computer Science, pp. 281–288 (1985)Google Scholar
  7. 7.
    Chassaing, P., Flajolet, P.: Hachage, arbres, chemins & graphes. Gazette des Mathématiciens 95, 29–49 (2003)MathSciNetGoogle Scholar
  8. 8.
    Chassaing, P., Janson, S.: A Vervaat-like path transformation for the reflected Brownian bridge conditioned on its local time at 0. Ann. Probab. 29(4), 1755–1779 (2001)MathSciNetCrossRefzbMATHGoogle Scholar
  9. 9.
    Chassaing, P., Louchard, G.: Phase transition for parking blocks, Brownian excursion and coalescence. Random Struct. Algorithms 21(1), 76–119 (2002)MathSciNetCrossRefzbMATHGoogle Scholar
  10. 10.
    Ernst, T.: The history of \(q\)-calculus and a new method, U. U. D. M. Report 2000:16, ISSN 1101-3591, Department of Mathematics, Uppsala University (2000)Google Scholar
  11. 11.
    Fagin, R., Nievergelt, J., Pippenger, N., Strong, H.R.: Extendible hashing—a fast access method for dynamic files. ACM Trans. Database Syst. 4(3), 315–344 (1979)CrossRefGoogle Scholar
  12. 12.
    Feller, W.: An Introduction to Probability Theory and its Applications, vol. II, 2nd edn. Wiley, New York (1971)zbMATHGoogle Scholar
  13. 13.
    Flajolet, P.: Slides of the lecture “On the Analysis of Linear Probing Hashing” (1998). http://algo.inria.fr/flajolet/Publications/lectures.html
  14. 14.
    Flajolet, P., Grabner, P.J., Kirschenhofer, P., Prodinger, H.: On Ramanujan’s \(Q\)-function. J. Comput. Appl. Math. 58, 103–116 (1995)MathSciNetCrossRefzbMATHGoogle Scholar
  15. 15.
    Flajolet, P., Odlyzko, A.M.: Singularity analysis of generating functions. SIAM J. Discrete Math. 3(2), 216–240 (1990)MathSciNetCrossRefzbMATHGoogle Scholar
  16. 16.
    Flajolet, P., Poblete, P., Viola, A.: On the analysis of linear probing hashing. Algorithmica 22(4), 490–515 (1998)MathSciNetCrossRefzbMATHGoogle Scholar
  17. 17.
    Flajolet, P., Sedgewick, R.: Analytic Combinatorics. Cambridge University Press, Cambridge (2009)CrossRefzbMATHGoogle Scholar
  18. 18.
    Gonnet, G.H., Baeza-Yates, R.: Handbook of Algorithms and Data Structures, 2nd edn. Pascal and Addison-Wesley (1991)Google Scholar
  19. 19.
    Gonnet, G.H., Munro, J.I.: Efficient ordering of hash tables. SIAM J. Comput. 8(3), 463–478 (1979)MathSciNetCrossRefzbMATHGoogle Scholar
  20. 20.
    Gut, A.: Probability: A Graduate Course, 2nd edn. Springer, New York (2013)CrossRefzbMATHGoogle Scholar
  21. 21.
    Janson, S.: Asymptotic distribution for the cost of linear probing hashing. Random Struct. Algorithms 19(3–4), 438–471 (2001)MathSciNetCrossRefzbMATHGoogle Scholar
  22. 22.
    Janson, S.: Individual displacements for linear probing hashing with different insertion policies. ACM Trans. Algorithms 1(2), 177–213 (2005)MathSciNetCrossRefzbMATHGoogle Scholar
  23. 23.
    Janson, S.: Brownian excursion area, Wright’s constants in graph enumeration, and other Brownian areas. Probab. Surv. 3, 80–145 (2007)MathSciNetCrossRefzbMATHGoogle Scholar
  24. 24.
    Janson, S., Łuczak, T., Ruciński, A.: Random Graphs. Wiley, New York (2000)CrossRefzbMATHGoogle Scholar
  25. 25.
    Kac, V., Cheung, P.: Quantum Calculus. Springer, New York (2002)CrossRefzbMATHGoogle Scholar
  26. 26.
    Knuth, D.: Notes on “open” addressing. Unpublished memorandum, 1963. (Memo dated July 22, 1963. With annotation “My first analysis of an algorithm, originally done during Summer 1962 in Madison”. Also conjectures the asymptotics of the \(Q\)-function, with annotation “Proved May 24, 1965”.). http://algo.inria.fr/AofA/Research/11-97.html
  27. 27.
    Knuth, D.E.: The Art of Computer Programming. Vol. 3: Sorting and Searching, 2nd edn. Addison-Wesley, Reading (1998)zbMATHGoogle Scholar
  28. 28.
    Knuth, D.E.: Linear probing and graphs. Algorithmica 22(4), 561–568 (1998)MathSciNetCrossRefzbMATHGoogle Scholar
  29. 29.
    Knuth, D.E., Pittel, B.: A recurrence related to trees. Proc. Am. Math. Soc. 105(2), 335–349 (1989)MathSciNetCrossRefzbMATHGoogle Scholar
  30. 30.
    Konheim, A.G., Weiss, B.: An occupancy discipline and applications. SIAM J. Appl. Math. 6(14), 1266–1274 (1966)CrossRefzbMATHGoogle Scholar
  31. 31.
    Larson, P.Å.: Analysis of uniform hashing. J. Assoc. Comput. Mach. 30(4), 805–819 (1983)MathSciNetCrossRefzbMATHGoogle Scholar
  32. 32.
    Mendelson, H.: Analysis of linear probing with buckets. Inf. Syst. 8(3), 207–216 (1983)CrossRefzbMATHGoogle Scholar
  33. 33.
    Olver, F.W.J., Lozier, D.W., Boisvert, R.F., Clark, C.W.: NIST Handbook of Mathematical Functions. Cambridge University Press, Cambridge (2010). Also available as NIST Digital Library of Mathematical Functions. http://dlmf.nist.gov/
  34. 34.
    Panholzer, A.: Slides of the lecture “Asymptotic results for the number of unsuccessful parkers in a one-way street” (2009). http://info.tuwien.ac.at/panholzer/
  35. 35.
    Peterson, W.W.: Addressing for random-access storage. IBM J. Res. Dev. 1(2), 130–146 (1957)MathSciNetCrossRefGoogle Scholar
  36. 36.
    Pemantle, R., Wilson, M.C.: Analytic Combinatorics in Several Variables. Cambridge University Press, Cambridge (2013)CrossRefzbMATHGoogle Scholar
  37. 37.
    Poblete, P.V., Munro, J.I.: Last-come-first-served hashing. J. Algorithms 10, 228–248 (1989)MathSciNetCrossRefzbMATHGoogle Scholar
  38. 38.
    Poblete, P.V., Viola, A., Munro, J.I.: The Diagonal Poisson Transform and its application to the analysis of a hashing scheme. Random Struct. Algorithms 10(1–2), 221–255 (1997)MathSciNetCrossRefzbMATHGoogle Scholar
  39. 39.
    Sedgewick, R., Flajolet, P.: An Introduction to the Analysis of Algorithms. Addison-Wesley, Reading (1996)zbMATHGoogle Scholar
  40. 40.
    Seitz, G.: Parking Functions and Generalizations. Diploma Thesis, TU Wien (2009)Google Scholar
  41. 41.
    Viola, A.: Analysis of Hashing Algorithms and a New Mathematical Transform. PhD thesis, Computer Science Department, University of Waterloo. Technical Report CS-95-50 (November 1995)Google Scholar
  42. 42.
    Viola, A.: Exact distribution of individual displacements in linear probing hashing. ACM Trans. Algorithms 1(2), 214–242 (2005)MathSciNetCrossRefzbMATHGoogle Scholar
  43. 43.
    Viola, A.: Distributional analysis of the parking problem and Robin Hood linear probing hashing with buckets. Discrete Math. Theor. Comput. Sci. 12(2), 307–332 (2010)MathSciNetzbMATHGoogle Scholar
  44. 44.
    Viola, A., Poblete, P.V.: The analysis of linear probing hashing with buckets. Algorithmica 21(1), 37–71 (1998)MathSciNetCrossRefzbMATHGoogle Scholar

Copyright information

© Springer Science+Business Media New York 2016

Authors and Affiliations

  1. 1.Department of MathematicsUppsala UniversityUppsalaSweden
  2. 2.Universidad de la RepúblicaMontevideoUruguay

Personalised recommendations