arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv cs/0604037cs.DS
收藏

一个O(n^3)时间的树编辑距离算法

An O(n^3)-Time Algorithm for Tree Edit Distance

Erik D. Demaine, Shay Mozes, Benjamin Rossman, Oren Weimann

摘要:

两棵带顶点标签的有序树之间的{ \em编辑距离}是通过一系列基本操作将一棵树转换为另一棵树的最小成本,这些操作包括删除和重新标记现有节点以及插入新节点。本文对已有的最佳$O(n^3\log n)$时间算法\cite{Klein}进行了改进,提出了一种最坏情况下的$O(n^3)$时间算法.我们的结果需要一个新的自适应策略,以决定如何动态程序划分成子问题(这是有趣的,在其本身的权利),以及更深入地了解以前的算法的问题。我们还证明了我们的算法的最优性之间的家庭的\emph{decomposition strategy}算法-其中也包括以前最快的算法-通过收紧已知的下限$Ω(n^2\log^2 n)$ ~ \cite{Touzet}到$Ω(n^3)$,匹配我们的算法的运行时间。进一步,当两棵树具有不同大小的$m$和~ $n$时,我们得到了$Θ(n m^2 (1 + \log \frac{n}{m}))$的匹配上下界,其中$m < n$ .

英文摘要:

The {\em edit distance} between two ordered trees with vertex labels is the minimum cost of transforming one tree into the other by a sequence of elementary operations consisting of deleting and relabeling existing nodes, as well as inserting new nodes. In this paper, we present a worst-case $O(n^3)$-time algorithm for this problem, improving the previous best $O(n^3\log n)$-time algorithm~\cite{Klein}. Our result requires a novel adaptive strategy for deciding how a dynamic program divides into subproblems (which is interesting in its own right), together with a deeper understanding of the previous algorithms for the problem. We also prove the optimality of our algorithm among the family of \emph{decomposition strategy} algorithms--which also includes the previous fastest algorithms--by tightening the known lower bound of $Ω(n^2\log^2 n)$~\cite{Touzet} to $Ω(n^3)$, matching our algorithm's running time. Furthermore, we obtain matching upper and lower bounds of $Θ(n m^2 (1 + \log \frac{n}{m}))$ when the two trees have different sizes $m$ and~$n$, where $m < n$.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