Abstract
We investigate the complexity of satisfiability problems parameterized by the size of the solution set compared to all solution candidates. Our main result is a uniform sampling algorithm for satisfying assignments of 2-CNF formulas that runs in expected time \(O^*(\varepsilon ^{-0.617})\) where \(\varepsilon \) is the fraction of assignments that are satisfying. This improves significantly over the trivial sampling bound of expected \(\Theta ^*(\varepsilon ^{-1})\), and on all previous algorithms whenever \(\varepsilon = \Omega (0.708^n)\), where n is the number of variables. We also consider algorithms for 3-SAT with an \(\varepsilon \) fraction of satisfying assignments, and prove that we can output a satisfying assignment in \(O^*(\varepsilon ^{-0.936})\) randomized time, and sample uniformly a satisfying assignment in time \(O^*(\varepsilon ^{-0.908}1.021^n)\). In the end we also present sampling results in the cases of 1-IN-3-SAT, monotone bounded degree 3-SAT and planar k-SAT.
Similar content being viewed by others
Notes
This is equivalent to finding a 1-maximal matching in a graph: first find a maximal matching and then find a maximal set of independent augmenting paths of length 3 and augment them.
References
Aspvall, B., Plass, M.F., Tarjan, R.E.: A linear-time algorithm for testing the truth of certain quantified boolean formulas. Inf. Process. Lett. 8(3), 121–123 (1979)
Beigel, R., Eppstein, D.: 3-coloring in time \(o(1.3446^n)\): a no-MIS algorithm. In: 36th IEEE Annual Symposium on Foundations of Computer Science, (FOCS), vol. 36, pp. 444–452 (1995)
De, A., Etesami, O., Trevisan, L., Tulsiani, M.: Improved pseudorandom generators for depth 2 circuits. In: 13th International Workshop, APPROX, and 14th International Workshop Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques, RANDOM, pp. 504–517 (2010)
Hertli, T.: 3-SAT faster and simpler–unique-SAT bounds for PPSZ hold in general. SIAM J. Comput. 43(2), 718–729 (2014)
Hirsch, E.A.: A fast deterministic algorithm for formulas that have many satisfying assignments. Logic J IGPL 6(1), 59–71 (1998)
Hofmeister, T., Schöning, U., Schuler, R., Watanabe, O.: A probabilistic 3–SAT algorithm further improved. In: Annual Symposium on Theoretical Aspects of Computer Science, pp. 192–202. Springer (2002)
Hofmeister, T., Schoning, U., Schuler, R., Watanabe, O.: Randomized algorithms for 3-SAT. Theory Comput. Syst. 40(3), 249–262 (2007)
Jerrum, M.R.: Counting, Sampling and Integrating: Algorithms and Complexity. Springer, Berlin (2003)
Jerrum, M.R., Valiant, L.G., Vazirani, V.V.: Random generation of combinatorial structures from a uniform distribution. Theoret. Comput. Sci. 43, 169–188 (1986)
Kane, D.M., Watanabe, O.: A short implicant of CNFs with relatively many satisfying assignments. Electron. Colloq. Comput. Complex. 20, 176 (2013)
Kutzkov, K.: New upper bound for the #3-SAT problem. Inf. Process. Lett. 105(1), 1–5 (2007)
Lipton, R.J., Tarjan, R.E.: Applications of a planar separator theorem. SIAM J. Comput. 9(3), 615–627 (1980)
Meel, K.S., Vardi, M.Y., Chakraborty, S., Fremont, D.J., Seshia, S.A., Fried, D., Ivrii, A., Malik, S.: Constrained sampling and counting: Universal hashing meets SAT solving. In: AAAI Workshop: Beyond NP (2016)
Naveh, Y., Rimon, M., Jaeger, I., Katz, Y., Vinov, M., Marcus, E., Shurek, G.: Constraint-based random stimuli generation for hardware verification. AI Mag. 28(3), 13 (2007)
Sang, T., Beame, P., Kautz, H.A.: Performing Bayesian inference by weighted model counting. In AAAI, vol. 5, pp. 475–481 (2005)
Schmitt, M., Wanka, R.: Exploiting independent subformulas: a faster approximation scheme for #k-SAT. Inf. Process. Lett. 113(9), 337–344 (2013)
Servedio, R.A., Tan, L.Y.: Deterministic search for CNF satisfying assignments in almost polynomial time. In: 58th IEEE Annual Symposium on Foundations of Computer Science, (FOCS), pp. 813–823 (2017)
Trevisan, L.: A note on approximate counting for k-DNF. In: Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques, pp. 417–425. Springer (2004)
Wahlström, M.: A tighter bound for counting max-weight solutions to 2SAT instances. In: International Workshop on Parameterized and Exact Computation, pp. 202–213. Springer (2008)
Acknowledgements
We would like to thank Noga Alon and József Solymosi for discussions on the problem. We also thank the reviewers of IPEC 2017 and Algorithmica for valuable remarks that improved the exposition.
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
This work started at the 2016 Gremo Workshop on Open Problems (GWOP), on June 6–10 at St. Niklausen, OW, Switzerland. A preliminary version was presented at the the 12th International Symposium on Parameterized and Exact Computation (IPEC 2017). The current version contains additional results on 3-SAT problems, but does not include the results on deterministic algorithms for 3-SAT and vertex cover that were presented at the conference.
Rights and permissions
About this article
Cite this article
Cardinal, J., Nummenpalo, J. & Welzl, E. Solving and Sampling with Many Solutions. Algorithmica 82, 1474–1489 (2020). https://doi.org/10.1007/s00453-019-00654-w
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00453-019-00654-w