English

Construction of Sparse Suffix Trees and LCE Indexes in Optimal Time and Space

Data Structures and Algorithms 2024-04-23 v3

Abstract

The notions of synchronizing and partitioning sets are recently introduced variants of locally consistent parsings with great potential in problem-solving. In this paper we propose a deterministic algorithm that constructs for a given readonly string of length nn over the alphabet {0,1,,nO(1)}\{0,1,\ldots,n^{\mathcal{O}(1)}\} a variant of τ\tau-partitioning set with size O(b)\mathcal{O}(b) and τ=nb\tau = \frac{n}{b} using O(b)\mathcal{O}(b) space and O(1ϵn)\mathcal{O}(\frac{1}{\epsilon}n) time provided bnϵb \ge n^\epsilon, for ϵ>0\epsilon > 0. As a corollary, for bnϵb \ge n^\epsilon and constant ϵ>0\epsilon > 0, we obtain linear construction algorithms with O(b)\mathcal{O}(b) space on top of the string for two major small-space indexes: a sparse suffix tree, which is a compacted trie built on bb chosen suffixes of the string, and a longest common extension (LCE) index, which occupies O(b)\mathcal{O}(b) space and allows us to compute the longest common prefix for any pair of substrings in O(n/b)\mathcal{O}(n/b) time. For both, the O(b)\mathcal{O}(b) construction storage is asymptotically optimal since the tree itself takes O(b)\mathcal{O}(b) space and any LCE index with O(n/b)\mathcal{O}(n/b) query time must occupy at least O(b)\mathcal{O}(b) space by a known trade-off (at least for bΩ(n/logn)b \ge \Omega(n / \log n)). In case of arbitrary bΩ(log2n)b \ge \Omega(\log^2 n), we present construction algorithms for the partitioning set, sparse suffix tree, and LCE index with O(nlogbn)\mathcal{O}(n\log_b n) running time and O(b)\mathcal{O}(b) space, thus also improving the state of the art.

Keywords

Cite

@article{arxiv.2105.03782,
  title  = {Construction of Sparse Suffix Trees and LCE Indexes in Optimal Time and Space},
  author = {Dmitry Kosolobov and Nikita Sivukhin},
  journal= {arXiv preprint arXiv:2105.03782},
  year   = {2024}
}

Comments

33 pages (1 title page, 15 pages main text, 14 pages appendix), 3 figures, 1 table