Skip to main content
Log in

A Unified Approach to Linear Probing Hashing with Buckets

  • Published:
Algorithmica Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4

Similar content being viewed by others

References

  1. Amble, O., Knuth, D.E.: Ordered hash tables. Comput. J. 17(2), 135–142 (1974)

    Article  MathSciNet  MATH  Google Scholar 

  2. Billingsley, P.: Convergence of Probability Measures. Wiley, New York (1968)

    MATH  Google Scholar 

  3. Blake, I.F., Konheim, A.G.: Big buckets are (are not) better!. J. Assoc. Comput. Mach. 24(4), 591–606 (1977)

    Article  MathSciNet  MATH  Google Scholar 

  4. Brent, R.P.: Reducing the retrieval time of scatter storage techniques. Commun. ACM 16(2), 105–109 (1973)

    Article  MathSciNet  MATH  Google Scholar 

  5. Celis, P.: Robin Hood Hashing. PhD thesis, Computer Science Department, University of Waterloo. Technical Report CS-86-14, April (1986)

  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)

  7. Chassaing, P., Flajolet, P.: Hachage, arbres, chemins & graphes. Gazette des Mathématiciens 95, 29–49 (2003)

    MathSciNet  Google Scholar 

  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)

    Article  MathSciNet  MATH  Google Scholar 

  9. Chassaing, P., Louchard, G.: Phase transition for parking blocks, Brownian excursion and coalescence. Random Struct. Algorithms 21(1), 76–119 (2002)

    Article  MathSciNet  MATH  Google Scholar 

  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)

  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)

    Article  Google Scholar 

  12. Feller, W.: An Introduction to Probability Theory and its Applications, vol. II, 2nd edn. Wiley, New York (1971)

    MATH  Google Scholar 

  13. Flajolet, P.: Slides of the lecture “On the Analysis of Linear Probing Hashing” (1998). http://algo.inria.fr/flajolet/Publications/lectures.html

  14. Flajolet, P., Grabner, P.J., Kirschenhofer, P., Prodinger, H.: On Ramanujan’s \(Q\)-function. J. Comput. Appl. Math. 58, 103–116 (1995)

    Article  MathSciNet  MATH  Google Scholar 

  15. Flajolet, P., Odlyzko, A.M.: Singularity analysis of generating functions. SIAM J. Discrete Math. 3(2), 216–240 (1990)

    Article  MathSciNet  MATH  Google Scholar 

  16. Flajolet, P., Poblete, P., Viola, A.: On the analysis of linear probing hashing. Algorithmica 22(4), 490–515 (1998)

    Article  MathSciNet  MATH  Google Scholar 

  17. Flajolet, P., Sedgewick, R.: Analytic Combinatorics. Cambridge University Press, Cambridge (2009)

    Book  MATH  Google Scholar 

  18. Gonnet, G.H., Baeza-Yates, R.: Handbook of Algorithms and Data Structures, 2nd edn. Pascal and Addison-Wesley (1991)

  19. Gonnet, G.H., Munro, J.I.: Efficient ordering of hash tables. SIAM J. Comput. 8(3), 463–478 (1979)

    Article  MathSciNet  MATH  Google Scholar 

  20. Gut, A.: Probability: A Graduate Course, 2nd edn. Springer, New York (2013)

    Book  MATH  Google Scholar 

  21. Janson, S.: Asymptotic distribution for the cost of linear probing hashing. Random Struct. Algorithms 19(3–4), 438–471 (2001)

    Article  MathSciNet  MATH  Google Scholar 

  22. Janson, S.: Individual displacements for linear probing hashing with different insertion policies. ACM Trans. Algorithms 1(2), 177–213 (2005)

    Article  MathSciNet  MATH  Google Scholar 

  23. Janson, S.: Brownian excursion area, Wright’s constants in graph enumeration, and other Brownian areas. Probab. Surv. 3, 80–145 (2007)

    Article  MathSciNet  MATH  Google Scholar 

  24. Janson, S., Łuczak, T., Ruciński, A.: Random Graphs. Wiley, New York (2000)

    Book  MATH  Google Scholar 

  25. Kac, V., Cheung, P.: Quantum Calculus. Springer, New York (2002)

    Book  MATH  Google Scholar 

  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. Knuth, D.E.: The Art of Computer Programming. Vol. 3: Sorting and Searching, 2nd edn. Addison-Wesley, Reading (1998)

    MATH  Google Scholar 

  28. Knuth, D.E.: Linear probing and graphs. Algorithmica 22(4), 561–568 (1998)

    Article  MathSciNet  MATH  Google Scholar 

  29. Knuth, D.E., Pittel, B.: A recurrence related to trees. Proc. Am. Math. Soc. 105(2), 335–349 (1989)

    Article  MathSciNet  MATH  Google Scholar 

  30. Konheim, A.G., Weiss, B.: An occupancy discipline and applications. SIAM J. Appl. Math. 6(14), 1266–1274 (1966)

    Article  MATH  Google Scholar 

  31. Larson, P.Å.: Analysis of uniform hashing. J. Assoc. Comput. Mach. 30(4), 805–819 (1983)

    Article  MathSciNet  MATH  Google Scholar 

  32. Mendelson, H.: Analysis of linear probing with buckets. Inf. Syst. 8(3), 207–216 (1983)

    Article  MATH  Google Scholar 

  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. 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. Peterson, W.W.: Addressing for random-access storage. IBM J. Res. Dev. 1(2), 130–146 (1957)

    Article  MathSciNet  Google Scholar 

  36. Pemantle, R., Wilson, M.C.: Analytic Combinatorics in Several Variables. Cambridge University Press, Cambridge (2013)

    Book  MATH  Google Scholar 

  37. Poblete, P.V., Munro, J.I.: Last-come-first-served hashing. J. Algorithms 10, 228–248 (1989)

    Article  MathSciNet  MATH  Google Scholar 

  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)

    Article  MathSciNet  MATH  Google Scholar 

  39. Sedgewick, R., Flajolet, P.: An Introduction to the Analysis of Algorithms. Addison-Wesley, Reading (1996)

    MATH  Google Scholar 

  40. Seitz, G.: Parking Functions and Generalizations. Diploma Thesis, TU Wien (2009)

  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)

  42. Viola, A.: Exact distribution of individual displacements in linear probing hashing. ACM Trans. Algorithms 1(2), 214–242 (2005)

    Article  MathSciNet  MATH  Google Scholar 

  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)

    MathSciNet  MATH  Google Scholar 

  44. Viola, A., Poblete, P.V.: The analysis of linear probing hashing with buckets. Algorithmica 21(1), 37–71 (1998)

    Article  MathSciNet  MATH  Google Scholar 

Download references

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.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Alfredo Viola.

Additional information

Partly supported by the Knut and Alice Wallenberg Foundation and project CSIC-UDELAR “Combinatoria Analítica y aplicaciones en criptografía, comunicaciones y recuperación de la información”, fondos 2015-2016”.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Janson, S., Viola, A. A Unified Approach to Linear Probing Hashing with Buckets. Algorithmica 75, 724–781 (2016). https://doi.org/10.1007/s00453-015-0111-x

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00453-015-0111-x

Keywords

Mathematics Subject Classification

Navigation