Abstract

The edit distance problem for rooted unordered trees is known to be NP-hard. Based on this fact, this paper studies exponential-time algorithms for the problem. For a general case, an O(min(1.26n1+n2,2b1+b2⋅poly(n1,n2))) time algorithm is presented, where n1 and n2 are the numbers of nodes and b1 and b2 are the numbers of branching nodes in two input trees. This algorithm is obtained by a combination of dynamic programming, exhaustive search, and maximum weighted bipartite matching. For bounded degree trees over a fixed alphabet, it is shown that the problem can be solved in O((1+ϵ)n1+n2) time for any fixed ϵ>0. This result is achieved by avoiding duplicate calculations for identical subsets of small subtrees.

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