Title :
A Linear-Space Top-Down Algorithm for Tree Inclusion Problem
Author :
Chen, Yangjun ; Chen, Yibin
Author_Institution :
Dept. Appl. Comput. Sci., Univ. of Winnipeg, Winnipeg, MB, Canada
Abstract :
We consider the following tree-matching problem: Given labeled, ordered trees P and T, can P be obtained from T by deleting nodes? Deleting a node v entails removing all edges incident to v and, if v has a parent u, replacing the edges from u to v by edges from u to the children of v. The best known algorithm for this problem needs O(|T|·|leaves(P)|) time and O(|leaves(P)|·min{DT, |leaves(T)|} + |T| + |P|) space, where leaves(T) (resp. leaves(P)) stands for the set of the leaves of T (resp. P), and DT (resp. DP) for the height of T (resp. P). In this paper, we present an efficient algorithm that requires O(|T|.|leaves(P)|) time and O(|T| + |P|) space.
Keywords :
computational complexity; pattern matching; trees (mathematics); linear-space top-down algorithm; tree inclusion problem; tree matching problem; Algorithm design and analysis; Computer science; Data structures; Heuristic algorithms; Pattern matching; Vegetation; tree embedding; tree inclusion; tree matching;
Conference_Titel :
Computer Science & Service System (CSSS), 2012 International Conference on
Conference_Location :
Nanjing
Print_ISBN :
978-1-4673-0721-5
DOI :
10.1109/CSSS.2012.30