Skip to main content
Log in

CNF Satisfiability in a Subspace and Related Problems

  • Published:
Algorithmica Aims and scope Submit manuscript

Abstract

We introduce the problem of finding a satisfying assignment to a CNF formula that must further belong to a prescribed input subspace. Equivalent formulations of the problem include finding a point outside a union of subspaces (the Union-of-Subspace Avoidance (USA) problem), and finding a common zero of a system of polynomials over \({\mathbb {F}}_2\) each of which is a product of affine forms. We focus on the case of k-CNF formulas (the \({k}-\textsc {Sub}-\textsc {Sat}\) problem). Clearly, \({k}-\textsc {Sub}-\textsc {Sat}\) is no easier than k-SAT, and might be harder. Indeed, via simple reductions we show that \({2}-\textsc {Sub}-\textsc {Sat}\) is NP-hard, and \({\small \mathrm {W}}[1]\)-hard when parameterized by the co-dimension of the subspace. We also prove that the optimization version Max-\({2}-\textsc {Sub}-\textsc {Sat}\) is NP-hard to approximate better than the trivial 3/4 ratio even on satisfiable instances. On the algorithmic front, we investigate fast exponential algorithms which give non-trivial savings over brute-force algorithms. We give a simple branching algorithm with running time \(O^*(1.5)^r\) for \({2}-\textsc {Sub}-\textsc {Sat}\), where r is the subspace dimension, as well as an \(O^*(1.4312)^n\) time algorithm where n is the number of variables. Turning to \({k}-\textsc {Sub}-\textsc {Sat}\) for \(k \geqslant 3\), while known algorithms for solving a system of degree k polynomial equations already imply a solution with running time \(\approx 2^{r(1-1/2k)}\), we explore a more combinatorial approach. Based on an analysis of critical variables (a key notion underlying the randomized k-SAT algorithm of Paturi, Pudlak, and Zane), we give an algorithm with running time \(\approx {n\atopwithdelims (){\leqslant t}} 2^{n-n/k}\) where n is the number of variables and t is the co-dimension of the subspace. This improves upon the running time of the polynomial equations approach for small co-dimension. Our combinatorial approach also achieves polynomial space in contrast to the algebraic approach that uses exponential space. We also give a PPZ-style algorithm for \({k}-\textsc {Sub}-\textsc {Sat}\) with running time \(\approx 2^{n-n/2k}\). This algorithm is in fact oblivious to the structure of the subspace, and extends when the subspace-membership constraint is replaced by any constraint for which partial satisfying assignments can be efficiently completed to a full satisfying assignment. Finally, for systems of O(n) polynomial equations in n variables over \({\mathbb {F}}_2\), we give a fast exponential algorithm when each polynomial has bounded degree irreducible factors (but can otherwise have large degree) using a degree reduction trick.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

Notes

  1. The NP-hardness would also follow from Schaefer’s dichotomy theorem for Boolean CSP [23], though that is an overkill hammer for this result.

  2. The notation \(O^*(f(n))\) for running time bounds suppresses polynomial factors.

  3. For nonnegative integers nt, the notation \({n \atopwithdelims (){\leqslant t}}\) stands for \(\sum _{i=0}^t {n \atopwithdelims ()i}\).

  4. Of course, there is also a trivial \(O^*(2^{n-t})\) time brute force algorithm.

  5. From a solution to \((\Phi _U,A_U)\) we can reconstruct the solution to \((\Phi ,A)\) as the values to variables in U are uniquely determined via the linear equations from the values to the other variables.

