English

Small-space encoding LCE data structure with constant-time queries

Data Structures and Algorithms 2017-02-27 v1

Abstract

The \emph{longest common extension} (\emph{LCE}) problem is to preprocess a given string ww of length nn so that the length of the longest common prefix between suffixes of ww that start at any two given positions is answered quickly. In this paper, we present a data structure of O(zτ2+nτ)O(z \tau^2 + \frac{n}{\tau}) words of space which answers LCE queries in O(1)O(1) time and can be built in O(nlogσ)O(n \log \sigma) time, where 1τn1 \leq \tau \leq \sqrt{n} is a parameter, zz is the size of the Lempel-Ziv 77 factorization of ww and σ\sigma is the alphabet size. This is an \emph{encoding} data structure, i.e., it does not access the input string ww when answering queries and thus ww can be deleted after preprocessing. On top of this main result, we obtain further results using (variants of) our LCE data structure, which include the following: - For highly repetitive strings where the zτ2z\tau^2 term is dominated by nτ\frac{n}{\tau}, we obtain a \emph{constant-time and sub-linear space} LCE query data structure. - Even when the input string is not well compressible via Lempel-Ziv 77 factorization, we still can obtain a \emph{constant-time and sub-linear space} LCE data structure for suitable τ\tau and for σ2o(logn)\sigma \leq 2^{o(\log n)}. - The time-space trade-off lower bounds for the LCE problem by Bille et al. [J. Discrete Algorithms, 25:42-50, 2014] and by Kosolobov [CoRR, abs/1611.02891, 2016] can be "surpassed" in some cases with our LCE data structure.

Keywords

Cite

@article{arxiv.1702.07458,
  title  = {Small-space encoding LCE data structure with constant-time queries},
  author = {Yuka Tanimura and Takaaki Nishimoto and Hideo Bannai and Shunsuke Inenaga and Masayuki Takeda},
  journal= {arXiv preprint arXiv:1702.07458},
  year   = {2017}
}
R2 v1 2026-06-22T18:27:06.188Z