By the MAXSAT problem, we are given a set $V$ of $m$ variables and a collection $C$ of $n$ clauses over $V$. We will seek a truth assignment to maximize the number of satisfied clauses. This problem is $\textit{NP}$-hard 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 worst case time complexity is bounded by O($(nm)^2(log_2\;nm)^{log_2\;nm}$). This shows that the 2-MAXSAT problem can be solved in polynomial time.
翻译:通过MAXSAT问题,我们给定一组包含$m$个变量的集合$V$和一组由$n$个子句构成的集合$C$(子句均基于$V$)。我们需要寻找一个真值赋值,使满足的子句数量最大化。即使在其受限版本——每个子句最多包含两个文字(literal)的2-MAXSAT问题中,该问题仍是$\textit{NP}$-难的。本文讨论了一种求解该问题的高效算法,其最坏情况时间复杂度为O($(nm)^2(\log_2\;nm)^{\log_2\;nm}$)。这表明2-MAXSAT问题可在多项式时间内求解。