0% found this document useful (0 votes)
27 views11 pages

Lecture 22

1) The document proves that several problems are NP-complete, including Max-Clique, Vertex Cover, Independent Set, and Set Cover. 2) It demonstrates reductions between these problems, such as showing that Max-Clique is NP-complete by reducing 3-CNF to Max-Clique. 3) The reductions prove that if you can solve one NP-complete problem efficiently, you can solve all NP-complete problems efficiently.

Uploaded by

f20201862
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)
27 views11 pages

Lecture 22

1) The document proves that several problems are NP-complete, including Max-Clique, Vertex Cover, Independent Set, and Set Cover. 2) It demonstrates reductions between these problems, such as showing that Max-Clique is NP-complete by reducing 3-CNF to Max-Clique. 3) The reductions prove that if you can solve one NP-complete problem efficiently, you can solve all NP-complete problems efficiently.

Uploaded by

f20201862
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/ 11

BITS, PILANI – K. K.

BIRLA GOA CAMPUS

Design & Analysis of Algorithms


(CS F364)

Lecture No. 22

1
NP Complete Problems
We have proved the following reductions:
CIRCUIT-SAT

SAT

3-CNF

MAX 2SAT k-CNF Max k-CNF Clique

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

Elements of U are the black circles, and the sets


S1 , S2 ,…..,S6 are indicated by rectangles.

The optimum cover consists of the three sets


{S3 , S4 , S5}
Set Covering Problem
Set Covering Problem
We are given a pair Σ = (X,F)
Where X = {x1, x2,…..,xm } is a finite set of objects, called
the universe
and F = {S1, S2,…..,Sn } is a collection of subsets of X,
such that every element of X belongs to at least one
subset in F.
Goal: Compute a set C ⊆ {1,...,n} of minimum
cardinality such that 𝑿 = ‫𝒊𝑺 𝑪∈𝒊ڂ‬
Set Covering Problem
Theorem: Set Cover problem is NP Complete
Proof:
• Set Cover is in NP (Easy)
• Claim:
Vertex Cover ≤𝑷 Set Cover.
Given an instance of Vertex Cover (i.e. a graph G=(V, E)
and an integer k)
We will construct an instance of the Set Cover problem.
• Let U = E.
Set Covering Problem
We will define n subsets of U as follows:
Label the vertices of G from 1 to n,
and let Si be the set of edges that incident to vertex i
Then Si  U and 𝑼 = ‫𝒊𝑺 𝒊ڂ‬
This construction can be done in polynomial time in the
size of the Vertex Cover instance
We show that G has a Vertex Cover of size k iff
system (U,F) has Set Cover of size k , where F = {Si |i =
1,…,n}
Set Covering Problem
Suppose G has a vertex cover of size k.
Let S be such a set of nodes.
By our construction, S corresponds to a collection C of
subsets of U
C clearly has k subsets.
Claim : The sets belonging to C cover U
Consider any element of U.
Such an element is an edge e in G.
Since S is a vertex cover for G, at least one of e’s endpoints
is in S.
Therefore C contains at least one of the sets associated with
the endpoints of e.
Set Covering Problem
Conversely, suppose there is a set cover C of size k in our
constructed instance.
Since each set in C is associated with a vertex in G,
let S be the set of these vertices.
Then |S|=|C|= k
Consider any edge e.
Since e is in the set U and C is a set cover, C must contain at
least one set that includes e.
But by construction, the only sets that include e correspond
to nodes that are endpoints of e.
Thus, S must contain at least one of the endpoints of e.
Therefore, S is a Vertex Cover of G of size k

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy