skip to main content
research-article

Fully Functional Static and Dynamic Succinct Trees

Published:01 May 2014Publication History
Skip Abstract Section

Abstract

We propose new succinct representations of ordinal trees and match various space/time lower bounds. It is known that any n-node static tree can be represented in 2n + o(n) bits so that a number of operations on the tree can be supported in constant time under the word-RAM model. However, the data structures are complicated and difficult to dynamize. We propose a simple and flexible data structure, called the range min-max tree, that reduces the large number of relevant tree operations considered in the literature to a few primitives that are carried out in constant time on polylog-sized trees. The result is extended to trees of arbitrary size, retaining constant time and reaching 2n + O(n/polylog(n)) bits of space. This space is optimal for a core subset of the operations supported and significantly lower than in any previous proposal.

For the dynamic case, where insertion/deletion (indels) of nodes is allowed, the existing data structures support a very limited set of operations. Our data structure builds on the range min-max tree to achieve 2n + O(n/log n) bits of space and O(log n) time for all operations supported in the static scenario, plus indels. We also propose an improved data structure using 2n + O(nlog log n/log n) bits and improving the time to the optimal O(log n/log log n) for most operations. We extend our support to forests, where whole subtrees can be attached to or detached from others, in time O(log1+ϵ n) for any ϵ > 0. Such operations had not been considered before.

Our techniques are of independent interest. An immediate derivation yields an improved solution to range minimum/maximum queries where consecutive elements differ by ± 1, achieving n + O(n/polylog(n)) bits of space. A second one stores an array of numbers supporting operations sum and search and limited updates, in optimal time O(log n/log log n). A third one allows representing dynamic bitmaps and sequences over alphabets of size σ, supporting rank/select and indels, within zero-order entropy bounds and time O(log n log σ/(log log n)2) for all operations. This time is the optimal O(log n/log log n) on bitmaps and polylog-sized alphabets. This improves upon the best existing bounds for entropy-bounded storage of dynamic sequences, compressed full-text self-indexes, and compressed-space construction of the Burrows-Wheeler transform.

