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 formula 2026-10-06
A Boolean formula is a finite expression built from Boolean variables and Boolean operations. A choice of truth values determines its value. The Boolean satisfiability problem asks whether some choice makes it true.
Maximum satisfiability 2026-10-14
Maximum satisfiability asks for a truth assignment maximizing the number of true clauses of a conjunctive normal form formula. The Boolean satisfiability problem asks whether all its clauses can be made true. Binary clause indicators give an integer programming formulation, and the literal-frequency greedy approximation for MAX-SAT guarantees at least half the optimum. Counts of clauses, rather than multiplicities of repeated literals within one clause, are relevant to this objective.
Let encode the truth value of . For a Boolean literal , write if and if . A clause is true precisely when the sum of its literal values is at least one. Thus the integer programming formulation of satisfiability is the feasibility problem
with objective zero. Every feasible binary vector gives a satisfying assignment of the Boolean satisfiability problem, and conversely. An empty clause gives and hence infeasibility.
For maximum satisfiability, introduce binary variables marking clauses selected as satisfied and solve
A false clause forces , while a true clause permits . At an optimum every permitted is one, since increasing it improves the objective without affecting another constraint. Therefore the objective is exactly the maximum number of simultaneously true clauses. Repeated literals cause no difficulty, and a clause containing both signs of a variable is always true.
For the literal-frequency greedy approximation for MAX-SAT, keep only clauses not already satisfied and remove literals made false. Count occurrence in clauses, rather than multiplicity within a clause. At a step let be the number of current clauses containing the chosen literal , and the number containing its opposite . Since has maximum clause frequency among all remaining literals, .
Setting true permanently satisfies exactly the clauses containing it. Some other clauses may become empty and are then permanently lost. Every newly empty clause previously contained , so their number satisfies
A clause containing both signs is satisfied and cannot be one of the lost clauses. Repeat this accounting at every step. Satisfied clauses are removed, so no success is counted twice; each lost nonempty original clause becomes empty at exactly one step. If is the total number satisfied and the number of initially nonempty clauses lost, summing the inequalities gives . Every initially nonempty clause eventually falls into one of these two classes. Writing their number as , we get
Even an optimal assignment can satisfy at most clauses. Consequently
Thus Greedy is a -approximation in the convention stated in the question. The proof also covers initial empty clauses by excluding them from ; they are unsatisfiable for every algorithm.
The Cook-Levin theorem states that the Boolean satisfiability problem is NP-complete under polynomial-time many-one reductions. Membership in NP follows by guessing an assignment and evaluating the formula in time polynomial in its description length.
For hardness, let have a deterministic polynomial-time verifier , with a polynomial witness-length bound. Use a fixed polynomial certificate length: a short certificate is encoded by its length followed by padded data, and the verifier checks this encoding. Pad the computation to exactly steps, with accepting and rejecting states absorbing. Enlarge polynomially if necessary to cover input/witness initialization. A standard polynomial slowdown permits a single-tape Turing machine, so it suffices to handle that model.
Encode a tape cell by a fixed number of bits recording its alphabet symbol and either no head or the head's finite control state. Starting with one head, a cell's next label depends only on its own label and the two neighboring labels: a head can change the symbol where it sits and can enter only a neighbor. Each such finite local function has a constant-size Boolean circuit. The initial row fixes , blanks and the starting head, leaving only the witness bits as Boolean circuit inputs. There are relevant cells with blank margins beyond every possible head position, and updates. Repeating these local Boolean circuits produces a Boolean circuit of size , with an output detecting an accepting head in the final row. The construction is computable in polynomial time. Induction on rows shows that every assignment to produces exactly the verifier's valid computation; invalid local encodings can be assigned arbitrary Boolean circuit behavior because they never arise from the valid initial row.
Convert this Boolean circuit to conjunctive normal form using a Tseitin transformation. Introduce one variable for each wire, and encode each gate output by:
Gate relationClauses imposing equivalence
Unit clauses fix constant sources and assert the final output. Each input assignment has exactly one extension to its gate values, so the resulting formula is satisfiable precisely when some witness makes accept. It has clauses of bounded length and is produced in polynomial time. Thus
This proof also gives hardness for clauses of at most three literals, without needing a separate satisfiability assumption.
This is Ladner's theorem. Assume and let be the Boolean satisfiability problem. Enumerate all clocked polynomial-time deterministic machines as and all clocked polynomial-time candidate reductions as . A standard delayed-diagonalization schedule gives a nondecreasing, unbounded, polynomial-time computable function that increases only by one. Define
The schedule alternates two requirements. At even stage , it holds fixed while searching successively larger finite sets of strings for an on which disagrees with membership in ; after finding one it increments . At odd stage , it searches for an such that
and then increments . Length and simulation budgets are increased slowly enough that each finite search is eventually exhaustive but computing still takes polynomial time. This is achieved, for example, by permitting only simulation steps and searches on strings of logarithmic length before deciding .
Every stage must finish. If an even stage remained forever, then would eventually be a fixed even number, so and would differ on only finitely many strings. If decided , those finitely many exceptions could be hardwired to decide in P, contradicting . If an odd stage remained forever, then would eventually be odd and would be finite. A correct polynomial-time many-one reduction from to would again put in P. Thus every fails to decide , and every fails to reduce to .
Finally, : compute and, when it is even, use the usual polynomial-time certificate for satisfiability. Hence