Parameter Reduction in Grammar-Compressed Trees

  • Markus Lohrey
  • Sebastian Maneth
  • Manfred Schmidt-Schauß
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5504)

Abstract

Trees can be conveniently compressed with linear straight-line context-free tree grammars. Such grammars generalize straight-line context-free string grammars which are widely used in the development of algorithms that execute directly on compressed structures (without prior decompression). It is shown that every linear straight-line context-free tree grammar can be transformed in polynomial time into a monadic (and linear) one. A tree grammar is monadic if each nonterminal uses at most one context parameter. Based on this result, a polynomial time algorithm is presented for testing whether a given nondeterministic tree automaton with sibling constraints accepts a tree given by a linear straight-line context-free tree grammar. It is shown that if tree grammars are nondeterministic or non-linear, then reducing their numbers of parameters cannot be done without an exponential blow-up in grammar size.

References

  1. 1.
    Bogaert, B., Tison, S.: Equality and disequality constraints on direct subterms in tree automata. In: Finkel, A., Jantzen, M. (eds.) STACS 1992. LNCS, vol. 577, pp. 161–171. Springer, Heidelberg (1992)CrossRefGoogle Scholar
  2. 2.
    Buneman, P., Grohe, M., Koch, C.: Path queries on compressed XML. In: VLDB 2003, pp. 141–152. Morgan Kaufmann, San Francisco (2003)Google Scholar
  3. 3.
    Busatto, G., Lohrey, M., Maneth, S.: Efficient memory representation of XML document trees. Information Systems 33(4–5), 456–474 (2008)CrossRefMATHGoogle Scholar
  4. 4.
    Comon-Lundh, H., Dauchet, M., Gilleron, R., Jacquemard, F., Löding, C., Lugiez, D., Tison, S., Tommasi, M.: Tree automata techniques and applications (2007), http://www.grappa.univ-lille3.fr/tata
  5. 5.
    Comon-Lundh, H., Jacquemard, F., Perrin, N.: Tree automata with memory, visibility and structural constraints. In: Seidl, H. (ed.) FOSSACS 2007. LNCS, vol. 4423, pp. 168–182. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  6. 6.
    Engelfriet, J., Rozenberg, G., Slutzki, G.: Tree transducers, L systems, and two-way machines. J. Comp. Syst. Sci. 20, 150–202 (1980)MathSciNetCrossRefMATHGoogle Scholar
  7. 7.
    Fischer, M.: Grammars with macro-like productions. PhD thesis, Harvard University, Massachusetts (May 1968)Google Scholar
  8. 8.
    Fujiyoshi, A., Kasai, T.: Spinal-formed context-free tree grammars. Theory Comput. Syst. 33(1), 59–83 (2000)MathSciNetCrossRefMATHGoogle Scholar
  9. 9.
    Gascón, A., Godoy, G., Schmidt-Schauß, M.: Context matching for compressed terms. In: LICS 2008, pp. 93–102. IEEE Computer Society Press, Los Alamitos (2008)Google Scholar
  10. 10.
    Levy, J., Schmidt-Schauß, M., Villaret, M.: Bounded second-order unification is NP-complete. In: Pfenning, F. (ed.) RTA 2006. LNCS, vol. 4098, pp. 400–414. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  11. 11.
    Lohrey, M., Maneth, S.: The complexity of tree automata and XPath on grammar-compressed trees. Theor. Comput. Sci. 363(2), 196–210 (2006)MathSciNetCrossRefMATHGoogle Scholar
  12. 12.
    Plandowski, W.: Testing equivalence of morphisms on context-free languages. In: van Leeuwen, J. (ed.) ESA 1994. LNCS, vol. 855, pp. 460–470. Springer, Heidelberg (1994)CrossRefGoogle Scholar
  13. 13.
    Rytter, W.: Grammar compression, LZ-encodings, and string algorithms with implicit input. In: Díaz, J., Karhumäki, J., Lepistö, A., Sannella, D. (eds.) ICALP 2004. LNCS, vol. 3142, pp. 15–27. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  14. 14.
    Schmidt-Schauß, M.: Polynomial equality testing for terms with shared substructures. Technical Report 21, Institut für Informatik, J. W. Goethe-Universität Frankfurt am Main (2005)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • Markus Lohrey
    • 1
  • Sebastian Maneth
    • 2
  • Manfred Schmidt-Schauß
    • 3
  1. 1.Institut für InformatikUniversität LeipzigGermany
  2. 2.NICTA and University of New South WalesAustralia
  3. 3.Institut für InformatikJohann Wolfgang Goethe-Universität FrankfurtGermany

Personalised recommendations