References

  1. D. Arroyuelo. 2008. An improved succinct representation for dynamic k-ary trees. In Proceedings of the 19th Annual Symposium on Combinatorial Pattern Matching (CPM). LNCS 5029. 277--289. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. D. Arroyuelo, R. Cánovas, G. Navarro, and K. Sadakane. 2010. Succinct trees in practice. In Proceedings of the 11th Workshop on Algorithm Engineering and Experiments (ALENEX). 84--97.Google ScholarGoogle Scholar
  3. J. Barbay, J. Fischer, and G. Navarro. 2011a. LRM-Trees: Compressed indices, adaptive sorting, and compressed permutations. In Proceedings of the 22nd Annual Symposium on Combinatorial Pattern Matching (CPM). LNCS 6661. 285--298. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. J. Barbay, M. He, J. I. Munro, and S. S. Rao. 2011b. Succinct indexes for strings, binary relations and multilabeled trees. ACM Transactions on Algorithms 7, 4, Article 52. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. M. Bender and M. Farach-Colton. 2000. The LCA problem revisited. In Proceedings of the 4th Latin American Symposium on Theoretical Informatics (LATIN). LNCS 1776. 88--94. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. M. Bender and M. Farach-Colton. 2004. The level ancestor problem simplified. Theoretical Computer Science 321, 1, 5--12. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. D. Benoit, E. D. Demaine, J. I. Munro, R. Raman, V. Raman, and S. S. Rao. 2005. Representing trees of higher degree. Algorithmica 43, 4, 275--292. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. M. Burrows and D. Wheeler. 1994. A Block Sorting Data Compression Algorithm. Technical Report. Digital Systems Research Center.Google ScholarGoogle Scholar
  9. R. Cánovas and G. Navarro. 2010. Practical compressed suffix trees. In Proceedings of the 9th International Symposium on Experimental Algorithms (SEA). LNCS 6049. 94--105. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. H.-L. Chan, W.-K. Hon, T.-W. Lam, and K. Sadakane. 2007. Compressed indexes for dynamic text collections. ACM Transactions on Algorithms 3, 2, Article 21. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Y.-T. Chiang, C.-C. Lin, and H.-I. Lu. 2005. Orderly spanning trees with applications. SIAM Journal on Computing 34, 4, 924--945. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. P. Davoodi, R. Raman, and S. S. Rao. 2012. Succinct representations of binary trees for range minimum queries. In Proceedings of the 18th Annual International Conference on Computing and Combinatorics (COCOON). LNCS 7434. 396--407.Google ScholarGoogle Scholar
  13. P. Davoodi and S. S. Rao. 2011. Succinct dynamic cardinal trees with constant time operations for small alphabet. In Proceedings of the 8th Annual Conference on Theory and Applications of Models of Computation (TAMC). 195--205. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. O. Delpratt, N. Rahman, and R. Raman. 2006. Engineering the LOUDS succinct tree representation. In Proceedings of the 5th Workshop on Efficient and Experimental Algorithms (WEA). LNCS 4007, 134--145. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. A. Farzan and J. I. Munro. 2008. A uniform approach towards succinct representation of trees. In Proceedings of the 11th Scandinavian Workshop on Algorithm Theory (SWAT). LNCS 5124. 173--184. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. A. Farzan and J. I. Munro. 2011. Succinct representation of dynamic trees. Theoretical Computer Science 412, 24, 2668--2678. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. A. Farzan, R. Raman, and S. S. Rao. 2009. Universal succinct representations of trees? In Proceedings of the 36th International Colloquium on Automata, Languages and Programming (ICALP). 451--462. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. P. Ferragina, F. Luccio, G. Manzini, and S. Muthukrishnan. 2009. Compressing and indexing labeled trees, with applications. Journal of the ACM 57, 1, Article 4. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. P. Ferragina, G. Manzini, V. Mäkinen, and G. Navarro. 2007. Compressed representations of sequences and full-text indexes. ACM Transactions on Algorithms 3, 2, Article 20. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. J. Fischer. 2010. Optimal succinctness for range minimum queries. In Proceedings of the 9th Symposium on Latin American Theoretical Informatics (LATIN). LNCS 6034. 158--169. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. J. Fischer and V. Heun. 2007. A new succinct representation of RMQ-information and improvements in the enhanced suffix array. In Proceedings of the 1st International Symposium on Combinatorics, Algorithms, Probabilistic and Experimental Methodologies (ESCAPE). LNCS 4614. 459--470. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. R. Fleischer. 1996. A simple balanced search tree with O(1) worst-case update time. International Journal of Foundations of Computer Science 7, 2, 137--149.Google ScholarGoogle ScholarCross RefCross Ref
  23. M. Fredman and M. Saks. 1989. The cell probe complexity of dynamic data structures. In Proceedings of the 21st Annual ACM Symposium on Theory of Computing (STOC). 345--354. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. M. Fredman and D. Willard. 1993. Surpassing the information theoretic bound with fusion trees. Journal of Computer and Systems Science 47, 3, 424--436. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. R. Geary, N. Rahman, R. Raman, and V. Raman 2006a. A simple optimal representation for balanced parentheses. Theoretical Computer Science 368, 3, 231--246. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. R. Geary, R. Raman, and V. Raman. 2006b. Succinct ordinal trees with level-ancestor queries. ACM Transactions on Algorithms 2, 4, 510--534. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. A. Golynski, R. Grossi, A. Gupta, R. Raman, and S. S. Rao. 2007. On the size of succinct indices. In Proceedings of the 15th Annual European Symposium on Algorithms (ESA). LNCS 4698. 371--382. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. R. González and G. Navarro. 2008. Rank/select on dynamic compressed sequences and applications. Theoretical Computer Science 410, 4414--4422. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. R. Grossi, A. Gupta, and J. S. Vitter. 2003. High-order entropy-compressed text indexes. In Proceedings of the 14th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA). 841--850. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. M. He and I. Munro. 2010. Succinct representations of dynamic strings. In Proceedings of the 17th International Symposium on String Processing and Information Retrieval (SPIRE). LNCS 6393. 334--346. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. M. He, J. I. Munro, and S. S. Rao. 2007. Succinct ordinal trees based on tree covering. In Proceedings of the 34th International Colloquium on Automata, Languages and Programming (ICALP). LNCS 4596. 509--520. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. W. K. Hon, K. Sadakane, and W. K. Sung. 2009. Breaking a time-and-space barrier in constructing full-text indices. SIAM Journal on Computing 38, 6, 2162--2178. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. G. Jacobson. 1989. Space-efficient static trees and graphs. In Proceedings of the 30th IEEE Annual Symposium on Foundations of Computer Science (FOCS). 549--554. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. J. Jansson, K. Sadakane, and W.-K. Sung. 2012. Ultra-succinct representation of ordered trees with applications. Journal of Computer and Systems Sciences 78, 2, 619--631. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. S. Joannou and R. Raman. 2012. Dynamizing succinct tree representations. In Proceedings of the 11th International Symposium on Experimental Algorithms (SEA). 224--235. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. H.-I. Lu and C.-C. Yeh. 2008. Balanced parentheses strike back. ACM Transactions on Algorithms 4, 3, Article 28. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. V. Mäkinen and G. Navarro. 2007. Rank and select revisited and extended. Theoretical Computer Science 387, 3, 332--347. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. V. Mäkinen and G. Navarro. 2008. Dynamic entropy-compressed sequences and full-text indexes. ACM Transactions on Algorithms 4, 3, Article 32. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. G. Manzini. 2001. An analysis of the Burrows-Wheeler transform. Journal of the ACM 48, 3, 407--430. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. J. I. Munro. 1986. An implicit data structure supporting insertion, deletion, and search in O(log n) time. Journal of Computer and Systems Sciences 33, 1, 66--74. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. J. I. Munro. 1996. Tables. In Proceedings of the 16th Conference on Foundations of Software Technology and Computer Science (FSTTCS). LNCS 1180. 37--42. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. J. I. Munro and V. Raman. 2001. Succinct representation of balanced parentheses and static trees. SIAM Journal on Computing 31, 3, 762--776. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. J. I. Munro, V. Raman, and S. S. Rao. 2001a. Space efficient suffix trees. Journal of Algorithms 39, 2, 205--222. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. J. I. Munro, V. Raman, and A. J. Storm. 2001b. Representing dynamic binary trees succinctly. In Proceedings of the 15th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA). 529--536. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. J. I. Munro and S. S. Rao. 2004. Succinct representations of functions. In Proceedings of the 31th International Colloquium on Automata, Languages and Programming (ICALP). LNCS 3142. 1006--1015.Google ScholarGoogle Scholar
  46. G. Navarro. 2012. Wavelet trees for all. In Proceedings of the 23rd Annual Symposium on Combinatorial Pattern Matching (CPM). LNCS 7354. 2--26. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. G. Navarro and Y. Nekrich. 2012. Optimal dynamic sequence representations. CoRR abs/1206.6982v1.Google ScholarGoogle Scholar
  48. D. Okanohara and K. Sadakane. 2009. A linear-time Burrows-Wheeler transform using induced sorting. In Proceedings of the 16th International Symposium on String Processing and Information Retrieval (SPIRE). LNCS 5721. 90--101. Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. R. Pagh. 2001. Low redundancy in static dictionaries with constant query time. SIAM Journal on Computing 31, 2, 353--363. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. M. Patrascu. 2007. Lower bounds for 2-dimensional range counting. In Proceedings of the 39th Annual ACM Symposium on Theory of Computing (STOC). 40--46. Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. M. Pǎtraşcu and E. D. Demaine. 2006. Logarithmic lower bounds in the cell-probe model. SIAM Journal on Computing 35, 4, 932--963. Google ScholarGoogle ScholarDigital LibraryDigital Library
  52. M. Pătraşcu and M. Thorup. 2006. Time-space trade-offs for predecessor search. In Proceedings of the 38th Annual ACM Symposium on Theory of Computing (STOC). 232--240. Google ScholarGoogle ScholarDigital LibraryDigital Library
  53. M. Pǎtraşcu and E. Viola. 2010. Cell-probe lower bounds for succinct partial sums. In Proceedings of the 21st ACM-SIAM Symposium on Discrete Algorithms (SODA). 117--122. Google ScholarGoogle ScholarDigital LibraryDigital Library
  54. M. Pǎtraşcu. 2008. Succincter. In Proceedings of the 49th IEEE Annual Symposium on Foundations of Computer Science (FOCS). 305--313. Google ScholarGoogle ScholarDigital LibraryDigital Library
  55. R. Raman, V. Raman, and S. S. Rao. 2001. Succinct dynamic data structures. In Proceedings of the 7th Annual Workshop on Algorithms and Data Structures (WADS). LNCS 2125. 426--437. Google ScholarGoogle ScholarDigital LibraryDigital Library
  56. R. Raman, V. Raman, and S. S. Rao. 2007. Succinct indexable dictionaries with applications to encoding k-ary trees, prefix sums and multisets. ACM Transactions on Algorithms 3, 4, Article 8. Google ScholarGoogle ScholarDigital LibraryDigital Library
  57. R. Raman and S. S. Rao. 2003. Succinct dynamic dictionaries and trees. In Proceedings of the 30th International Colloquium on Automata, Languages and Programming (ICALP). LNCS 2719. 357--368. Google ScholarGoogle ScholarDigital LibraryDigital Library
  58. K. Sadakane. 2002. Succinct representations of lcp information and improvements in the compressed suffix arrays. In Proceedings of the 13th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA). 225--232. Google ScholarGoogle ScholarDigital LibraryDigital Library
  59. K. Sadakane. 2007a. Compressed suffix trees with full functionality. Theory of Computing Systems 41, 4, 589--607. Google ScholarGoogle ScholarDigital LibraryDigital Library
  60. K. Sadakane. 2007b. Succinct data structures for flexible text retrieval systems. Journal of Discrete Algorithms 5, 12--22. Google ScholarGoogle ScholarDigital LibraryDigital Library
  61. K. Sadakane and G. Navarro. 2010. Fully-functional succinct trees. In Proceedings of the 21st Annual ACM-SIAM Symposium on Discrete Algorithms (SODA). 134--149. Google ScholarGoogle ScholarDigital LibraryDigital Library
  62. J. Vuillemin. 1980. A unifying look at data structures. Communications of the ACM 23, 4, 229--239. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Fully Functional Static and Dynamic Succinct Trees

            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 10, Issue 3
              June 2014
              176 pages
              ISSN:1549-6325
              EISSN:1549-6333
              DOI:10.1145/2620785
              Issue’s Table of Contents

              Copyright © 2014 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 May 2014
              • Revised: 1 September 2012
              • Accepted: 1 September 2012
              • Received: 1 August 2011
              Published in talg Volume 10, Issue 3

              Permissions

              Request permissions about this article.

              Request Permissions

              Check for updates

              Qualifiers

              • research-article
              • Research
              • Refereed

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader