









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An overview of np-completeness, a concept in computer science that deals with the complexity of decidable languages. Np-completeness compares the problem classes p and np, discussing languages like clique, is, vc, and sat, and their equivalence. The document also covers polynomial-time reductions and their significance in determining the complexity of problems.
Typology: Slides
1 / 16
This page cannot be seen from the preview
Don't miss anything!










(problems that admit efficient algorithms)
(solutions can be checked efficiently)
decidable
NP P
Equivalence of certain NP languages
CLIQUE, SAT, etc. require time ≈2 n^ to solve
we can prove is that
Equivalence of certain NP languages
P
CLIQUE = {(G, k ): G is a graph with a clique of k vertices}
IS = {(G, k ): G is a graph with an independent set of k vertices}
1 2
3 4
{1, 4}, {2, 3, 4}, {1} are cliques {1, 2}, {1, 3}, {4} are independent sets
G, k
reject if not
accept if G has IS of size k
G ’ , k ’ reject if not
accept if G’ has clique of size k
On input ( G , k ) Construct G ’ by flipping all edges of G Set k ’ = k Output ( G ’, k ’)
independent sets in G (^) cliques in G’
If G ’ has a clique of size k ’, then G has an IS of size k
If G ’ does not have a clique of size k ’,
x y
x ∈ L y ∈ L ’
R algorithm for L’
acc rej
algorithm accepts