Content deleted Content added
→Overview: Resolution is not a function of c and n only, it also depends on the choice of l. Better to spell this out. Unit propagation is also easy to spell out to reduce dependence on unexplained functions. |
Adding short description: "Check the validity of a logic formula" |
||
(12 intermediate revisions by 10 users not shown) | |||
Line 1:
{{Short description|Check the validity of a logic formula}}
==Overview==
Line 21 ⟶ 22:
'''function''' DP-SAT(Φ)
// ''unit propagation:'
'''
'''
'''
Φ ← ''remove-from-formula''(
Φ ← ''add-to-formula'
// ''eliminate clauses not in normal form:''
Φ ← ''remove-from-formula''(''c'', Φ);
// ''pure literal elimination:''▼
▲ Φ ← ''add-to-formula''(''c'' \ {¬''l''}, Φ);
Φ ← ''remove-from-formula''(''c'', Φ);
▲ // ''pure literal elimination:''
// ''stopping conditions:''
'''for every''' literal ''l'' that occurs pure in Φ '''do'''▼
'''if''' Φ contains an empty clause '''then'''
// ''Davis-Putnam procedure:''▼
▲ // ''Davis-Putnam procedure:''
▲ '''for every''' clause ''c'' in Φ containing ''l'' and every clause ''n'' in Φ containing its negation ¬''l'' '''do'''
'''for every''' clause ''c'' in Φ containing ''l'' and every clause ''n'' in Φ containing its negation ¬''l'' '''do'''
// ''resolve c with n:''
''r'' ← (''c'' \ {''l''}) ∪ (''n'' \ {¬''l''});
Φ ← ''add-to-formula''(''r'', Φ);
Φ ← ''remove-from-formula''(''c'', Φ);
▲ '''return''' ''DP-SAT''(Φ);
{{Algorithm-end}}
At each step of the SAT solver, the intermediate formula generated is [[equisatisfiable]], but possibly not [[Logical equivalence|equivalent]], 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]] 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]]s.
Line 66 ⟶ 70:
| pages = 201–215
| year = 1960
}}
▲| doi=10.1145/321033.321034}}
*{{cite journal
| last=Davis
Line 91 ⟶ 95:
}}
* {{cite book|author=John Harrison|title=Handbook of practical logic and automated reasoning|url=https://archive.org/details/handbookpractica00harr|url-access=limited|year=2009|publisher=Cambridge University Press|isbn=978-0-521-89957-4|pages=[https://archive.org/details/handbookpractica00harr/page/n100 79]–90}}
{{DEFAULTSORT:Davis-Putnam algorithm}}
Line 96 ⟶ 101:
[[Category:Constraint programming]]
[[Category:Automated theorem proving]]
|