Abstract
A linear space data structure for grammar-compressed trees is presented which allows to carry out tree traversal operations and subtree equality checks in constant time. A traversal step consists of moving to the parent or to the ith child of a node.
Similar content being viewed by others
References
Bender, M.A., Farach-Colton, M.: The LCA problem revisited. In: Proceedings of LATIN 2000. Lecture Notes in Computer Science, vol. 1776, pp. 88–94. Springer, Berlin (2000)
Bille, P., Gørtz, I.L., Landau, G.M., Weimann, O.: Tree compression with top trees. Inf. Comput. 243, 166–177 (2015)
Bille, P., Landau, G.M., Raman, R., Sadakane, K., Satti, S.R., Weimann, O.: Random access to grammar-compressed strings and trees. SIAM J. Comput. 44(3), 513–539 (2015)
Bousquet-Mélou, M., Lohrey, M., Maneth, S., Noeth, E.: XML compression via DAGs. Theory Comput. Syst. 57(4), 1322–1371 (2014)
Busatto, G., Lohrey, M., Maneth, S.: Efficient memory representation of XML document trees. Inf. Syst. 33(4–5), 456–474 (2008)
Cai, J., Paige, R.: Using multiset discrimination to solve language processing problems without hashing. Theor. Comput. Sci. 145(1&2), 189–228 (1995)
Charikar, M., Lehman, E., Lehman, A., Liu, D., Panigrahy, R., Prabhakaran, M., Sahai, A., Shelat, A.: The smallest grammar problem. IEEE Trans. Inf. Theory 51(7), 2554–2576 (2005)
Comon, H., Dauchet, M., Gilleron, R., Jacquemard, F., Lugiez, D., Löding, C., Tison, S., Tommasi, M.: Tree automata techniques and applications. http://tata.gforge.inria.fr/ (2007)
Delpratt, O., Raman, R., Rahman, N.: Engineering succinct DOM. In: Proceedings of EDBT. ACM International Conference Proceeding Series, vol. 261, pp. 49–60. ACM (2008)
Gasieniec, L., Kolpakov, R.M., Potapov, I., Sant, P.: Real-time traversal in grammar-based compressed files. In: Proceedings of DCC 2005, p. 458. IEEE Computer Society. Long version availabe at http://www.csc.liv.ac.uk/~leszek/papers/dcc05.ps.gz (2005)
Hübschle-Schneider, L., Raman, R.: Tree compression with top trees revisited. In: Proceedings of SEA 2015. Lecture Notes in Computer Science, vol. 9125, pp. 15–27. Springer, Berlin (2015). Long version available at arXiv:1506.04499
Hucke, D., Lohrey, M., Noeth, E.: Constructing small tree grammars and small circuits for formulas. In: Proceedings of FSTTCS 2014. LIPIcs, vol. 29, pp. 457–468. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2014)
Gusfield, D.: Algorithms on Strings, Trees, and Sequences—Computer Science and Computational Biology. Cambridge University Press, Cambridge (1997)
Jeż, A., Lohrey, M.: Approximation of smallest linear tree grammars. In: Proceedings of STACS 2014. LIPIcs, vol. 25, pp. 445–457. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2014)
Knuth, D.: The Art of Computer Programming. Fundamental Algorithms, vol. I. Addison-Wesley, Reading (1968)
Lohrey, M.: Algorithmics on SLP-compressed strings: a survey. Groups Complex. Cryptol. 4(2), 241–299 (2012)
Lohrey, M., Maneth, S.: The complexity of tree automata and XPath on grammar-compressed trees. Theor. Comput. Sci. 363(2), 196–210 (2006)
Lohrey, M., Maneth, S., Mennicke, R.: XML tree structure compression using RePair. Inf. Syst. 38(8), 1150–1167 (2013)
Lohrey, M., Maneth, S., Schmidt-Schauß, M.: Parameter reduction and automata evaluation for grammar-compressed trees. J. Comput. Syst. Sci. 78(5), 1651–1669 (2012)
Maneth, S., Sebastian, T.: Fast and tiny structural self-indexes for XML. CoRR (2010). arXiv:1012.5696
Maneth, S., Sebastian, T.: XPath node selection over grammar-compressed trees. In: Proceedings of TTATT 2013, Electronic Proceedings in Theoretical Computer Science, vol. 134, pp. 38–48 (2013)
Navarro, G., Sadakane, K.: Fully functional static and dynamic succinct trees. ACM Trans. Algorithms 10(3), 16 (2014)
Schieber, B., Vishkin, U.: On finding lowest common ancestors: simplification and parallelization. SIAM J. Comput. 17(6), 1253–1262 (1988)
Scwentick, T.: Automata for XML—a survey. J. Comput. Syst. Sci. 73(3), 289–315 (2007)
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Lohrey, M., Maneth, S. & Reh, C.P. Constant-Time Tree Traversal and Subtree Equality Check for Grammar-Compressed Trees. Algorithmica 80, 2082–2105 (2018). https://doi.org/10.1007/s00453-017-0331-3
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00453-017-0331-3