We generalize Karp-Rabin string matching to handle multiple patterns in O(n log n + m) time and O(s) space, where n is the length of the text and m is the total length of the s 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 n. If the optimal parse consists of z phrases, using only O(z) working space we can return a parse consisting of at most 2z phrases in O(n log n) time, and a parse of at most (1+ε)z phrases in O(n log2 n) for any constant ε > 0. As previous quasilinear-time algorithms for LZ77 use Ω(n/poly log n) space, but z can be exponentially small in n, these improvements in space consumption are substantial.
CITATION STYLE
Fischer, J., Gagie, T., Gawrychowski, P., & Kociumaka, T. (2015). Approximating LZ77 via small-space multiple-pattern matching. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 9294, pp. 533–544). Springer Verlag. https://doi.org/10.1007/978-3-662-48350-3_45
Mendeley helps you to discover research relevant for your work.