We present an algorithm for approximating the edit distance $\operatorname{ed}(x, y)$ between two strings $x$ and $y$ in time parameterized by the degree to which one of the strings $x$ satisfies a natural pseudorandomness property. The pseudorandomness model is asymmetric in that no requirements are placed on the second string $y$, which may be constructed by an adversary with full knowledge of $x$.
We say that $x$ is \emph{$(p, B)$-pseudorandom} if all pairs $a$ and $b$ of disjoint $B$-letter substrings of $x$ satisfy $\operatorname{ed}(a, b) \ge pB$. Given parameters $p$ and $B$, our algorithm computes the edit distance between a $(p, B)$-pseudorandom string $x$ and an arbitrary string $y$ within a factor of $O(1/p)$ in time $\tilde{O}(nB)$, with high probability.
Our algorithm is robust in the sense that it can handle a small portion of $x$ being adversarial (i.e., not satisfying the pseudorandomness property). In this case, the algorithm incurs an additive approximation error proportional to the fraction of $x$ which behaves maliciously.
The asymmetry of our pseudorandomness model has particular appeal for the case where $x$ is a \emph{source string}, meaning that $\operatorname{ed}(x, y)$ will be computed for many strings $y$. Suppose that one wishes to achieve an $O(α)$-approximation for each $\operatorname{ed}(x, y)$ computation, and that $B$ is the smallest block-size for which the string $x$ is $(1/α, B)$-pseudorandom. We show that without knowing $B$ beforehand, $x$ may be preprocessed in time $\tilde{O}(n^{1.5}\sqrt{B})$, so that all future computations of the form $\operatorname{ed}(x, y)$ may be $O(α)$-approximated in time $\tilde{O}(nB)$. Furthermore, for the special case where only a single $\operatorname{ed}(x, y)$ computation will be performed, we show how to achieve an $O(α)$-approximation in time $\tilde{O}(n^{4/3}B^{2/3})$.
An Algorithmic Bridge Between Hamming and Levenshtein Distances
Academic College of Tel Aviv-Yafo(特拉维夫雅法学术学院);Max Planck Institute for Informatics(马克斯·普朗克计算机科学研究所);Weizmann Institute of Science(魏茨曼科学研究所);University of California, San Diego(加利福尼亚大学圣地亚哥分校)
Approximation Algorithms for LCS and LIS with Truly Improved Running Times
最长公共子序列($\mathsf{LCS}$)是组合优化中的一个经典和核心问题。虽然$\mathsf{LCS}$承认一个二次时间的解决方案,最近的证据表明,解决这个问题可能是不可能的,在真正的次二次时间。$\mathsf{LCS}$的一个特殊情况,其中每个字符在每个字符串中最多出现一次,等价于最长递增子序列问题($\mathsf{LIS}$),它可以在拟线性时间内求解。在这项工作中,我们提出了新的算法近似$\mathsf{LCS}$在真正的次二次时间和$\mathsf{LIS}$在真正的次线性时间。我们的近似因子取决于最优解大小与输入大小的比值。我们用$λ$表示这个比率,并且在没有任何关于$λ$的先验知识的情况下,得到了关于$\mathsf{LCS}$和$\mathsf{LIS}$的以下结果。$\bullet$一个真正的次二次时间算法,用于$\mathsf{LCS}$,具有近似因子$Ω(λ^3)$。$\bullet$一个真正的次线性时间算法,用于$\mathsf{LIS}$,具有近似因子$Ω(λ^3)$。三角不等式最近被[Boroujeni,Ehsani,Ghodsi,HajiAghayi和Seddighin SODA 2018]和[Charkraborty,Das,Goldenberg,Koucky和Saks FOCS 2018]用于提出编辑距离的新近似算法。我们的技术$\mat…