English

An Efficient Algorithm for Solving the 2-MAXSAT Problem

Computational Complexity 2025-08-05 v22

Abstract

By the MAXSAT problem, we are given a set VV of mm variables and a collection CC of nn clauses over VV, i.e., a conjunctive normal form (CNF\textit{CNF}) formula. We will seek a truth assignment to maximize the number of satisfied clauses in CC. This problem is NP\textit{NP}-complete even for its restricted version, the 2-maxsat problem, by which every clause contains at most 2 literals. In this paper, we discuss an efficient algorithm to solve this problem. Its main idea is to transform the 2-maxsat problem into a related problem of maximizing satisfied conjunctions in a disjunctive normal form (DNF\textit{DNF}) formula DD. We then represent all those truth assignments for a conjunction dd as a graph (called a pp*-graph), under each of which dd evaluates to true\textit{true}, and organize all the pp*-graphs for the conjunctions in DD into a trie-like structure. By exploring the structure and recursively its substructures (with each corresponding to a subgraph dynamically built up by integrating some pp*-subgraphs), the algorithm can find a maximum set of satisfied conjunctions in DD in polynomial time. Its worst-case time complexity is bounded by O(n2m4n^2m^4). This provides in fact a proof of PP = NP\textit{NP}.

Keywords

Cite

@article{arxiv.2304.12517,
  title  = {An Efficient Algorithm for Solving the 2-MAXSAT Problem},
  author = {Yangjun Chen},
  journal= {arXiv preprint arXiv:2304.12517},
  year   = {2025}
}