Victor Farazdagi

Victor Farazdagi

Computer science and applied mathematics

15 Dec 2018

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 G=(V,E)G = (V, E) and variables k,lZk, l \in \mathbb{Z}.

Output: A set SVS \subset V where S=k|S| = k and there are at most ll edges between pairs of vertices in SS. Report NO, if no such set exists.

Prove that Sparse Subgraph problem is NP-Complete.

2. Attack Plan

We need to show that:

  1. SSNPSS \in NP
  2. ISSSIS \to SS

where SS := Sparse Subgraph problem, and IS := Independent Set problem.

3. Proof

3.1 SSNPSS \in NP

Consider input graph G=(V,E)G = (V, E) and k,lZk, l \in \mathbb{Z} for a Sparse Subgraph problem.

Given a solution SS, it takes O(V)O(|V|) time to verify that S=k|S| = k.

To check that number of edges between any pair of vertices in SS is l\le l, we need to run O(V2)O({|V|}^2) algorithm.

3.2 ISSSIS \to SS

Independent Set is a known NP-Complete problem. It takes graph G=(V,E)G = (V, E) and gZg \in \mathbb{Z} and returns SVS \subset V, where Sg|S| \ge g and x,yS\forall x, y \in S, (x,y)E(x, y) \notin E i.e. there is no edges between vertices in SS.

In order to reduce ISSSIS \to SS we first need to show how input for ISIS is transformed to input for SSSS: let’s set k=gk = g and l=0l = 0. Now, run SS on input (G,k,l)(G, k, l).

Claim: GG has an Independent Set SS, where S=g|S| = g     \iff GG has a Sparse Subgraph SS, where S=k=g|S| = k = g and l0l \le 0

Forward implication: take any Independent Set SS, it is a Sparse Spargraph as well, since there is no edges between vertices of SS (l0l \le 0) and S=g=k|S| = g = k.

Reverse implication: for a given Sparse Graph solution SS, it is an Independent Set as well (number of edges between vertices is zero, and S=g=k|S| = g = k). \blacksquare