Lecture 18: Practice Problems

1. 2-SAT

2-SAT (clauses size 2) can be solved in polynomial time. How?

Show Answer

Graph Reduction.

Clause (A v B) is equivalent to (!A -> B) and (!B -> A).

Build an implication graph. Check for Strong Connected Components. If x and !x are in same SCC, it's unsatisfiable.

2. Transitivity

Is polynomial reduction transitive? (If A <= B and B <=C, is A <=C?)

Show Answer

Yes.

Combining two polynomial functions f(g(x)) results in a polynomial function. O(n^a)^b = O(n^(ab)).