References

  1. Björklund, A., Kaski, P., Williams, R.: Solving systems of polynomial equations over GF(2) by a parity-counting self-reduction. In: Baier, C., Chatzigiannakis, I., Flocchini, P., Leonardi, S. (eds.) 46th International Colloquium on Automata, Languages, and Programming, ICALP 2019, July 9–12, 2019, Patras, Greece. LIPIcs, vol. 132, pp. 26:1–26:13. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2019)

  2. Brakensiek, J., Gopi, S., Guruswami, V.: CSPs with global modular constraints: algorithms and hardness via polynomial representations. In: Proceedings of the 51st Annual ACM Symposium on Theory of Computing (STOC), pp. 590–601 (2019)

  3. Brakensiek, J., Guruswami, V.: Bridging between 0/1 and linear programming via random walks. In: Proceedings of the 51st Annual ACM Symposium on Theory of Computing, pp. 568–577 (2019)

  4. Calabro, C., Impagliazzo, R., Paturi, R.: A duality between clause width and clause density for SAT. In: 21st Annual IEEE Conference on Computational Complexity (CCC 2006), 16–20 July 2006, Prague, Czech Republic, pp. 252–260. IEEE Computer Society (2006)

  5. Chan, T.M., Williams, R.R.: Deterministic APSP, orthogonal vectors, and more: quickly derandomizing Razborov–Smolensky. ACM Trans. Algorithms 17(1), 2:1-2:14 (2021)

    Article  MathSciNet  Google Scholar 

  6. Chen, R., Santhanam, R.: Satisfiability on mixed instances. In: Proceedings of the 2016 ACM Conference on Innovations in Theoretical Computer Science, pp. 393–402 (2016)

  7. Couceiro, M., Haddad, L., Lagerkvist, V.: Fine-grained complexity of constraint satisfaction problems through partial polymorphisms: a survey. In: 2019 IEEE 49th International Symposium on Multiple-Valued Logic (ISMVL), pp. 170–175 (2019)

  8. Dinur, I.: Improved algorithms for solving polynomial systems over GF(2) by multiple parity-counting. In: Marx, D. (ed.) Proceedings of the 2021 ACM-SIAM Symposium on Discrete Algorithms, SODA 2021, Virtual Conference, January 10–13, 2021, pp. 2550–2564. SIAM (2021)

  9. Downey, R.G., Fellows, M.R.: Parameterized Complexity. Springer, Berlin (2012)

    MATH  Google Scholar 

  10. Fellows, M.R., Hermelin, D., Rosamond, F.A., Vialette, S.: On the parameterized complexity of multiple-interval graph problems. Theor. Comput. Sci. 410(1), 53–61 (2009)

    Article  MathSciNet  Google Scholar 

  11. Flum, J., Grohe, M.: Parameterized Complexity Theory (Texts in Theoretical Computer Science. An EATCS Series). Springer, Berlin (2006)

    Google Scholar 

  12. Impagliazzo, R., Matthews, W., Paturi, R.: A satisfiability algorithm for AC\(^0\). In: Rabani, Y. (ed.) Proceedings of the Twenty-Third Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2012, Kyoto, Japan, January 17–19, 2012, pp. 961–972. SIAM (2012)

  13. Impagliazzo, R., Paturi, R.: On the complexity of k-sat. J. Comput. Syst. Sci. 62(2), 367–375 (2001)

    Article  MathSciNet  Google Scholar 

  14. Impagliazzo, R., Paturi, R., Zane, F.: Which problems have strongly exponential complexity? J. Comput. Syst. Sci. 63(4), 512–530 (2001)

    Article  MathSciNet  Google Scholar 

  15. Jonsson, P., Lagerkvist, V., Nordh, G., Zanuttini, B.: Strong partial clones and the time complexity of SAT problems. J. Comput. Syst. Sci. 84, 52–78 (2017)

    Article  MathSciNet  Google Scholar 

  16. Jonsson, P., Lagerkvist, V., Roy, B.: Fine-grained time complexity of constraint satisfaction problems. ACM Trans. Comput. Theory 13(1), 2:1-2:32 (2021)

    Article  MathSciNet  Google Scholar 

  17. Kaltofen, E.: Factorization of polynomials given by straight-line programs. Adv. Comput. Res. 5, 375–412 (1989)

    Google Scholar 

  18. Lagerkvist, V., Wahlström, M.: Which NP-hard SAT and CSP problems admit exponentially improved algorithms? CoRR, abs/1801.09488 (2018). arXiv:1801.09488

  19. Lokshtanov, D., Paturi, R., Tamaki, S., Williams, R.R., Yu, H.: Beating brute force for systems of polynomial equations over finite fields. In: Proceedings of the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 2190–2202 (2017)

  20. Monien, B., Speckenmeyer, E.: Solving satisfiability in less than \(2^n\) steps. Discrete Appl. Math. 10(3), 287–295 (1985)

    Article  MathSciNet  Google Scholar 

  21. Patrascu, M., Williams, R.: On the possibility of faster SAT algorithms. In: Proceedings of the Twenty-First Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 1065–1075 (2010)

  22. Paturi, R., Pudlák, P., Zane, F.: Satisfiability coding lemma. In: 38th Annual Symposium on Foundations of Computer Science (FOCS), pp. 566–574 (1997)

  23. Schaefer, T.J.: The complexity of satisfiability problems. In: Lipton, R.J., Burkhard, W.A., Savitch, W.J., Friedman, E.P., Aho, A.V. (eds.) Proceedings of the 10th Annual ACM Symposium on Theory of Computing, May 1–3, 1978, San Diego, California, USA, pp. 216–226. ACM (1978)

  24. Schöning, U.: A probabilistic algorithm for k-sat and constraint satisfaction problems. In: 40th Annual Symposium on Foundations of Computer Science, pp. 410–414 (1999)

  25. Schuler, R.: An algorithm for the satisfiability problem of formulas in conjunctive normal form. J. Algorithms 54(1), 40–44 (2005)

    Article  MathSciNet  Google Scholar 

  26. Soos, M., Gocht, S., Meel, K.S..: Tinted, detached, and lazy CNF-XOR solving and its applications to counting and sampling. In: Lahiri, S.K., Wang, C. (eds.) Computer Aided Verification—32nd International Conference, CAV 2020, Los Angeles, CA, USA, July 21–24, 2020, Proceedings, Part I. Lecture Notes in Computer Science, vol. 12224, pp. 463–484. Springer (2020)

  27. Soos, M., Meel, K.S.: BIRD: engineering an efficient CNF-XOR SAT solver and its applications to approximate model counting. In: The Thirty-Third AAAI Conference on Artificial Intelligence, AAAI 2019, The Thirty-First Innovative Applications of Artificial Intelligence Conference, IAAI 2019, The Ninth AAAI Symposium on Educational Advances in Artificial Intelligence, EAAI 2019, Honolulu, Hawaii, USA, January 27–February 1, 2019, pp. 1592–1599. AAAI Press (2019)

  28. Valiant, L.G., Vazirani, V.V.: NP is as easy as detecting unique solutions. Theor. Comput. Sci. 47(3), 85–93 (1986)

    Article  MathSciNet  Google Scholar 

Download references

Acknowledgements

We thank anonymous reviewers for their useful comments and pointers to the literature.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to V. Arvind.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

A conference version of this work was presented at the 2021 International Symposium on Parameterized and Exact Computation (IPEC). Portions of this work were done during visits to the Institute of Mathematical Sciences, Chennai. Research supported in part by the US National Science Foundation Grant CCF-1908125 and a Simons Investigator Award.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Arvind, V., Guruswami, V. CNF Satisfiability in a Subspace and Related Problems. Algorithmica 84, 3276–3299 (2022). https://doi.org/10.1007/s00453-022-00958-4

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00453-022-00958-4

Keywords

Navigation