Skip to content
Official PYQ · 2014

GATE CS 2014 Set 3 Q38 — Undecidability

Explain with AI

Consider the decision problem 2CNFSAT2CNFSAT defined as follows:

{ϕ∣ϕ is a satisfiable propositional formula in CNF with at most two literals per clause}\left\{ \phi \mid \phi \text{ is a satisfiable propositional formula in CNF with at most two literals per clause}\right\}

For example, ϕ=(x1∨x2)∧(x1∨x3ˉ)∧(x2∨x4)\phi = (x1 \vee x2) \wedge (x1 \vee \bar{x3}) \wedge (x2 \vee x4) is a Boolean formula and it is in 2CNFSAT2CNFSAT.

The decision problem 2CNFSAT2CNFSAT is

Choose one option
View worked solution

Answer: B

The decision problem 2extCNFSAT2 ext{CNFSAT} can be solved in polynomial time using an implication graph representation:

  1. For each clause (u∨v)(u \vee v) in the formula, we rewrite it as two equivalent implication constraints: (¬u  ⟹  v)(\neg u \implies v) and (¬v  ⟹  u)(\neg v \implies u).
  2. We construct a directed implication graph G=(V,E)G = (V, E) where the vertices VV represent the variables and their negations, and the directed edges EE represent these implications.
  3. The formula is unsatisfiable if and only if there exists some variable xx such that there is a path from xx to ¬x\neg x and a path from ¬x\neg x to xx in GG (i.e., they belong to the same Strongly Connected Component).

Since finding strongly connected components and checking reachability in a directed graph can be done in linear time O(∣V∣+∣E∣)O(|V| + |E|) using depth-first search (DFS), 2extCNFSAT2 ext{CNFSAT} is solvable in polynomial time by reduction to directed graph reachability.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Undecidability questions