![]() |
VOOZH | about |
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ā.
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:
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.
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).
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.
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:
2. Equivalence of the Two Problems:
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:
To understand the proof, consider the following example graph and its complement:
š ImageSee for - Proof that Hamiltonian Path is NP-Complete