English

Constructing small tree grammars and small circuits for formulas

Data Structures and Algorithms 2015-09-22 v3 Computational Complexity Formal Languages and Automata Theory

Abstract

It is shown that every tree of size nn over a fixed set of σ\sigma different ranked symbols can be decomposed (in linear time as well as in logspace) into O(nlogσn)=O(nlogσlogn)O\big(\frac{n}{\log_\sigma n}\big) = O\big(\frac{n \log \sigma}{\log n}\big) many hierarchically defined pieces. Formally, such a hierarchical decomposition has the form of a straight-line linear context-free tree grammar of size O(nlogσn)O\big(\frac{n}{\log_\sigma n}\big), which can be used as a compressed representation of the input tree. This generalizes an analogous result for strings. Previous grammar-based tree compressors were not analyzed for the worst-case size of the computed grammar, except for the top dag of Bille et al., for which only the weaker upper bound of O(nlogσ0.19n)O\big(\frac{n}{\log_\sigma^{0.19} n}\big) (which was very recently improved to O(nloglogσnlogσn)O\big(\frac{n \cdot \log \log_\sigma n}{\log_\sigma n}\big) by H\"ubschle-Schneider and Raman) for unranked and unlabelled trees has been derived. The main result is used to show that every arithmetical formula of size nn, in which only mnm \leq n different variables occur, can be transformed (in linear time as well as in logspace) into an arithmetical circuit of size O(nlogmlogn)O\big(\frac{n \cdot \log m}{\log n}\big) and depth O(logn)O(\log n). This refines a classical result of Brent from 1974, according to which an arithmetical formula of size nn can be transformed into a logarithmic depth circuit of size O(n)O(n).

Keywords

Cite

@article{arxiv.1407.4286,
  title  = {Constructing small tree grammars and small circuits for formulas},
  author = {Moses Ganardi and Danny Hucke and Artur Jez and Markus Lohrey and Eric Noeth},
  journal= {arXiv preprint arXiv:1407.4286},
  year   = {2015}
}

Comments

A short version of this paper appeared in the Proceedings of FSTTCS 2014

R2 v1 2026-06-22T05:05:20.364Z