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(|ΣP|·|T| + #matches).
CITATION STYLE
Richter, T. (1997). A new algorithm for the ordered tree inclusion problem. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 1264, pp. 150–166). Springer Verlag. https://doi.org/10.1007/3-540-63220-4_57
Mendeley helps you to discover research relevant for your work.