On the top-down evaluation of tree inclusion problem

Yangjun Chen, Yibin Chen · International Journal of Information Technology Communications and Convergence · 2011

We consider the following tree-matching problem: Given labelled, 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 a new algorithm that requires O('T'•'leaves(P)') time but only O('T' + 'P') space.

Read the paper · More papers on PaperTik