Skip to main content

Graphs, hypergraphs and hashing

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 790))

Abstract

Minimal perfect hash functions are used for memory efficient storage and fast retrieval of items from static sets. We present an infinite family of efficient and practical algorithms for generating minimal perfect hash functions which allow an arbitrary order to be specified for the keys. We show that almost all members of the family are space and time optimal, and we identify the one with minimum constants. Members of the family generate a minimal perfect hash function in two steps. First a special kind of function into an r-graph is computed probabilistically. Then this function is refined deterministically to a minimal perfect hash function. We give strong practical and theoretical evidence that the first step uses linear random time. The second step runs in linear deterministic time. The family not only has theoretical importance, but also offers the fastest known method for generating perfect hash functions.

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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  • A.V. Aho, J.E. Hopcroft, and J.D. Ullman. The Design and Analysis of Computer Algorithms. Addison-Wesley, 1974.

    Google Scholar 

  • M.D. Brain and A.L. Tharp. Near-perfect hashing of large word sets. Software — Practice and Experience 19 (1989) 967–978.

    Google Scholar 

  • M.D. Brain and A.L. Tharp. Perfect hashing using sparse matrix packing. Information Systems, 15 (1990) 281–290.

    Google Scholar 

  • J.L. Carter and M.N. Wegman. Universal classes of hash functions. In 9th Annual ACM Symposium on Theory of Computing — STOC'77, 106–112, 1977.

    Google Scholar 

  • J.L. Carter and M.N. Wegman. New classes and applications of hash functions. In 20th Annual Symposium on Foundations of Computer Science — FOCS'79, 175–182, 1979a.

    Google Scholar 

  • J.L. Carter and M.N. Wegman. Universal classes of hash functions. Journal of Computer and System Sciences, 18 (1979b) 143–154.

    Google Scholar 

  • N. Cercone, J. Boates, and M. Krause. An interactive system for finding perfect hash functions. IEEE Software, 2 (1985) 38–53.

    Google Scholar 

  • C-C. Chang and T-C. Wu. Letter oriented perfect hashing scheme based upon sparse table compression. Software — Practice and Experience, 21 (1991) 35–49.

    Google Scholar 

  • C.C. Chang. The study of an ordered minimal perfect hashing scheme. Communications of the ACM, 27 (1984) 384–387.

    Google Scholar 

  • C.C. Chang and C.H. Chang. An ordered minimal perfect hashing scheme with single parameter. Information Processing Letters, 27 (1988) 79–83.

    Google Scholar 

  • C.C. Chang, C.Y. Chen, and J.K. Jan. On the design of a machine independent perfect hashing. The Computer Journal, 34 (1991) 469–474.

    Google Scholar 

  • C.C. Chang and R.C.T. Lee. A letter-oriented minimal perfect hashing scheme. The Computer Journal, 29 (1986) 277–281.

    Google Scholar 

  • R.J. Cichelli. Minimal perfect hash functions made simple. Communications of the ACM, 23 (1980) 17–19.

    Google Scholar 

  • C.R. Cook and R.R. Oldehoeft. A letter oriented minimal perfect hashing function. SIGPLAN Notices, 17 (1982) 18–27.

    Google Scholar 

  • G.V. Cormack, R.N.S. Horspool, and M. Kaiserwerth. Practical perfect hashing. The Computer Journal, 28 (1985) 54–55.

    Google Scholar 

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

    Google Scholar 

  • Z.J. Czech and B.S. Majewski. Generating a minimal perfect hashing function in O(m 2) time. Archiwum Informatyki, 4 (1992) 3–20.

    Google Scholar 

  • M. Dietzfelbinger, J. Gil, Y. Matias, and N. Pippenger. Polynomial hash functions are reliable. In 19th International Colloquium on Automata, Languages and Programming — ICALP'92, 235–246, Vienna, Austria, 1992. LNCS 623.

    Google Scholar 

  • M. Dietzfelbinger and F. Meyer auf der Heide. A new universal class of hash functions, and dynamic hashing in real time. In 17th International Colloquium on Automata, Languages and Programming — ICALP'90, 6–19, Warwick University, England, 1990. LNCS 443.

    Google Scholar 

  • M.W. Du, T.M. Hsieh, K.F. Jea, and D.W Shieh. The study of a new perfect hash scheme. IEEE Transactions on Software Engineering, 9 (1983) 305–313.

    Google Scholar 

  • R. Duke. Types of cycles in hypergraphs. Ann. Discrete Math., 27 (1985) 399–418.

    Google Scholar 

  • P. Erdős and A. Rényi. On the evolution of random graphs. Publ. Math. Inst. Hung. Acad. Sci., 5 (1960) 17–61. Reprinted in J.H. Spencer, editor, The Art of Counting: Selected Writings, Mathematicians of Our Time, 574–617. Cambridge, Mass.: MIT Press, 1973.

    Google Scholar 

  • E. Fox, Q.F. Chen, A. Daoud, and L. Heath. Order preserving minimal perfect hash functions and information retrieval. ACM Transactions on Information Systems, 9 (1991) 281–308.

    Google Scholar 

  • E. Fox, Q.F. Chen, and L. Heath. LEND and faster algorithms for constructing minimal perfect hash functions. In Proc. 15th Annual International ACM SIGIR Conference on Research and Development in Information Retrieval — SIGIR'92, Copenhagen, Denmark, 266–273, 1992.

    Google Scholar 

  • E.A. Fox, L.S. Heath, Q. Chen, and A.M. Daoud. Practical minimal perfect hash functions for large databases. Communications of the ACM, 35 (1992) 105–121.

    Google Scholar 

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

    Google Scholar 

  • G.H. Gonnet and R. Baeza-Yates. Handbook of Algorithms and Data Structures. Addison-Wesley, Reading, Mass., 1991.

    Google Scholar 

  • M. Gori and G. Soda. An algebraic approach to Cichelli's perfect hashing. BIT, 29 (1989) 209–214.

    Google Scholar 

  • G. Haggard and K. Karplus. Finding minimal perfect hash functions. ACM SIGCSE Bulletin, 18 (1986) 191–193.

    Google Scholar 

  • G. Havas and B.S. Majewski. Optimal algorithms for minimal perfect hashing. Technical Report 234, The University of Queensland, Key Centre for Software Technology, Queensland, 1992.

    Google Scholar 

  • C.T.M. Jackobs and P. van Emde Boas. Two results on tables. Information Processing Letters, 22 (1986) 43–48.

    Google Scholar 

  • G. Jaeschke. Reciprocal hashing: A method for generating minimal perfect hashing functions. Communications of the ACM, 24 (1981) 829–833.

    Google Scholar 

  • A. Karlin and E. Upfal. Parallel hashing — an efficient implementation of shared memory. In 18th Annual ACM Symposium on Theory of Computing — STOC'86, 160–168, 1986.

    Google Scholar 

  • T.G. Lewis and C.R. Cook. Hashing for dynamic and static internal tables. Computer, 21 (1988) 45–56.

    Google Scholar 

  • B.S. Majewski, N.C. Wormald, Z.J. Czech, and G. Havas. A family of generators of minimal perfect hash functions. Technical Report 16, DIMACS, Rutgers University, New Jersey, USA, 1992.

    Google Scholar 

  • K. Mehlhorn. Data Structures and Algorithms 1: Sorting and Searching, volume 1. Springer-Verlag, Berlin Heidelberg, New York, Tokyo, 1984.

    Google Scholar 

  • F. Meyer auf der Heide. Dynamic hashing strategies. In 15th Symposium on Mathematical Foundations of Computer Science — MFCS'90, 76–87, Banska Bystrica, Czechoslovakia, 1990.

    Google Scholar 

  • P.K. Pearson. Fast hashing of variable-length text strings. Communications of the ACM, 33 (1990) 677–680.

    Google Scholar 

  • T.J. Sager. A polynomial time generator for minimal perfect hash functions. Communications of the ACM, 28 (1985) 523–532.

    Google Scholar 

  • J.P. Schmidt and A. Siegel. On aspects of universality and performance for closed hashing. In 21st Annual ACM Symposium on Theory of Computing — STOC'89, 355–366, Seattle, Washington, 1989.

    Google Scholar 

  • J.P. Schmidt and A. Siegel. The analysis of closed hashing under limited randomness. In 22st Annual ACM Symposium on Theory of Computing — STOC'90, 224–234, Baltimore, MD, 1990.

    Google Scholar 

  • J.P. Schmidt and A. Siegel. The spatial complexity of oblivious k-probe hash functions. SIAM Journal on Computing, 19 (1990) 775–786.

    Google Scholar 

  • A. Siegel. On universal classes of fast high performance hash functions, their timespace trade-off, and their applications. In 30th Annual Symposium on Foundations of Computer Science — FOCS'89, 20–25, 1989.

    Google Scholar 

  • C. Slot and P. van Emde Boas. On tape versus core: An application of space efficient hash functions to the invariance of space. In 16th Annual ACM Symposium on Theory of Computing — STOC'84, 391–400, Washington, DC, 1984.

    Google Scholar 

  • J. Spencer and N.C. Wormald. On the k-core of random graphs. Manuscript, 1993.

    Google Scholar 

  • R. Sprugnoli. Perfect hashing functions: A single probe retrieving method for static sets. Communications of the ACM, 20 (1977) 841–850.

    Google Scholar 

  • R.E. Tarjan and A.C-C Yao. Storing a sparse table. Communications of the ACM, 22 (1979) 606–611.

    Google Scholar 

  • V.G. Winters. Minimal perfect hashing for large sets of data. In International Conference on Computing and Information — ICCI'90, 275–284, Niagara Falls, Canada, 1990.

    Google Scholar 

  • V.G. Winters. Minimal perfect hashing in polynomial time. BIT, 30 (1990) 235–244.

    Google Scholar 

  • W.P. Yang and M.W. Du. A backtracking method for constructing perfect hash functions from a set of mapping functions. BIT, 25 (1985) 148–164.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Jan van Leeuwen

Rights and permissions

Reprints and permissions

Copyright information

© 1994 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Havas, G., Majewski, B.S., Wormald, N.C., Czech, Z.J. (1994). Graphs, hypergraphs and hashing. In: van Leeuwen, J. (eds) Graph-Theoretic Concepts in Computer Science. WG 1993. Lecture Notes in Computer Science, vol 790. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-57899-4_49

Download citation

  • DOI: https://doi.org/10.1007/3-540-57899-4_49

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-57899-4

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

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics