example of reduction a polynomial decision to an NP-complete

997 views Asked by At

I know if I reduce an NP-complete problem to a unknown problem P then I'm sure that P is itself NP-complete. And I know if I reduce a Problem P to an NP-complete problem there is no conclusion. So I want to give an example to show that we can reduce a Polynomial solvable problem P to an NP-complete one.

1

There are 1 answers

0
Dima Chubarov On BEST ANSWER

If I reduce an NP-complete problem to a unknown problem P then I'm sure that P is itself NP-complete

No, this is not well formulated. If an NP-complete problem A is reducible to a problem P all we can say is that any problem in NP is reducible to P. To say that P is NP-complete we need to know additionally that P is itself in NP.

What you probably intended to say was

If I reduce an NP-complete problem to some a unknown problem P in NP then I'm sure that P is itself NP-complete

Now to your original question.

give an example to show that we can reduce a Polynomial solvable problem P to an NP-complete one

Consider the problem known as 2-SAT: Given a boolean formula in conjunctive normal form such that each disjunction contains at most two variables tell it if is satisfiable.

Solving this problem following an algorithm by Aspvall, Plass & Tarjan (1979) involves building an implication graph and finding all its strongly connected components. The paper proves that the formula is satisfiable if and only if the implication graph does not contain a strongly connected component that include some variable together with its negation. It also shows that this algorithm is linear in the size of the formula encoding.

So

  1. there exists a linear algorithm for 2-SAT.
  2. 2-SAT is reducible to unrestricted boolean satisfiability problem known as SAT.

This gives an example of a polynomially solvable problem (2-SAT) that is reducible to an NP-complete problem (SAT).