3-SAT 2026-10-06
3-SAT is the Boolean satisfiability problem restricted to Boolean formulas in conjunctive normal form with at most three Boolean literals per Boolean clause. It is NP-complete. A nonempty short Boolean clause can be padded to three positions by repeating a Boolean literal, without changing satisfiability.
Boolean variable 2026-10-06
A Boolean variable takes one of two truth values. It is an input to a Boolean formula; a Boolean literal uses the variable either positively or negated.
Clause of a Boolean formula 2026-10-06
A clause is an expression formed from Boolean literals, true when at least one literal is true. The empty clause is false. Repeating a literal does not change the truth value. A conjunctive normal form formula is a conjunction of these clauses.
Conjunctive normal form 2026-10-06
A Boolean formula is in conjunctive normal form when it is a conjunction of Boolean clauses. It is true precisely when every clause is true; an empty conjunction is true. 3-SAT restricts each clause to at most three Boolean literals.
Past exam of the mathematics course of the University of Cambridge 2015 iii Paper 38 4 e Solution Created 2026-10-03 Updated 2026-10-06
The three-colourability problem belongs to NP: a colour assignment is a polynomial-length complexity certificate, and all edges can be checked in time.
For NP-hardness, reduce 3-SAT to the three-colourability problem. Start with a palette graph triangle with vertices . Its colours are necessarily distinct, and name them by these vertices. For each Boolean variable , add vertices , join them to each other, and join each to . The graph triangle is the forcing component of the Boolean-pair colouring gadget, so the two literal vertices receive opposite colours .
For each Boolean clause, attach a fresh copy of the three-colour clause gadget, identify its with the palette vertex , and identify its three input vertices with the Boolean clause's Boolean literal vertices. Copies share only palette or literal vertices. A Boolean clause with one or two Boolean literals is padded to three by repeating a literal; an empty Boolean clause can be mapped immediately to the uncolourable graph .
Any graph colouring with three colours gives a truth assignment by reading colour as true. The three-colour clause gadget forbids three false inputs, so every Boolean clause is satisfied. Conversely, any satisfying truth assignment colours the literal pairs, and the extension property proved above independently colours the fresh auxiliary vertices of each clause. Thus the entire graph is three-colourable exactly when the formula is satisfiable.
There are vertices for variables and nonempty padded clauses, and edges. The construction is a polynomial-time many-one reduction. Using the permitted NP-completeness of 3-SAT, we obtain