English

The Complexity of Dynamic LZ77 is $\tilde{\Theta}(n^{2/3})$

Data Structures and Algorithms 2025-10-28 v3

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 SS undergoing edit operations, including character substitutions, insertions, and deletions. Our data structure can be constructed in O~(n)\tilde{O}(n) time for an initial string of length nn and supports updates in O~(n2/3)\tilde{O}(n^{2/3}) time, where nn is the current length of SS. Additionally, we prove that no algorithm can achieve an update time of O(n2/3ε)O(n^{2/3-\varepsilon}) 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