[Paper Review] Small-space encoding LCE data structure with constant-time queries
This paper presents a novel encoding data structure for the Longest Common Extension (LCE) problem that achieves O(1) query time using O(zτ² + n/τ) words of space, where z is the size of the Lempel-Ziv 77 factorization and τ ≤ √n is a trade-off parameter. The structure is space-efficient, does not require access to the original string after preprocessing, and surpasses known time-space trade-off lower bounds for highly repetitive strings and small alphabets.
The \emph{longest common extension} (\emph{LCE}) problem is to preprocess a given string $w$ of length $n$ so that the length of the longest common prefix between suffixes of $w$ that start at any two given positions is answered quickly. In this paper, we present a data structure of $O(z τ^2 + \frac{n}τ)$ words of space which answers LCE queries in $O(1)$ time and can be built in $O(n \log σ)$ time, where $1 \leq τ\leq \sqrt{n}$ is a parameter, $z$ is the size of the Lempel-Ziv 77 factorization of $w$ and $σ$ is the alphabet size. This is an \emph{encoding} data structure, i.e., it does not access the input string $w$ when answering queries and thus $w$ 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τ^2$ term is dominated by $\frac{n}τ$, 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 $τ$ and for $σ\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.
Motivation & Objective
- To design a space-efficient LCE data structure that supports constant-time queries while using sub-linear space.
- To eliminate the need for storing the original string after preprocessing by creating an encoding data structure.
- To overcome known time-space trade-off lower bounds for the LCE problem in specific regimes, such as highly repetitive strings or small alphabets.
- To achieve optimal space-time trade-offs for strings compressible via Lempel-Ziv 77 factorization.
- To explore the feasibility of sub-linear working space for computing the Lempel-Ziv factorization.
Proposed method
- The data structure is built using a t-truncated suffix tree, where suffixes are truncated at length t, and indexed using Lempel-Ziv 77 factorization to compress the structure.
- It employs a novel encoding technique that avoids storing the original string, relying only on compressed representations and auxiliary data structures.
- The LCE query is answered in O(1) time by combining range minimum queries (RMQ) on LCP arrays and compressed representations of suffix arrays.
- The construction uses a parameter τ to balance space and time, with the space complexity bounded by O(zτ² + n/τ) words.
- For small alphabets (σ ≤ 2^o(log n)), the method leverages packed memory words to perform constant-time bit-parallel operations on substrings of length log n.
- The approach uses a two-phase query mechanism: short LCEs (≤ log n bits) via bit-parallel operations, and long LCEs via a compressed RMQ structure on the truncated suffix tree.
Experimental results
Research questions
- RQ1Can a constant-time LCE data structure be built using sub-linear space without accessing the original string?
- RQ2Can known time-space lower bounds for the LCE problem be surpassed in practice for highly repetitive strings?
- RQ3Is it possible to achieve O(1) query time with O(n/τ) space for strings with small Lempel-Ziv factorization size z?
- RQ4Does the alphabet size σ influence the validity of existing lower bounds for time-space trade-offs in LCE data structures?
- RQ5Can the Lempel-Ziv 77 factorization be computed in O(n log σ) time with sub-linear working space?
Key findings
- The proposed data structure supports O(1) time LCE queries using O(zτ² + n/τ) words of space, with construction in O(n log σ) time and O(zτ² + n/τ) working space.
- For highly repetitive strings where zτ² is dominated by n/τ, the space usage becomes sub-linear, achieving O(n/τ) words with O(1) query time.
- When σ ≤ 2^o(log n), the method achieves T(n)S(n) = o(n log n), which surpasses the lower bound of Bille et al. (2014) for such strings.
- For σ ≤ 2^o(√log n), the product of time and space complexity becomes o(n log n), surpassing Kosolobov’s lower bound in this regime.
- The data structure is an encoding structure: the original string w can be deleted after preprocessing, as queries do not require access to w.
- The method demonstrates that for small alphabets, bit-parallel operations on packed words enable constant-time LCE queries on substrings of length log n, enabling efficient query composition.
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.