Vertex Cover is NP-Complete

Last Updated : 17 Mar, 2026

Given a graph G(V, E) and a positive integer k, the problem is to determine whether there exists a subset V’ of vertices with at most k vertices such that every edge in the graph is connected to at least one vertex in V’.

Explanation

To understand the proof, we first define what an instance of a problem means. An instance is simply an input to the given problem. In this case, an instance of the Vertex Cover problem consists of a graph G(V, E) and a positive integer k. The goal is to check whether a vertex cover of size at most k exists in G.

By definition, an NP-Complete problem is one that is both in NP and NP-Hard. Therefore, proving that Vertex Cover is NP-Complete consists of two parts:

  1. Proof that Vertex Cover is in NP
  2. Proof that Vertex Cover is NP-Hard

Proof that Vertex Cover is in NP

A problem is in NP if, given a solution (also called a 'certificate') and an instance of the problem, we can verify the correctness of the solution in polynomial time.

For the Vertex Cover problem, the certificate is a subset V’ of V, which represents the vertex cover. To check whether V’ is a valid vertex cover of size at most k, we can use the following strategy:

let count be an integer
set count to 0
for each vertex v in V’
remove all edges adjacent to v from set E
increment count by 1
if count = k and E is empty
then
the given solution is correct
else
the given solution is incorrect

Since this verification process runs in polynomial time, the Vertex Cover problem belongs to NP.

Proof that Vertex Cover is NP-Hard

To prove that Vertex Cover is NP-Hard, we reduce a known NP-Hard problem to Vertex Cover. We use the Clique Problem, which is already proven to be NP-Complete (hence also NP-Hard).

Definition of Clique Problem:

In graph theory, a clique is a subset of vertices such that every pair of vertices is connected by an edge.
The Clique Problem is:

Given a graph G(V,E)G(V, E)G(V,E) and an integer kkk, determine whether there exists a clique of size kkk in GGG.

Reduction from Clique Problem to Vertex Cover

To show that any instance of the Clique Problem can be reduced to an instance of the Vertex Cover Problem, we proceed as follows:

1. Construct Graph Complement:

  • Given a graph G(V, E), construct G’ (the complement of G).
  • G’ consists of all edges not in G, but present in a complete graph on the same set of vertices.

2. Equivalence of the Two Problems:

  • Finding a clique of size k in G is equivalent to finding a vertex cover of size |V| - k in G’.

Forward Proof (Clique → Vertex Cover)

  • Assume there is a clique of size k in G.
  • Let V’ be the set of vertices forming the clique.
  • In G’, at least one vertex of each edge must belong to V - V’ to cover all edges.
  • This means V - V’ forms a vertex cover of size |V| - k in G’.

Backward Proof (Vertex Cover → Clique)

  • Assume there exists a vertex cover of size |V| - k in G’.
  • The remaining k vertices (not in the vertex cover) must form a clique in G, since all their edges exist in G.

Thus, we have shown that finding a clique of size k in G is equivalent to finding a vertex cover of size |V| - k in G’.

Since the Clique Problem is NP-Complete, and we have successfully reduced it to the Vertex Cover Problem, we conclude that Vertex Cover is NP-Hard.

Thus, we can conclude the following:

  • We have proven that Vertex Cover is in NP by showing that a given solution can be verified in polynomial time.
  • We have proven that Vertex Cover is NP-Hard by reducing the Clique problem to the Vertex Cover problem.
  • Since Vertex Cover is both NP and NP-Hard, it is NP-Complete.

To understand the proof, consider the following example graph and its complement:

See for - Proof that Hamiltonian Path is NP-Complete


Comment