Balancing Straight-Line Programs

02/10/2019
by   Moses Ganardi, et al.
0

It is shown that a context-free grammar of size m that produces a single string w (such a grammar is also called a string straight-line program) can be transformed in linear time into a context-free grammar for w of size O(m), whose unique derivation tree has depth O( |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( n) with the cost of a constant multiplicative size increase. Here, n refers to the size of the unfolding (or unravelling) of the circuit.

READ FULL TEXT
research
07/01/2021

Compression by Contracting Straight-Line Programs

In grammar-based compression a string is represented by a context-free g...
research
03/18/2020

Grammar compression with probabilistic context-free grammar

We propose a new approach for universal lossless text compression, based...
research
01/10/2019

Entropy Bounds for Grammar-Based Tree Compressors

The definition of k^th-order empirical entropy of strings is extended to...
research
02/15/2018

Grammar-based Compression of Unranked Trees

We introduce forest straight-line programs (FSLPs) as a compressed repre...
research
07/11/2017

Multiple Context-Free Tree Grammars: Lexicalization and Characterization

Multiple (simple) context-free tree grammars are investigated, where "si...
research
02/22/2019

On Transforming Narrowing Trees into Regular Tree Grammars Generating Ranges of Substitutions

The grammar representation of a narrowing tree for a syntactically deter...
research
01/03/2022

Efficient enumeration algorithms for annotated grammars

We introduce annotated grammars, an extension of context-free grammars w...

Please sign up or login with your details

Forgot password? Click here to reset