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

子字符串后缀选择

Substring Suffix Selection

Maxim Babenko, Paweł Gawrychowski, Tomasz Kociumaka, Tatiana Starikovskaya

摘要:

我们研究以下子串后缀选择问题:给定长度为n的字符串T的子串,计算其第k个字典序最小后缀。这是一个众所周知的计算字符串最大后缀问题的自然推广,这是许多其他问题的基本组成部分。我们首先回顾了Babenko,Kolesnichenko和Starikovskaya [CPM'13]介绍的问题的两种特殊情况,其中我们被要求计算子串的最小非空后缀和最大后缀。对于最大后缀问题,我们给出了一个线性空间结构,其查询时间为O(1),预处理时间为线性,即,我们设法同时实现最优的构造和最优的查询时间。对于最小后缀问题,我们给出了一个线性空间的数据结构,其查询时间为O(τ),预处理时间为O(nlogn/ τ),其中1 <= τ<= logn是该数据结构的一个参数.作为一个示例应用,我们证明了这种数据结构可以在O(k τ)时间内计算T的任意子串的Lyndon分解,其中k是分解中不同因子的个数.最后,我们转向子串后缀选择问题的一般情况,在这种情况下,使用任何组合性质似乎都更困难。然而,我们开发了一个线性空间数据结构,查询时间为O(log^{2+ε} n)。

英文摘要:

We study the following substring suffix selection problem: given a substring of a string T of length n, compute its k-th lexicographically smallest suffix. This a natural generalization of the well-known question of computing the maximal suffix of a string, which is a basic ingredient in many other problems. We first revisit two special cases of the problem, introduced by Babenko, Kolesnichenko and Starikovskaya [CPM'13], in which we are asked to compute the minimal non-empty and the maximal suffixes of a substring. For the maximal suffixes problem, we give a linear-space structure with O(1) query time and linear preprocessing time, i.e., we manage to achieve optimal construction and optimal query time simultaneously. For the minimal suffix problem, we give a linear-space data structure with O(τ) query time and O(n log n / τ) preprocessing time, where 1 <= τ<= log n is a parameter of the data structure. As a sample application, we show that this data structure can be used to compute the Lyndon decomposition of any substring of T in O(k τ) time, where k is the number of distinct factors in the decomposition. Finally, we move to the general case of the substring suffix selection problem, where using any combinatorial properties seems more difficult. Nevertheless, we develop a linear-space data structure with O(log^{2+ε} n) query time.

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

↑