#CFG and #DNNF admit FPRAS
This solves a fundamental open problem in counting complexity for two important formalisms, providing efficient approximation algorithms where only quasi-polynomial or restricted-case algorithms were known.
The paper provides the first fully polynomial-time randomized approximation schemes (FPRAS) for counting words generated by a context-free grammar and counting satisfying assignments of a DNNF circuit, solving two longstanding open problems.
We provide the first fully polynomial-time randomized approximation scheme for the following two counting problems: 1. Given a Context Free Grammar $G$ over alphabet $Σ$, count the number of words of length exactly $n$ generated by $G$. 2. Given a circuit $φ$ in Decomposable Negation Normal Form (DNNF) over the set of Boolean variables $X$, compute the number of assignments to $X$ such that $φ$ evaluates to 1. Finding polynomial time algorithms for the aforementioned problems has been a longstanding open problem. Prior work could either only obtain a quasi-polynomial runtime (SODA 1995) or a polynomial-time randomized approximation scheme for restricted fragments, such as non-deterministic finite automata (JACM 2021) or non-deterministic tree automata (STOC 2021).