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

流k-失配问题:空间和总时间之间的权衡

The Streaming k-Mismatch Problem: Tradeoffs between Space and Total Time

Shay Golan, Tomasz Kociumaka, Tsvi Kopelowitz, Ely Porat

摘要:

我们重新审视的$k$ -不匹配问题的流模型上的模式的长度$m$和流文本的长度$n$,都超过了大小- $σ$字母表。Clifford等人[SODA 2019]提出的流$k$不匹配问题的当前最先进算法使用$\tilde O(k)$空间和每个字符的$\tilde O\big(\sqrt k\big)$最差情况时间。已知空间复杂度是(无条件)最优的,并且每个字符的最坏情况时间匹配条件下限。然而,在算法的总时间成本$\tilde O(n\sqrt k)$和已知最快的离线算法(花费$\tilde O\big(n + \min\big(\frac{nk}{\sqrt m},σn\big)\big)$时间)之间存在差距。此外,不知道当使用多于$O(k)$空间时,是否可以改进$\tilde O(n\sqrt k)$总时间。我们解决这些差距,设计一个随机流算法的$k$不匹配的问题,给定一个整数参数$k\le s \le m$,使用$\tilde O(s)$空间和成本$\tilde O\big(n+\min\big(\frac {nk^2}m,\frac{nk}{\sqrt s},\frac{σnm}s\big)\big)$总时间。对于$s=m$,总运行时间变为$\tilde O\big(n + \min\big(\frac{nk}{\sqrt m},σn\big)\big)$,这与最快离线算法的时间成本相匹配。此外,最坏情况下每个字符的时间成本仍然是$\tilde O\big(\sqrt k\big)$。

英文摘要:

We revisit the $k$-mismatch problem in the streaming model on a pattern of length $m$ and a streaming text of length $n$, both over a size-$σ$ alphabet. The current state-of-the-art algorithm for the streaming $k$-mismatch problem, by Clifford et al. [SODA 2019], uses $\tilde O(k)$ space and $\tilde O\big(\sqrt k\big)$ worst-case time per character. The space complexity is known to be (unconditionally) optimal, and the worst-case time per character matches a conditional lower bound. However, there is a gap between the total time cost of the algorithm, which is $\tilde O(n\sqrt k)$, and the fastest known offline algorithm, which costs $\tilde O\big(n + \min\big(\frac{nk}{\sqrt m},σn\big)\big)$ time. Moreover, it is not known whether improvements over the $\tilde O(n\sqrt k)$ total time are possible when using more than $O(k)$ space. We address these gaps by designing a randomized streaming algorithm for the $k$-mismatch problem that, given an integer parameter $k\le s \le m$, uses $\tilde O(s)$ space and costs $\tilde O\big(n+\min\big(\frac {nk^2}m,\frac{nk}{\sqrt s},\frac{σnm}s\big)\big)$ total time. For $s=m$, the total runtime becomes $\tilde O\big(n + \min\big(\frac{nk}{\sqrt m},σn\big)\big)$, which matches the time cost of the fastest offline algorithm. Moreover, the worst-case time cost per character is still $\tilde O\big(\sqrt k\big)$.

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

↑