skip to main content
article

Succinct indexable dictionaries with applications to encoding k-ary trees, prefix sums and multisets

Published:01 November 2007Publication History
Skip Abstract Section

Abstract

We consider the indexable dictionary problem, which consists of storing a set S ⊆ {0,…,m − 1} for some integer m while supporting the operations of rank(x), which returns the number of elements in S that are less than x if xS, and −1 otherwise; and select(i), which returns the ith smallest element in S. We give a data structure that supports both operations in O(1) time on the RAM model and requires B(n, m) + o(n) + O(lg lg m) bits to store a set of size n, where B(n, m) = ⌊lg (m/n)⌋ is the minimum number of bits required to store any n-element subset from a universe of size m. Previous dictionaries taking this space only supported (yes/no) membership queries in O(1) time. In the cell probe model we can remove the O(lg lg m) additive term in the space bound, answering a question raised by Fich and Miltersen [1995] and Pagh [2001].

We present extensions and applications of our indexable dictionary data structure, including:

—an information-theoretically optimal representation of a k-ary cardinal tree that supports standard operations in constant time;

—a representation of a multiset of size n from {0,…,m − 1} in B(n, m + n) + o(n) bits that supports (appropriate generalizations of) rank and select operations in constant time; and + O(lg lg m)

—a representation of a sequence of n nonnegative integers summing up to m in B(n, m + n) + o(n) bits that supports prefix sum queries in constant time.

