GATE / CS ARCHIVE

GATE CSE 2014 SET 3 / QUESTION 38

GATE CSE 2014 Set 3 Q38

Theory of Computation · Complexity & Reductions · Full GATE CSE 2014 Set 3 paper

GATE 2014 Set 3, Q38 2 marks · MCQ
Not in GATE 2027 syllabusReport issue

Complexity & Reductions

Question 38, GATE 2014: 2CNFSAT asks whether a CNF propositional formula with at most two literals per clause is satisfiable; for example (x1∨x2)∧(x1∨¬x3)∧(x2∨x4). Classify it. A NP-complete; B polynomial-time solvable via directed graph reachability; C constant-time solvable because every instance is satisfiable; D NP-hard but not NP-complete.
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Step 1: Translate every clause (a∨b) into implications ¬a→b and ¬b→a. Treat a unit clause as (a∨a). This gives a directed implication graph with one vertex per literal. Step 2: If x reaches ¬x and ¬x reaches x, they lie in one strongly connected component, so either truth assignment forces a contradiction. Conversely, if no variable shares an SCC with its negation, the SCC ordering yields a satisfying assignment. Step 3: SCCs and reachability are computable in polynomial time (linear time suffices for SCCs), establishing B. C is false, as clauses x and ¬x form an unsatisfiable instance.

Original paper, page 61 · Answer key