Skip to main content
Log in

Succinct Dynamic Cardinal Trees

  • Published:
Algorithmica Aims and scope Submit manuscript

Abstract

Cardinal trees (or tries of degree \(k\)) are a fundamental data structure, in particular for many text-processing algorithms. Each node in a cardinal tree has at most \(k\) children, each labeled with a symbol from the alphabet \(\{1,\ldots , k\}\). In this paper we introduce succinct representations for dynamic cardinal trees on \(n\) nodes, requiring \(2n + n\lg {k} + o(n\lg {k})\) bits of space. These are the first dynamic cardinal tree representations that support a (fairly) complete set of operations while using almost optimal space. For \(k= \mathcal {O}(\mathrm{polylog}(n))\), we show how the navigational and query operations on the tree can be supported in \(\mathcal {O}(1)\) time, while supporting insertions and deletions of leaves in \(\mathcal {O}(1)\) amortized time. For \(k= \omega ({\mathrm{polylog}(n)})\) [and \(\mathcal {O}(n)\)], we show that the same set of operations can be supported in \(\mathcal {O}(\lg {k}/\lg {\lg {k}})\) time (amortized in the case of insertions/deletions). We also show how to associate \(b\)-bit satellite data to the tree nodes using \(bn+o(n)\) extra bits. Finally, we show how the machinery introduced for dynamic cardinal trees can be adapted to represent dynamic binary trees using \(2n+o(n)\) bits of space, so that the tree operations are supported in \(\mathcal {O}(1)\) time (amortized in the case of insert/delete operations). We support adding satellite data to the tree nodes using \(bn+o(n)\) extra bits [(vs. \(bn+o(bn)\) extra bits of the fastest previous dynamic representation from the literature], while providing several trade-offs for accessing/modifying the data.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Apostolico, A.: The myriad virtues of subword trees. In: Apostolico, A., Galil, Z. (eds.) Combinatorial Algorithms on Words. NATO ISI Series, pp. 85–96. Springer, Berlin (1985)

  2. Arroyuelo, D.: An improved succinct representation for dynamic k-ary trees. In: Proceedings of 19th Annual Symposium on Combinatorial Pattern Matching (CPM), vol. 5029 of Lecture Notes in Computer Science, pp. 277–289. Springer, Berlin (2008)

  3. Arroyuelo D., Cánovas, R., Navarro, G., Sadakane, K.: Succinct trees in practice. In: Proceedings of 11th Workshop on Algorithm Engineering and Experiments (ALENEX), pp. 84–97. SIAM (2010)

  4. Arroyuelo, D., Navarro, G.: Space-efficient construction of Lempel–Ziv compressed text indexes. Inf. Comput. 209(7), 1070–1102 (2011)

    Article  MathSciNet  MATH  Google Scholar 

  5. Bender, M., Farach-Colton, M.: The level ancestor problem simplified. Theor. Comput. Sci. 321(1), 5–12 (2004)

    Article  MathSciNet  MATH  Google Scholar 

  6. Bender, M., Farach-Colton, M., Pemmasani, G., Skiena, S., Sumazin, P.: Lowest common ancestors in trees and directed acyclic graphs. J. Algorithms 57(2), 75–94 (2005)

    Article  MathSciNet  MATH  Google Scholar 

  7. Benoit, D., Demaine, E., Munro, J.I., Raman, R., Raman, V., Rao, S.S.: Representing trees of higher degree. Algorithmica 43(4), 275–292 (2005)

    Article  MathSciNet  MATH  Google Scholar 

  8. Brodnik, A., Carlsson, S., Demaine, E., Munro, J.I., Sedgewick, R.: Resizable arrays in optimal time and space. In: Proceedings of 6th International Workshop on Algorithms and Data Structures (WADS), vol. 1663 of Lecture Notes in Computer Science, pp. 37–48. Springer (1999)

  9. Chan, H.-L., Hon, W.-K., Lam, T.-W., Sadakane, K.: Compressed indexes for dynamic text collections. ACM Trans. Algorithms 3(2), article 21 (2007)

  10. Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 3rd edn. MIT Press, Cambridge (2009)

    MATH  Google Scholar 

  11. Darragh, J., Cleary, J., Witten, I.: Bonsai: a compact representation of trees. Softw. Pract. Exp. 23(3), 277–291 (1993)

    Article  Google Scholar 

  12. Davoodi, P., Rao, S.S.: Succinct dynamic cardinal trees with constant time operations for small alphabet. In: Proceedings of 8th Annual Conference on Theory and Applications of Models of Computation (TAMC), vol. 6648 of Lecture Notes in Computer Science, pp. 195–205. Springer (2011)

  13. Farzan, A., Munro, J.I.: Succinct representation of dynamic trees. Theor. Comput. Sci. 412, 2668–2678 (2011)

    Article  MathSciNet  MATH  Google Scholar 

  14. Farzan, A., Raman, R., Rao, S.S.: Universal succinct representations of trees? In: Proceedings of 36th International Colloquium on Automata, Languages and Programming (ICALP), vol. 5555 of Lecture Notes in Computer Science, pp. 451–462. Springer (2009)

  15. Ferragina, P., Luccio, F., Manzini, G., Muthukrishnan, S.: Compressing and indexing labeled trees, with applications. J. ACM 57(1), Article 4 (2009)

  16. Ferragina, P., Manzini, G., Mäkinen, V., Navarro, G.: Compressed representations of sequences and full-text indexes. ACM Trans. Algorithms 3(2), article 20 (2007)

  17. Fredman, M.L.: The complexity of maintaining an array and computing its partial sums. J. ACM 29(1), 250–260 (1982)

    Article  MathSciNet  MATH  Google Scholar 

  18. Geary, R., Raman, R., Raman, V.: Succinct ordinal trees with level-ancestor queries. ACM Trans. Algorithms 2(4), 510–534 (2006)

    Article  MathSciNet  Google Scholar 

  19. Graham, R.L., Knuth, D.E., Patashnik, O.: Concrete Mathematics—a Foundation for Computer Science, 2nd edn. Addison-Wesley, Reading (1994)

    MATH  Google Scholar 

  20. Hon, W.-K., Sadakane, K., Sung, W.-K.: Succinct data structures for searchable partial sums with optimal worst-case performance. Theor. Comput. Sci. 412(39), 5176–5186 (2011)

    Article  MathSciNet  MATH  Google Scholar 

  21. Jacobson, G. Space-efficient static trees and graphs. In: Proceedings of 30th Annual Symposium on Foundations of Computer Science (FOCS), pp. 549–554. IEEE Computer Society (1989)

  22. Jansson, J., Sadakane, K., Sung, W.-K.: Linked dynamic tries with applications to LZ-compression in sublinear time and space. Algorithmica (2013). doi:10.1007/s00453-013-9836-6

  23. Jansson, J., Sadakane, K., Sung, W.-K.: Ultra-succinct representation of ordered trees with applications. J. Comput. Syst. Sci. 78(2), 619–631 (2012)

    Article  MathSciNet  MATH  Google Scholar 

  24. Joannou, S., Raman, R.: Dynamizing succinct tree representations. In: Proceedings of 11th International Symposium on Experimental Algorithms (SEA), vol. 7276 of Lecture Notes in Computer Science, pp. 224–235. Springer (2012)

  25. Lu, H.-I., Yeh, C.-C.: Balanced parentheses strike back. ACM Trans. Algorithms 4(3), 28:1–28:13 (2008)

  26. Manzini, G.: An analysis of the Burrows–Wheeler transform. J. ACM 48(3), 407–430 (2001)

    Article  MathSciNet  Google Scholar 

  27. Munro, J.I., Raman, V.: Succinct representation of balanced parentheses and static trees. SIAM J. Comput. 31(3), 762–776 (2001)

    Article  MathSciNet  MATH  Google Scholar 

  28. Munro, J.I., Raman, V., Storm, A.J.: Representing dynamic binary trees succinctly. In: Proceedings of 12th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 529–536. ACM/SIAM (2001)

  29. Navarro, G., Nekrich, Y.: Optimal dynamic sequence representations. SIAM J. Comput. 43(5), 1781–1806 (2014)

    Article  MathSciNet  MATH  Google Scholar 

  30. Navarro, G., Sadakane, K.: Fully-functional static and dynamic succinct trees. ACM Trans. Algorithms 10(3), article 16 (2014)

  31. Raman, R., Raman, V., Rao, S.S.: Succinct dynamic data structures. In: Proceedings of 7th International Workshop on Algorithms and Data Structures (WADS), vol. 2125 of Lecture Notes in Computer Science, pp. 426–437. Springer (2001)

  32. Raman, R., Raman, V., Rao, S.S.: Succinct indexable dictionaries with applications to encoding k-ary trees, prefix sums and multisets. ACM Trans. Algorithms 3(4), Article 43 (2009)

  33. Raman, R., Rao, S.S.: Succinct dynamic dictionaries and trees. In: Proceedings of 30th International Colloquium on Automata, Languages and Programming (ICALP), vol. 2719 of Leture Notes in Computer Science, pp. 357–368. Springer (2003)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Diego Arroyuelo.

Additional information

Preliminary versions of this paper appeared in Proceedings of 19th Annual Symposium on Combinatorial Pattern Matching (CPM 2008), LNCS 5029, pp. 277–289, and Proceedings of 8th Annual Conference on Theory and Applications of Models of Computation (TAMC 2011), LNCS 6648, pp. 195–205.

Diego Arroyuelo: Research partly supported by FONDECYT Grant 11121556. Pooya Davoodi: research supported by NSF Grant CCF-1018370, BSF Grant 2010437, and Center for Massive Data Algorithmics, a Center of the Danish National Research Foundation. Srinivasa Rao Satti: research partly supported by Basic Science Research Program through the National Research Foundation of Korea (NRF) funded by the Ministry of Education, Science and Technology, Grant Number 2012-0008241.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Arroyuelo, D., Davoodi, P. & Satti, S.R. Succinct Dynamic Cardinal Trees. Algorithmica 74, 742–777 (2016). https://doi.org/10.1007/s00453-015-9969-x

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00453-015-9969-x

Keywords

Navigation