Lecture 22
Lecture 22
Lecture No. 22
1
NP Complete Problems
We have proved the following reductions:
CIRCUIT-SAT
SAT
3-CNF
Vertex Cover
Independent Set
Max-Clique
Theorem :
Max-Clique is NP-Complete
Proof:
We will prove 3-CNF ≤𝑷 Max-Clique.
Given a 3-CNF formula of m clauses C1, C2,….., Cm
and over n variables x1, x2,….., xn
We construct a graph G as follows:
1. for each clause Cr = 𝒍𝒓𝟏 𝒍𝒓𝟐 𝒍𝒓𝟑 , create one vertex for each
of 𝒍𝒓𝟏 , 𝒍𝒓𝟐 , 𝒍𝒓𝟑
2. Place an edge between two vertices 𝒍𝒓𝒊 and 𝒍𝒔𝒋 if and only if
• r ≠ s, i.e., the corresponding literals are from different clauses
• 𝒍𝒓𝒊 ≠ ⌐ 𝒍𝒔𝒋 i.e., they are consistent
Max-Clique
Example: Suppose = C1 C2 C3
where C1 = x1 ⌐ x2 ⌐ x3, C 2 = ⌐ x 1 x2 x3
and C3 = x1 x2 x3
G:
Vertex Cover Problem
Vertex Cover NPC
Claim: Clique ≤𝑷 Vertex Cover
Claim: G has a clique of size k if and only if the complement
ഥ has a vertex cover of size |V| - k.
graph 𝑮
Theorem:
Independent Set is NP-Complete.
Claim: Max-Clique ≤𝑷 Independent Set
Claim: G has a clique of size k if and only if the the
complement graph 𝑮 ഥ has a independent set of size k.
Set Covering Problem
Example