A Linear-Space Top-Down Algorithm for Tree Inclusion Problem

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

Full description

Saved in:
Bibliographic Details
Published in2012 International Conference on Computer Science and Service System pp. 85 - 89
Main Authors Yangjun Chen, Yibin Chen
Format Conference Proceeding
LanguageEnglish
Published IEEE 01.08.2012
Subjects
Online AccessGet full text

Cover

Loading…
More Information
Summary: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{D T , |leaves(T)|} + |T| + |P|) space, where leaves(T) (resp. leaves(P)) stands for the set of the leaves of T (resp. P), and D T (resp. D P ) 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.
ISBN:9781467307215
1467307211
DOI:10.1109/CSSS.2012.30