TL;DR
Projected Model Counting (PMC) is a notoriously difficult problem (#·NP-complete) used to count unique solutions over a subset of variables in a Boolean formula. This paper introduces the first fixed-parameter tractable (FPT) algorithm for PMC by exploiting the structural property of treewidth. Crucially, the authors prove that their double-exponential runtime bound is asymptotically optimal under the Exponential Time Hypothesis (ETH), establishing the theoretical limits of solving PMC efficiently.
What Problem Does This Paper Address?
In computer science, Model Counting (#SAT) asks us to find the total number of satisfying assignments for a given Boolean formula. However, in many real-world applications—like database queries or declarative problem modeling—we introduce auxiliary variables to simplify problem encoding. We don't actually care about the values of these auxiliary variables; we only care about a specific subset of "projected" variables.
This is where Projected Model Counting (PMC) comes in. PMC counts solutions with respect to a given set of projected variables, meaning multiple global solutions that look identical when restricted to the projected variables are counted as only one solution.
While standard #SAT is #P-complete, adding projection makes the problem significantly harder: PMC is complete for the complexity class #·NP. The authors tackle the challenge of solving this highly complex problem by exploiting the structural "tree-likeness" (treewidth) of the formula's graph representation.
Methods
The authors propose a novel two-pass dynamic programming algorithm called PCNTSAT that operates on a nice tree decomposition of the formula's primal graph.
- Pass 1 (Standard SAT Solving & Purging): The algorithm performs a standard bottom-up dynamic programming traversal (
DPSAT) to find satisfying assignments. Crucially, it then performs a "purging" step to eliminate any partial assignments that cannot be extended to a full solution, preventing unnecessary computation later. - Pass 2 (Projected Counting): The algorithm traverses the tree decomposition a second time (
DPPROJ). It groups valid assignments into equivalence classes (called buckets) based on their projected variables. It then applies a sophisticated, recursive version of the generalized inclusion-exclusion principle to compute the intersection of projected model counts across tree nodes without overcounting.
Unlike standard #SAT algorithms on tree decompositions, which scale single-exponentially with treewidth ($k$), tracking the complex subset relationships required for projection forces a double-exponential time complexity: $O(2^{2^{k+4}} n^2)$, where $n$ is the input size.
Datasets
Not discussed in the paper. (The paper is purely theoretical and algorithmic, focusing on complexity proofs and runtime bounds rather than empirical evaluation).
Key Insights and Ideas
- The Power of Purging: Cleaning up the dynamic programming tables between passes is a vital optimization. By removing dead-end partial assignments early, the algorithm avoids having to correct stored counters via expensive backtracking during the counting phase.
- Double Exponential is Unavoidable: The most striking insight is the lower bound proof. By reducing from $\exists\forall$-SAT, the authors prove that under the Exponential Time Hypothesis (ETH), no bounded treewidth algorithm can solve PMC in $2^{2^{o(k)}} \cdot \|F\|^{o(k)}$ time. This means the double-exponential complexity is an inherent property of the problem, making their algorithm asymptotically tight and optimal.
- FPT to the Rescue: Despite the problem's extreme hardness (#·NP-complete), the paper establishes that PMC is Fixed-Parameter Tractable (FPT) when parameterized by treewidth. For instances where the graph structure remains tree-like (small $k$), the problem scales polynomially ($n^2$) with the size of the formula.
Key Results
- New Algorithm: Introduced
PCNTSAT, the first FPT algorithm for PMC using treewidth, with a deterministic runtime of $O(2^{2^{k+4}} n^2)$. - Tight Complexity Bounds: Proved a matching lower bound under ETH, establishing that a double-exponential dependence on treewidth is theoretically mandatory for PMC.
Limitations and Future Work
- The Treewidth Bottleneck: Because the runtime scales double-exponentially with treewidth ($2^{2^k}$), the algorithm quickly becomes impractical for instances where the treewidth $k$ is even moderately large (e.g., $k > 4$).
- Alternative Graph Representations: The current approach relies on the primal graph of the formula. The authors note that extending this framework to incidence graphs might yield better structural parameters and tighter bounds for certain types of formulas.
- Broader Framework Potential: The multi-pass inclusion-exclusion dynamic programming strategy developed here is highly general. The authors suggest it could be adapted to solve other challenging combinatorial problems involving projection, such as projection in Answer Set Programming (ASP) or Quantified Boolean Formulas (QBF).
Summary updated