Question 1 |

(A) NP-complete = NP

(B) NP-complete P =

(C) NP-hard = NP

(D) P = NP-complete

A | |

B | |

C | |

D |

**NP Complete**

**Discuss it**

Question 2 |

R is NP-complete | |

R is NP-hard | |

Q is NP-complete | |

Q is NP-hard |

**NP Complete**

**Discuss it**

Question 3 |

There is no polynomial time algorithm for X. | |

If X can be solved deterministically in polynomial time, then P = NP. | |

If X is NP-hard, then it is NP-complete.
| |

X may be undecidable. |

**NP Complete**

**Discuss it**

Question 4 |

both in P | |

both NP complete | |

NP-complete and in P respectively | |

undecidable and NP-complete respectively |

**NP Complete**

**Discuss it**

Question 5 |

1, 2 and 3 | |

1 and 3 | |

2 and 3 | |

1 and 2 |

**NP Complete**

**Discuss it**

Question 6 |

If we want to prove that a problem X is NP-Hard, we take a known NP-Hard problem Y and reduce Y to X | |

The first problem that was proved as NP-complete was the circuit satisfiability problem. | |

NP-complete is a subset of NP Hard | |

All of the above | |

None of the above |

**NP Complete**

**Discuss it**

Question 7 |

1. The problem of determining whether there exists a cycle in an undirected graph is in P. 2. The problem of determining whether there exists a cycle in an undirected graph is in NP. 3. If a problem A is NP-Complete, there exists a non-deterministic polynomial time algorithm to solve A.

1, 2 and 3 | |

1 and 2 only | |

2 and 3 only | |

1 and 3 only |

**NP Complete**

**GATE CS 2013**

**Discuss it**

Question 8 |

A | |

B | |

C | |

D |

**NP Complete**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 9 |

NP-Complete. | |

solvable in polynomial time by reduction to directed graph reachability. | |

solvable in constant time since any input instance is satisfiable. | |

NP-hard, but not NP-complete. |

**NP Complete**

**GATE-CS-2014-(Set-3)**

**Discuss it**

Question 10 |

_{3}be the problem of finding a Hamiltonian cycle in a graph G = (V,E) with V divisible by 3 and DHAM

_{3}be the problem of determining if a Hamiltonian cycle exists in such graphs. Which one of the following is true?

Both DHAM _{3} and SHAM_{3} are NP-hard | |

SHAM _{3} is NP-hard, but DHAM_{3} is not | |

DHAM _{3} is NP-hard, but SHAM_{3} is not | |

Neither DHAM _{3} nor SHAM_{3} is NP-hard |

**NP Complete**

**GATE-CS-2006**

**Discuss it**

Question 11 |

α : Given G(V, E), does G have an independent set of size | V | - 4? β : Given G(V, E), does G have an independent set of size 5?Which one of the following is TRUE?

α is in P and β is NP-complete | |

α is NP-complete and β is in P | |

Both α and β are NP-complete | |

Both α and β are in P |

**NP Complete**

**GATE-CS-2005**

**Discuss it**

Question 12 |

Π is NP-hard but not NP-complete | |

Π is in NP, but is not NP-complete | |

Π is NP-complete | |

Π is neither NP-hard, nor in NP |

**NP Complete**

**GATE-CS-2003**

**Discuss it**

Question 13 |

**1)**Given a graph, find if the graph has a cycle that visits every vertex exactly once except the first visited vertex which must be visited again to complete the cycle.

**2)**Given a graph, find if the graph has a cycle that visits every edge exactly once. Which of the following is true about above two problems.

Problem 1 belongs NP Complete set and 2 belongs to P | |

Problem 1 belongs to P set and 2 belongs to NP Complete set | |

Both problems belong to P set | |

Both problems belong to NP complete set |

**NP Complete**

**GATE-CS-2015 (Mock Test)**

**Discuss it**

Question 14 |

Q1 is in NP, Q2 is NP hard | |

Q2 is in NP, Q1 is NP hard | |

Both Q1 and Q2 are in NP | |

Both Q1 and Q2 are in NP hard |

**NP Complete**

**GATE-CS-2015 (Set 2)**

**Discuss it**

Q1 reduces in polynomial time to 3-SAT ==> Q1 is in NP 3-SAT reduces in polynomial time to Q2 ==> Q2 is NP Hard. If Q2 can be solved in P, then 3-SAT can be solved in P, but 3-SAT is NP-Complete, that makes Q2 NP Hard

Question 15 |

I. If L4 ∈ P, L2 ∈ P II. If L1 ∈ P or L3 ∈ P, then L2 ∈ P III. L1 ∈ P, if and only if L3 ∈ P IV. If L4 ∈ P, then L1 ∈ P and L3 ∈ P

II only | |

III only | |

I and IV only | |

I only |

**NP Complete**

**GATE-CS-2015 (Set 3)**

**Discuss it**

Question 16 |

It can be reduced to the 3-SAT problem in polynomial time | |

The 3-SAT problem can be reduced to it in polynomial time | |

It can be reduced to any other problem in NP in polynomial time | |

some problem in NP can be reduced to it in polynomial time |

**Analysis of Algorithms**

**NP Complete**

**GATE IT 2006**

**Discuss it**

Question 17 |

If X can be solved in polynomial time, then so can Y | |

X is NP-complete | |

X is NP-hard | |

X is in NP, but not necessarily NP-complete |

**NP Complete**

**Gate IT 2008**

**Discuss it**

In order to solve these type of questions in GATE, we will give 2 important theorems. Proofs of these is beyond the scope of this explanation. For Proofs please refer to Introduction To Algorithms by Thomas Cormen.

**Theorem - 1
**When a given Hard Problem (NPC, NPH and Undecidable Problems) is reduced to an unknown problem in polynomial time, then unknown problem also becomes Hard.

*Case - 1 * When NPC(NP-Complete) problem is reduced to unknown problem, unknown problem becomes NPH(NP-Hard).

*Case - 2* When NPH(NP-Hard) problem is reduced to unknown problem, unknown problem becomes NPH(NP-Hard).

*Case - 3* When undecidable problem is reduced to unknown problem, unknown problem becomes also becomes undecidable.

Remember that Hard problems needs to be converted for this theorem but not the other way.

**Theorem - 2**

When an unknown problem is reduced to an Easy problem(P or NP) in polynomial time, then unknown problem also becomes easy.

*Case - 1 * When an unknown problem is reduced to a P type problem, unknown problem also becomes P.

*Case - 2* When an unknown problem is reduced to a NP type problem, unknown problem also becomes NP.

Remember that unknown problems needs to be converted for this theorem to work but not the other way.

In the given question, X which is unknown problem is reduced to NPC problem in polynomial time so Theorem - 1 will not work. But all NPC problems are also NP, so we can say that X is getting reduced to a known NP problem so that **Theorem - 2 **is applicable and X is also NP. In order to make it NPC, we have to prove it NPH first which is not the case as Y is not getting reduced to X.

This solution is contributed by **Pranjul Ahuja**.