MAJORITY-3SAT (and Related Problems) in Polynomial Time
Shyan Akmal, Ryan Williams
Abstract
Majority-SAT (a.k.a. MAJ-SAT) is the problem of determining whether an input n-variable formula in conjunctive normal form (CNF) has at least 2^(n-1) satisfying assignments. Majority-SAT and related problems have been studied extensively in various AI communities interested in the complexity of probabilistic planning and inference. Although Majority-SAT has been known to be PP-complete for over 40 years, the complexity of a natural variant has remained open: Majority-kSAT, where the input CNF formula is restricted to have clause width at most k. We prove that for every k, Majority-kSAT is in P; in fact, the problem can be solved in linear time (whereas the previous best-known algorithm ran in exponential time). More generally, for any positive integer k and constant p in (0,1) with bounded denominator, we give an algorithm that can determine whether a given k-CNF has at least p(2^n) satisfying assignments, in deterministic linear time. We find these results surprising, as many analogous problems which are hard for CNF formulas remain hard when restricted to 3-CNFs. Our algorithms have interesting positive implications for counting complexity and the complexity of inference, significantly reducing the known complexities of related problems such as E-MAJ-kSAT and MAJ-MAJ-kSAT. Our results immediately extend to arbitrary Boolean CSPs with constraints of arity k. At the heart of our approach is an efficient method for solving threshold counting problems by extracting and analyzing various sunflowers found in the corresponding set system of a k-CNF. Exploring the implications of our results, we find that the tractability of Majority-kSAT is somewhat fragile, in intriguing ways. For the closely related GtMajority-SAT problem (where we ask whether a given formula has greater than 2^(n-1) satisfying assignments) which is also known to be PP-complete, we show that GtMajority-kSAT is in P for k at most 3, but becomes NP-complete for k at least 4. We also show that for Majority-SAT on k-CNFs with one additional clause of arbitrary width, the problem is PP-complete for k at least 4, is NP-hard for k=3, and remains in P for k=2. These results are counterintuitive, because the “natural” classifications of these problems would have been PP-completeness, and because there is a stark difference in the complexity of GtMajority-kSAT and Majority-kSAT for all k at least 4.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 87a90c44-68a6-4a78-9125-5f2a014ea312Cited by top-tier papers1
Ask how each one uses itRelated papers
- Min-CSPs on Complete InstancesAditya Anand, Euiwoong Lee, Amatya SharmaSODA 2025
- Improved Algorithms for Maximum Satisfiability and Its Special CasesKirill Brilliantov, Vasily Alferov, Ivan BliznetsAAAI 2023 · 6 citations
- Towards the sampling Lovász Local LemmaVishesh Jain, Huy Tuan Pham, Thuy-Duong VuongFOCS 2021 · 17 citations
- Enumerating k-SAT functionsDingding Dong, Nitya Mani, Yufei ZhaoSODA 2022 · 1 citation
- Flow-augmentation III: Complexity dichotomy for Boolean CSPs parameterized by the number of unsatisfied constraintsEun Jung Kim, Stefan Kratsch, Marcin Pilipczuk, Magnus WahlströmSODA 2023 · 4 citations
