On the top-down evaluation of tree inclusion problem

نویسندگان

  • Yangjun Chen
  • Yibin Chen
چکیده

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.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Alternating Regular Tree Grammars in the Framework of Lattice-Valued Logic

In this paper, two different ways of introducing alternation for lattice-valued (referred to as {L}valued)  regular tree grammars and {L}valued top-down tree automata are compared. One is the way which defines the alternating regular tree grammar, i.e., alternation is governed by the non-terminals of the grammar and the other is the way which combines state with alternation. The first way is ta...

متن کامل

Automatic QoS-aware Web Services Composition based on Set-Cover Problem

By definition, web-services composition works on developing merely optimum coordination among a number of available web-services to provide a new composed web-service intended to satisfy some users requirements for which a single web service is not (good) enough. In this article, the formulation of the automatic web-services composition is proposed as several set-cover problems and an approxima...

متن کامل

A top down algorithm for constrained tree inclusion

An ordered labeled tree is a tree which nodes are labeled and in which the left-to-right order among siblings is significant. Given two ordered labeled trees P and T , the constrained tree inclusion problem is to determine whether it is possible to obtain P from T by deleting degree-one or degreetwo nodes. G. Valiente proposed a bottom up algorithm which solves the problem in O(|P ||T |) time a...

متن کامل

On the Tree Inclusion and Query Evaluation in Document Databases

In this paper, a method to evaluate queries in document databases is proposed. The main idea of this method is a new top-down algorithm for tree-inclusion. In fact, a path-oriented query can be considered as a pattern tree while an XML document can be considered as a target tree. To evaluate a query S against a document T, we will check whether S is included in T. For a query S, our algorithm n...

متن کامل

Introducing Cuts into Top-down Search: A New Way to Check Tree Inclusion

The ordered tree inclusion is an interesting problem, by which we will check whether a pattern tree P can be included in a target tree T, where the order of siblings in both P and T is significant. In this paper, we propose an efficient algorithm for this problem. Its time complexity is bounded by O(|T|loghP) with O(|T| + |P|) space being used, where hP represents the height of P. Up to now th...

متن کامل

An Efficient Top-down Algorithm for Tree Inclusion

 Let T and S be ordered, labeled trees. We say that S is included in T if there is a sequence of delete operations performed on T, which make T isomorphic to S. In this paper, we propose a top-down algorithm for this problem, which needs only O(|T|⋅|leaves(S)|) time and O(|T| + |S|) space.

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • IJITCC

دوره 1  شماره 

صفحات  -

تاریخ انتشار 2011