A Scalable Approximate Model Counter

Propositional model counting (#SAT), i.e., counting the number of satisfying assignments of a propositional formula, is a problem of significant theoretical and practical interest. Due to the inherent complexity of the problem, approximate model counting, which counts the number of satisfying assignments to within given tolerance and confidence level, was proposed as a practical alternative to exact model counting. Yet, approximate model counting has been studied essentially only theoretically. The only reported implementation of approximate model counting, due to Karp and Luby, worked only for DNF formulas. A few existing tools for CNF formulas are bounding model counters; they can handle realistic problem sizes, but fall short of providing counts within given tolerance and confidence, and, thus, are not approximate model counters. We present here a novel algorithm, as well as a reference implementation, that is the first scalable approximate model counter for CNF formulas. The algorithm works by issuing a polynomial number of calls to a SAT solver. Our tool, ApproxMC, scales to formulas with tens of thousands of variables. Careful experimental comparisons show that ApproxMC reports, with high confidence, bounds that are close to the exact count, and also succeeds in reporting bounds with small tolerance and high confidence in cases that are too large for computing exact model counts. Authors would like to thank Henry Kautz and Ashish Sabhrawal for their valuable help in experiments, and Tracy Volz for valuable comments on the earlier drafts. Work supported in part by NSF grants CNS 1049862 and CCF-1139011, by NSF Expeditions in Computing project "ExCAPE: Expeditions in Computer Augmented Program Engineering," by BSF grant 9800096, by a gift from Intel, by a grant from Board of Research in Nuclear Sciences, India, and by the Shared University Grid at Rice funded by NSF under Grant EIA-0216467, and a partnership between Rice University, Sun Microsystems, and Sigma Solutions, Inc.

[1]  Aravind Srinivasan,et al.  Chernoff-Hoeffding bounds for applications with limited independence , 1995, SODA '93.

[2]  Roberto J. Bayardo,et al.  Using CSP Look-Back Techniques to Solve Exceptionally Hard SAT Instances , 1996, CP.

[3]  Carmel Domshlak,et al.  Probabilistic Planning via Heuristic Forward Search and Weighted Model Counting , 2007, J. Artif. Intell. Res..

[4]  Leslie G. Valiant,et al.  Random Generation of Combinatorial Structures from a Uniform Distribution , 1986, Theor. Comput. Sci..

[5]  Mihir Bellare,et al.  Uniform Generation of NP-Witnesses Using an NP-Oracle , 2000, Inf. Comput..

[6]  Shin-ichi Minato,et al.  Zero-Suppressed BDDs for Set Manipulation in Combinatorial Problems , 1993, 30th ACM/IEEE Design Automation Conference.

[7]  Vibhav Gogate,et al.  SampleSearch: Importance sampling in presence of determinism , 2011, Artif. Intell..

[8]  R. Rubinstein Stochastic Enumeration Method for Counting NP-Hard Problems , 2013 .

[9]  Henry A. Kautz,et al.  Performing Bayesian Inference by Weighted Model Counting , 2005, AAAI.

[10]  M. Luby Monte-carlo methods for estimating system reliability , 1983 .

[11]  Leslie G. Valiant,et al.  The Complexity of Enumeration and Reliability Problems , 1979, SIAM J. Comput..

[12]  Adnan Darwiche,et al.  New Advances in Compiling CNF into Decomposable Negation Normal Form , 2004, ECAI.

[13]  Thomas Hofmann,et al.  Near-Uniform Sampling of Combinatorial Spaces Using XOR Constraints , 2007 .

[14]  Luca Trevisan,et al.  Lecture Notes on Computational Complexity , 2004 .

[15]  Ingo Wegener,et al.  The Number of Knight's Tours Equals 33, 439, 123, 484, 294 - Counting with Binary Decision Diagrams , 1996, Electron. J. Comb..

[16]  Ashish Sabharwal,et al.  Leveraging Belief Propagation, Backtrack Search, and Statistics for Model Counting , 2008, ISAIM.

[17]  Dana Angluin,et al.  On Counting Problems and the Polynomial-Time Hierarchy , 1980, Theor. Comput. Sci..

[18]  Michael Sipser,et al.  A complexity theoretic approach to randomness , 1983, STOC.

[19]  Bart Selman,et al.  Uniform Solution Sampling Using a Constraint Solver As an Oracle , 2012, UAI.

[20]  Bart Selman,et al.  A New Approach to Model Counting , 2005, SAT.

[21]  Larry J. Stockmeyer,et al.  The complexity of approximate counting , 1983, STOC.

[22]  Eliezer L. Lozinskii,et al.  The Good Old Davis-Putnam Procedure Helps Counting Models , 2011, J. Artif. Intell. Res..

[23]  Janos Simon,et al.  On the Difference Between One and Many (Preliminary Version) , 1977, ICALP.

[24]  Bart Selman,et al.  Model Counting , 2021, Handbook of Satisfiability.

[25]  Seinosuke Toda On the computational power of PP and (+)P , 1989, 30th Annual Symposium on Foundations of Computer Science.

[26]  Toniann Pitassi,et al.  Combining Component Caching and Clause Learning for Effective Model Counting , 2004, SAT.

[27]  Bart Selman,et al.  Model Counting: A New Strategy for Obtaining Good Bounds , 2006, AAAI.

[28]  Jörg Hoffmann,et al.  From Sampling to Model Counting , 2007, IJCAI.

[29]  Richard M. Karp,et al.  Monte-Carlo Approximation Algorithms for Enumeration Problems , 1989, J. Algorithms.

[30]  Marc Thurley,et al.  sharpSAT - Counting Models with Advanced Component Caching and Implicit BCP , 2006, SAT.

[31]  C. Pixley,et al.  Simplifying Boolean constraint solving for random simulation-vector generation , 2002, IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems.

[32]  Toniann Pitassi,et al.  Algorithms and complexity results for #SAT and Bayesian inference , 2003, 44th Annual IEEE Symposium on Foundations of Computer Science, 2003. Proceedings..

[33]  Supratik Chakraborty,et al.  A Scalable and Nearly Uniform Generator of SAT Witnesses , 2013, CAV.

[34]  Roberto J. Bayardo,et al.  Using CSP Look-Back Techniques to Solve Real-World SAT Instances , 1997, AAAI/IAAI.

[35]  Dan Roth,et al.  On the Hardness of Approximate Reasoning , 1993, IJCAI.

[36]  Andreas Kuehlmann,et al.  Stimulus generation for constrained random simulation , 2007, ICCAD 2007.