# NP Complete

Please wait while the activity loads.

If this activity does not load, try refreshing your browser. Also, this page requires javascript. Please visit using a browser with javascript enabled.

If this activity does not load, try refreshing your browser. Also, this page requires javascript. Please visit using a browser with javascript enabled.

Question 1 |

Assuming P != NP, which of the following is true ?

(A) NP-complete = NP

(B) NP-complete P =

(C) NP-hard = NP

(D) P = NP-complete

(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 1 Explanation:

The answer is B (no NP-Complete problem can be solved in polynomial time). Because, if one NP-Complete problem can be solved in polynomial time, then all NP problems can solved in polynomial time. If that is the case, then NP and P set become same which contradicts the given condition.

Question 2 |

Let S be an NP-complete problem and Q and R be two other problems not known to be in NP. Q is polynomial time reducible to S and S is polynomial-time reducible to R. Which one of the following statements is true? (GATE CS 2006)

R is NP-complete | |

R is NP-hard | |

Q is NP-complete | |

Q is NP-hard |

**NP Complete**

**Discuss it**

Question 2 Explanation:

(A) Incorrect because R is not in NP. A NP Complete problem has to be in both NP and NP-hard.
(B) Correct because a NP Complete problem S is polynomial time educable to R.
(C) Incorrect because Q is not in NP.
(D) Incorrect because there is no NP-complete problem that is polynomial time Turing-reducible to Q.

Question 3 |

Let X be a problem that belongs to the class NP. Then which one of the following is TRUE?

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 3 Explanation:

(A) is incorrect because set NP includes both P(Polynomial time solvable) and NP-Complete .
(B) is incorrect because X may belong to P (same reason as (A))
(C) is correct because NP-Complete set is intersection of NP and NP-Hard sets.
(D) is incorrect because all NP problems are decidable in finite set of operations.

Question 4 |

The problem 3-SAT and 2-SAT are

both in P | |

both NP complete | |

NP-complete and in P respectively | |

undecidable and NP-complete respectively |

**NP Complete**

**Discuss it**

Question 4 Explanation:

The Boolean satisfiability problem (SAT) is a decision problem, whose instance is a Boolean expression written using only AND, OR, NOT, variables, and parentheses. The problem is: given the expression, is there some assignment of TRUE and FALSE values to the variables that will make the entire expression true? A formula of propositional logic is said to be satisfiable if logical values can be assigned to its variables in a way that makes the formula true.
3-SAT and 2-SAT are special cases of k-satisfiability (k-SAT) or simply satisfiability (SAT), when each clause contains exactly k = 3 and k = 2 literals respectively.
2-SAT is P while 3-SAT is NP Complete. (See this for explanation)
References:
http://en.wikipedia.org/wiki/Boolean_satisfiability_problem

Question 5 |

Which of the following statements are TRUE?
(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 3 | |

2 and 3 | |

1 and 2 |

**NP Complete**

**Discuss it**

Question 6 |

Which of the following is true about NP-Complete and NP-Hard problems.

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 6 Explanation:

See NP-Completeness

Question 7 |

Which of the following statements are TRUE?

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 7 Explanation:

1. We can either use BFS or DFS to find whether there is a cycle in an undirected graph. For example, see DFS based implementation to detect cycle in an undirected graph. The time complexity is O(V+E) which is polynomial.
2. If a problem is in P, then it is definitely in NP (can be verified in polynomial time). See NP-Completeness
3. True. See See NP-Completeness

Question 8 |

Suppose a polynomial time algorithm is discovered that correctly computes the largest clique in a given graph. In this scenario, which one of the following represents the correct Venn diagram of the complexity classes P, NP and NP Complete (NPC)?

A | |

B | |

C | |

D |

**NP Complete**

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

**Discuss it**

Question 8 Explanation:

Clique is an NP complete problem. If one NP complete problem can be solved in polynomial time, then all of them can be. So NPC set becomes equals to P.

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 9 Explanation:

2CNF-SAT can be reduced to strongly connected components problem. And strongly connected component has a polynomial time solution. Therefore 2CNF-SAT is polynomial time solvable. See https://en.wikipedia.org/wiki/2-satisfiability#Strongly_connected_components for details.
As a side note, 3CNFSAT is NP Complete problem.

Question 10 |

Let SHAM

_{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 10 Explanation:

The problem of finding whether there exist a Hamiltonian Cycle or not is NP Hard and NP Complete Both.
Finding a Hamiltonian cycle in a graph G = (V,E) with V divisible by 3 is also NP Hard.

There are 19 questions to complete.