Introduction
In string processing, the Suffix Tree is a fundamental data structure, allowing pattern matching in time proportional to the pattern length. However, to maintain a linear $O(n)$ space complexity, suffix trees store edge labels as index pairs referencing the original text. This dependency requires the original string to remain in memory, which is problematic for massive datasets or memory-constrained environments.
Suffix Tries offer a "stand-alone" alternative by storing actual characters on edges. Unfortunately, a standard suffix trie can reach $O(n^2)$ size. Linear-size Suffix Tries (LSTs), introduced by Crochemore et al. in 2016, solve this by using auxiliary nodes to maintain $O(n)$ size while remaining stand-alone. This paper presents the first "online" algorithms to construct LSTs directly, symbol-by-symbol.
The Stand-Alone Advantage
The LST's primary advantage is its independence from the input text. By ensuring every edge represents exactly one character, the LST removes the need to store the original string alongside the index. This is a game-changer for systems where memory is tight or where the original text is too massive to keep in RAM alongside the index.
Online Construction Algorithms
The authors propose two distinct online construction methods:
1. Right-to-Left (R-to-L) Construction
Based on Weiner’s algorithm, this method processes the string from end to beginning. It utilizes "hard" and "soft" Weiner links to identify insertion points for new nodes. The algorithm distinguishes between Type-1 nodes (standard branching nodes) and Type-2 nodes (auxiliary nodes that break long edges into single-character steps).
2. Left-to-Right (L-to-R) Construction
Based on Ukkonen’s algorithm, this "streaming" approach processes the string from start to finish. It introduces a "pre-LST" structure and uses "fast links" (chains of suffix links) to efficiently update the active point in the trie as new characters arrive.
Key Technical Innovation: Type-2 Nodes
The core innovation lies in the management of Type-2 nodes. These nodes ensure the trie remains linear in size without sacrificing the stand-alone property. The authors rigorously prove that the total number of nodes remains bounded by $O(n)$, specifically showing that the number of Type-2 nodes is at most $n-1$.
Performance and Complexity
The authors established the following asymptotic bounds for their algorithms (where $n$ is string length and $\sigma$ is alphabet size):
- R-to-L Algorithm: Runs in $O(n \log \sigma)$ time and $O(n)$ space.
- L-to-R Algorithm: Runs in $O(n(\log \sigma + \frac{\log n}{\log \log n}))$ time and $O(n)$ space.
- Pattern Matching: Once constructed, the LST supports pattern matching for a pattern $P$ in $O(|P| \log \sigma)$ time using "fast links," matching the efficiency of a suffix tree.
Conclusion and Future Work
This work successfully adapts Weiner and Ukkonen construction philosophies to the LST framework, proving that the LST is a robust alternative to the suffix tree. Future challenges include closing the complexity gap for the L-to-R algorithm and extending these techniques to even more compact structures like Linear-size Compact DAWGs (LCDAWGs).
Summary updated