- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

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

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.

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 Questions & Answers
- Vertex cover Problem
- Prove that the vertex cover is NP complete in TOC
- What is the branch problem?
- The Exposed Terminal Problem
- The Hidden Terminal Problem
- What is the decision problem in TOC?
- What is the Halting Problem in TOC?
- The Knight’s tour problem
- C++ Program to Solve the Fractional Knapsack Problem
- C++ Program to Solve the Dominating Set Problem
- Solution to the clumsy factorial problem in JavaScript
- The algorithm problem - Backtracing pattern in JavaScript
- Explain the Post Correspondence Problem in TOC
- Partition problem
- Prove that the Hamiltonian Path is NP-Complete in TOC

Advertisements