The Complexity of Dynamic LZ77 is $\tilde{\Theta}(n^{2/3})$
Abstract
The Lempel-Ziv 77 (LZ77) factorization is a fundamental compression scheme widely used in text processing and data compression. In this work, we investigate the time complexity of maintaining the LZ77 factorization of a dynamic string. By establishing matching upper and lower bounds, we fully characterize the complexity of this problem. We present an algorithm that efficiently maintains the LZ77 factorization of a string undergoing edit operations, including character substitutions, insertions, and deletions. Our data structure can be constructed in time for an initial string of length and supports updates in time, where is the current length of . Additionally, we prove that no algorithm can achieve an update time of unless the Strong Exponential Time Hypothesis fails. This lower bound holds even in the restricted setting where only substitutions are allowed and only the length of the LZ77 factorization is maintained.
Keywords
Cite
@article{arxiv.2502.12000,
title = {The Complexity of Dynamic LZ77 is $\tilde{\Theta}(n^{2/3})$},
author = {Itai Boneh and Shay Golan and Matan Kraus},
journal= {arXiv preprint arXiv:2502.12000},
year = {2025}
}
Comments
Accepted to SODA 2026