Lempel-Ziv (LZ77) Factorization in Sublinear Time
arXiv:2409.12146 · doi:10.1109/FOCS61266.2024.00122
Abstract
Lempel-Ziv (LZ77) factorization is a fundamental problem in string processing: Greedily partition a given string from left to right into blocks (called phrases) so that each phrase is either the leftmost occurrence of a letter or the longest prefix of the unprocessed suffix that has another occurrence earlier in . Due to numerous applications, LZ77 factorization is one of the most studied problems on strings. In the 47 years since its inception, several algorithms were developed for different models of computation, including parallel, GPU, external-memory, and quantum. Remarkably, however, the complexity of the most basic variant is still not settled: All existing algorithms in the RAM model run in time, which is a factor away from the lower bound of (following from the necessity to read the input, which takes space for ). We present the first -time algorithm for LZ77 factorization, breaking the linear-time barrier present for nearly 50 years. For , our algorithm runs in time and uses the optimal working space. Our algorithm generalizes to , where . The runtime and working space then become and . To obtain our algorithm, we prove a more general result: For any constant and , in time and using space, we can construct an -size index that, given any (represented as ), computes the leftmost occurrence of in in time. In other words, we solve the indexing/online variant of the LZ77 problem.
arXiv commentAccepted to FOCS 2024
References in corpus (7)
- Linear Time Lempel-Ziv Factorization: Simple, Fast, Small
- Time-Space Trade-Offs for Lempel-Ziv Compressed Indexing
- Collapsing the Hierarchy of Compressed Data Structures: Suffix Arrays in Optimal Compressed Space
- Optimal Construction of Compressed Indexes for Highly Repetitive Texts
- Near-Optimal Search Time in -Optimal Space, and Vice Versa
- Grammar Compressed Sequences with Rank/Select Support
- Lempel-Ziv (LZ77) Factorization in Sublinear Time