skip to main content
article
Free Access

Storing a sparse table

Published:01 November 1979Publication History
Skip Abstract Section

Abstract

The problem of storing and searching large sparse tables is ubiquitous in computer science. The standard technique for storing such tables is hashing, but hashing has poor worst-case performance. We propose a good worst-case method for storing a static table of n entries, each an integer between 0 and N - 1. The method requires O(n) words of storage and allows O(logn N) access time. Although our method is a little complicated to use in practice, our analysis shows why a simpler algorithm used for compressing LR parsing tables works so well.

References

  1. 1 Alto, A.V., Hopcroft, J.E., and Ullman, J.D. The Design and Analysis of Computer d Igorithm. Addison-Wesley, Reading, Mass., 1974, Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 2 Aho, A.V., and Ullman, J.D. Principles of Compiler Design. Addison-Wesley, Reading, Mass., 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 3 Downey, P.J., Sethi, R., and Tarjan, R.E. Variations on the common subexpression problem. To appear in J. A CM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 4 Even, S., Lichtenstein, D.I., and Shiloach, Y. Remarks on Ziegler's method for matrix compression. Unpublished manuscript, 1977.Google ScholarGoogle Scholar
  5. 5 Knuth, D.E. The Art of Computer Programming, VoL 3: Sorting and Searching. Addison-Wesley, Reading, Mass., 1973. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 6 Sprugnoli, R. Perfect hashing functions: A single probe retrieving method for static sets. Comm. ACM 20, 11 (Nov. 1977), 841-850. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 7 Tarjan, R.E. Graph theory and Gaussian elimination. In Sparse Matrix Computations, J.R. Bunch and D.J. Rose, Eds., Academic Press, New York, 1976, pp. 3-22.Google ScholarGoogle Scholar
  8. 8 Ziegler, S.F. Smaller faster table driven parser. Unpublished manuscript, Madison Academic Comptg. Ctr., U. of Wisconsin, Madison, Wisconsin, 1977.Google ScholarGoogle Scholar

Index Terms

  1. Storing a sparse table
    Index terms have been assigned to the content through auto-classification.

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image Communications of the ACM
      Communications of the ACM  Volume 22, Issue 11
      Nov. 1979
      37 pages
      ISSN:0001-0782
      EISSN:1557-7317
      DOI:10.1145/359168
      Issue’s Table of Contents

      Copyright © 1979 ACM

      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: 1 November 1979

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader