GateAI
Searching, Sorting and Hashing

GATE CSE 2014 Set 3 · Q38

MCQ2 marksMedium

Time

Consider the decision problem 2CNFSAT2CNFSAT defined as follows: Φ∣Φ\Phi \mid \Phi is a satisfiable propositional formula in CNF with at most two literals per clause For example, Φ=(x1∨x2)∧(x1∨x3‾)∧(x2∨x4)\Phi = (x_1 \vee x_2) \wedge (x_1 \vee \overline{x_3}) \wedge (x_2 \vee x_4) is a Boolean formula and it is in 2CNFSAT2CNFSAT. The decision problem 2CNFSAT2CNFSAT is (A) NP-Complete. (B) solvable in polynomial time by reduction to directed graph reachability. (C) solvable in constant time since any input instance is satisfiable. (D) NP-hard, but not NP-complete.

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: B) solvable in polynomial time by reduction to directed graph reachability.

Searching, Sorting and Hashing

The 2-Satisfiability (2-SAT or 2CNFSAT) problem can be solved in linear (and therefore polynomial) time by constructing an implication graph:

  1. Each clause of the form (a∨b)(a \vee b) is equivalent to two implications: $(

eg a \to b)and and ( eg b \to a)$.

  1. In the directed implication graph, each variable xix_i and its negation $

eg x_i$ are represented as vertices, and each implication represents a directed edge.

  1. The formula is satisfiable if and only if no variable xix_i and its negation $

eg x_ibelongtothesameStronglyConnectedComponent(SCC),whichisequivalenttocheckingdirectedreachabilitybetween belong to the same Strongly Connected Component (SCC), which is equivalent to checking directed reachability between x_iand and eg x_i$.

Since computing strongly connected components or testing reachability takes O(V+E)O(V + E) time using algorithms like Kosaraju's or Tarjan's, the problem is solvable in polynomial time by reduction to directed graph reachability.

Therefore, option (B) is correct.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Searching, Sorting and Hashing previous year question is Q38 of the GATE CSE 2014 Set 3 paper. Find more GATE CSE PYQs on Searching, Sorting and Hashing in Algorithms, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Searching, Sorting and Hashing PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Searching, Sorting and Hashing in GATE CSE

Searching, Sorting and Hashing has 27 GATE CSE PYQs across 20 papers from 2012 to 2026. 7 of them are 2-mark MCQs like this one, and GATE CSE 2014 Set 3 has 3.

How GATE tests Searching, Sorting and Hashing

More from GATE CSE 2014 Set 3

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2014 Set 3 · Q38 · MCQ

Consider the decision problem 2CNFSAT defined as follows: is a satisfiable propositional formula in CNF with at most two literals per clause For example, = (x1 x2) (x1 x3) (x2 x4) is a Boolean formula and it is in 2CNFSAT. The decision problem 2CNFSAT is (A) NP-Complete. (B) solvable in polynomial time by reduction to directed graph reachability. (C) solvable in constant time since any input instance is satisfiable. (D) NP-hard, but not NP-complete.

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.