Suffix arrays and LCP arrays are one of the most fundamental data structures widely used for various kinds of string processing. Many problems can be solved efficiently by using suffix arrays, or a pair of suffix arrays and LCP arrays. In this paper, we consider two problems for a string of length $N$, the characters of which are represented as integers in $[1, \dots, \sigma]$ for $1 \leq \sigma \leq N$; the string contains $\sigma$ distinct characters, (1) construction of the suffix array and (2) simultaneous construction of both the suffix array and the LCP array. In the word RAM model, we propose algorithms to solve both the problems in $O(N)$ time using $O(1)$ extra words, which are optimal in time and space. Extra words mean 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 algorithm that runs in $O(N)$ time using $\sigma+O(1)$ extra words for the suffix array construction proposed by [Nong, TOIS 2013], and it improves the previous most efficient solution that runs in $O(N)$ time using $\sigma + O(1)$ extra words for both suffix array and LCP array construction using the combination of [Nong, TOIS 2013] and [Manzini, SWAT 2004]. Another optimal time and space algorithm to construct the suffix array was proposed by [Li et al, arXiv 2016] very recently and independently. Our algorithm is simpler than theirs, and it allows us to solve the second problem in optimal time and space.


翻译:后缀阵列和 LCP 阵列是广泛用于各类字符串处理的最基本数据结构之一。 许多问题可以通过使用后缀阵列或一对后缀阵列和 LCP 阵列来有效解决。 在本文中, 我们考虑一个长度为$1,\dots,\sigma] 和 LCP 阵列的两个问题, 其字符在 $1,\leq\ sigma\leq\leq N$; 字符串包含 $\ sigma $ cleq N$; 字符串包含不同的字符, (1) 后缀阵列的构建和 (2) 后缀阵列的同时构建。 在 URM 模式中, 我们建议用$( N) $( 美元) 额外字来解决 $( $(1) 美元) 的问题。 额外字的意思是需要的空间, 除了用于 输入字符串和产出后缀的2013 lifix 阵列和 LCP 组合的空格外。 我们对2004 最高级阵列的阵列的阵列改进了以$( N$), 用$( Nxxxxxxxxxx) 和2013年拟议的阵列的算, 用$xxxx 和最高级的计算, 和最高级的阵列的计算, 和最高级的阵列的计算是用前的 和最短的阵列的阵列的阵列,, 使用前的 和最短的阵列的阵列的阵列, 和最短的Lxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,,, 和前的计算, 和前的阵列。

0
下载
关闭预览

相关内容

专知会员服务
59+阅读 · 2020年3月19日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
26+阅读 · 2019年5月18日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
Hierarchical Imitation - Reinforcement Learning
CreateAMind
19+阅读 · 2018年5月25日
条件GAN重大改进!cGANs with Projection Discriminator
CreateAMind
8+阅读 · 2018年2月7日
【LeetCode 500】关关的刷题日记27 Keyboard Row
专知
3+阅读 · 2017年11月5日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
Arxiv
9+阅读 · 2019年4月19日
Meta-Learning with Latent Embedding Optimization
Arxiv
6+阅读 · 2018年7月16日
Arxiv
5+阅读 · 2018年1月17日
VIP会员
相关VIP内容
专知会员服务
59+阅读 · 2020年3月19日
相关资讯
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
26+阅读 · 2019年5月18日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
Hierarchical Imitation - Reinforcement Learning
CreateAMind
19+阅读 · 2018年5月25日
条件GAN重大改进!cGANs with Projection Discriminator
CreateAMind
8+阅读 · 2018年2月7日
【LeetCode 500】关关的刷题日记27 Keyboard Row
专知
3+阅读 · 2017年11月5日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
Top
微信扫码咨询专知VIP会员