Abstract
It is shown that every tree of size n over a fixed set of σ different ranked symbols can be produced by a so called straight-line linear context-free tree grammar of size O(nlogσn), which can be used as a compressed representation of the input tree. Two algorithms for computing such tree grammar are presented: One working in logarithmic space and the other working in linear time. As a consequence, it is shown that every arithmetical formula of size n, in which only m≤n different variables occur, can be transformed (in linear time as well as in logspace) into an arithmetical circuit of size O(n⋅logmlogn) and depth O(logn). This refines a classical result of Brent from 1974, according to which an arithmetical formula of size n can be transformed into a logarithmic depth circuit of size O(n).
Highlights
Grammar-based compression has emerged to an active field in string compression during the past 20 years
We present a grammar-based tree compressor that transforms a given node-labelled ranked tree of size n with σ different node labels into a and depth O(log n), where the depth of a tree straight-line programs (TSLPs) is the depth of the corresponding derivation tree
Before we come to grammar-based tree compression, let us briefly discuss grammar-based string compression
Summary
Grammar-based compression has emerged to an active field in string compression during the past 20 years. To evaluate the compression performance of a grammar-based compressor C, two different approaches can be found in the literature: A first approach is to analyze the size of the SLP produced by C for an input string x compared to the size of a smallest SLP for x. Many grammar-based compressors produce for every string of length n an of size This holds for instance for the above mentioned LZ78, RePair, and BISECTION, and for all compressors that produce so-called irreducible SLPs [16]. We present a grammar-based tree compressor that transforms a given node-labelled ranked with σ different node labels into a TSLP n logσ n) and depth O(log n), where the depth of a TSLP is the depth of the corresponding derivation tree. The size of the minimal dag for trees of size n is Θ(n/ log n) on average [11] but n in the worst case
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.