Computing minimal and maximal suffixes of a substring
Computing minimal and maximal suffixes of a substring
复制标题
计算子字符串的最小和最大后缀
DOI:
10.1016/j.tcs.2015.08.023
复制
发表时间:
2014
期刊:
影响因子:
--
通讯作者:
Tatiana Starikovskaya
中科院分区:
文献类型:
--
作者:
M. Babenko;Paweł Gawrychowski;Tomasz Kociumaka;Ignat I. Kolesnichenko;Tatiana Starikovskaya
We consider the problems of computing the maximal and the minimal non-empty suffixes of substrings of a longer text of length n. For the minimal suffix problem we show that for every τ, 1≤ τ≤ log n, there exists a linear-space data structure with O (τ) query time and O (n log n/τ) preprocessing time. As a sample application, we show that this data structure can be used to compute the Lyndon decomposition of any substring of the text in O (k τ) time, where k is the number of distinct factors in the decomposition. For the maximal suffix problem, we give a linear-space structure with O (1) query time and O (n) preprocessing time. In other words, we simultaneously achieve both the optimal query time and the optimal construction time.