Skip to main content

A new algorithm for the ordered tree inclusion problem

  • Conference paper
  • First Online:
Combinatorial Pattern Matching (CPM 1997)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1264))

Included in the following conference series:

Abstract

In the problem of ordered tree inclusion two ordered labeled trees P and T are given, and the pattern tree P matches the target tree T at a node x, if there exists a one-to-one map f from the nodes of P to the nodes of T which preserves the labels, the ancestor relation and the left-to-right ordering of the nodes. In [7] Kilpeläinen and Mannila give an algorithm that solves the problem of ordered tree inclusion in time and space Θ(∣P∣ · ∣T∣). In this paper we present a new algorithm for the ordered tree inclusion problem with time complexity O(∣Σ p ∣ · ∣T∣ +#matches · DEPTH(T)), where Σ p is the alphabet of the labels of the pattern tree and #matches is the number of pairs (v, w) ∈ P * T with LABEL(v)=LABEL(w). The space complexity of our algorithm is O ∣gS p ∣ · ∣T∣ + #matches).

This work was supported by the DFG under grant Bl 320-1

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. M. Dubiner, Z. Galil and E. Magen, Faster Tree Pattern Matching, Proc. 31st FOCS (1990), pp. 145–150.

    Google Scholar 

  2. G. H. Gonnet and F. Wm. Tompa, Mind your Grammar-a New Approach to Text Databases, Proc. of the Conf. on Very Large Databases 1987 (VLDB'87), pp. 339–346.

    Google Scholar 

  3. C. M. Hoffman and M. J. O'Donnell, Pattern Matching in Trees, JACM 29 (1982), pp. 68–95.

    Google Scholar 

  4. P. Kilpeläinen, G. Linden, H. Mannila and E. Nikunen, A Structured Document Database System, in R. Furuta (ed.), EP'90-Proc. of the Int. Conf. on Electronic Publishing, Document Manipulation & Typography, The Cambridge Series on Electronic Publishing, Cambridge University Press, 1990.

    Google Scholar 

  5. P. Kilpeläinen and H. Mannila, Retrieval from Hierarchical Texts by Partial Patterns, in R. Korfhage, E. Rasmussen and P. Willet (eds.), SIGIR '93-Proc. of the 16th Ann. Int. ACM SIGIR Conf. on Research and Development in Informational Retrieval 1993, pp. 214–222.

    Google Scholar 

  6. P. Kilpeläinen and H. Mannila, Query Primitives for Tree-Structured Data, Proc. 5th CPM (1994), pp. 213–225.

    Google Scholar 

  7. P. Kilpeläinen and H. Mannila, Ordered and Unordered Tree Inclusion, SIAM J. Comput. 24 (1995), pp. 340–356.

    Google Scholar 

  8. D. E. Knuth, The Art of Computer Programming, Vol. 1, Addison-Wesley, Reading, MA, 1969, p. 347.

    Google Scholar 

  9. S. R. Kosaraju, Efficient Tree Pattern Matching, Proc. 30th FOCS (1989), pp. 178–183.

    Google Scholar 

  10. K. Zhang and D. Shasha, Simple Fast Algorithms for the Editing Distance between Trees and Related Problems, SIAM J. Comput. 18 (1989), pp. 1245–1262.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Alberto Apostolico Jotun Hein

Rights and permissions

Reprints and permissions

Copyright information

© 1997 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Richter, T. (1997). A new algorithm for the ordered tree inclusion problem. In: Apostolico, A., Hein, J. (eds) Combinatorial Pattern Matching. CPM 1997. Lecture Notes in Computer Science, vol 1264. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-63220-4_57

Download citation

  • DOI: https://doi.org/10.1007/3-540-63220-4_57

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-63220-7

  • Online ISBN: 978-3-540-69214-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics