Professional Documents
Culture Documents
Tutorial 13
Tutorial 13
Tutorial 13
Complexity
The reduction from decision problems A to be must follow the following guidelines.
1. Every possible input instance of A should be reducible to an instance of B, in polynomial time, using
polynomial space.
2. The reduction must be such that
(a) Every YES instance of B ensures a YES instance of A.
(b) Every NO instance of B ensures a NO instance of A.
3. If A is NP Hard, this makes B also NP Hard. To prove B is NP complete, show that B is also in NP
(has a polynomial time verifier).
1. Prove the independent set problem NP-hard by showing its decision version NP-complete.
Hint. Reduce from the vertex cover problem.
2. Suppose that you are given a “black-box” subroutine to solve the decision version of the independent
set problem. Give an algorithm to find an independent set of maximum size. The running time of your
algorithm should be polynomial in |V | and |E|, counting queries to the black box as a single step.
3 Subgraph-isomorphism problem
The subgraph-isomorphism problem takes two undirected graphs G1 and G2 , and it asks whether G1 is
isomorphic to a subgraph of G2 . Show that the subgraph-isomorphism problem is NP-complete.
Recall that graphs G and H are isomorphic if there is a bijection f : V (G) → V (H) from vertex set
V (G) of G to vertex set V (H) of H such that two vertices u, v ∈ V (G) are adjacent in G if an only if
f (u), f (v) ∈ V (H) are adjacent in H.
Hint: Reduce from CLIQUE problem.