(A) NP-complete = NP
(B) NP-complete P =
(C) NP-hard = NP
(D) P = NP-complete
R is NP-complete
R is NP-hard
Q is NP-complete
Q is NP-hard
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.
both in P
both NP complete
NP-complete and in P respectively
undecidable and NP-complete respectively
1, 2 and 3
1 and 3
2 and 3
1 and 2
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
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
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.
Both DHAM3 and SHAM3 are NP-hard
SHAM3 is NP-hard, but DHAM3 is not
DHAM3 is NP-hard, but SHAM3 is not
Neither DHAM3 nor SHAM3 is NP-hard
α : 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
Π 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
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
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
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
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
I and IV only
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
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
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.