You are on page 1of 11

Polynomial Time Reductions

Polynomial Computable function f :

For any w computes f (w)


in polynomial time

1
Language A is polynomial time reducible to
language B if there is a polynomial
computable function f such that:

w ∈ A ⇔ f ( w) ∈ B

2
Theorem:
Suppose that A is polynomial reducible to B.
If B ∈ P then A∈ P .

Proof:
Let M be the machine to accept B
Machine to accept A in polynomial time:
On input w :
1. Compute f (w)
2. Run M on input f (w)
3
3CNF formula:

( x1 ∨ x2 ∨ x3 ) ∧ ( x3 ∨ x5 ∨ x6 ) ∧ ( x3 ∨ x6 ∨ x4 ) ∧ ( x4 ∨ x5 ∨ x6 )

Each clause has three literals

Language:

3SAT ={ w : w is a satisfiable
3CNF formula}

4
Clique:

A 5-clique

CLIQUE = {< G, k > : G contains a k-clique}

5
Theorem: 3SAT is polynomial time
reducible to CLIQUE

We can give a polynomial time reduction


of one problem to the other

6
NP-Completeness

A problem is NP-complete if:

•It is in NP

•Every NP problem is reduced to it


(in polynomial time)

7
Observation:

If we can solve any NP-complete problem


in Deterministic Polynomial Time (P time)
then we know:

P = NP

8
Observation:

If we prove that
we cannot solve an NP-complete problem
in Deterministic Polynomial Time (P time)
then we know:

P ≠ NP

9
Cook’s Theorem:

The satisfiability problem is NP-complete

Proof:
Convert a Non-Deterministic Turing Machine
to a Boolean expression
in conjunctive normal form
10
Other NP-Complete Problems:

•The Traveling Salesperson Problem

•Vertex cover

•Hamiltonian Path

All the above are reduced


to the satisfiability problem
11

You might also like