Skip to main content

Tree Template Matching in Ranked Ordered Trees by Pushdown Automata

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNTCS,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.

This research has been partially supported by the Ministry of Education, Youth and Sports of Czech Republic under research program MSM 6840770014, and by the Czech Science Foundation as project No. 201/09/0807.

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

Buying options

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

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  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. Chase, D.R.: An improvement to bottom-up tree pattern matching. In: POPL 1987, pp. 168–177. ACM, New York (1987)

    Google Scholar 

  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. Crochemore, M., Rytter, W.: Jewels of Stringology. World Scientific, Singapore (1994)

    MATH  Google Scholar 

  5. Flouri, T., Janoušek, J., Melichar, B.: Subtree matching by pushdown automata. Computer Science and Information Systems 7, 331–358 (2010)

    Article  Google Scholar 

  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)

    Article  Google Scholar 

  7. Glanville, R.S., Graham, S.L.: A new method for compiler code generation. In: POPL, pp. 231–240 (1978)

    Google Scholar 

  8. Hoffmann, C.M., O’Donnell, M.J.: Pattern matching in trees. J. ACM 29, 68–95 (1982)

    Article  MathSciNet  MATH  Google Scholar 

  9. Janoušek, J., Melichar, B.: On regular tree languages and deterministic pushdown automata. Acta Informatica 46, 533–547 (2009)

    Article  MathSciNet  MATH  Google Scholar 

  10. Kuboyama, T.: Matching and Learning in Trees. Phd thesis (2007)

    Google Scholar 

  11. Mauri, G., Pavesi, G.: Algorithms for pattern matching and discovery in rna secondary structure. Theor. Comput. Sci. 335(1), 29–51 (2005)

    Article  MathSciNet  MATH  Google Scholar 

  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)

    Chapter  Google Scholar 

  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)

    Chapter  Google Scholar 

  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)

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2011 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Flouri, T., Janoušek, J., Melichar, B., Iliopoulos, C.S., Pissis, S.P. (2011). Tree Template Matching in Ranked Ordered Trees by Pushdown Automata. In: Bouchou-Markhoff, B., Caron, P., Champarnaud, JM., Maurel, D. (eds) Implementation and Application of Automata. CIAA 2011. Lecture Notes in Computer Science, vol 6807. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-22256-6_25

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-22256-6_25

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-22255-9

  • Online ISBN: 978-3-642-22256-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics