论文标题
动态最长常见的底弦
Dynamic Longest Common Substring in Polylogarithmic Time
论文作者
论文摘要
最长的常见子字符串问题是找到一个最长的字符串,该字符串是两个输入字符串的(连续)子字符串。我们考虑了此问题的动态变体,其中我们要维护两个动态字符串$ s $和$ t $,每个长度最多$ n $,可以替换字母,以便能够在每次替换后返回最长的普通基因。最近,Amir等。 [ESA 2019]提出了一个解决此问题的解决方案,该解决方案仅需要$ \ tilde {\ Mathcal {o}}}(n^{2/3})$时间每次更新。这带来了确定是否存在使用Polyogarithmic更新时间的更快解决方案的挑战,或(与其他动态问题一样),我们应该期望一个多项式(条件)下限。我们通过设计一种更快的算法来回答这个问题,该算法处理摊销$ \ log^{\ Mathcal {o}(1)} n $ time中的每个替换,概率很高。我们的解决方案依赖于利用由于Gawrychowski等人而导致的动态字符串集合的局部一致性。 [SODA 2018],以及用标有双色叶子的两个动态树,因此,在每次更新之后,我们可以报告一对节点,一个来自每棵树的最大合并重量,每种颜色至少有一个常见的叶子降低物。 We complement this with a lower bound of $Ω(\log n/ \log\log n)$ for the update time of any polynomial-size data structure that maintains the LCS of two dynamic strings, and the same lower bound for the update time of any data structure of size $\tilde{\mathcal{O}}(n)$ that maintains the LCS of a static and a dynamic string.两个下限甚至可以允许摊销和随机化。
The longest common substring problem consists in finding a longest string that appears as a (contiguous) substring of two input strings. We consider the dynamic variant of this problem, in which we are to maintain two dynamic strings $S$ and $T$, each of length at most $n$, that undergo substitutions of letters, in order to be able to return a longest common substring after each substitution. Recently, Amir et al. [ESA 2019] presented a solution for this problem that needs only $\tilde{\mathcal{O}}(n^{2/3})$ time per update. This brought the challenge of determining whether there exists a faster solution with polylogarithmic update time, or (as is the case for other dynamic problems), we should expect a polynomial (conditional) lower bound. We answer this question by designing a significantly faster algorithm that processes each substitution in amortized $\log^{\mathcal{O}(1)} n$ time with high probability. Our solution relies on exploiting the local consistency of the parsing of a collection of dynamic strings due to Gawrychowski et al. [SODA 2018], and on maintaining two dynamic trees with labeled bicolored leaves, so that after each update we can report a pair of nodes, one from each tree, of maximum combined weight, which have at least one common leaf-descendant of each color. We complement this with a lower bound of $Ω(\log n/ \log\log n)$ for the update time of any polynomial-size data structure that maintains the LCS of two dynamic strings, and the same lower bound for the update time of any data structure of size $\tilde{\mathcal{O}}(n)$ that maintains the LCS of a static and a dynamic string. Both lower bounds hold even allowing amortization and randomization.