Algorithmica

, Volume 70, Issue 3, pp 428–456 | Cite as

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

  • Martin Aumüller
  • Martin Dietzfelbinger
  • Philipp Woelfel
Article

Abstract

It is shown that for cuckoo hashing with a stash as proposed by Kirsch et al. (Proc. 16th European Symposium on Algorithms (ESA), pp. 611–622, Springer, Berlin, 2008) families of very simple hash functions can be used, maintaining the favorable performance guarantees: with constant stash size s the probability of a rehash is O(1/ns+1), the lookup time and the deletion time are O(s) in the worst case, and the amortized expected insertion time is O(s) as well. Instead of the full randomness needed for the analysis of Kirsch et al. and of Kutzelnigg (Discrete Math. Theor. Comput. Sci., 12(3):81–102, 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 (Proc. 35th ACM Symp. on Theory of Computing (STOC), pp. 629–638, 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. The results can be generalized to situations where the stash size is non-constant.

Keywords

Data structures Hash table Randomized algorithms Hash functions Cuckoo hashing Random graphs 

References

  1. 1.
    Arbitman, Y.: Efficient dictionary data structures based on cuckoo hashing. Master’s thesis, Weizmann Institute of Science (2010) Google Scholar
  2. 2.
    Carter, L., Wegman, M.N.: Universal classes of hash functions. J. Comput. Syst. Sci. 18(2), 143–154 (1979) CrossRefMATHMathSciNetGoogle Scholar
  3. 3.
    Devroye, L., Morin, P.: Cuckoo hashing: Further analysis. Inf. Process. Lett. 86(4), 215–219 (2003) CrossRefMATHMathSciNetGoogle Scholar
  4. 4.
    Diestel, R.: Graph Theory. Springer, Berlin (2005) MATHGoogle 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) CrossRefMATHMathSciNetGoogle Scholar
  6. 6.
    Dietzfelbinger, M., Rink, M.: Applications of a splitting trick. In: Proc. 36th International Colloquium on Automata, Languages and Programming (ICALP). LNCS, vol. 5555, pp. 354–365. Springer, Berlin (2009) CrossRefGoogle Scholar
  7. 7.
    Dietzfelbinger, M., Schellbach, U.: On risks of using cuckoo hashing with simple universal hash classes. In: Proc. 20th ACM-SIAM Symp. on Discrete Algorithms (SODA), pp. 795–804 (2009) CrossRefGoogle 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) CrossRefMATHMathSciNetGoogle 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) CrossRefMATHMathSciNetGoogle Scholar
  11. 11.
    Goodrich, M.T., Mitzenmacher, M.: Privacy-preserving access of outsourced data via oblivious ram simulation. In: Proc. 38th International Colloquium on Automata, Languages and Programming (ICALP), pp. 576–587 (2011) CrossRefGoogle Scholar
  12. 12.
    Kirsch, A., Mitzenmacher, M., Wieder, U.: More robust hashing: cuckoo hashing with a stash. In: Proc. 16th European Symposium on Algorithms (ESA). LNCS, vol. 5193, pp. 611–622. Springer, Berlin (2008) Google Scholar
  13. 13.
    Kirsch, A., Mitzenmacher, M., Wieder, U.: More robust hashing: cuckoo hashing with a stash. SIAM J. Comput. 39(4), 1543–1561 (2009) CrossRefMATHMathSciNetGoogle Scholar
  14. 14.
    Klassen, T.Q., Woelfel, P.: Independence of tabulation-based hash classes. In: Proc. 10th Theoretical Informatics—Latin American Symposium (LATIN). LNCS, vol. 7256, pp. 506–517. Springer, Berlin (2012) Google Scholar
  15. 15.
    Kutzelnigg, R.: A further analysis of cuckoo hashing with a stash and random graphs of excess r. Discrete Math. Theor. Comput. Sci. 12(3), 81–102 (2010) MATHMathSciNetGoogle Scholar
  16. 16.
    Mitzenmacher, M., Vadhan, S.P.: Why simple hash functions work: exploiting the entropy in a data stream. In: Proc. 19th ACM-SIAM Symp. on Discrete Algorithms (SODA), pp. 746–755 (2008) Google Scholar
  17. 17.
    Pagh, R., Rodler, F.F.: Cuckoo hashing. J. Algorithms 51(2), 122–144 (2004) CrossRefMATHMathSciNetGoogle Scholar
  18. 18.
    Pǎtraşcu, M., Thorup, M.: The power of simple tabulation hashing. J. ACM 59(3), 14 (2012) MathSciNetGoogle Scholar
  19. 19.
    Siegel, A.: On universal classes of extremely random constant-time hash functions. SIAM J. Comput. 33(3), 505–543 (2004) CrossRefMATHMathSciNetGoogle Scholar
  20. 20.
    Thorup, M., Zhang, Y.: Tabulation based 4-universal hashing with applications to second moment estimation. In: Proc. 15th ACM-SIAM Symp. on Discrete Algorithms (SODA), pp. 615–624 (2004) Google Scholar
  21. 21.
    Thorup, M., Zhang, Y.: Tabulation-based 5-independent hashing with applications to linear probing and second moment estimation. SIAM J. Comput. 41(2), 293–331 (2012) CrossRefMATHMathSciNetGoogle Scholar
  22. 22.
    Wegman, M.N., Carter, L.: New hash functions and their use in authentication and set equality. J. Comput. Syst. Sci. 22, 265–279 (1981) CrossRefMATHMathSciNetGoogle 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 Science+Business Media New York 2013

Authors and Affiliations

  • Martin Aumüller
    • 1
  • Martin Dietzfelbinger
    • 1
  • Philipp Woelfel
    • 2
  1. 1.Faculty of Computer Science and AutomationTechnische Universität IlmenauIlmenauGermany
  2. 2.Department of Computer ScienceUniversity of CalgaryCalgaryCanada

Personalised recommendations