Prerequisite – Clique is NP

A Polynomial-time reduction is a method for solving one problem using another.

E-TM = {<M> : M is a TM and }

CLIQUE = {<G, k> : graph G has a clique with at least k vertices}.

**Note –**

Since CLIQUE is NP => some NDTM_{CLIQUE} accepts CLIQUE.

Reduction(<G, k>) construct the following machine M M(x): 1. Run NDTM_{CLIQUE}on input <G, k>. 2. If NDTM_{CLIQUE}accepts; M rejects x. 3. Else; M accepts x. return <M>

We convert the instance <G, k> CLIQUE to a TM <M> E-TM. And <G, k> CLIQUE to a TM <M> E-TM.

**Correctness:**

i. <G, k> CLIQUE => M rejects all input x => L(M)= => <M> E-TM. ii. <G, k> CLIQUE => M accepts all input x => L(M) => <M> E-TM.

Hence, reduction is correct.

**Polytime –**

The reduction involves describing the construction of a new Turing machine M for input <G, k>. We don’t run the machine on the input. Hence, the reduction is polytime.

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the **DSA Self Paced Course** at a student-friendly price and become industry ready.

## Recommended Posts:

- Turing Machine for language { www | w ∈ {a, b} }
- Turing Machine to accept maximum of two numbers
- NFA for language at least one of the symbols occurring an odd number of times
- NFA which accepts set of strings over an alphabet {0, 1, 2} such that the final digit has appeared before
- Difference between Ambiguous and Unambiguous Grammar
- Introduction to Queue Automata
- DFA that recognizes number of 0 is multiple of 3 on input {0,1}
- DFA that begins with 'a' but does not contain substring 'aab'
- Intersection process of two DFAs
- Post Correspondence Problem
- Design a DFA that accepts a string containing 3 a's and 3 b's
- Build a DFA to accept a binary string containing "01" i times and "1" 2j times
- CYK Algorithm for Context Free Grammar
- Proof that Path Selection Decision problem is NP-Complete

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.