In
logic
Logic is the study of correct reasoning. It includes both formal and informal logic. Formal logic is the study of deductively valid inferences or logical truths. It examines how conclusions follow from premises based on the structure o ...
and
computer science
Computer science is the study of computation, information, and automation. Computer science spans Theoretical computer science, theoretical disciplines (such as algorithms, theory of computation, and information theory) to Applied science, ...
, the Davis–Putnam algorithm was developed by
Martin Davis and
Hilary Putnam
Hilary Whitehall Putnam (; July 31, 1926 – March 13, 2016) was an American philosopher, mathematician, computer scientist, and figure in analytic philosophy in the second half of the 20th century. He contributed to the studies of philosophy of ...
for checking the validity of a
first-order logic
First-order logic, also called predicate logic, predicate calculus, or quantificational logic, is a collection of formal systems used in mathematics, philosophy, linguistics, and computer science. First-order logic uses quantified variables over ...
formula using a
resolution-based decision procedure for
propositional logic
The propositional calculus is a branch of logic. It is also called propositional logic, statement logic, sentential calculus, sentential logic, or sometimes zeroth-order logic. Sometimes, it is called ''first-order'' propositional logic to contra ...
. Since the set of valid first-order formulas is
recursively enumerable
In computability theory, a set ''S'' of natural numbers is called computably enumerable (c.e.), recursively enumerable (r.e.), semidecidable, partially decidable, listable, provable or Turing-recognizable if:
*There is an algorithm such that the ...
but not
recursive
Recursion occurs when the definition of a concept or process depends on a simpler or previous version of itself. Recursion is used in a variety of disciplines ranging from linguistics to logic. The most common application of recursion is in m ...
, there exists no general algorithm to solve this problem. Therefore, the Davis–Putnam algorithm only terminates on valid formulas. Today, the term "Davis–Putnam algorithm" is often used synonymously with the resolution-based propositional decision procedure (Davis–Putnam procedure) that is actually only one of the steps of the original algorithm.
Overview

The procedure is based on
Herbrand's theorem, which implies that an
unsatisfiable
In mathematical logic, a formula is ''satisfiable'' if it is true under some assignment of values to its variables. For example, the formula x+3=y is satisfiable because it is true when x=3 and y=6, while the formula x+1=x is not satisfiable over ...
formula has an unsatisfiable
ground instance, and on the fact that a formula is valid if and only if its negation is unsatisfiable. Taken together, these facts imply that to prove the validity of ''φ'' it is enough to prove that a ground instance of ''¬φ'' is unsatisfiable. If ''φ'' is not valid, then the search for an unsatisfiable ground instance will not terminate.
The procedure for checking validity of a formula ''φ'' roughly consists of these three parts:
* put the formula ''¬φ'' in
prenex form and eliminate quantifiers
* generate all propositional ground instances, one by one
* check if each instance is satisfiable.
** If some instance is unsatisfiable, then return that ''φ'' is valid. Else continue checking.
The last part is a
SAT solver
In computer science and formal methods, a SAT solver is a computer program which aims to solve the Boolean satisfiability problem (SAT). On input a formula over Boolean data type, Boolean variables, such as "(''x'' or ''y'') and (''x'' or not ''y'' ...
based on
resolution (as seen on the illustration), with an eager use of
unit propagation
Unit propagation (UP) or boolean constraint propagation (BCP) or the one-literal rule (OLR) is a procedure of automated theorem proving that can simplify a set of (usually propositional) clauses.
Definition
The procedure is based on unit clause ...
and pure literal elimination (elimination of clauses with variables that occur only positively or only negatively in the formula).
Input: A set of clauses Φ.
Output: A Truth Value: true if Φ can be satisfied, false otherwise.
function DP-SAT(Φ)
repeat
// ''unit propagation:''
while Φ contains a unit clause do
for every clause ''c'' in Φ that contains ''l'' do
Φ ← ''remove-from-formula''(''c'', Φ);
for every clause ''c'' in Φ that contains ¬''l'' do
Φ ← ''remove-from-formula''(''c'', Φ);
Φ ← ''add-to-formula''(''c'' \ , Φ);
// ''eliminate clauses not in normal form:''
for every clause ''c'' in Φ that contains both a literal ''l'' and its negation ¬''l'' do
Φ ← ''remove-from-formula''(''c'', Φ);
// ''pure literal elimination:''
while there is a literal ''l'' all of which occurrences in Φ have the same polarity do
for every clause ''c'' in Φ that contains ''l'' do
Φ ← ''remove-from-formula''(''c'', Φ);
// ''stopping conditions:''
if Φ is empty then
return true;
if Φ contains an empty clause then
return false;
// ''Davis-Putnam procedure:''
pick a literal ''l'' that occurs with both polarities in Φ
for every clause ''c'' in Φ containing ''l'' and every clause ''n'' in Φ containing its negation ¬''l'' do
// ''resolve c with n:''
''r'' ← (''c'' \ ) ∪ (''n'' \ );
Φ ← ''add-to-formula''(''r'', Φ);
for every clause ''c'' that contains ''l'' or ¬''l'' do
Φ ← ''remove-from-formula''(''c'', Φ);
At each step of the SAT solver, the intermediate formula generated is
equisatisfiable, but possibly not
equivalent
Equivalence or Equivalent may refer to:
Arts and entertainment
*Album-equivalent unit, a measurement unit in the music industry
*Equivalence class (music)
*'' Equivalent VIII'', or ''The Bricks'', a minimalist sculpture by Carl Andre
*'' Equiva ...
, to the original formula. The resolution step leads to a worst-case exponential blow-up in the size of the formula.
The
Davis–Putnam–Logemann–Loveland algorithm
In logic and computer science, the Davis–Putnam–Logemann–Loveland (DPLL) algorithm is a complete, backtracking-based search algorithm for deciding the satisfiability of propositional logic formulae in conjunctive normal form, i.e. for s ...
is a 1962 refinement of the propositional satisfiability step of the Davis–Putnam procedure which requires only a linear amount of memory in the worst case. It eschews the resolution for ''the splitting rule'': a backtracking algorithm that chooses a literal ''l'', and then recursively checks if a simplified formula with ''l'' assigned a true value is satisfiable or if a simplified formula with ''l'' assigned false is. It still forms the basis for today's (as of 2015) most efficient complete
SAT solver
In computer science and formal methods, a SAT solver is a computer program which aims to solve the Boolean satisfiability problem (SAT). On input a formula over Boolean data type, Boolean variables, such as "(''x'' or ''y'') and (''x'' or not ''y'' ...
s.
See also
*
Herbrandization
References
*
*
*
*
{{DEFAULTSORT:Davis-Putnam algorithm
Boolean algebra
Constraint programming
Automated theorem proving