arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1407.0522cs.DS
收藏

最长公共子串问题的次线性空间算法

Sublinear Space Algorithms for the Longest Common Substring Problem

Tomasz Kociumaka, Tatiana Starikovskaya, Hjalte Wedel Vildhøj

摘要:

给定$m$文档的总长度$n$,我们考虑的问题,找到一个最长的字符串共同的至少$d \geq 2$的文件。这个问题被称为\emph{longest common substring (LCS) problem},并且具有经典的$O(n)$空间和$O(n)$时间解(Weiner [FOCS'73],Hui [CPM'92])。然而,线性空间的使用在许多应用中是不切实际的。在本文中,我们表明,对于任何权衡参数$1 \leq τ\leq n$,LCS问题可以解决在$O(τ)$空间和$O(n^2/τ)$时间,从而提供了第一个光滑的确定性的时间-空间权衡从常数到线性空间。结果使用了一种新的非常简单的算法,它计算了在$O(n^2/τ)$时间和$O(1)$空间中LCS的$τ$ -加法近似。我们还展示了确定性分支程序的时间-空间权衡下界,这意味着任何确定性RAM算法解决LCS问题的文件,从足够大的字母在$O(τ)$空间必须使用$Ω(n\sqrt{\log(n/(τ\log n))/\log\log(n/(τ\log n)})$时间。

英文摘要:

Given $m$ documents of total length $n$, we consider the problem of finding a longest string common to at least $d \geq 2$ of the documents. This problem is known as the \emph{longest common substring (LCS) problem} and has a classic $O(n)$ space and $O(n)$ time solution (Weiner [FOCS'73], Hui [CPM'92]). However, the use of linear space is impractical in many applications. In this paper we show that for any trade-off parameter $1 \leq τ\leq n$, the LCS problem can be solved in $O(τ)$ space and $O(n^2/τ)$ time, thus providing the first smooth deterministic time-space trade-off from constant to linear space. The result uses a new and very simple algorithm, which computes a $τ$-additive approximation to the LCS in $O(n^2/τ)$ time and $O(1)$ space. We also show a time-space trade-off lower bound for deterministic branching programs, which implies that any deterministic RAM algorithm solving the LCS problem on documents from a sufficiently large alphabet in $O(τ)$ space must use $Ω(n\sqrt{\log(n/(τ\log n))/\log\log(n/(τ\log n)})$ time.

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

↑