Tree Compression Using String Grammars

  • Moses Ganardi
  • Danny Hucke
  • Markus Lohrey
  • Eric Noeth
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9644)

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.

References

  1. 1.
    Akutsu, T.: A bisection algorithm for grammar-based compression of ordered trees. Inf. Process. Lett. 110(18–19), 815–820 (2010)MathSciNetCrossRefMATHGoogle Scholar
  2. 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)MathSciNetCrossRefMATHGoogle Scholar
  3. 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)MathSciNetCrossRefMATHGoogle Scholar
  4. 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)CrossRefGoogle Scholar
  5. 5.
    Bille, P., Gørtz, I.L., Landau, G.M., Weimann, O.: Tree compression with top trees. Inform. Comput. 243, 166–177 (2015)MathSciNetCrossRefMATHGoogle Scholar
  6. 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)MathSciNetCrossRefMATHGoogle Scholar
  7. 7.
    Busatto, G., Lohrey, M., Maneth, S.: Efficient memory representation of XML document trees. Inform. Syst. 33(4–5), 456–474 (2008)CrossRefMATHGoogle Scholar
  8. 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. 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)MathSciNetCrossRefMATHGoogle Scholar
  10. 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. 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)CrossRefGoogle Scholar
  12. 12.
    Ferragina, P., Luccio, F., Manzini, G., Muthukrishnan, S.: Compressing and indexing labeled trees, with applications. J. ACM 57(1), 4 (2009)MathSciNetCrossRefMATHGoogle Scholar
  13. 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. 14.
    Ganardi, M., Hucke, D., Lohrey, M., Noeth, E.: Tree compression using string grammars. arXiv.org (2014). arxiv.org/abs/1504.05535
  15. 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)CrossRefGoogle Scholar
  16. 16.
    Jacobson, G.: Space-efficient static trees and graphs. In: Proceedings of FOCS 1989, pp. 549–554. IEEE Computer Society (1989)Google Scholar
  17. 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)MathSciNetCrossRefMATHGoogle Scholar
  18. 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)CrossRefGoogle Scholar
  19. 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. 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. 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)CrossRefGoogle Scholar
  22. 22.
    Lohrey, M.: Leaf languages and string compression. Inform. Comput. 209(6), 951–965 (2011)MathSciNetCrossRefMATHGoogle Scholar
  23. 23.
    Lohrey, M.: The Compressed Word Problem for Groups. Springer, New York (2014)CrossRefMATHGoogle Scholar
  24. 24.
    Lohrey, M.: Grammar-based tree compression. In: Potapov, I. (ed.) DLT 2015. LNCS, vol. 9168, pp. 46–57. Springer, Heidelberg (2015)CrossRefGoogle Scholar
  25. 25.
    Munro, J.I., Raman, V.: Succinct representation of balanced parentheses and static trees. SIAM J. Comput. 31(3), 762–776 (2001)MathSciNetCrossRefMATHGoogle Scholar
  26. 26.
    Rytter, W.: Application of Lempel-Ziv factorization to the approximation of grammar-based compression. Theor. Comput. Sci. 302(1–3), 211–222 (2003)MathSciNetCrossRefMATHGoogle Scholar
  27. 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. 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

Copyright information

© Springer-Verlag Berlin Heidelberg 2016

Authors and Affiliations

  • Moses Ganardi
    • 1
  • Danny Hucke
    • 1
  • Markus Lohrey
    • 1
  • Eric Noeth
    • 1
  1. 1.University of SiegenSiegenGermany

Personalised recommendations