English

Space-efficient conversions from SLPs

Data Structures and Algorithms 2023-10-11 v4

Abstract

We give algorithms that, given a straight-line program (SLP) with gg rules that generates (only) a text T[1..n]T [1..n], builds within O(g)O(g) space the Lempel-Ziv (LZ) parse of TT (of zz phrases) in time O(nlog2n)O(n\log^2 n) or in time O(gzlog2(n/z))O(gz\log^2(n/z)). We also show how to build a locally consistent grammar (LCG) of optimal size glc=O(δlognδ)g_{lc} = O(\delta\log\frac{n}{\delta}) from the SLP within O(g+glc)O(g+g_{lc}) space and in O(nlogg)O(n\log g) time, where δ\delta is the substring complexity measure of TT. Finally, we show how to build the LZ parse of TT from such a LCG within O(glc)O(g_{lc}) space and in time O(zlog2nlog2(n/z))O(z\log^2 n \log^2(n/z)). All our results hold with high probability.

Keywords

Cite

@article{arxiv.2212.02327,
  title  = {Space-efficient conversions from SLPs},
  author = {Travis Gagie and Adrián Goga and Artur Jeż and Gonzalo Navarro},
  journal= {arXiv preprint arXiv:2212.02327},
  year   = {2023}
}