Advertisement

A new algorithm for the ordered tree inclusion problem

  • Thorsten Richter
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1264)

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

Keywords

Target Tree Suitable Candidate Parse Tree Label Tree Mapping Range 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    M. Dubiner, Z. Galil and E. Magen, Faster Tree Pattern Matching, Proc. 31st FOCS (1990), pp. 145–150.Google Scholar
  2. 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. 3.
    C. M. Hoffman and M. J. O'Donnell, Pattern Matching in Trees, JACM 29 (1982), pp. 68–95.Google Scholar
  4. 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. 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. 6.
    P. Kilpeläinen and H. Mannila, Query Primitives for Tree-Structured Data, Proc. 5th CPM (1994), pp. 213–225.Google Scholar
  7. 7.
    P. Kilpeläinen and H. Mannila, Ordered and Unordered Tree Inclusion, SIAM J. Comput. 24 (1995), pp. 340–356.Google Scholar
  8. 8.
    D. E. Knuth, The Art of Computer Programming, Vol. 1, Addison-Wesley, Reading, MA, 1969, p. 347.Google Scholar
  9. 9.
    S. R. Kosaraju, Efficient Tree Pattern Matching, Proc. 30th FOCS (1989), pp. 178–183.Google Scholar
  10. 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

Copyright information

© Springer-Verlag Berlin Heidelberg 1997

Authors and Affiliations

  • Thorsten Richter
    • 1
  1. 1.Department of Computer Science IVUniversity of BonnBonnGermany

Personalised recommendations