Definition · A decision problemA decision problem is a set of inputs together with a yes-or-no question about each one. SAT is the decision problem whose input is a formula in conjunctive normal form and whose question is “is there an assignment satisfying every clause?”. An algorithm solves it by answering the question; it is not required to produce anything else, and the oracle in the lab does not.
Definition · A certificate, and the class NPA decision problem is in NP when every yes instance has a certificate of size polynomial in the input, and a verifier that reads the instance and the certificate and accepts in polynomial time, accepting no certificate whatever for a no instance. For SAT the certificate is an assignment and the verifier evaluates the clauses. P is the class of decision problems solvable in polynomial time, and P is contained in NP because an algorithm that answers the question is a verifier that ignores its certificate.
Whether the containment is strict is not known, and nothing on this course settles it. What the rest of the course does is build the structure that makes the question sharp: a relation between problems that carries hardness from one to another, a family of problems at the top of that relation, and six things worth doing about a problem that reaches it.
The same question in three forms
Every problem here can be asked three ways, and it is worth separating them before the machinery starts. The decision form asks whether a solution exists; the search form asks for one; the optimisation form asks for the best one. They are different questions and the theory is stated for the first. The reason that costs nothing is this lesson.
Theorem · Search reduces to decision for satisfiabilitySuppose a routine decides SAT in one unit of time. Then a satisfying assignment for a formula on n variables can be produced with n + 1 calls to it.
Call the oracle on the formula itself. If it says no there is no assignment to produce and the work is over, which is the first call. Otherwise fix x1 to true, simplify — delete every clause containing x1 and delete ¬x1 from the clauses containing it — and call the oracle on what is left.
If that call says yes, some satisfying assignment of the original has x1 true, so committing to true loses nothing. If it says no, no satisfying assignment has x1 true; since the original is satisfiable, every satisfying assignment has x1 false, so committing to false loses nothing. Either way one call settles one variable and the remaining formula is still satisfiable.
Repeat for x2 up to xn. After n more calls every variable is fixed and no clause remains unsatisfied, so reading the commitments off gives an assignment. The total is n + 1 calls, each on a formula no larger than the original.
□
What the lab counts, and what it refuses to count
The loaded formula is (x1 or x2 or not x3) and (not x1 or x2 or x3) and (x1 or not x2 or x3) and (not x1 or not x2 or not x3): three variables, four clauses. The panel reports 4 oracle calls against 8 assignments a search would try, the assignment x1=T x2=T x3=F, and the formula's 4 models out of those 8. Both branches are allowed at x1 and at x2, so the reduction takes true and moves on; at x3 the oracle refuses true and the reduction takes false, which is the only place on this instance where a question does any work.
Two checks run beside the trace and neither is decoration. Every restricted formula is re-decided by brute force independently of the reduction, and all three steps are required to agree; and the assignment at the end is evaluated clause by clause rather than assumed. A reduction that produced a confident wrong witness would look identical on the page without them.
Example · The step that refuses a branchAfter x1 and x2 are both fixed true, the formula that is left is (not x3). The oracle is asked whether fixing x3 to true leaves something satisfiable and answers no, so x3 is false. That single refusal is the difference between an assignment and a guess, and it cost one question.
Now read the two numbers side by side and resist the conclusion. Four calls against eight assignments is a saving of one half on this formula. Move to the four-variable example in the panel and it is five calls against sixteen. The calls grow by one per variable and the assignments double, so the gap widens without limit — but that sentence is a claim about the two expressions, not about the two numbers on screen, and the numbers on screen cannot establish it.