Tutorial 13

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

[CSN212] Study Group 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 Harder Problems on paths


Show that the following problems are NP Hard, by reducing an NP-Hard problem to them.
1. Longest path avoiding repeated vertices, with possibly positive weight cycles.
2. Shortest path avoiding repeated vertices, with possibly negative weight cycles.
Hint: Reduce from Hamiltonian Path.

2 Maximum independent set problem


An independent set of a graph G = (V, E) is a subset V ′ ⊆ V of vertices such that each edge in E is incident
on at most one vertex in V ′ . The independent set problem is to find a maximum-size independent set in G.

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.

You might also like