Abstract
Cuckoo hashing was introduced by Pagh and Rodler in 2001 [12]. A set S of n keys is stored in two tables T 1 and T 2 each of which has m cells of capacity 1 such that constant access time is guaranteed. For m ≥ (1 + ε)n and hash functions h 1, h 2 that are c logn-wise independent, Pagh [11] showed that the keys of an arbitrary set S can be stored using h 1 and h 2 with a probability of 1 − O(1/n).
Here we prove that a family of simple hash functions that can be evaluated fast is not sufficient to guarantee this behavior, namely there exists a “bad” set S of size ≈ (7/8) ·m for which the probability that the keys of S cannot be stored using h 1 and h 2 is Ω(1). Experiments indicate that the bad sets cause the cuckoo scheme to fail with a probability much larger than formally proved in our main theorem.
Our result shows that care must be taken when using cuckoo hashing in combination with very simple hash classes, if a small failure probability is essential since frequent rehashing cannot be tolerated.
Research supported in part by DFG grant DI 412/10-1.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Carter, L., Wegman, M.N.: Universal Classes of Hash Functions. J. Comput. Syst. Sci. 18, 143–154 (1979)
Chor, B., Goldreich, O.: Unbiased Bits from Sources of Weak Randomness and Probabilistic Communication Complexity. SIAM J. Comput. 17, 230–261 (1988)
Cohen, J., Kane, D.M.: 6.856 Project: Bounds on the Independence Required for Cuckoo Hashing, http://web.mit.edu/dankane/www/Independence%20Bounds.pdf
Devroye, L., Morin, P.: Cuckoo Hashing: Further Analysis. Inf. Process. Lett. 86, 215–219 (2003)
Dietzfelbinger, M., Hagerup, T., Katajainen, J., Penttonen, M.: A Reliable Randomized Algorithm for the Closest-pair Problem. J. Algorithms 25, 19–51 (1997)
Dietzfelbinger, M., Schellbach, U.: On Risks of Using Cuckoo Hashing with Simple Universal Hash Classes. In: Proc. 20th Annual ACM-SIAM Symp. on Discrete Algorithms. SIAM, Philadelphia (to appear, 2009)
Finsler, P.: Über die Primzahlen zwischen n und 2n. Festschrift zum 60. Geburtstag von Prof. Dr. Andreas Speiser, Füssli, Zürich, 118–122 (1945)
Hagerup, T., Rüb, C.: A Guided Tour of Chernoff Bounds. Inf. Process. Lett. 33, 305–308 (1990)
Kirsch, A., Mitzenmacher, M., Wieder, U.: More Robust Hashing: Cuckoo Hashing with a Stash. In: Halperin, D., Mehlhorn, K. (eds.) Esa 2008. LNCS, vol. 5193, pp. 611–622. Springer, Heidelberg (2008)
Mitzenmacher, M., Vadhan, S.: Why Simple Hash Functions Work: Exploiting the Entropy in a Data Stream. In: Proc. 19th Annual ACM-SIAM Symp. on Discrete Algorithms, pp. 746–755. SIAM, Philadelphia (2008)
Pagh, R.: On the Cell Probe Complexity of Membership and Perfect Hashing. In: Proc. 33rd Annual Symp. on Theory of Computing, pp. 425–432. ACM Press, New York (2001)
Pagh, R., Rodler, F.F.: Cuckoo Hashing. In: Meyer auf der Heide, F. (ed.) ESA 2001. LNCS, vol. 2161, pp. 121–133. Springer, Heidelberg (2001)
Pagh, A., Pagh, R., Ruzic, M.: Linear Probing with Constant Independence. In: Proc. 39th Annual ACM Symp. on Theory of Computing, pp. 318–327. ACM Press, New York (2007)
Pagh, R., Rodler, F.F.: Cuckoo Hashing. J. Algorithms 51, 122–144 (2004)
Zuckerman, D.: Simulating BPP Using a General Weak Random Source. Algorithmica 16, 367–391 (1996)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2009 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Dietzfelbinger, M., Schellbach, U. (2009). Weaknesses of Cuckoo Hashing with a Simple Universal Hash Class: The Case of Large Universes. In: Nielsen, M., Kučera, A., Miltersen, P.B., Palamidessi, C., Tůma, P., Valencia, F. (eds) SOFSEM 2009: Theory and Practice of Computer Science. SOFSEM 2009. Lecture Notes in Computer Science, vol 5404. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-95891-8_22
Download citation
DOI: https://doi.org/10.1007/978-3-540-95891-8_22
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-95890-1
Online ISBN: 978-3-540-95891-8
eBook Packages: Computer ScienceComputer Science (R0)