Tree Template Matching in Ranked Ordered Trees by Pushdown Automata

  • Tomáš Flouri
  • Jan Janoušek
  • Bořivoj Melichar
  • Costas S. Iliopoulos
  • Solon P. Pissis
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6807)

Abstract

We consider the problem of tree template matching in ranked ordered trees, and propose a solution based on the bottom-up technique. Specifically, we transform the tree pattern matching problem to a string matching problem, by transforming the tree template and the subject tree to strings representing their postfix notation, and then use pushdown automata as the computational model. The method is analogous to the construction of string pattern matchers. The given tree template is preprocessed once, by constructing a nondeterministic pushdown automaton, which is then transformed to the equivalent deterministic one. Although we prove that the space required for preprocessing is exponential to the size of the tree template in the general case, the space required for a specific class of tree templates is linear. The time required for the searching phase is linear to the size of the subject tree in both cases.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Aho, A.V., Ganapathi, M.: Efficient tree pattern matching (extended abstract): an aid to code generation. In: POPL, pp. 334–340. ACM, New York (1985)Google Scholar
  2. 2.
    Chase, D.R.: An improvement to bottom-up tree pattern matching. In: POPL 1987, pp. 168–177. ACM, New York (1987)Google Scholar
  3. 3.
    Cleophas, L.G.W.A.: Tree Algorithms: Two Taxonomies and a Toolkit. Ph.D. thesis, Eindhoven University of Technology (April 2008)Google Scholar
  4. 4.
    Crochemore, M., Rytter, W.: Jewels of Stringology. World Scientific, Singapore (1994)MATHGoogle Scholar
  5. 5.
    Flouri, T., Janoušek, J., Melichar, B.: Subtree matching by pushdown automata. Computer Science and Information Systems 7, 331–358 (2010)CrossRefGoogle Scholar
  6. 6.
    Fraser, C.W., Henry, R.R., Proebsting, T.A.: Burg: fast optimal instruction selection and tree parsing. SIGPLAN Notices 27(4), 68–76 (1992)CrossRefGoogle Scholar
  7. 7.
    Glanville, R.S., Graham, S.L.: A new method for compiler code generation. In: POPL, pp. 231–240 (1978)Google Scholar
  8. 8.
    Hoffmann, C.M., O’Donnell, M.J.: Pattern matching in trees. J. ACM 29, 68–95 (1982)MathSciNetCrossRefMATHGoogle Scholar
  9. 9.
    Janoušek, J., Melichar, B.: On regular tree languages and deterministic pushdown automata. Acta Informatica 46, 533–547 (2009)MathSciNetCrossRefMATHGoogle Scholar
  10. 10.
    Kuboyama, T.: Matching and Learning in Trees. Phd thesis (2007)Google Scholar
  11. 11.
    Mauri, G., Pavesi, G.: Algorithms for pattern matching and discovery in rna secondary structure. Theor. Comput. Sci. 335(1), 29–51 (2005)MathSciNetCrossRefMATHGoogle Scholar
  12. 12.
    Melichar, B.: Arbology: Trees and pushdown automata. In: Dediu, A.-H., Fernau, H., Martín-Vide, C. (eds.) LATA 2010. LNCS, vol. 6031, pp. 32–49. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  13. 13.
    Nowotka, D., Srba, J.: Height-deterministic pushdown automata. In: Kučera, L., Kučera, A. (eds.) MFCS 2007. LNCS, vol. 4708, pp. 125–134. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  14. 14.
    Shankar, P., Gantait, A., Yuvaraj, A.R., Madhavan, M.: A new algorithm for linear regular tree pattern matching. Theor. Comput. Sci. 242(1-2), 125–142 (2000)MathSciNetCrossRefMATHGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Tomáš Flouri
    • 1
  • Jan Janoušek
    • 1
  • Bořivoj Melichar
    • 1
  • Costas S. Iliopoulos
    • 2
    • 3
  • Solon P. Pissis
    • 2
  1. 1.Dept. of Theoretical Computer Science, Faculty of Information TechnologyCzech Technical University in PragueCzech Republic
  2. 2.Dept. of InformaticsKing’s College LondonLondonUK
  3. 3.DEBIICurtin University of TechnologyPerthAustralia

Personalised recommendations