Pigeonhole formula
The pigeonhole formulas encode, as a set of clauses, the false statement that pigeons fit into holes without two pigeons sharing a hole. The pigeonhole principle says this is impossible, and any person convinces themselves of it by counting. Resolution, the proof system that SAT solvers work in, cannot count: Armin Haken proved in 1985 that every resolution refutation of the pigeonhole formulas has size exponential in [1]. As a result, DPLL and CDCL solvers take exponential time on formulas with only a few hundred clauses. Stronger proof systems, such as extended resolution, cutting planes and Frege systems, have polynomial-size proofs[3][4][5], so the family marks the boundary between resolution and reasoning that can count. It was proposed as a hard example by Cook and Reckhow in 1979[2].
The formulas
For pigeons and holes , the variable means that pigeon is in hole . The formula says that each pigeon is in some hole and no hole holds two pigeons:
It has variables, pigeon clauses of length , and hole clauses of length 2. Nothing in it prevents a pigeon from occupying two holes; adding those constraints gives the functional pigeonhole formula, and requiring every hole to be used gives the onto version. Both are also hard for resolution.
Resolution lower bound
Haken showed that every resolution refutation of contains at least clauses[1]. His proof considers the assignments that place of the pigeons in distinct holes, which falsify only the clause of the remaining pigeon, and shows that a short refutation would have to contain a clause that is falsified by many of these assignments at once and yet is wide, of which there cannot be few. Beame and Pitassi gave a simpler proof in 1996[6], and Ben-Sasson and Wigderson derived such bounds from the width of refutations[10]. For many more pigeons than holes, the weak pigeonhole principle, Raz showed in 2004 that resolution still needs exponential size, however many pigeons there are[7][9].
Since every CDCL run on an unsatisfiable formula is a resolution refutation, the bound applies to every such solver, whatever its heuristics.
Solving the formulas with increasing numbers of holes, using a CDCL solver.
Running it.
holes variables clauses CDCL conflicts3 12 22 74 20 45 285 30 81 1546 42 133 7587 56 204 41648 72 297 34671
Each extra hole multiplies the number of conflicts by five to eight; the formula for eight holes, with 72 variables and 297 clauses, already takes tens of thousands of conflicts, and production solvers, although far faster, are stopped by formulas with a dozen or so holes.
Short proofs
The principle has a two-line counting proof: summing the pigeon constraints gives at least occupied places, and summing the hole constraints gives at most . Proof systems that can express this argument prove the formulas efficiently.
In cutting planes, clauses become linear inequalities over 0–1 variables, and the rules add inequalities and round coefficients. The hole constraints can be derived from the pairwise clauses in a polynomial number of steps, and adding them to the pigeon constraints cancels every variable and leaves [4].
The final step of the cutting-planes proof: adding all pigeon and hole inequalities.
(* The counting argument as a derivation over linear inequalities. Foreach pigeon, sum over holes of p(i,j) >= 1; for each hole, sum overpigeons of p(i,j) <= 1. Adding all of them cancels every variable. *)let refute n =(* represent sum_{i,j} c(i,j) p(i,j) + k >= 0 by its coefficients *)let coef = Array.make_matrix (n + 1) n 0 and const = ref 0 and steps = ref 0 infor i = 0 to n do (* p(i,0) + ... + p(i,n-1) - 1 >= 0 *)for j = 0 to n - 1 do coef.(i).(j) <- coef.(i).(j) + 1 done;const := !const - 1; incr stepsdone;for j = 0 to n - 1 do (* 1 - p(0,j) - ... - p(n,j) >= 0 *)for i = 0 to n do coef.(i).(j) <- coef.(i).(j) - 1 done;const := !const + 1; incr stepsdone;let cancelled = Array.for_all (Array.for_all (( = ) 0)) coef in(cancelled, !const, !steps)
Running it.
n = 3: 7 inequalities added, variables cancelled: true, result: -1 >= 0n = 10: 21 inequalities added, variables cancelled: true, result: -1 >= 0n = 1000: 2001 inequalities added, variables cancelled: true, result: -1 >= 0
Cook showed in 1976 that extended resolution, which may introduce new variables as abbreviations, has polynomial-size proofs, by reducing the principle for holes to that for [3]. Buss gave polynomial-size proofs in Frege systems, the textbook proof systems of propositional logic, in 1987[5].
In practice
Because the formula is symmetric under permuting pigeons and permuting holes, a solver that breaks the symmetry, for instance by adding clauses that force pigeons into holes in a canonical order, can finish much faster[8]. Pseudo-Boolean solvers, which reason with cardinality constraints directly, refute it at once once the constraints have been recognized. Plain CDCL solvers do neither, and the formulas are part of the standard suite for testing claims about solver performance.
History
The pigeonhole principle is attributed to Dirichlet, who used it in 1834 under the name Schubfachprinzip, the drawer principle. Cook and Reckhow, founding propositional proof complexity in 1979, proposed its propositional form as a candidate for a tautology without short proofs in some proof systems[2]. Cook had already shown that extended resolution proves it efficiently[3]. Haken's lower bound for resolution in 1985 was the first exponential lower bound for resolution without restrictions[1], and cutting-planes and Frege proofs of polynomial size followed in 1987[4][5]. The weak pigeonhole principle remained open for resolution until 2004[7].
see also
- ResolutionResolution is the inference rule that derives, from two clauses containing a variable with opposite signs, the clause of all their other literals: from C ∨ x and D ∨ ¬x, infer C ∨ D. It is sound and refutation complete for propositional logic, so a set of clauses is unsatisfiable exactly when the empty clause can be derived. Resolution is the proof system behind SAT solvers, whose runs on unsatisfiable formulas are resolution refutations, and behind first-order theorem provers and logic programming. Some formulas, such as the pigeonhole formulas, have only exponentially long resolution refutations.
- CDCLConflict-driven clause learning (CDCL) is the algorithm of modern SAT solvers. It extends DPLL backtracking search with three ideas: when propagation falsifies a clause, conflict analysis derives a new clause that explains the conflict and adds it to the formula; the solver then backjumps non-chronologically to the decision level at which the new clause forces a literal; and branching follows the variables involved in recent conflicts. With watched literals, restarts and clause deletion, CDCL solvers decide industrial formulas with millions of variables, and with restarts they are as strong as general resolution, exponentially stronger than DPLL.
- DPLLDPLL, the Davis–Putnam–Logemann–Loveland procedure, is the backtracking search algorithm for Boolean satisfiability on which all complete SAT solvers are built. It repeatedly simplifies a CNF formula by unit propagation and pure literal elimination, then chooses an unassigned variable and tries both of its values in turn, backtracking to the most recent choice when a clause becomes false. It is sound and complete, uses memory linear in the formula, and its runs on unsatisfiable formulas correspond to tree-like resolution proofs, which gives exponential lower bounds such as the n! − 1 decisions it needs for the pigeonhole formulas. Clause learning turned it into CDCL.
- SATThe Boolean satisfiability problem, SAT, asks whether some assignment of true and false to the variables of a propositional formula makes the formula true. It was the first problem shown to be NP-complete, so every problem in NP reduces to it, and no polynomial-time algorithm is known. In practice SAT solvers based on conflict-driven clause learning decide industrial instances with millions of variables, which has made SAT a general-purpose engine for hardware and software verification, planning, scheduling and combinatorics.
- DIMACS CNFDIMACS CNF is the standard plain-text format for Boolean formulas in conjunctive normal form, read by essentially every SAT solver. After optional comment lines beginning with c, a header p cnf V C gives the number of variables and clauses; each clause is then a list of non-zero integers, v for a variable and −v for its negation, terminated by 0. It was defined for the Second DIMACS Implementation Challenge in 1993 and has variants for quantified formulas (QDIMACS), weighted MaxSAT (WCNF) and unsatisfiability proofs (DRAT).
referenced by
further reading
- [1]A. Haken, “The intractability of resolution”, Theoretical Computer Science 39 (1985).
- [2]S. A. Cook, R. A. Reckhow, “The relative efficiency of propositional proof systems”, Journal of Symbolic Logic 44 (1979).
- [3]S. A. Cook, “A short proof of the pigeon hole principle using extended resolution”, SIGACT News 8 (1976).
- [4]W. Cook, C. R. Coullard, G. Turán, “On the complexity of cutting-plane proofs”, Discrete Applied Mathematics 18 (1987).
- [5]S. R. Buss, “Polynomial size proofs of the propositional pigeonhole principle”, Journal of Symbolic Logic 52 (1987).
- [6]P. Beame, T. Pitassi, “Simplified and improved resolution lower bounds”, FOCS (1996).
- [7]R. Raz, “Resolution lower bounds for the weak pigeonhole principle”, Journal of the ACM 51 (2004).
- [8]J. Crawford, M. Ginsberg, E. Luks, A. Roy, “Symmetry-breaking predicates for search problems”, KR (1996).
- [9]A. A. Razborov, “Proof complexity of pigeonhole principles”, Developments in Language Theory, Lecture Notes in Computer Science 2295 (2002).
- [10]E. Ben-Sasson, A. Wigderson, “Short proofs are narrow — resolution made simple”, Journal of the ACM 48 (2001).
last updated