Consider the decision problem defined as follows:
For example, is a Boolean formula and it is in .
The decision problem is
View worked solution
Answer: B
The decision problem can be solved in polynomial time using an implication graph representation:
- For each clause in the formula, we rewrite it as two equivalent implication constraints: and .
- We construct a directed implication graph where the vertices represent the variables and their negations, and the directed edges represent these implications.
- The formula is unsatisfiable if and only if there exists some variable such that there is a path from to and a path from to in (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 using depth-first search (DFS), is solvable in polynomial time by reduction to directed graph reachability.
Free practice · Your answers on this page are not saved.
