- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

# Prove that the polynomial time reduction is from the Clique problem to the Vertex Cover problem

Vertex cover is a subset of vertices that covers all the edges in a graph. It is used to determine whether a given graph has a 3SAT to vertex cover.

Clique is called a subset of vertices that are all directly connected. It determines whether a clique of size k exists in a graph.

To prove − Vertex cover can be reduced to clique.

## Proof

Given a graph G=(V,E) and integer k.

Get its complement graph G'=(V,E').

Solve CLIQUE(G',|V|-k).

If there is a solution, return yes. Otherwise, it returns as no.

To prove this reduction, we need to show the following −

If there is a solution to VERTEX-COVER(G,k), then there must be a solution to CLIQUE(G',|V|-k) and vice versa.

Assume that G has a vertex cover V' ⊆ V , where |V |' = k. Then, for all u, v ε V , if (u, v) ε E, then u ε V' or v ε V' or both since the vertex cover must cover all edges.

The contrapositive is that for all u, v ε V, if u does not belong to V', then (u, v) ε/ E and thus (u, v) ε E.

For any pair of vertices that are both not in the vertex cover V' of G, there is an edge between them in G.

The union of all pairs of vertices that are all not in V' is simply V − V'. Thus, V − V' is a clique in G, by definition, and V − V' has size |V | − k.

This operation can be done in polynomial time. Since VERTEX-COVER can be reduced to CLIQUE in polynomial time, CLIQUE ε NP and VERTEX-COVER is NP-complete, CLIQUE is also NP-Complete.

- Related Articles
- Vertex cover Problem
- Prove that the vertex cover is NP complete in TOC
- What is the branch problem?
- The Knight’s tour problem
- The Exposed Terminal Problem
- The Hidden Terminal Problem
- What is the decision problem in TOC?
- What is the Halting Problem in TOC?
- Problem: Time taken by tomatoes to rot in JavaScript
- Two sum problem in linear time in JavaScript
- C++ Program to Solve the Dominating Set Problem
- C++ Program to Solve the Fractional Knapsack Problem
- Solution to the clumsy factorial problem in JavaScript
- How to identify entity from a given problem
- Partition problem