Linear Time Construction of Cover Suffix Tree and Applications

08/08/2023
by   Jakub Radoszewski, et al.
0

The Cover Suffix Tree (CST) of a string T is the suffix tree of T with additional explicit nodes corresponding to halves of square substrings of T. In the CST an explicit node corresponding to a substring C of T is annotated with two numbers: the number of non-overlapping consecutive occurrences of C and the total number of positions in T that are covered by occurrences of C in T. Kociumaka et al. (Algorithmica, 2015) have shown how to compute the CST of a length-n string in O(n log n) time. We show how to compute the CST in O(n) time assuming that T is over an integer alphabet. Kociumaka et al. (Algorithmica, 2015; Theor. Comput. Sci., 2018) have shown that knowing the CST of a length-n string T, one can compute a linear-sized representation of all seeds of T as well as all shortest α-partial covers and seeds in T for a given α in O(n) time. Thus our result implies linear-time algorithms computing these notions of quasiperiodicity. The resulting algorithm computing seeds is substantially different from the previous one (Kociumaka et al., SODA 2012, ACM Trans. Algorithms, 2020). Kociumaka et al. (Algorithmica, 2015) proposed an O(n log n)-time algorithm for computing a shortest α-partial cover for each α=1,…,n; we improve this complexity to O(n). Our results are based on a new characterization of consecutive overlapping occurrences of a substring S of T in terms of the set of runs (see Kolpakov and Kucherov, FOCS 1999) in T. This new insight also leads to an O(n)-sized index for reporting overlapping consecutive occurrences of a given pattern P of length m in O(m+output) time, where output is the number of occurrences reported. In comparison, a general index for reporting bounded-gap consecutive occurrences of Navarro and Thankachan (Theor. Comput. Sci., 2016) uses O(n log n) space.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
05/07/2021

Faster Algorithms for Longest Common Substring

In the classic longest common substring (LCS) problem, we are given two ...
research
02/17/2021

Linear Time Runs over General Ordered Alphabets

A run in a string is a maximal periodic substring. For example, the stri...
research
10/17/2018

Fast and Longest Rollercoasters

For k≥ 3, a k-rollercoaster is a sequence of numbers whose every maximal...
research
11/08/2022

Computing palindromes on a trie in linear time

A trie 𝒯 is a rooted tree such that each edge is labeled by a single cha...
research
06/29/2020

The Number of Repetitions in 2D-Strings

The notions of periodicity and repetitions in strings, and hence these o...
research
05/13/2020

k-Approximate Quasiperiodicity under Hamming and Edit Distance

Quasiperiodicity in strings was introduced almost 30 years ago as an ext...
research
12/20/2021

String Sampling with Bidirectional String Anchors

The minimizers sampling mechanism is a popular mechanism for string samp...

Please sign up or login with your details

Forgot password? Click here to reset