[Paper Review] Linear Time Construction of Cover Suffix Tree and Applications
This paper presents the first linear-time algorithm to construct the Cover Suffix Tree (CST) for strings over an integer alphabet, leveraging a novel combinatorial characterization linking overlapping consecutive substring occurrences to runs in the string. The approach enables optimal O(n) construction of CST and leads to linear-time algorithms for quasiperiodicity problems such as computing all seeds and shortest α-partial covers, as well as an O(n)-space index for reporting bounded-gap overlapping consecutive occurrences in O(m + output) time.
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,\ldots,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.
Motivation & Objective
- To design a linear-time algorithm for constructing the Cover Suffix Tree (CST) of a string over an integer alphabet.
- To improve upon the O(n log n)-time CST construction of Kociumaka et al. (2015) by achieving optimal O(n) time complexity.
- To enable efficient computation of quasiperiodicity measures such as all seeds and shortest α-partial covers in linear time.
- To develop an O(n)-sized index for reporting overlapping consecutive occurrences of a pattern in O(m + output) time, improving on prior O(n log n)-space solutions.
Proposed method
- Introduce a new combinatorial characterization linking overlapping consecutive occurrences of substrings to runs (maximal repetitions) in the string.
- Show that the set of substrings with overlapping consecutive occurrences implied by a single run has a 'triangular' structure.
- Use two bottom-up traversals: one over the suffix tree’s suffix links and another over the CST to compute cv(v) and nov(v) values for explicit nodes.
- Construct an O(n)-space index for bounded-gap overlapping consecutive occurrences using weighted ancestor queries and range minimum queries (RMQs).
- Leverage perfect hashing and bucket sort to maintain linear-time construction under integer alphabets.
- Use RMQ preprocessing on arrays MB and ML to enable O(1) range queries during pattern occurrence reporting.
Experimental results
Research questions
- RQ1Can the Cover Suffix Tree be constructed in O(n) time for strings over an integer alphabet?
- RQ2Does the new run-based characterization of overlapping consecutive occurrences enable faster computation of quasiperiodicity measures?
- RQ3Can an O(n)-sized index be built to report all bounded-gap overlapping consecutive occurrences of a pattern in O(m + output) time?
- RQ4Is it possible to compute all seeds and shortest α-partial covers in linear time using the CST?
- RQ5Can the proposed approach be extended to improve the construction time of the Maximal Augmented Suffix Tree (MAST)?
Key findings
- The Cover Suffix Tree of a string of length n over an integer alphabet can be constructed in O(n) time, achieving optimal linear time complexity.
- The algorithm computes all seeds of a string in O(n) time, significantly improving upon the prior O(n log n) approach.
- The algorithm computes the shortest α-partial cover for each α = 1, ..., n in O(n) time, improving the prior O(n log n) bound.
- An O(n)-sized index is constructed that reports all bounded-gap overlapping consecutive occurrences of a pattern of length m in O(m + output) time, with O(n) construction time for constant alphabets.
- The key insight is that overlapping consecutive occurrences of substrings are fully characterized by runs in the string, leading to a triangular structure that enables efficient computation.
- The method enables efficient computation of cv(v) and nov(v) values via two bottom-up traversals over the suffix tree and CST, respectively, using RMQs and weighted ancestor queries.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.