Efficient LZ78 factorization of grammar compressed text
arXiv:1207.4607 · doi:10.1007/978-3-642-34109-0_10
Abstract
We present an efficient algorithm for computing the LZ78 factorization of a text, where the text is represented as a straight line program (SLP), which is a context free grammar in the Chomsky normal form that generates a single string. Given an SLP of size representing a text of length , our algorithm computes the LZ78 factorization of in time and space, where is the number of resulting LZ78 factors. We also show how to improve the algorithm so that the term in the time and space complexities becomes either , where is the length of the longest LZ78 factor, or where is a quantity which depends on the amount of redundancy that the SLP captures with respect to substrings of of a certain length. Since where is the alphabet size, the latter is asymptotically at least as fast as a linear time algorithm which runs on the uncompressed string when is constant, and can be more efficient when the text is compressible, i.e. when and are small.
SPIRE 2012
References in corpus (5)
- Tying up the loose ends in fully LZW-compressed pattern matching
- Pattern matching in Lempel-Ziv compressed strings: fast, simple, and deterministic
- On Bijective Variants of the Burrows-Wheeler Transform
- Solving Classical String Problems on Compressed Texts
- Speeding-up -gram mining on grammar-based compressed texts