Definition
3-Satisfiability Problem
Trivial Exponential Barrier
Problems in P can be solved in polynomial time
where
For NP-complete problems, no polynomial-time algorithm is known. Examples include SAT, 3-SAT, independent set, 3-colouring, and vertex cover.
The basic deterministic way to solve such problems is exhaustive search. For a Boolean formula with
up to the cost of checking each assignment. For problems with three choices per variable or object, a similarly trivial search may give
These bounds are encoding-dependent because
For 3-SAT, the trivial branching algorithm assigns one variable at a time. Each variable gives two branches: true and false. This produces a full binary search tree of depth
The exact-algorithm question is whether one can break this trivial exponential barrier. For 3-SAT, one can do better than
Breaking the Exponential Barrier
The basic branching algorithm chooses one variable and creates two subinstances. For 3-SAT, one can branch on a whole clause instead.
Let
- If
has one literal, then it is a unit clause. Unit propagation fixes that literal. - If
has two literals over variables , then there are only three satisfying assignments for . - If
has three literals over variables , then there are only seven satisfying assignments for .
Thus one branching step removes
- a unit clause has
satisfying assignment; - a 2-literal clause has
satisfying assignments; - a 3-literal clause has
satisfying assignments.
Let
A branch on a 3-literal clause assigns 3 variables and creates at most 7 subinstances. Thus
Variables counted by
If the algorithm branches on four 3-literal clauses, then it assigns
variables through such branches. Hence , and these branches contribute leaves.
A branch on a 2-literal clause assigns 2 variables and creates at most 3 subinstances. Thus
Variables counted by
If the algorithm branches on five 2-literal clauses, then it assigns
variables through such branches. Hence , and these branches contribute leaves.
Multiplying the two contributions, the number of leaves is at most
Since
So 3-SAT can be solved exactly and deterministically in time
where
The O-star notation