Abstract

The tree matching problem is considered of given labeled trees P and T, determining if the pattern tree P can be obtained from the text tree T by deleting degree-one and degree-two nodes and, in the case of unordered trees, by also permuting siblings. The constrained tree inclusion problem is more sensitive to the structure of the pattern tree than the general tree inclusion problem. Further, it can be solved in polynomial time for both unordered and ordered trees. Algorithms based on the subtree homeomorphism algorithm of (Chung, 1987) are presented that solve the constrained tree inclusion problem in O(m1.5n) time on unordered trees with m and n nodes, and in O(mn) time on ordered trees, using O(mn) additional space. These algorithms can be improved using results of (Shamir and Tsur, 1999) to run in O((m1.5/log m)n) and O((m/ logm)n) time, respectively.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.