arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2105.06166cs.DS
收藏

动态k失配问题

The Dynamic k-Mismatch Problem

Raphaël Clifford, Paweł Gawrychowski, Tomasz Kociumaka, Daniel P. Martin, Przemysław Uznański

摘要:

文本到模式汉明距离问题要求计算长度为$m$的给定模式与长度为$n\ge m$的给定文本的所有长度- $m$子串之间的汉明距离。我们专注于$k$ -不匹配版本的问题,其中距离需要返回,只有当它不超过阈值$k$。我们假设$n\le 2m$(通常,可以将文本划分为重叠的块)。在这项工作中,我们展示了这个问题的动态版本的数据结构,支持两个操作:更新执行模式或文本中的单字母替换,以及查询,给定索引$i$,返回模式和从位置$i$开始的文本子串之间的汉明距离,或者报告它超过$k$。首先,我们展示了一个具有$\tilde{O}(1)$更新和$\tilde{O}(k)$查询时间的数据结构。然后,我们表明,$\tilde{O}(k)$更新和$\tilde{O}(1)$查询时间也是可能的。这两者为动态$k$ -与$k \le \sqrt{n}$的不匹配问题提供了最佳权衡:我们证明,在强3 SUM猜想的条件下,无法同时实现所有操作的$k^{1-Ω(1)}$时间。对于$k\ge \sqrt{n}$,我们给出了另一个下界,在线矩阵向量猜想的条件下,排除了每次操作花费$n^{1/2-Ω(1)}$时间的算法。对于恒定大小的字母表,这是严格的:Clifford等人(STACS 2018)在这种情况下实现了每次操作的$\tilde{O}(\sqrt{n})$时间,但对于大字母表,每次操作的$\tilde{O}(n^{3/4})$时间。我们改进和扩展这一结果的算法,给定$1\le x\le k$,实现更新时间$\tilde{O}(\frac{n}{k} +\sqrt{\frac{nk}{x}})$和查询时间$\tilde{O}(x)$。具体地,对于$k\ge \sqrt{n}$,$x$的适当选择产生每次操作的$\tilde{O}(\sqrt[3]{nk})$时间,当没有提供阈值$k$时,该时间是$\tilde{O}(n^{2/3})$。

英文摘要:

The text-to-pattern Hamming distances problem asks to compute the Hamming distances between a given pattern of length $m$ and all length-$m$ substrings of a given text of length $n\ge m$. We focus on the $k$-mismatch version of the problem, where a distance needs to be returned only if it does not exceed a threshold $k$. We assume $n\le 2m$ (in general, one can partition the text into overlapping blocks). In this work, we show data structures for the dynamic version of this problem supporting two operations: An update performs a single-letter substitution in the pattern or the text, and a query, given an index $i$, returns the Hamming distance between the pattern and the text substring starting at position $i$, or reports that it exceeds $k$. First, we show a data structure with $\tilde{O}(1)$ update and $\tilde{O}(k)$ query time. Then we show that $\tilde{O}(k)$ update and $\tilde{O}(1)$ query time is also possible. These two provide an optimal trade-off for the dynamic $k$-mismatch problem with $k \le \sqrt{n}$: we prove that, conditioned on the strong 3SUM conjecture, one cannot simultaneously achieve $k^{1-Ω(1)}$ time for all operations. For $k\ge \sqrt{n}$, we give another lower bound, conditioned on the Online Matrix-Vector conjecture, that excludes algorithms taking $n^{1/2-Ω(1)}$ time per operation. This is tight for constant-sized alphabets: Clifford et al. (STACS 2018) achieved $\tilde{O}(\sqrt{n})$ time per operation in that case, but with $\tilde{O}(n^{3/4})$ time per operation for large alphabets. We improve and extend this result with an algorithm that, given $1\le x\le k$, achieves update time $\tilde{O}(\frac{n}{k} +\sqrt{\frac{nk}{x}})$ and query time $\tilde{O}(x)$. In particular, for $k\ge \sqrt{n}$, an appropriate choice of $x$ yields $\tilde{O}(\sqrt[3]{nk})$ time per operation, which is $\tilde{O}(n^{2/3})$ when no threshold $k$ is provided.

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

↑