Skip to main content

Tree Compression Using String Grammars

  • Conference paper
  • First Online:
LATIN 2016: Theoretical Informatics (LATIN 2016)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 9644))

Included in the following conference series:

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.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 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

  1. Akutsu, T.: A bisection algorithm for grammar-based compression of ordered trees. Inf. Process. Lett. 110(18–19), 815–820 (2010)

    Article  MathSciNet  MATH  Google Scholar 

  2. 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)

    Article  MathSciNet  MATH  Google Scholar 

  3. 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)

    Article  MathSciNet  MATH  Google Scholar 

  4. 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)

    Chapter  Google Scholar 

  5. Bille, P., Gørtz, I.L., Landau, G.M., Weimann, O.: Tree compression with top trees. Inform. Comput. 243, 166–177 (2015)

    Article  MathSciNet  MATH  Google Scholar 

  6. 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)

    Article  MathSciNet  MATH  Google Scholar 

  7. Busatto, G., Lohrey, M., Maneth, S.: Efficient memory representation of XML document trees. Inform. Syst. 33(4–5), 456–474 (2008)

    Article  MATH  Google Scholar 

  8. Buss, S.R.: The boolean formula value problem is in ALOGTIME. In: Proceedings of STOC 1987, pp. 123–131. ACM Press (1987)

    Google Scholar 

  9. 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)

    Article  MathSciNet  MATH  Google Scholar 

  10. 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/

  11. 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)

    Chapter  Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

  13. 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

  14. Ganardi, M., Hucke, D., Lohrey, M., Noeth, E.: Tree compression using string grammars. arXiv.org (2014). arxiv.org/abs/1504.05535

  15. 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)

    Chapter  Google Scholar 

  16. Jacobson, G.: Space-efficient static trees and graphs. In: Proceedings of FOCS 1989, pp. 549–554. IEEE Computer Society (1989)

    Google Scholar 

  17. 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 

  18. 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)

    Chapter  Google Scholar 

  19. 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)

    Google Scholar 

  20. Kobayashi, N., Matsuda, K., Shinohara, A.: Functional programs as compressed data. In: Proceedings of PEPM 2012, pp. 121–130. ACM Press (2012)

    Google Scholar 

  21. Lohrey, M.: On the parallel complexity of tree automata. In: Middeldorp, A. (ed.) RTA 2001. LNCS, vol. 2051, pp. 201–215. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  22. Lohrey, M.: Leaf languages and string compression. Inform. Comput. 209(6), 951–965 (2011)

    Article  MathSciNet  MATH  Google Scholar 

  23. Lohrey, M.: The Compressed Word Problem for Groups. Springer, New York (2014)

    Book  MATH  Google Scholar 

  24. Lohrey, M.: Grammar-based tree compression. In: Potapov, I. (ed.) DLT 2015. LNCS, vol. 9168, pp. 46–57. Springer, Heidelberg (2015)

    Chapter  Google Scholar 

  25. 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 

  26. Rytter, W.: Application of Lempel-Ziv factorization to the approximation of grammar-based compression. Theor. Comput. Sci. 302(1–3), 211–222 (2003)

    Article  MathSciNet  MATH  Google Scholar 

  27. Schmidt-Schauß, M.: Linear compressed pattern matching for polynomial rewriting. In: Proceedings of TERMGRAPH 2013. EPTCS, vol. 110, pp. 29–40 (2013)

    Google Scholar 

  28. Storer, J.A., Szymanski, T.G.: The macro model for data compression. In: Proceedings of STOC 1978, pp. 30–39. ACM (1978)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Moses Ganardi .

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics