Resolution Algorithm
Proves a statement by showing its negation leads to a contradiction.
The idea
Write everything as clauses (ORs of literals). Two clauses containing opposite literals, P and ¬P, can be combined by removing that pair. To prove a conclusion Q, add ¬Q and keep resolving; if you derive the empty clause (a contradiction), Q must be true. For propositional logic it is sound and complete.
(A ∨ P), (B ∨ ¬P) ⊢ (A ∨ B)
Watch it run
This is a real computation, not a drawing. Pause, step, change the settings, or try new random data.
- given
- derived
- being resolved
Goal: prove R. Resolution proves it by contradiction: assume ¬R is true, add it to the knowledge, and look for a contradiction.
- clauses:
- 4
Empty clause reached: the query follows from the knowledge base.
Step by step
- 1Convert the knowledge base and the negated goal into clauses.
- 2Pick two clauses with complementary literals.
- 3Resolve them into a new clause with those literals removed.
- 4Add it to the set and repeat.
- 5If the empty clause appears, the goal is proved.
Where it is used
Theorem provers, SAT-related reasoning, logic programming.
Watch out for
The number of clauses can explode, so practical provers use strategies to choose which to resolve.