Abstract

We generalize Karp-Rabin string matching to handle multiple patterns in O(nlog⁡n+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(ε−1nlog⁡n)\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)Ω(n/\textrm{polylog }n) space, but zz can be exponentially small in nn, these improvements in space are substantial.

Explore this paper’s authors, topics and related work.

Building this map preview

BZPEER is loading the nearby papers, people, topics and institutions for this page.

Reviews 0

Write a reviewWrite

No reviews yet.

Discussion 0

Add a commentWrite

No comments yet.