[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
research-article

A dictionary implementation based on dynamic perfect hashing

Published: 12 June 2008 Publication History

Abstract

We describe experimental results on an implementation of a dynamic dictionary. The basis of our implementation is “dynamic perfect hashing” as described by Dietzfelbinger et al. (SIAM J. Computing 23, 1994, pp. 738--761), an extension of the storage scheme proposed by Fredman et al. (J. ACM 31, 1984, pp. 538--544). At the top level, a hash function is used to partition the keys to be stored into several sets. On the second level, there is a perfect hash function for each of these sets. This technique guarantees O(1) worst-case time for lookup and expected O(1) amortized time for insertion and deletion, while only linear space is required. We study the practical performance of dynamic perfect hashing and describe improvements of the basic scheme. The focus is on the choice of the hash function (both for integer and string keys), on the efficiency of rehashing, on the handling of small buckets, and on the space requirements of the implementation.

References

[1]
Carter, J. and Wegman, M. 1979. Universal classes of hash functions. J. Comput. Syst. Sci. 18, 2 (Apr.), 143--154.
[2]
Czech, Z. J., Havas, G., and Majewski, B. S. 1992. An optimal algorithm for generating minimal perfect hash functions. Inform. Process. Let. 43, 5 (Oct.), 257--264.
[3]
Dietzfelbinger, M., Karlin, A., Mehlhorn, K., Meyer auf der Heide, F., Rohnert, H., and Tarjan, R. E. 1994. Dynamic perfect hashing: Upper and lower bounds. SIAM J. Comput. 23, 4 (Aug.), 738--761.
[4]
Dietzfelbinger, M., Hagerup, T., Katajainen, J., and Penttonen, M. 1997. A reliable randomized algorithm for the closest-pair problem. J. Algor. 25, 1 (Oct.), 19--51.
[5]
Fredman, M. L., Komlós, J., and Szemerédi, E. 1984. Storing a sparse table with O(1) worst case access time. J. ACM 31, 3 (July), 538--544.
[6]
McGeoch, C. 1996a. Challenge project ideas. http://www.cs.amherst.edu/ccm/challenge5/ideas.html.
[7]
McGeoch, C. 1996b. The fifth dimacs implementation challenge: Data type definitions and specifications. http://www.cs.amherst.edu/ccm/challenge5/documents/specs.ps.
[8]
Thorup, M. 2000. Even strongly universal hashing is pretty fast. In SODA '00: Proceedings of the 11th Annual ACM-SIAM Symposium on Discrete Algorithms. Society for Industrial and Applied Mathematics, Philadelphia, PA, 496--497.

Cited By

View all
  • (2010)Comparing integer data structures for 32- and 64-bit keysACM Journal of Experimental Algorithmics10.1145/1671970.167197715(2.1-2.43)Online publication date: 17-Mar-2010

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Journal of Experimental Algorithmics
ACM Journal of Experimental Algorithmics  Volume 12, Issue
2008
507 pages
ISSN:1084-6654
EISSN:1084-6654
DOI:10.1145/1227161
Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 12 June 2008
Accepted: 01 January 2008
Revised: 01 August 2007
Received: 01 August 2002
Published in JEA Volume 12

Author Tags

  1. Data structures
  2. dictionaries
  3. dynamic hashing
  4. hash functions
  5. implementation

Qualifiers

  • Research-article
  • Research
  • Refereed

Funding Sources

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)9
  • Downloads (Last 6 weeks)0
Reflects downloads up to 06 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2010)Comparing integer data structures for 32- and 64-bit keysACM Journal of Experimental Algorithmics10.1145/1671970.167197715(2.1-2.43)Online publication date: 17-Mar-2010

View Options

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media