English

Balancing Straight-Line Programs

Data Structures and Algorithms 2020-07-02 v5

Abstract

It is shown that a context-free grammar of size mm that produces a single string ww (such a grammar is also called a string straight-line program) can be transformed in linear time into a context-free grammar for ww of size O(m)\mathcal{O}(m), whose unique derivation tree has depth O(logw)\mathcal{O}(\log |w|). This solves an open problem in the area of grammar-based compression. Similar results are shown for two formalism for grammar-based tree compression: top dags and forest straight-line programs. These balancing results are all deduced from a single meta theorem stating that the depth of an algebraic circuit over an algebra with a certain finite base property can be reduced to O(logn)\mathcal{O}(\log n) with the cost of a constant multiplicative size increase. Here, nn refers to the size of the unfolding (or unravelling) of the circuit.

Keywords

Cite

@article{arxiv.1902.03568,
  title  = {Balancing Straight-Line Programs},
  author = {Moses Ganardi and Artur Jeż and Markus Lohrey},
  journal= {arXiv preprint arXiv:1902.03568},
  year   = {2020}
}

Comments

An extended abstract of this paper appears in the Proceedings of FOCS 2019