Hostname: page-component-78c5997874-g7gxr Total loading time: 0 Render date: 2024-11-11T07:47:11.014Z Has data issue: false hasContentIssue false

Analysis of Robin Hood and Other Hashing Algorithms Under the Random Probing Model, With and Without Deletions

Published online by Cambridge University Press:  14 August 2018

P. V. POBLETE
Affiliation:
Department of Computer Science, University of Chile, Casilla 2777, Santiago, Chile (e-mail: ppoblete@dcc.uchile.cl)
A. VIOLA
Affiliation:
Instituto de Computación, Universidad de la República, Montevideo 11300, Uruguay (e-mail: aviola@fing.edu.uy)

Abstract

Thirty years ago, the Robin Hood collision resolution strategy was introduced for open addressing hash tables, and a recurrence equation was found for the distribution of its search cost. Although this recurrence could not be solved analytically, it allowed for numerical computations that, remarkably, suggested that the variance of the search cost approached a value of 1.883 when the table was full. Furthermore, by using a non-standard mean-centred search algorithm, this would imply that searches could be performed in expected constant time even in a full table.

In spite of the time elapsed since these observations were made, no progress has been made in proving them. In this paper we introduce a technique to work around the intractability of the recurrence equation by solving instead an associated differential equation. While this does not provide an exact solution, it is sufficiently powerful to prove a bound of π2/3 for the variance, and thus obtain a proof that the variance of Robin Hood is bounded by a small constant for load factors arbitrarily close to 1. As a corollary, this proves that the mean-centred search algorithm runs in expected constant time.

We also use this technique to study the performance of Robin Hood hash tables under a long sequence of insertions and deletions, where deletions are implemented by marking elements as deleted. We prove that, in this case, the variance is bounded by 1/(1−α), where α is the load factor.

To model the behaviour of these hash tables, we use a unified approach that we apply also to study the First-Come-First-Served and Last-Come-First-Served collision resolution disciplines, both with and without deletions.

Type
Paper
Copyright
Copyright © Cambridge University Press 2018 

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.)

Footnotes

Supported in part by NIC Chile.

Partially supported by Project CSIC I+D ‘Combinatoria Analítica y aplicaciones en criptografía, comunicaciones y recuperación de la información’, fondos 2015-2016.

References

Abramowitz, M. and Stegun, I. A. (1964) Handbook of Mathematical Functions: With Formulas, Graphs, and Mathematical Tables, Courier Corporation.Google Scholar
Amble, O. and Knuth, D. E. (1974) Ordered hash tables. Comput. J. 17 135142.CrossRefGoogle Scholar
Balakrishnan, N. (2013) Handbook of the Logistic Distribution, CRC Press.Google Scholar
Brent, R. P. (1973) Reducing the retrieval time of scatter storage techniques. Comm. Assoc. Comput. Mach. 16 105109.Google Scholar
Carter, J. L. and Wegman, M. N. (1979) Universal classes of hash functions. J. Comput. Syst. Sci. 18 143154.CrossRefGoogle Scholar
Celis, P. (1986) Robin Hood hashing. PhD thesis, University of Waterloo. Technical Report CS-86-14.Google Scholar
Celis, P., Larson, P.-A. and Munro, J. (1985) Robin Hood hashing. In 26th IEEE Symposium on the Foundations of Computer Science, IEEE, pp. 281–288.CrossRefGoogle Scholar
Cunto, W. and Poblete, P. V. (1988) Two hybrid methods for collision resolution in open addressing hashing. In SWAT 88: Scandinavian Workshop on Algorithm Theory (Karlsson, R. and Lingas, A., eds), Springer, pp. 113119.CrossRefGoogle Scholar
Feller, W. (1968), An Introduction to Probability Theory and Its Applications, Vol. 1, Wiley.Google Scholar
Gonnet, G. H. and Munro, J. I. (1979) Efficient ordering of hash tables. SIAM J. Comput. 8 463478.CrossRefGoogle Scholar
Guibas, L. J. (1976) The Analysis of Hashing Algorithms, STAN-CS, Stanford University.Google Scholar
Guibas, L. J. (1978) The analysis of hashing techniques that exhibit k-ary clustering. J. Assoc. Comput. Mach. 25 544555.CrossRefGoogle Scholar
Knuth, D. E. (1998), The Art of Computer Programming, Vol. 3: Sorting and Searching, second edition, Addison-Wesley.Google Scholar
Mitzenmacher, M. (2014) A new approach to analyzing Robin Hood hashing. arXiv:1401.7616Google Scholar
Pagh, A. and Pagh, R. (2008) Uniform hashing in constant time and optimal space. SIAM J. Comput. 38 8596.CrossRefGoogle Scholar
Poblete, P. V. and Munro, J. I. (1989) Last-Come-First-Served hashing. J. Algorithms 10 228248.CrossRefGoogle Scholar
Poblete, P. and Viola, A. (2001) The effect of deletions on different insertion disciplines for hash tables. In Brazilian Symposium on Graphs, Algorithms and Combinatorics (GRACO).CrossRefGoogle Scholar