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.
Dynamic Dyck and Tree Edit Distance: Decompositions and Reductions to String Edit Distance
Pennsylvania State University(宾夕法尼亚州立大学);University of Maryland(马里兰大学);Max Planck Institute for Informatics(马克斯·普朗克 informatics 研究所);University of California, San Diego(加利福尼亚大学圣地亚哥分校)
King’s College London(伦敦国王学院);Max Planck Institute for Informatics(马克斯·普朗克 informatics 研究所);National Institute of Informatics(日本国立情报学研究所);The Graduate University for Advanced Studies, SOKENDAI(综合研究大学院大学)
k-Approximate Quasiperiodicity under Hamming and Edit Distance
弦的准周期性是在大约30年前作为弦周期性的扩展而引入的。准周期性的基本概念是覆盖和种子。文本$T$的封面是一个字符串,它在$T$中的出现覆盖了$T$的所有位置。文本种子$T$是$T$的超字符串的封面。在各种应用中,由于误差的存在,精确的准周期性仍然是不够的。我们考虑近似的准周期性的概念,我们允许近似发生在$T$与一个小的汉明,Levenshtein或加权编辑距离。在之前的工作中,Sip et al.(2002)和Christodoulakis et al.(2005)表明,在加权编辑距离下分别计算近似覆盖和种子是NP难的。因此,他们考虑了受限的近似覆盖和种子,这些覆盖和种子需要成为原始字符串$T$的因子,并提出了计算它们的多项式时间算法。进一步的算法,考虑近似发生的汉明距离有界的$k$,给出了几个贡献Guth等人。他们还研究了放松近似quasiperiods,不需要覆盖所有位置的$T$。在大数据的情况下,多项式时间复杂度中的指数起着至关重要的作用。我们提出了更有效的算法计算限制近似覆盖和种子。特别是,我们改进了许多上述算法的复杂性,也为放松quasiperiods。我们的解决方案是特别有效的,如果允许的错误的数量(或总成本)是有界的。证明了在汉明距离下计算非限制近似覆盖和种子的NP-困难性。在过去三年里,在CPM最近的三次贡献中研究了近似覆盖率。然而,这些作品认为一个不同的定义近似…