Reduction of an input instance to INDEPENDENT SET to an equivalent input instance to VERTEX COVER.
For a given graph G=(V,E) and integer k, the INDEPENDENT SET problem is to find whether G contains an Independent Set of size ≥k.
For a given graph G=(V,E) and integer k, the VERTEX COVER problem is to find whether G contains a Vertex Cover of size ≤k.
In a graph G={V,E}, S is an Independent Set ⇔(V−S) is a Vertex Cover.
1. If S is an Independent Set, there is no edge e=(u,v) in G, such that both u,v∈S. Hence for any edge e=(u,v), at least one of u,v must lie in (V−S). ⇒(V−S) is a vertex cover in G.
2. If (V−S) is a Vertex Cover, then between any pair of vertices (u,v)∈S if there exist an edge e, none of the endpoints of e would exist in (V−S) violating the definition of vertex cover. Hence no pair of vertices in S can be connected by an edge. ⇒S is an Independent Set in G.
Hence G contains an Independent Set of size k⇔ G contains a Vertex Cover of size |V|−k.