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.
Similar content being viewed by others
References
Amble, O., Knuth, D.E.: Ordered hash tables. Comput. J. 17(2), 135–142 (1974)
Billingsley, P.: Convergence of Probability Measures. Wiley, New York (1968)
Blake, I.F., Konheim, A.G.: Big buckets are (are not) better!. J. Assoc. Comput. Mach. 24(4), 591–606 (1977)
Brent, R.P.: Reducing the retrieval time of scatter storage techniques. Commun. ACM 16(2), 105–109 (1973)
Celis, P.: Robin Hood Hashing. PhD thesis, Computer Science Department, University of Waterloo. Technical Report CS-86-14, April (1986)
Celis, P., Larson, P., Munro, I.J.: Robin hood hashing. In: 26th IEEE Symposium on the Foundations of Computer Science, pp. 281–288 (1985)
Chassaing, P., Flajolet, P.: Hachage, arbres, chemins & graphes. Gazette des Mathématiciens 95, 29–49 (2003)
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)
Chassaing, P., Louchard, G.: Phase transition for parking blocks, Brownian excursion and coalescence. Random Struct. Algorithms 21(1), 76–119 (2002)
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)
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)
Feller, W.: An Introduction to Probability Theory and its Applications, vol. II, 2nd edn. Wiley, New York (1971)
Flajolet, P.: Slides of the lecture “On the Analysis of Linear Probing Hashing” (1998). http://algo.inria.fr/flajolet/Publications/lectures.html
Flajolet, P., Grabner, P.J., Kirschenhofer, P., Prodinger, H.: On Ramanujan’s \(Q\)-function. J. Comput. Appl. Math. 58, 103–116 (1995)
Flajolet, P., Odlyzko, A.M.: Singularity analysis of generating functions. SIAM J. Discrete Math. 3(2), 216–240 (1990)
Flajolet, P., Poblete, P., Viola, A.: On the analysis of linear probing hashing. Algorithmica 22(4), 490–515 (1998)
Flajolet, P., Sedgewick, R.: Analytic Combinatorics. Cambridge University Press, Cambridge (2009)
Gonnet, G.H., Baeza-Yates, R.: Handbook of Algorithms and Data Structures, 2nd edn. Pascal and Addison-Wesley (1991)
Gonnet, G.H., Munro, J.I.: Efficient ordering of hash tables. SIAM J. Comput. 8(3), 463–478 (1979)
Gut, A.: Probability: A Graduate Course, 2nd edn. Springer, New York (2013)
Janson, S.: Asymptotic distribution for the cost of linear probing hashing. Random Struct. Algorithms 19(3–4), 438–471 (2001)
Janson, S.: Individual displacements for linear probing hashing with different insertion policies. ACM Trans. Algorithms 1(2), 177–213 (2005)
Janson, S.: Brownian excursion area, Wright’s constants in graph enumeration, and other Brownian areas. Probab. Surv. 3, 80–145 (2007)
Janson, S., Łuczak, T., Ruciński, A.: Random Graphs. Wiley, New York (2000)
Kac, V., Cheung, P.: Quantum Calculus. Springer, New York (2002)
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
Knuth, D.E.: The Art of Computer Programming. Vol. 3: Sorting and Searching, 2nd edn. Addison-Wesley, Reading (1998)
Knuth, D.E.: Linear probing and graphs. Algorithmica 22(4), 561–568 (1998)
Knuth, D.E., Pittel, B.: A recurrence related to trees. Proc. Am. Math. Soc. 105(2), 335–349 (1989)
Konheim, A.G., Weiss, B.: An occupancy discipline and applications. SIAM J. Appl. Math. 6(14), 1266–1274 (1966)
Larson, P.Å.: Analysis of uniform hashing. J. Assoc. Comput. Mach. 30(4), 805–819 (1983)
Mendelson, H.: Analysis of linear probing with buckets. Inf. Syst. 8(3), 207–216 (1983)
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/
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/
Peterson, W.W.: Addressing for random-access storage. IBM J. Res. Dev. 1(2), 130–146 (1957)
Pemantle, R., Wilson, M.C.: Analytic Combinatorics in Several Variables. Cambridge University Press, Cambridge (2013)
Poblete, P.V., Munro, J.I.: Last-come-first-served hashing. J. Algorithms 10, 228–248 (1989)
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)
Sedgewick, R., Flajolet, P.: An Introduction to the Analysis of Algorithms. Addison-Wesley, Reading (1996)
Seitz, G.: Parking Functions and Generalizations. Diploma Thesis, TU Wien (2009)
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)
Viola, A.: Exact distribution of individual displacements in linear probing hashing. ACM Trans. Algorithms 1(2), 214–242 (2005)
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)
Viola, A., Poblete, P.V.: The analysis of linear probing hashing with buckets. Algorithmica 21(1), 37–71 (1998)
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
Corresponding author
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
About this article
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
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00453-015-0111-x