在立方时间内编辑无根树之间的距离
Edit Distance between Unrooted Trees in Cubic Time
摘要:
树之间的编辑距离是经典的字符串之间的编辑距离的自然推广,其中允许的基本操作是边的收缩、去收缩和重新标记。Demaine等人[ACM Trans.on Algorithms,6(1),2009]示出了如何在$\mathcal{O}(n^{3})$时间内计算$n$节点上的根树之间的编辑距离。然而,将他们的方法推广到无根树似乎很成问题,最有效的已知解决方案仍然是Klein [ESA 1998]以前的$\mathcal{O}(n^{3}\log n)$时间算法。由于在提高这种复杂性方面缺乏进展,因此似乎无根树比有根树更困难。我们表明,这是,事实上,不是这样的,和编辑之间的距离无根树$n$节点可以计算在$\mathcal{O}(n^{3})$时间。不太可能存在明显更快的解决方案,因为Bringmann等人[SODA 2018]证明了计算有根树之间的编辑距离的复杂性不能降低到$\mathcal{O}(n^{3-ε})$,除非一些流行的猜想失败,并且下限很容易扩展到无根树。我们还表明,对于两个无根树的大小$m$和$n$,其中$m\le n$,我们的算法可以修改运行在$\mathcal{O}(nm^2(1+\log\frac nm))$。这又一次与Demaine等人对有根树的复杂性相匹配,他们还表明,如果我们将自己限制在所谓的分解算法中,这是最优的。
英文摘要:
Edit distance between trees is a natural generalization of the classical edit distance between strings, in which the allowed elementary operations are contraction, uncontraction and relabeling of an edge. Demaine et al. [ACM Trans. on Algorithms, 6(1), 2009] showed how to compute the edit distance between rooted trees on $n$ nodes in $\mathcal{O}(n^{3})$ time. However, generalizing their method to unrooted trees seems quite problematic, and the most efficient known solution remains to be the previous $\mathcal{O}(n^{3}\log n)$ time algorithm by Klein [ESA 1998]. Given the lack of progress on improving this complexity, it might appear that unrooted trees are simply more difficult than rooted trees. We show that this is, in fact, not the case, and edit distance between unrooted trees on $n$ nodes can be computed in $\mathcal{O}(n^{3})$ time. A significantly faster solution is unlikely to exist, as Bringmann et al. [SODA 2018] proved that the complexity of computing the edit distance between rooted trees cannot be decreased to $\mathcal{O}(n^{3-ε})$ unless some popular conjecture fails, and the lower bound easily extends to unrooted trees. We also show that for two unrooted trees of size $m$ and $n$, where $m\le n$, our algorithm can be modified to run in $\mathcal{O}(nm^2(1+\log\frac nm))$. This, again, matches the complexity achieved by Demaine et al. for rooted trees, who also showed that this is optimal if we restrict ourselves to the so-called decomposition algorithms.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。