English

Approximating LZ77 via Small-Space Multiple-Pattern Matching

Data Structures and Algorithms 2015-09-11 v2

Abstract

We generalize Karp-Rabin string matching to handle multiple patterns in O(nlogn+m)\mathcal{O}(n \log n + m) time and O(s)\mathcal{O}(s) space, where nn is the length of the text and mm is the total length of the ss patterns, returning correct answers with high probability. As a prime application of our algorithm, we show how to approximate the LZ77 parse of a string of length nn. If the optimal parse consists of zz phrases, using only O(z)\mathcal{O}(z) working space we can return a parse consisting of at most (1+ε)z(1+\varepsilon)z phrases in O(ε1nlogn)\mathcal{O}(\varepsilon^{-1}n\log n) time, for any ε(0,1]\varepsilon\in (0,1]. As previous quasilinear-time algorithms for LZ77 use Ω(n/polylog n)\Omega(n/\textrm{polylog }n) space, but zz can be exponentially small in nn, these improvements in space are substantial.

Keywords

Cite

@article{arxiv.1504.06647,
  title  = {Approximating LZ77 via Small-Space Multiple-Pattern Matching},
  author = {Johannes Fischer and Travis Gagie and Paweł Gawrychowski and Tomasz Kociumaka},
  journal= {arXiv preprint arXiv:1504.06647},
  year   = {2015}
}

Comments

preliminary version presented at ESA 2015

R2 v1 2026-06-22T09:22:26.772Z