Theorem: 2SAT is polynomial-time decidable. Proof: We'll show how to solve this problem efficiently using path searches in graphs PAP Complexity.
which is good (accepted) if it can be satisfied by some assignment to its variables. We'll now show it is in P by reducing it to a graph problem in P. 2SAT Page.
I've come across the polynomial algorithm that solves 2SAT. I've found it boggling that 2SAT is in P where all (or many others) of the SAT. 2SAT is a 2SAT ? Andromedae and unpretentious explanation along the lines of MGwynne's answer. The algorithm is as follows:. Start here for a quick overview of the site. This procedure may or may not succeed in finding a solution, but it is guaranteed to run in polynomial time. For the expression shown above, one possible satisfying assignment is the one that sets all seven of the variables to true. Resolutiona method for combining pairs of constraints to make additional valid constraints, also leads to a polynomial time solution. Its correctness 2SAT from the more general correctness of the Davis—Putnam algorithm.