English

Online Algorithms for Constructing Linear-size Suffix Trie

Data Structures and Algorithms 2019-04-11 v3

Abstract

The suffix trees are fundamental data structures for various kinds of string processing. The suffix tree of a string TT of length nn has O(n)O(n) nodes and edges, and the string label of each edge is encoded by a pair of positions in TT. Thus, even after the tree is built, the input text TT needs to be kept stored and random access to TT is still needed. The linear-size suffix tries (LSTs), proposed by Crochemore et al. [Linear-size suffix tries, TCS 638:171-178, 2016], are a `stand-alone' alternative to the suffix trees. Namely, the LST of a string TT of length nn occupies O(n)O(n) total space, and supports pattern matching and other tasks in the same efficiency as the suffix tree without the need to store the input text TT. Crochemore et al. proposed an offline algorithm which transforms the suffix tree of TT into the LST of TT in O(nlogσ)O(n \log \sigma) time and O(n)O(n) space, where σ\sigma is the alphabet size. In this paper, we present two types of online algorithms which `directly' construct the LST, from right to left, and from left to right, without constructing the suffix tree as an intermediate structure. Both algorithms construct the LST incrementally when a new symbol is read, and do not access to the previously read symbols. The right-to-left construction algorithm works in O(nlogσ)O(n \log \sigma) time and O(n)O(n) space and the left-to-right construction algorithm works in O(n(logσ+logn/loglogn))O(n (\log \sigma + \log n / \log \log n)) time and O(n)O(n) space. The main feature of our algorithms is that the input text does not need to be stored.

Keywords

Cite

@article{arxiv.1901.10045,
  title  = {Online Algorithms for Constructing Linear-size Suffix Trie},
  author = {Diptarama Hendrian and Takuya Takagi and Shunsuke Inenaga},
  journal= {arXiv preprint arXiv:1901.10045},
  year   = {2019}
}

Comments

20 pages, 9 figures

R2 v1 2026-06-23T07:24:56.030Z