Practice Problem: Sparse Subgraph
0. Context
This is a second practice problem on NP-Completeness proofs.
The first one was Almost-SAT problem.
1. Problem Statement
Consider Sparse Subgraph problem defined as following:
Input: An undirected graph and variables .
Output: A set where and there are at most edges between pairs of vertices in . Report NO, if no such set exists.
Prove that Sparse Subgraph problem is NP-Complete.
2. Attack Plan
We need to show that:
where SS := Sparse Subgraph problem, and IS := Independent Set problem.
3. Proof
3.1
Consider input graph and for a Sparse Subgraph problem.
Given a solution , it takes time to verify that .
To check that number of edges between any pair of vertices in is , we need to run algorithm.
3.2
Independent Set is a known NP-Complete problem. It takes graph and and returns , where and , i.e. there is no edges between vertices in .
In order to reduce we first need to show how input for is transformed to input for : let’s set and . Now, run SS on input .
Claim: has an Independent Set , where has a Sparse Subgraph , where and
Forward implication: take any Independent Set , it is a Sparse Spargraph as well, since there is no edges between vertices of () and .
Reverse implication: for a given Sparse Graph solution , it is an Independent Set as well (number of edges between vertices is zero, and ).