arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2302.04229cs.DS
收藏

加权编辑距离计算:字符串、树和Dyck

Weighted Edit Distance Computation: Strings, Trees and Dyck

Debarati Das, Jacob Gilbert, MohammadTaghi Hajiaghayi, Tomasz Kociumaka, Barna Saha

摘要:

给定两个长度为$n$/字母表$Σ$的字符串,以及它们的编辑距离的上界$k$,Myers(Mystica '86)和Landau和Vishkin(JCSS'88)的算法在$\mathcal{O}(n+k^2)$时间内计算未加权的字符串编辑距离。到目前为止,它仍然是精确编辑距离计算的最快算法,并且在强指数假设(STOC'15)下是最优的。多年来,这一结果激发了许多发展,包括字符串编辑距离的快速近似算法以及类似的$\tilde{\mathcal{O}}(n+$聚$(k))$ -时间算法,用于推广到树和Dyck编辑距离。令人惊讶的是,所有这些结果只适用于未加权的情况。虽然未加权的编辑距离在理论上是基本的,但几乎所有现实世界的应用都需要加权的编辑距离,其中不同的权重被分配给不同的编辑操作,并且可能随正在编辑的字符而变化。给定权重函数$w: Σ\cup \{\varepsilon \}\times Σ\cup \{\varepsilon \} \rightarrow \mathbb{R}_{\ge 0}$(使得对于具有$a\ne b$的所有$a,b\in Σ\cup \{\varepsilon\}$的$w(a,a)=0$和$w(a,b)\ge 1$),目标是找到使编辑的总权重最小化的比对。除了普通的$\mathcal{O}(n^2)$ -时间动态编程算法及其几乎微不足道的$\mathcal{O}(nk)$ -时间实现之外,上述关于未加权编辑距离的开发都不适用于加权变体。在本文中,我们提出了第一个$\mathcal{O}(n+$聚$(k))$ -时间算法,计算加权字符串编辑距离准确,从而弥合了我们的理解之间的根本差距未加权和加权编辑距离。然后,我们将这一结果推广到加权树和戴克编辑距离,这导致一个确定性的算法,改进了以前的工作未加权树编辑距离。

英文摘要:

Given two strings of length $n$ over alphabet $Σ$, and an upper bound $k$ on their edit distance, the algorithm of Myers (Algorithmica'86) and Landau and Vishkin (JCSS'88) computes the unweighted string edit distance in $\mathcal{O}(n+k^2)$ time. Till date, it remains the fastest algorithm for exact edit distance computation, and it is optimal under the Strong Exponential Hypothesis (STOC'15). Over the years, this result has inspired many developments, including fast approximation algorithms for string edit distance as well as similar $\tilde{\mathcal{O}}(n+$poly$(k))$-time algorithms for generalizations to tree and Dyck edit distances. Surprisingly, all these results hold only for unweighted instances. While unweighted edit distance is theoretically fundamental, almost all real-world applications require weighted edit distance, where different weights are assigned to different edit operations and may vary with the characters being edited. Given a weight function $w: Σ\cup \{\varepsilon \}\times Σ\cup \{\varepsilon \} \rightarrow \mathbb{R}_{\ge 0}$ (such that $w(a,a)=0$ and $w(a,b)\ge 1$ for all $a,b\in Σ\cup \{\varepsilon\}$ with $a\ne b$), the goal is to find an alignment that minimizes the total weight of edits. Except for the vanilla $\mathcal{O}(n^2)$-time dynamic-programming algorithm and its almost trivial $\mathcal{O}(nk)$-time implementation, none of the aforementioned developments on the unweighted edit distance apply to the weighted variant. In this paper, we propose the first $\mathcal{O}(n+$poly$(k))$-time algorithm that computes weighted string edit distance exactly, thus bridging a fundamental gap between our understanding of unweighted and weighted edit distance. We then generalize this result to weighted tree and Dyck edit distances, which lead to a deterministic algorithm that improves upon the previous work for unweighted tree edit distance.

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

↑