We give algorithms that, given a straight-line program (SLP) with g rules that generates (only) a text T[1..n], build within O(g) space the Lempel-Ziv (LZ) parse of T (of z phrases) in time O(nlog ^2 n) or in time O(gzlog ^2(n/z)) . We also show how to build a locally consistent grammar (LCG) of optimal size g_lc = O(δlogn/δ) from the SLP within O(g+g_lc) space and in O(nlog g) time, where δ is the substring complexity measure of T. Finally, we show how to build the LZ parse of T from such an LCG within O(g_lc) space and in time O(zlog ^2 n log ^2(n/z)) . All our results hold with high probability.
更多
查看译文
关键词
Membrane Computing,Duplication and Inversion,Molecular Computation,Spiking Neural P Systems,Approximate Matching