arXivDaily arXiv每日学术速递 周一至周五更新
北美退伍军人节(Veterans Day),12 日无更新
arXiv 1703.01009cs.DS
收藏

字母表后缀数组和LCP数组的时空最优构造

Optimal Time and Space Construction of Suffix Arrays and LCP Arrays for Integer Alphabets

Keisuke Goto

摘要:

后缀数组和LCP数组是广泛用于各种字符串处理的最基本的数据结构之一。考虑了整数字母表上长度为$N$的只读字符串的两个问题:对于$1 \leq σ\leq N$,字符串包含$σ$不同字符,后缀数组的构造,以及后缀数组和LCP数组的同时构造.对于字RAM模型,我们提出的算法来解决这两个问题,在$O(N)$的时间,通过使用$O(1)$额外的字,这是最佳的时间和空间。额外的字意味着除了输入字符串和输出后缀数组和LCP数组的空间之外所需的空间。我们的贡献改进了以前最有效的算法,[Nong,TOIS 2013]使用$σ+O(1)$额外单词的$O(N)$时间和[Franceschini和Muthukrishnan,ICALP 2007]使用$O(1)$额外单词的$O(N \log N)$时间,用于构建后缀数组,并且它改进了以前在$O(N)$时间中运行的最有效的解决方案,该解决方案使用$σ+ O(1)$额外的字来构造后缀数组和LCP数组,[Nong,TOIS 2013]和[Manzini,SWAT 2004]的组合。

英文摘要:

Suffix arrays and LCP arrays are one of the most fundamental data structures widely used for various kinds of string processing. We consider two problems for a read-only string of length $N$ over an integer alphabet $[1, \dots, σ]$ for $1 \leq σ\leq N$, the string contains $σ$ distinct characters, the construction of the suffix array, and a simultaneous construction of both the suffix array and LCP array. For the word RAM model, we propose algorithms to solve both of the problems in $O(N)$ time by using $O(1)$ extra words, which are optimal in time and space. Extra words means the required space except for the space of the input string and output suffix array and LCP array. Our contribution improves the previous most efficient algorithms, $O(N)$ time using $σ+O(1)$ extra words by [Nong, TOIS 2013] and $O(N \log N)$ time using $O(1)$ extra words by [Franceschini and Muthukrishnan, ICALP 2007], for constructing suffix arrays, and it improves the previous most efficient solution that runs in $O(N)$ time using $σ+ O(1)$ extra words for constructing both suffix arrays and LCP arrays through a combination of [Nong, TOIS 2013] and [Manzini, SWAT 2004].

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

↑