0% found this document useful (0 votes)
11 views23 pages

Complexity 1

Uploaded by

mgaganreddy3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views23 pages

Complexity 1

Uploaded by

mgaganreddy3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Computational

Intractability
Polynomial - time Reductions

• Showing a problem X is as hard as a problem Y


• A solution to X will give a solution to Y
Polynomial - time Reductions

• Showing a problem X is as hard as a problem Y


• A solution to X will give a solution to Y
• Y ≤p X
• Y is polynomial time reducible to X
• If X can be solved in polynomial time, then Y can be solved in
polynomial time

• If Y cannot be solved in polynomial time, then X cannot be


solved in polynomial time
Polynomial - time Reductions

• Are there problems which are not polynomial time solvable?


Polynomial - time Reductions

• Reduction : INDEPENDENT SET to VERTEX COVER


Polynomial - time Reductions

• INDEPENDENT SET problem


• Input : Graph G
• Output : Find a maximum cardinality Independent set of G.
Polynomial - time Reductions

• INDEPENDENT SET problem (Optimisation)


• Input : Graph G
• Output : Find a maximum cardinality Independent set of G.

• INDEPENDENT SET problem (Decision )


• Input : Graph G, k
• Output : Does G have an independent set of size at least k ?
Polynomial - time Reductions

• Reduction : INDEPENDENT SET to VERTEX COVER


• INDEPENDENT SET problem
• Input : Graph G, k
• Output : Does G have an independent set of size at least k ?
• VERTEX COVER problem
• Input : Graph G, k
• Output : Does G have a vertex cover of size at most k ?
Polynomial - time Reductions

• Reduction : INDEPENDENT SET to VERTEX COVER


• INDEPENDENT SET problem
• Input : Graph G, k
• Output : Does G have an independent set of size at least k ?
• VERTEX COVER problem
• Input : Graph G, n-k
Polynomial - time Reductions

• Reduction : INDEPENDENT SET to VERTEX COVER


• INDEPENDENT SET problem
• Input : Graph G, k
• Output : Does G have an independent set of size at least k ?
• VERTEX COVER problem
• Input : Graph G, n-k
G has an independent set of size k if and only if G has a vertex
cover of size n - k
Polynomial - time Reductions

• SET COVER problem


• Input : Universe U of n elements, A collection S of m subsets of
U, k

• Output : Does there exist k subsets such that their union is U ?


Polynomial - time Reductions

• VERTEX COVER to SET COVER


• VERTEX COVER problem
• Input : Graph G, k
• Output : Does G have a vertex cover of size at most k ?
• SET COVER instance
• U = E(G)
• S : For all i in V, add a set of edges that are incident to vertex i
• k’ = k
Polynomial - time Reductions

• VERTEX COVER to SET COVER


• VERTEX COVER problem
• Input : Graph G, k
• Output : Does G have a vertex cover of size at most k ?
• SET COVER instance
• U = E(G)
• S : For all i in V, add a set of edges that are incident to vertex i
• k’ = k
Polynomial - time Reductions

• (U,S) has a set cover of size k if and only if G has a vertex cover
of size k
Polynomial - time Reductions

• Transitivity of reductions
Complexity classes

• Ef icient Certi ication : Given a proposed solution, checking it


is very easy.
f
f
Complexity classes

• Ef icient Certi ication : Given a proposed solution, checking it


is very easy.

• Ef icient Certi ier


f
f
f
f
Complexity classes

• P : set of all problems X for which there exists an algorithm A


with polynomial running time that solves X

• NP : Set of all problems for which there exists an ef icient


certi ier
f
f
Complexity classes

• P : set of all problems X for which there exists an algorithm A


with polynomial running time that solves X

• NP : Set of all problems for which there exists an ef icient


certi ier

• What is the relation between P and NP ?


f
f
Complexity classes

• NP-Complete problems
• (considered to be ) hardest problems in NP
Complexity classes

• NP-Complete problems
• (considered to be ) hardest problems in NP
• X is an NP- Complete problem if
1. X is in NP

2. Every problem Y in NP is polynomial time reducible to X


Complexity classes

Cook & Levin’s Theorem

CIRCUIT SATISFIABILITY problem is NP- Complete


Complexity classes

Circuit Satis iabiliy problem

Given a circuit with

• sources - nodes with no incoming edge, labelled 0, 1 or variables


• operators - ∨ , ∧ , ¬
• output - no outgoing edges
Given a circuit, decide whether there is an assignment of values to
the inputs that causes value of output to be 1
f

You might also like