That is correct. Specifically, replace all clauses (x ∨ y)
with (x ∨ y) ∧ (~x ∨ ~y)
. That literally says "x or y have to be true, and x or y have to be false", or equivalently "satisfy (x ∨ y)
while making sure that one of x
and y
is false".
To prove the equivalence, let us first assume that the NAE 2-SAT problem is satisfiable. Let A be a satisfying assignment and let {x, y}
be one arbitrary clause. Since exactly one of x
and y
are true, this implies that (x ∨ y) ∧ (~x ∨ ~y)
is true. Hence, the corresponding two clauses in the 2-SAT formula are satisfied. Since {x, y}
was chosen arbitrarily, we conclude that A satisfies all the clauses in the 2-SAT formula.
Conversely, let us assume that the NAE 2-SAT is not satisfiable. That is, for any assignment, there exists some clause {x, y}
for which x
and y
are either both true or both false. Let A be an arbitrarily chosen assignment and let {x, y}
be a clause that A does not satisfy (in the NAE 2-SAT). Since x = y
, this implies that (x ∨ y) ∧ (~x ∨ ~y)
is false (because one of the halves of the conjunction will be false). Hence, A does not satisfy the 2-SAT formula. Since A was chosen arbitrarily, we conclude that no assignment satisfies the 2-SAT formula.