Compilation and Fast Model Counting beyond CNF
Alexis de Colnet, Stefan Szeider, Tianwei Zhang
TL;DR
We address the problem of efficiently counting models for systems of Boolean constraints beyond CNF by leveraging incidence treewidth. The authors introduce the notion of $w$-slim constraints for complete OBDDs/SDNNFs and prove a fixed-parameter tractable compilation to d-SDNNF for conjunctions of such constraints, with running time $2^{O(k)}\mathrm{poly}(|F|+|\mathrm{var}(F)|)$ where $k=\mathrm{tw}_i(F)$. A central technique is encoding each constraint via Tseitin CNF with auxiliary variables, constructing per-constraint vtrees, and then merging these encodings to bound the incidence width and enable FPT compilation; a complementary approach yields faster model counting for a subfamily without compilation. The paper also provides lower bounds showing the exponent cannot be removed and presents a faster DP-based model counting scheme for one-sided and modulo constraints, demonstrating practical advantages for parity, cardinality, and threshold-like constraints. Overall, the work broadens the reach of knowledge compilation beyond CNF, offering both theoretical insights and practical counting methods for a wide class of constraints.
Abstract
Circuits in deterministic decomposable negation normal form (d-DNNF) are representations of Boolean functions that enable linear-time model counting. This paper strengthens our theoretical knowledge of what classes of functions can be efficiently transformed, or compiled, into d-DNNF. Our main contribution is the fixed-parameter tractable (FPT) compilation of conjunctions of specific constraints parameterized by incidence treewidth. This subsumes the known result for CNF. The constraints in question are all functions representable by constant-width ordered binary decision diagrams (OBDDs) for all variable orderings. For instance, this includes parity constraints and cardinality constraints with constant threshold. The running time of the FPT compilation is singly exponential in the incidence treewidth but hides large constants in the exponent. To balance that, we give a more efficient FPT algorithm for model counting that applies to a sub-family of the constraints and does not require compilation.
