Skip to main content

Weaknesses of Cuckoo Hashing with a Simple Universal Hash Class: The Case of Large Universes

  • Conference paper
SOFSEM 2009: Theory and Practice of Computer Science (SOFSEM 2009)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 5404))

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.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Carter, L., Wegman, M.N.: Universal Classes of Hash Functions. J. Comput. Syst. Sci. 18, 143–154 (1979)

    Article  MathSciNet  MATH  Google Scholar 

  2. Chor, B., Goldreich, O.: Unbiased Bits from Sources of Weak Randomness and Probabilistic Communication Complexity. SIAM J. Comput. 17, 230–261 (1988)

    Article  MathSciNet  MATH  Google Scholar 

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

  4. Devroye, L., Morin, P.: Cuckoo Hashing: Further Analysis. Inf. Process. Lett. 86, 215–219 (2003)

    Article  MathSciNet  MATH  Google Scholar 

  5. Dietzfelbinger, M., Hagerup, T., Katajainen, J., Penttonen, M.: A Reliable Randomized Algorithm for the Closest-pair Problem. J. Algorithms 25, 19–51 (1997)

    Article  MathSciNet  MATH  Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

  8. Hagerup, T., Rüb, C.: A Guided Tour of Chernoff Bounds. Inf. Process. Lett. 33, 305–308 (1990)

    Article  MathSciNet  MATH  Google Scholar 

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

    Chapter  Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

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

    Chapter  Google Scholar 

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

    Google Scholar 

  14. Pagh, R., Rodler, F.F.: Cuckoo Hashing. J. Algorithms 51, 122–144 (2004)

    Article  MathSciNet  MATH  Google Scholar 

  15. Zuckerman, D.: Simulating BPP Using a General Weak Random Source. Algorithmica 16, 367–391 (1996)

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

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

Publish with us

Policies and ethics