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

在字符串中比一般字母表更快的最长公共扩展

Faster Longest Common Extension Queries in Strings over General Alphabets

Paweł Gawrychowski, Tomasz Kociumaka, Wojciech Rytter, Tomasz Waleń

摘要:

最长公共扩展查询(通常称为最长公共前缀查询)构成多字符串算法中的基本构建块,例如计算运行和近似模式匹配。我们表明,序列的$q$ LCE查询的大小$n$的字符串在一般有序的字母表可以实现在$O(q \log \log n+n\log^*n)$的时间,使只有$O(q+n)$符号比较。因此,可以在进行$O(n)$符号比较的$O(n \log \log n)$时间内计算字符串中在一般有序字母表上的所有游程。我们的结果改进了Kosolobov(信息处理Letters,2016)的解决方案,他给出了一个具有$O(n \log^{2/3} n)$运行时间的算法,并证明了$O(n)$时间是可能的。我们在解决这个猜想方面取得了重大进展。当时间增加到$O(q\log n + n\log^*n)$时,我们的技术扩展到一般无序字母的情况。主要工具是差异覆盖和不交集数据结构。

英文摘要:

Longest common extension queries (often called longest common prefix queries) constitute a fundamental building block in multiple string algorithms, for example computing runs and approximate pattern matching. We show that a sequence of $q$ LCE queries for a string of size $n$ over a general ordered alphabet can be realized in $O(q \log \log n+n\log^*n)$ time making only $O(q+n)$ symbol comparisons. Consequently, all runs in a string over a general ordered alphabet can be computed in $O(n \log \log n)$ time making $O(n)$ symbol comparisons. Our results improve upon a solution by Kosolobov (Information Processing Letters, 2016), who gave an algorithm with $O(n \log^{2/3} n)$ running time and conjectured that $O(n)$ time is possible. We make a significant progress towards resolving this conjecture. Our techniques extend to the case of general unordered alphabets, when the time increases to $O(q\log n + n\log^*n)$. The main tools are difference covers and the disjoint-sets data structure.

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

↑