Open In App

Proof that Almost-SAT is NP Complete

Prerequisite: NP-Completeness, NP Class, SAT 

Problem– The Almost-SAT problem which is built on top of SAT(Boolean Satisfiability Problem) problem takes a boolean formula in conjunctive normal form with m clauses as input. If such an assignment exists, the result is an assignment of the literals such that exactly m-1 clauses evaluate to TRUE, otherwise NO. Demonstrate that Almost-SAT is NP-Complete.



Solution- 

SAT, sometimes called as B-SAT(Boolean Satisfiability Problem)which is the problem of determining if there exists an interpretation that satisfies a given Boolean formula.It asks whether the variables of a given Boolean formula can be consistently replaced by the values TRUE or FALSE in such a way that the formula evaluates to TRUE



Almost-SAT is the minimum satisfiability problem, is an FNP generalisation of SAT. It asks for the minimum number of clauses which can be satisfied by any assignment and for the given problem minimum clauses satisfied should be m-1 where the total number of clauses are m.

Given Almost-SAT problem can be described as follows:

To prove a problem NP-Complete, there are two steps involved:

  1. Prove given problem belong to NP Class.
  2. All other problems in the NP class can be polynomial time reducible to that problem. (This is the prove of being NP-Hard)

Now it is not possible to reduce every NP problem to another NP problem to prove it’s NP completeness all the time. That’s why we show that any known NP complete problem is reducible to that problem in polynomial time.

Proof:

To prove that Almost-SAT is NP-complete we need to prove the above two conditions.

1. Almost-SAT belongs to NP Class: A problem is classified to be in NP Class if the solution for the problem can be verified in polynomial time.

2. Almost-SAT is an NP-Hard Problem:

Now we need to show that MAX-SAT is as hard as a known NP-Complete Problem. By using a reduction strategy we can show that MAX-SAT is as least as difficult as a known NP-Complete Problem (the known problem here will be the SAT problem). See here for the “Proof of SAT Is an NP-Complete“.

We are going to show the reduction from SAT -> Almost-SAT

Input Conversion: We need to transform the SAT input to Almost-SAT input. 

In SAT, we are given a function f in CNF form with n literals and m clauses. The input function for Almost-SAT will be f’ with m’ clauses and n’ literals.

To transform the given input from SAT -> Almost-SAT

  1. Take SAT problem input in CNF form f with n literals and m clauses.
  2. Add a new literal u and its negation such as:

f’ = f ∧ u ∧ ¬u

In Almost-SAT, the number of clauses is m’ = m + 2. Because we only need to add one variable and its negation, the transformation will be O(1), and the input conversion will be polynomial in time.

Output Conversion: We need to transform the output from Almost -SAT to output to SAT

Assigning values to n literals requires O(n) time, resulting in polynomial output conversion.

Correctness: Now we need to prove the correctness of the claim which says

f is satisfied ↔ f’ is satisfied

So, this means that claim f is satisfied ↔ f’ is satisfied is correct.

Conclusion:

So, Almost-SAT is an NP-Complete problem.  

Article Tags :