# Solving Projected Model Counting by Utilizing Treewidth and its Limits

arXiv: https://arxiv.org/abs/2305.19212 · HTML: https://mlsanity.com/paper/2305.19212/

## Key facts

- Cited by 1 papers in the map (data through 14 Oct 2026).
- Builds on 17 of its 92 references that are in the map.
- First posted on arXiv 30 May 2023.

## Builds on (most cited first, 17 of 17)

- [Multi-shot ASP solving with clingo](https://mlsanity.com/paper/1705.09811/) (2017)
- [The Model Counting Competition 2020](https://mlsanity.com/paper/2012.01323/) (2020)
- [Distribution-Aware Sampling and Weighted Model Counting for SAT](https://mlsanity.com/paper/1404.2984/) (2014)
- [Answer Set Solving with Bounded Treewidth Revisited](https://mlsanity.com/paper/1702.02890/) (2017)
- [An Experimental Study of the Treewidth of Real-World Graph Data (Extended Version)](https://mlsanity.com/paper/1901.06862/) (2019)
- [Exploiting Database Management Systems and Treewidth for Counting](https://mlsanity.com/paper/2001.04191/) (2020)
- [Projected Model Counting](https://mlsanity.com/paper/1507.07648/) (2015)
- [Implementing Efficient All Solutions SAT Solvers](https://mlsanity.com/paper/1510.00523/) (2015)
- [Lower Bounds for QBFs of Bounded Treewidth](https://mlsanity.com/paper/1910.01047/) (2019)
- [Practical Access to Dynamic Programming on Tree Decompositions](https://mlsanity.com/paper/1806.10176/) (2018)
- [Structural Decompositions of Epistemic Logic Programs](https://mlsanity.com/paper/2001.04219/) (2020)
- [Positive-instance driven dynamic programming for treewidth](https://mlsanity.com/paper/1704.05286/) (2017)
- [A Trichotomy in the Complexity of Counting Answers to Conjunctive Queries](https://mlsanity.com/paper/1408.0890/) (2014)
- [Structural Tractability of Counting of Solutions to Conjunctive Queries](https://mlsanity.com/paper/1303.2059/) (2013)
- [Combining Treewidth and Backdoors for CSP](https://mlsanity.com/paper/1610.03298/) (2016)
- [Exploiting Treewidth for Projected Model Counting and its Limits](https://mlsanity.com/paper/1805.05445/) (2018)
- [Measuring what Matters: A Hybrid Approach to Dynamic Programming with Treewidth](https://mlsanity.com/paper/1908.10132/) (2019)

## Built on by (most cited first, 1 of 1)

- [Dynamic Blocked Clause Elimination for Projected Model Counting](https://mlsanity.com/paper/2408.06199/) (2024)

## Abstract (arXiv)

In this paper, we introduce a novel algorithm to solve projected model counting (PMC). PMC asks to count solutions of a Boolean formula with respect to a given set of projection variables, where multiple solutions that are identical when restricted to the projection variables count as only one solution. Inspired by the observation that the so-called "treewidth" is one of the most prominent structural parameters, our algorithm utilizes small treewidth of the primal graph of the input instance. More precisely, it runs in time O(2^2k+4n2) where k is the treewidth and n is the input size of the instance. In other words, we obtain that the problem PMC is fixed-parameter tractable when parameterized by treewidth. Further, we take the exponential time hypothesis (ETH) into consideration and establish lower bounds of bounded treewidth algorithms for PMC, yielding asymptotically tight runtime bounds of our algorithm. While the algorithm above serves as a first theoretical upper bound and although it might be quite appealing for small values of k, unsurprisingly a naive implementation adhering to this runtime bound suffers already from instances of relatively small width. Therefore, we turn our attention to several measures in order to resolve this issue towards exploiting treewidth in practice: We present a technique called nested dynamic programming, where different levels of abstractions of the primal graph are used to (recursively) compute and refine tree decompositions of a given instance. Finally, we provide a nested dynamic programming algorithm and an implementation that relies on database technology for PMC and a prominent special case of PMC, namely model counting (#Sat). Experiments indicate that the advancements are promising, allowing us to solve instances of treewidth upper bounds beyond 200.
