Definition
Maximum 2-SAT Optimisation Problem
Instance: A CNF formula , where every clause contains at most two literals.
Feasible solutions: All truth assignments .
Objective: Maximise the number of satisfied clauses:
Here is if holds and otherwise. An assignment is optimal exactly when its value equals . Each clause occurrence counts separately.
This is the restriction of MaxSAT to clauses of length at most two; unit clauses are allowed.
Satisfiability versus Maximisation
Testing whether all clauses of a 2-CNF formula can be satisfied is polynomial-time solvable. Finding the largest number that can be satisfied is NP-hard. The tractability of 2-SAT therefore does not imply the tractability of Max2SAT.
The linear reduction from MaxE3SAT transfers both exact hardness and an approximation lower bound to Max2SAT.
Example
A feasible assignment need not satisfy the formula
For , no assignment satisfies every clause. Setting satisfies the first and third clauses, so .