Graph Theory37 sections · 1633 units
Open in Course

The 2-SAT Restriction

(Exactly two variables)

General SAT is hard. If clauses can have any number of variables, no fast algorithm exists.

The problem is NP-complete. 22-SAT restricts each clause to exactly two variables. Every clause looks like "a OR b", "NOT x OR y", or "NOT p OR NOT q". With exactly two per clause, everything changes. You can solve 22-SAT in linear time using graph algorithms. That is what this section is about. The restriction to exactly two variables makes the problem tractable.