References

  1. Aho, A. V., Hopcroft, J. E., and Ullman, J. D. 1983. Data Structures and Algorithms. Addison-Wesley. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Ajtai, M., Fredman, M. L., and Komlós, J. 1984. Hash functions for priority queues. Inf. Control 63, 3, 217--225. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Andersson, A., Hagerup, T., Nilsson, S., and Raman, R. 1998. Sorting in linear time? J. Comput. Syst. Sci. 57, 1, 74--93. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Beame, P. and Fich, F. E. 2002. Optimal bounds for the predecessor problem and related problems. J. Comput. Syst. Sci. 65, 1, 38--72. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Benoit, D., Demaine, E. D., Munro, J. I., Raman, R., Raman, V., and Rao, S. S. 2005. Representing trees of higher degree. Algorithmica 43, 4, 275--292. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Brodnik, A. and Munro, J. I. 1999. Membership in constant time and almost-minimum space. SIAM J. Comput. 28, 5, 1627--1640. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Clark, D. R. 1996. Compact pat trees. Ph.D. thesis, University of Waterloo. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Cleary, J. G. 1984. Compact hash tables using bidirectional linear probing. IEEE Trans. Comput. 33, 9, 828--834. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Darragh, J. J., Cleary, J. G., and Witten, I. H. 1993. Bonsai: A compact representation of trees. Softw. Pract. Exper. 23, 3, 277--291. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Elias, P. 1974. Efficient storage and retrieval by content and address of static files. J. ACM 21, 2, 246--260. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Ferragina, P. and Manzini, G. 2005. Indexing compressed text. J. ACM 52, 4, 552--581. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Fich, F. E. and Miltersen, P. B. 1995. Tables should be sorted (on random access machines). In Proceedings of the 4th International Workshop on Algorithms and Data Structures. Lecture Notes in Computer Science, vol. 955. Springer, 482--493. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 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, 538--544. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Fredman, M. L. and Saks, M. E. 1989. The cell probe complexity of dynamic data structures. In Proceedings of the 21st Annual ACM Symposium on Theory of Computing. ACM, 345-- 354. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Fredman, M. L. and Willard, D. E. 1993. Surpassing the information theoretic bound with fusion trees. J. Comput. Syst. Sci. 47, 3, 424--436. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Geary, R. F., Raman, R., and Raman, V. 2006. Succinct ordinal trees with level-ancestor queries. ACM Trans. Alg. 2, 4, 510--534. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Golynski, A., Munro, J. I., and Rao, S. S. 2006. Rank/Select operations on large alphabets: A tool for text indexing. In Proceedings of the 17th Annual ACM-SIAM Symposium on Discrete Algorithms. ACM Press, New York, 368--373. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Graham, R. L., Knuth, D. E., and Patashnik, O. 1994. Concrete Mathematics. Addison-Wesley. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Grossi, R., Gupta, A., and Vitter, J. S. 2003. High-Order entropy-compressed text indexes. In Proceedings of the 14th Annual ACM-SIAM Symposium on Discrete Algorithms, (SODA). Society for Industrial and Applied Mathematics, Philadelphia, PA, 841--850. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Grossi, R. and Vitter, J. S. 2005. Compressed suffix arrays and suffix trees with applications to text indexing and string matching. SIAM J. Comput. 35, 2, 378--407. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Hagerup, T. 1998. Sorting and searching on the word RAM. In Proceedings of the 15th Annual Symposium on Theoretical Aspects of Computer Science. Lecture Notes in Computer Science, vol. 1373. Springer, 366--398. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Hagerup, T. and Tholey, T. 2001. Efficient minimal perfect hashing in nearly minimal space. In Proceedings of the 18th Annual Symposium on Theoretical Aspects of Computer Science. Lecture Notes in Computer Science, vol. 2010. Springer, 317--326.Google ScholarGoogle Scholar
  23. Jacobson, G. 1989. Succinct static data structures. Ph.D. thesis, Carnegie Mellon University. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Jansson, J., Sadakane, K., and Sung, W.-K. 2007. Ultra-Succinct representation of ordered trees. In Proceedings of the 18th ACM-SIAM Symposium on Discrete Algorithms. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Munro, J. I. 1996. Tables. In Proceedings of the 16th Conference on Foundations of Software Technology and Theoretical Computer Science. Lecture Notes in Computer Science, vol. 1180. Springer, 37--42. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Munro, J. I. and Raman, V. 2001. Succinct representation of balanced parentheses and static trees. SIAM J. Comput. 31, 3, 762--776. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Munro, J. I., Raman, V., and Rao, S. S. 2001. Space efficient suffix trees. J. Alg. 39, 2, 205--222. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Navarro, G. and Mäkinen, V. 2007. Compressed full-text indexes. ACM Computing Surveys 39, 1, 2. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Pagh, R. 2001. Low redundancy in static dictionaries with constant query time. SIAM J. Comput. 31, 2, 353--363. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Paul, W. J. and Simon, J. 1980. Decision trees and random access machines. In Proceedings of the International Symposium on Logic and Algorithmic, 331--340.Google ScholarGoogle Scholar
  31. Raman, R., Raman, V., and Rao, S. S. 2002. Succinct indexable dictionaries with applications to encoding k-ary trees and multisets. In Proceedings of the 13th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), 233--242. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Raman, V. and Rao, S. S. 1999. Static dictionaries supporting rank. In Proceedings of the 10th International Symposium on Algorithms and Computation. Lecture Notes in Computer Science, vol. 1741. Springer, 18--26.Google ScholarGoogle Scholar
  33. Schmidt, J. P. and Siegel, A. 1990. The spatial complexity of oblivious k-probe hash functions. SIAM J. Comput. 19, 5, 775--786. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Tarjan, R. E. and Yao, A. C.-C. 1979. Storing a sparse table. Commun. ACM 22, 11, 606--611. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Yao, A. C.-C. 1981. Should tables be sorted? J. ACM 28, 3, 615--628. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Succinct indexable dictionaries with applications to encoding k-ary trees, prefix sums and multisets

            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 ACM Transactions on Algorithms
              ACM Transactions on Algorithms  Volume 3, Issue 4
              November 2007
              293 pages
              ISSN:1549-6325
              EISSN:1549-6333
              DOI:10.1145/1290672
              Issue’s Table of Contents

              Copyright © 2007 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 2007
              Published in talg Volume 3, Issue 4

              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