# Proof that NAE-4-SAT is NP Complete

• Last Updated : 15 Oct, 2020

Problem Statement: Given a 4-CNF formula f, the task is to check if there is every clause such that at least one literal is TRUE and the other is FALSE.

Explanation: An instance of the problem is an input specified to the problem. An instance of the NAE-4-SAT Problem is a boolean 4-CNF formula. Since an NP-complete problem is a problem which is both NP and NP-Hard, the proof or statement that a problem is NP-Complete consists of two parts:

1. The problem itself is in NP class.
2. All other problems in NP class can be polynomial-time reducible to that.
(B is polynomial-time reducible to C is denoted as B ≤ PC)

If the 2nd condition is only satisfied then the problem is called NP Hard.
But it is not possible to reduce every NP problem into another NP problem to show its NP-Completeness all the time. To show a problem is NP-Complete, prove that the problem is in NP and any NP-Complete problem is reducible to that, i.e., if B is NP-Complete and B ≤ PC For C in NP, then C is NP-Complete.
Thus, it can be verified that the hitting set problem is NP-Complete using the following propositions:

NAE-4-SAT is in NP:
It any problem is in NP, then given a ‘certificate’, which is a solution to the problem and an instance of the problem (a boolean 4CNF formula), we will be able to verify (whether the solution is correct or not) certificate in polynomial time. This can be done by checking that the truth assignment satisfies every clause in the formula f and that all the literals values assigned to any particular clause do not hold all same values, that is at least one is false in every clause.

NAE-4-SAT is NP-Hard:
In order to prove NAE-4-SAT is NP Hard, reduce a known NP Hard problem to this problem, in our case 3-SAT to NAE-4-SAT. The 3-SAT formula f is transformed by adding a variable v to every clause of the formula f. Since the formula f now has four literals in each of the clauses, it becomes a 4-SAT formula.
Now, the following propositions hold:

• If 3-SAT is true, this implies that at least one of the literals in every clause must be true. We may assign the newly added variable v, a value of 0. NAE-4-SAT also holds, since the literals that were true in formula f also hold in NAE formula and the variable v is assigned a false boolean value, that is at least one is true and another is false.
• If the 4CNF formula is satisfiable, then this particular assignment of variables must have at least one true literal and at-least one negative literal. If the additional variable v, has the boolean value false, then we can remove it easily from each clause, and then the 3-SAT formula will still be satisfiable. If the additional variable v has a boolean true value, then we can remove any of the literal from each clause, since the variable v will make the 3CNF formula satisfiable.
Consider the example:

f=(x1 V x2 V x3) AND (x1‘ V x2‘ V x3)

NAE formula=(x1 V x2‘ V x3‘ V v) AND (x1‘ V x2 V x3 V v)

Let us assume one of the valid assignment for 4CNF formula to be (x1=0, x2=0, x3=0, v=1)

The 4-NAE formula is true because v=1 and x1=0 in every clause. Now if we negate all values, to remove v=1 later, even then the formula is satisfied by setting x1=1 in the first clause and x2=1 in the second clause.
Therefore, the 3-SAT formula is also satisfied. Hence NAE 4-SAT problem is NP-Complete.

My Personal Notes arrow_drop_up
Recommended Articles
Page :