Abstract
We study the compressed representation of a ranked tree by a straight-line program (SLP) for its preorder traversal string, and compare it with the previously studied representation by straight-line context-free tree grammars (also known as tree straight-line programs or TSLPs). Although SLPs may be exponentially more succinct than TSLPs, we show that many simple tree queries can still be performed efficiently on SLPs, such as computing the height of a tree, tree navigation, or evaluation of Boolean expressions. Other problems like pattern matching and evaluation of tree automata become intractable.
The third and fourth author are supported by the DFG-project LO 748/10-1.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
In fact, there is a polynomial time algorithm that checks whether a TSLP-compressed pattern tree s occurs in a TSLP-compressed tree t [27]. But for this, it is important that every variable x occurs at most once in the pattern s. For the case that variables are allowed to occur repeatedly in the pattern, the precise complexity is open.
References
Akutsu, T.: A bisection algorithm for grammar-based compression of ordered trees. Inf. Process. Lett. 110(18–19), 815–820 (2010)
Allender, E., Bürgisser, P., Kjeldgaard-Pedersen, J., Miltersen, P.B.: On the complexity of numerical analysis. SIAM J. Comput. 38(5), 1987–2006 (2009)
Benoit, D., Demaine, E.D., Munro, J.I., Raman, R., Raman, V., Rao, S.S.: Representing trees of higher degree. Algorithmica 43(4), 275–292 (2005)
Bertoni, A., Choffrut, C., Radicioni, R.: Literal shuffle of compressed words. In: Ausiello, G., Karhumäki, J., Mauri, G., Ong, L. (eds.) Fifth IFIP International Conference on Theoretical Computer Scienc – TCS 2008. IFIP, vol. 273, pp. 87–100. Springer, Boston (2008)
Bille, P., Gørtz, I.L., Landau, G.M., Weimann, O.: Tree compression with top trees. Inform. 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)
Busatto, G., Lohrey, M., Maneth, S.: Efficient memory representation of XML document trees. Inform. Syst. 33(4–5), 456–474 (2008)
Buss, S.R.: The boolean formula value problem is in ALOGTIME. In: Proceedings of STOC 1987, pp. 123–131. ACM Press (1987)
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. tata.gforge.inria.fr/
Esparza, J., Luttenberger, M., Schlund, M.: A brief history of strahler numbers. In: Dediu, A.-H., MartÃn-Vide, C., Sierra-RodrÃguez, J.-L., Truthe, B. (eds.) LATA 2014. LNCS, vol. 8370, pp. 1–13. Springer, Heidelberg (2014)
Ferragina, P., Luccio, F., Manzini, G., Muthukrishnan, S.: Compressing and indexing labeled trees, with applications. J. ACM 57(1), 4 (2009)
Ganardi, M., Hucke, D., Jeż, A., Lohrey, M., Noeth, E.: Constructing small tree grammars and small circuits for formulas. arXiv.org (2014). arxiv.org/abs/1407.4286
Ganardi, M., Hucke, D., Lohrey, M., Noeth, E.: Tree compression using string grammars. arXiv.org (2014). arxiv.org/abs/1504.05535
Hübschle-Schneider, L., Raman, R.: Tree compression with top trees revisited. In: Bampis, E. (ed.) SEA 2015. LNCS, vol. 9125, pp. 15–27. Springer, Heidelberg (2015)
Jacobson, G.: Space-efficient static trees and graphs. In: Proceedings of FOCS 1989, pp. 549–554. IEEE Computer Society (1989)
Jansson, J., Sadakane, K., Sung, W.-K.: Ultra-succinct representation of ordered trees with applications. J. Comput. Syst. Sci. 78(2), 619–631 (2012)
Jeż, A.: Approximation of grammar-based compression via recompression. In: Fischer, J., Sanders, P. (eds.) CPM 2013. LNCS, vol. 7922, pp. 165–176. Springer, Heidelberg (2013)
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)
Kobayashi, N., Matsuda, K., Shinohara, A.: Functional programs as compressed data. In: Proceedings of PEPM 2012, pp. 121–130. ACM Press (2012)
Lohrey, M.: On the parallel complexity of tree automata. In: Middeldorp, A. (ed.) RTA 2001. LNCS, vol. 2051, pp. 201–215. Springer, Heidelberg (2001)
Lohrey, M.: Leaf languages and string compression. Inform. Comput. 209(6), 951–965 (2011)
Lohrey, M.: The Compressed Word Problem for Groups. Springer, New York (2014)
Lohrey, M.: Grammar-based tree compression. In: Potapov, I. (ed.) DLT 2015. LNCS, vol. 9168, pp. 46–57. Springer, Heidelberg (2015)
Munro, J.I., Raman, V.: Succinct representation of balanced parentheses and static trees. SIAM J. Comput. 31(3), 762–776 (2001)
Rytter, W.: Application of Lempel-Ziv factorization to the approximation of grammar-based compression. Theor. Comput. Sci. 302(1–3), 211–222 (2003)
Schmidt-Schauß, M.: Linear compressed pattern matching for polynomial rewriting. In: Proceedings of TERMGRAPH 2013. EPTCS, vol. 110, pp. 29–40 (2013)
Storer, J.A., Szymanski, T.G.: The macro model for data compression. In: Proceedings of STOC 1978, pp. 30–39. ACM (1978)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2016 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Ganardi, M., Hucke, D., Lohrey, M., Noeth, E. (2016). Tree Compression Using String Grammars. In: Kranakis, E., Navarro, G., Chávez, E. (eds) LATIN 2016: Theoretical Informatics. LATIN 2016. Lecture Notes in Computer Science(), vol 9644. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-49529-2_44
Download citation
DOI: https://doi.org/10.1007/978-3-662-49529-2_44
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-662-49528-5
Online ISBN: 978-3-662-49529-2
eBook Packages: Computer ScienceComputer Science (R0)