Efficient LZ78 factorization of grammar compressed text
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.
Cite
@article{arxiv.1207.4607,
title = {Efficient LZ78 factorization of grammar compressed text},
author = {Hideo Bannai and Shunsuke Inenaga and Masayuki Takeda},
journal= {arXiv preprint arXiv:1207.4607},
year = {2013}
}
Comments
SPIRE 2012