Abstract

The largest common subtree problem is to find a bijective mapping between subsets of nodes of two input rooted trees of maximum cardinality or weight that preserves labels and ancestry relationship. The problem is known to be NP-hard for unordered trees. In this paper, we consider a restricted unordered case in which the maximum outdegree of a common subtree is bounded by a constant D. We present an O(nD) time algorithm where n is the maximum size of two input trees, which improves a previous O(n2D) time algorithm. We also present an O((H2⋅22H−1⋅D2H)D−1poly(n)) time algorithm, where H is the maximum height of two input trees.

Full Text
Published version (Free)

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