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

最短唯一子串查询

Shortest Unique Substring Query Revisited

Atalay Mert İleri, M. Oğuzhan Külekci, Bojian Xu

摘要:

我们重新讨论了最近由[6]提出的寻找最短唯一子串(SUS)的问题。我们提出了一个最佳的$O(n)$时间和空间的算法,可以找到一个SUS的大小为$n$的字符串的每个位置。我们的算法显着改善了[6]所需的$O(n^2)$时间复杂度。我们还支持找到覆盖每个位置的所有SUS,而[6]中的解决方案只能为每个位置找到一个SUS。此外,我们的解决方案更简单,更容易实现,在实践中也可以更节省空间,因为我们只使用字符串的逆后缀数组和最长公共前缀数组,而[6]中的算法使用字符串的后缀树和其他辅助数据结构。实验结果表明,该算法比文献[6]中的算法速度更快,更节省空间。

英文摘要:

We revisit the problem of finding shortest unique substring (SUS) proposed recently by [6]. We propose an optimal $O(n)$ time and space algorithm that can find an SUS for every location of a string of size $n$. Our algorithm significantly improves the $O(n^2)$ time complexity needed by [6]. We also support finding all the SUSes covering every location, whereas the solution in [6] can find only one SUS for every location. Further, our solution is simpler and easier to implement and can also be more space efficient in practice, since we only use the inverse suffix array and longest common prefix array of the string, while the algorithm in [6] uses the suffix tree of the string and other auxiliary data structures. Our theoretical results are validated by an empirical study that shows our algorithm is much faster and more space-saving than the one in [6].

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

↑