Explicit and Efficient Hash Families Suffice for Cuckoo Hashing with a Stash

  • Martin Aumüller
  • Martin Dietzfelbinger
  • Philipp Woelfel
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7501)

Abstract

It is shown that for cuckoo hashing with a stash as proposed by Kirsch, Mitzenmacher, and Wieder (2008) families of very simple hash functions can be used, maintaining the favorable performance guarantees: with stash size s the probability of a rehash is O(1/ns + 1), and the evaluation time is O(s). Instead of the full randomness needed for the analysis of Kirsch et al. and of Kutzelnigg (2010) (resp. Θ(logn)-wise independence for standard cuckoo hashing) the new approach even works with 2-wise independent hash families as building blocks. Both construction and analysis build upon the work of Dietzfelbinger and Woelfel (2003). The analysis, which can also be applied to the fully random case, utilizes a graph counting argument and is much simpler than previous proofs. As a byproduct, an algorithm for simulating uniform hashing is obtained. While it requires about twice as much space as the most space efficient solutions, it is attractive because of its simple and direct structure.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Aumüller, M., Dietzfelbinger, M., Woelfel, P.: Explicit and efficient hash families suffice for cuckoo hashing with a stash. CoRR abs/1204.4431 (2012)Google Scholar
  2. 2.
    Calkin, N.J.: Dependent sets of constant weight binary vectors. Combinatorics, Probability and Computing 6(3), 263–271 (1997)MathSciNetMATHCrossRefGoogle Scholar
  3. 3.
    Carter, L., Wegman, M.N.: Universal classes of hash functions. J. Comput. Syst. Sci. 18(2), 143–154 (1979)MathSciNetMATHCrossRefGoogle Scholar
  4. 4.
    Devroye, L., Morin, P.: Cuckoo hashing: Further analysis. Inf. Process. Lett. 86(4), 215–219 (2003)MathSciNetMATHCrossRefGoogle Scholar
  5. 5.
    Dietzfelbinger, M., Hagerup, T., Katajainen, J., Penttonen, M.: A reliable randomized algorithm for the closest-pair problem. J. Algorithms 25(1), 19–51 (1997)MathSciNetMATHCrossRefGoogle Scholar
  6. 6.
    Dietzfelbinger, M., Rink, M.: Applications of a Splitting Trick. In: Albers, S., Marchetti-Spaccamela, A., Matias, Y., Nikoletseas, S., Thomas, W. (eds.) ICALP 2009. LNCS, vol. 5555, pp. 354–365. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  7. 7.
    Dietzfelbinger, M., Schellbach, U.: On risks of using cuckoo hashing with simple universal hash classes. In: 20th Ann. ACM-SIAM Symp. on Discrete Algorithms (SODA), pp. 795–804 (2009)Google Scholar
  8. 8.
    Dietzfelbinger, M., Weidling, C.: Balanced allocation and dictionaries with tightly packed constant size bins. Theor. Comput. Sci. 380(1-2), 47–68 (2007)MathSciNetMATHCrossRefGoogle Scholar
  9. 9.
    Dietzfelbinger, M., Woelfel, P.: Almost random graphs with simple hash functions. In: Proc. 35th ACM Symp. on Theory of Computing (STOC), New York, NY, USA, pp. 629–638 (2003)Google Scholar
  10. 10.
    Fotakis, D., Pagh, R., Sanders, P., Spirakis, P.G.: Space efficient hash tables with worst case constant access time. Theory Comput. Syst. 38(2), 229–248 (2005)MathSciNetMATHCrossRefGoogle Scholar
  11. 11.
    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)CrossRefGoogle Scholar
  12. 12.
    Kirsch, A., Mitzenmacher, M., Wieder, U.: More Robust Hashing: Cuckoo Hashing with a Stash. SIAM J. Comput. 39(4), 1543–1561 (2009)MathSciNetMATHCrossRefGoogle Scholar
  13. 13.
    Klassen, T.Q., Woelfel, P.: Independence of Tabulation-Based Hash Classes. In: Fernández-Baca, D. (ed.) LATIN 2012. LNCS, vol. 7256, pp. 506–517. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  14. 14.
    Kutzelnigg, R.: A further analysis of cuckoo hashing with a stash and random graphs of excess r. Discr. Math. and Theoret. Comput. Sci. 12(3), 81–102 (2010)MathSciNetGoogle Scholar
  15. 15.
    Mitzenmacher, M., Vadhan, S.P.: Why simple hash functions work: exploiting the entropy in a data stream. In: Proc. 19th Ann. ACM-SIAM Symp. on Discrete Algorithms (SODA), pp. 746–755 (2008)Google Scholar
  16. 16.
    Pagh, A., Pagh, R.: Uniform hashing in constant time and optimal space. SIAM J. Comput. 38(1), 85–96 (2008)MathSciNetMATHCrossRefGoogle Scholar
  17. 17.
    Pagh, R., Rodler, F.F.: Cuckoo hashing. J. Algorithms 51(2), 122–144 (2004)MathSciNetMATHCrossRefGoogle Scholar
  18. 18.
    Pǎtraşcu, M., Thorup, M.: The power of simple tabulation hashing. In: Proc. 43rd ACM Symp. on Theory of Computing (STOC), pp. 1–10 (2011)Google Scholar
  19. 19.
    Siegel, A.: On universal classes of extremely random constant-time hash functions. SIAM J. Comput. 33(3), 505–543 (2004)MathSciNetMATHCrossRefGoogle Scholar
  20. 20.
    Thorup, M., Zhang, Y.: Tabulation based 4-universal hashing with applications to second moment estimation. In: Proc. 15th Ann. ACM-SIAM Symp. on Discrete Algorithms (SODA), pp. 615–624 (2004)Google Scholar
  21. 21.
    Thorup, M., Zhang, Y.: Tabulation based 5-universal hashing and linear probing. In: Proc. 12th ALENEX, pp. 62–76. SIAM (2010)Google Scholar
  22. 22.
    Wegman, M.N., Carter, L.: New classes and applications of hash functions. In: Proc. 20th Ann. Symp. on Foundations of Computer Science (FOCS), pp. 175–182. IEEE Computer Society (1979)Google Scholar
  23. 23.
    Woelfel, P.: Asymmetric balanced allocation with simple hash functions. In: Proc. 17th ACM-SIAM Symp. on Discrete Algorithms (SODA), pp. 424–433 (2006)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Martin Aumüller
    • 1
  • Martin Dietzfelbinger
    • 1
  • Philipp Woelfel
    • 2
  1. 1.Fakultät für Informatik und AutomatisierungTechnische Universität IlmenauIlmenauGermany
  2. 2.Department of Computer ScienceUniversity of CalgaryCalgaryCanada

Personalised recommendations