In: Advanced Math
First show that the Clique problem is NP. Given a Graph G(V,E),
If we provide the set of vertices
as a certificate of a clique in G, then we can check if V' induces
a clique in polynomial time. We can check whether each pair of
vertices
also belongs in E(G). This can be done in
time.
To show Clique problem is NP-Complete, we reduce it from
Independent set problem, i.e.,
. We assume that Finding independent set in a graph is
NP-hard.
Take an instance of Independent Set Problem, Graph G(V,E) and q.
Decision problem is - does there exists a Independent Set of size q
in G? We see that G has an Independent Set of Size q iff
has a clique of size q. Construct the Graph
as follows. Let
. For each vertex
and if
, then draw edge
. If
, then we do not draw any edge in
. We look at
such pairs
. Hence we can construct
in polynomial time.
Instance of the Clique problem -
and q. Does there exists a clique of size q?
We have reduced the Independent Set Problem to Clique Problem in Polynomial time. If we can find answer to clique problem in polynomial time, then essentially we would have found answer to Independent Set Problem in polynomial time, but Independent Set Problem is NP-hard. Hence Clique Problem must also NP-hard.
We have shown that Clique problem is NP and NP hard , hence it is NP-Complete.