GATE / CS ARCHIVE

SIMILAR QUESTIONS / THEORY OF COMPUTATION

Transfer bounds through an NP-complete middle

3 questions solved the same way, newest first. Back to Theory of Computation

How these are solved

Follow reduction arrows: reducing to an NP language gives an NP upper bound; an NP-hard language reducing to the target gives hardness. Do not infer membership from hardness alone.

1 mark · MCQ
Not in GATE 2027 syllabusReport issue

Complexity & Reductions

Question 26, GATE 2015: Q1≤p3-SAT≤pQ2. Which is “consistent” with this? A Q1 in NP, Q2 NP-hard; B Q2 in NP, Q1 NP-hard; C both in NP; D both NP-hard. Official choice interprets the question as what is necessarily implied.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Our answer: A is guaranteed; all choices can be consistent

A polynomial reduction Q1≤p3-SAT implies Q1∈NP, by composing the reduction with a 3-SAT verifier. The reduction 3-SAT≤pQ2 makes Q2 NP-hard. Thus A is necessarily implied. The literal word consistent is weaker: taking Q1=Q2=3-SAT satisfies all four options simultaneously. The key A requires reading the question as asking what is guaranteed, not merely possible.

A reduction from Q1 to 3-SAT converts a Q1 instance in polynomial time and lets an NP verifier check the resulting formula certificate, so Q1 belongs to NP. A reduction in the other direction from an NP-complete problem to Q2 shows Q2 is at least as hard as every NP problem, so it is NP-hard; it need not belong to NP. These are directional implications, not equivalence. Literal consistency is weaker than logical entailment: choosing both problems equal to 3-SAT makes every listed classification possible, which is why the source wording is explicitly qualified.

Original paper, page 34 · Answer key

1 mark · MCQ
Not in GATE 2027 syllabusReport issue

Reductions to and from an NP-complete problem

Complexity & Reductions

Question 16, GATE 2006: S is NP-complete. Q and R are problems not initially known to belong to NP. Q is polynomial-time reducible to S and S is polynomial-time reducible to R. Which statement necessarily follows?
Options:
(A) R is NP-complete
(B) R is NP-hard
(C) Q is NP-complete
(D) Q is NP-hard
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

1. Every NP language reduces to S, and S reduces to R, so transitivity makes R NP-hard. R need not belong to NP and therefore need not be NP-complete.

2. Q reducing to S does place Q in NP, but does not make Q NP-hard. Thus B.

3. Teaching check: Reduction direction matters: if A reduces to B, a solver for B can solve A. Thus hardness flows from S toward R. Membership in NP does not automatically flow in that direction, which is why NP-hard is justified but NP-complete is not.

Original paper, page 2

1 mark · MCQ
Not in GATE 2027 syllabusReport issue

Two directions of an NP-completeness proof

Complexity & Reductions

Question 12, GATE 2003: Ram gives a polynomial-time reduction from 3-SAT to decision problem Π. Shyam gives a polynomial-time reduction from Π to 3-SAT. What follows? A. Π is NP-hard but not NP-complete; B. Π is in NP but not NP-complete; C. Π is NP-complete; D. Π is neither NP-hard nor in NP.
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

1. Reduction direction matters: 3-SAT≤pΠ means a solver for Π could solve an NP-complete problem, proving hardness. For membership, compute the other reduction and use a satisfying assignment to the resulting 3-CNF as a polynomial certificate. Combining membership and hardness is precisely NP-completeness.

2. The reduction 3-SAT≤pΠ proves Π is NP-hard. The reduction Π≤p 3-SAT supplies a polynomial verifier/NP algorithm because 3-SAT is in NP, so Π is in NP. Together these establish NP-completeness, C, for the standard decision-problem reductions.

Original paper, page 2