Skip to main content

A Practical Minimal Perfect Hashing Method

  • Conference paper
Book cover Experimental and Efficient Algorithms (WEA 2005)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 3503))

Included in the following conference series:

Abstract

We propose a novel algorithm based on random graphs to construct minimal perfect hash functions h. For a set of n keys, our algorithm outputs h in expected time O(n). The evaluation of h(x) requires two memory accesses for any key x and the description of h takes up 1.15n words. This improves the space requirement to 55% of a previous minimal perfect hashing scheme due to Czech, Havas and Majewski. A simple heuristic further reduces the space requirement to 0.93n words, at the expense of a slightly worse constant in the time complexity. Large scale experimental results are presented.

This work was supported in part by GERINDO Project–grant MCT/CNPq/CT-INFO 552.087/02-5, CAPES/PROF Scholarship (Fabiano C. Botelho), FAPESP Proj. Tem. 03/09925-5 and CNPq Grant 30.0334/93-1 (Yoshiharu Kohayakawa), and CNPq Grant 30.5237/02-0 (Nivio Ziviani).

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. Bollobás, B.: Random graphs, 2nd edn. Cambridge Studies in Advanced Mathematics, vol. 73. Cambridge University Press, Cambridge (2001)

    MATH  Google Scholar 

  2. Bollobás, B., Pikhurko, O.: Integer sets with prescribed pairwise differences being distinct. European Journal of Combinatorics (to appear)

    Google Scholar 

  3. Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 2nd edn. MIT Press, Cambridge (2001)

    MATH  Google Scholar 

  4. Czech, Z.J., Havas, G., Majewski, B.S.: An optimal algorithm for generating minimal perfect hash functions. Information Processing Letters 43(5), 257–264 (1992)

    Article  MATH  MathSciNet  Google Scholar 

  5. Czech, Z.J., Havas, G., Majewski, B.S.: Fundamental study perfect hashing. Theoretical Computer Science 182, 1–143 (1997)

    Article  MATH  MathSciNet  Google Scholar 

  6. Dietzfelbinger, M., Hagerup, T.: Simple minimal perfect hashing in less space. In: Meyer auf der Heide, F. (ed.) ESA 2001, vol. 2161, pp. 109–120. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  7. Erdős, P., Rényi, A.: On random graphs I. Pub. Math. Debrecen 6, 290–297 (1959)

    Google Scholar 

  8. Erdős, P., Rényi, A.: On the evolution of random graphs. Magyar Tud. Akad. Mat. Kutató Int. Közl. 5, 17–61 (1960)

    Google Scholar 

  9. Fox, E.A., Chen, Q.F., Heath, L.S.: A faster algorithm for constructing minimal perfect hash functions. In: Proceedings of the 15th Annual International ACM SIGIR Conference on Research and Development in Information Retrieval, pp. 266–273 (1992)

    Google Scholar 

  10. Fredman, M.L., Komlós, J., Szemerédi, E.: Storing a sparse table with O(1) worst case access time. J. ACM 31(3), 538–544 (1984)

    Article  MATH  Google Scholar 

  11. Havas, G., Majewski, B.S., Wormald, N.C., Czech, Z.J.: Graphs, hypergraphs and hashing. In: van Leeuwen, J. (ed.) WG 1993, vol. 790, pp. 153–165. Springer, Heidelberg (1994)

    Google Scholar 

  12. Janson, S., Łuczak, T., Ruciński, A.: Random graphs. Wiley-Inter., Chichester (2000)

    MATH  Google Scholar 

  13. Erdős, P., Rényi, A.: On the strength of connectedness of a random graph. Acta Mathematica Scientia Hungary 12, 261–267 (1961)

    Article  Google Scholar 

  14. Pagh, R.: Hash and displace: Efficient evaluation of minimal perfect hash functions. In: Workshop on Algorithms and Data Structures, pp. 49–54 (1999)

    Google Scholar 

  15. Pittel, B., Wormald, N.C.: Counting connected graphs inside-out. Journal of Combinatorial Theory (to appear)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2005 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Botelho, F.C., Kohayakawa, Y., Ziviani, N. (2005). A Practical Minimal Perfect Hashing Method. In: Nikoletseas, S.E. (eds) Experimental and Efficient Algorithms. WEA 2005. Lecture Notes in Computer Science, vol 3503. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11427186_42

Download citation

  • DOI: https://doi.org/10.1007/11427186_42

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-25920-6

  • Online ISBN: 978-3-540-32078-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics