UNIT 3 KR Predicate Logic
UNIT 3 KR Predicate Logic
6. Return SUBST.
Resolution in Predicate Logic (given set F,
to prove P)
1. Convert all the statements of F to clause form.
2. Negate P and convert the result to clause form. Add it to the set of clauses obtained in 1.
3. Repeat until a contradiction found, no progress can make, or a predetermined amount of
effort has expanded.
1. Select two clauses. Call these the parent clauses.
2. Resolve them together. The resolvent will the disjunction of all the literals of both parent clauses
with appropriate substitutions performed and with the following exception: If there is one pair of
literals T1 and ¬T2 such that one of the parent clauses contains T2 and the other contains T1 and if T1
and T2 are unifiable, then neither T1 nor T2 should appear in the resolvent. We call T1 and T2
Complementary literals. Use the substitution produced by the unification to create the resolvent. If
there is more than one pair of complementary literals, only one pair should omit from the resolvent.
3. If the resolvent is an empty clause, then a contradiction has found. Moreover, If it is not, then add it
to the set of classes available to the procedure.
Properties of Resolution
Complete for FOL
Refutation-complete
◦ If a set of sentences is unsatisfiable, resolution will always be able to derive a contradiction.
Idea :
◦ We get a problem with a set of conditions.
◦ To solve the problem, we have to use every condition indicated in the problem.
◦ If we could solve without using every condition????
◦ Something must be off!
◦ That set of conditions is an analogy to the set of support.
Drawback
If we define bad SoS, problem becomes unsolvable.
Strategies for speeding up the resolution
process
Resolve clauses containing only complimentary literals
Eliminated tautologies and clauses subsumed by other clauses. PV Q is subsumed by P.
Set of support strategy
Unit preference strategy
Example
John likes all kind of food.
Apple and vegetable are food
Anything anyone eats and not killed is food.
Anil eats peanuts and still alive
Harry eats everything that Anil eats.
Prove by resolution that:
John likes peanuts.
Step-1: Conversion of Facts into FOL
Step-2: Conversion of FOL into CNF
Eliminate implication
∀x ¬ food(x) V likes(John, x)
food(Apple) Λ food(vegetables)
∀x ∀y ¬ [eats(x, y) Λ ¬ killed(x)] V food(y)
eats (Anil, Peanuts) Λ alive(Anil)
∀x ¬ eats(Anil, x) V eats(Harry, x)
∀x¬ [¬ killed(x) ] V alive(x)
∀x ¬ alive(x) V ¬ killed(x)
likes(John, Peanuts).
Move negation inwards
∀x ¬ food(x) V likes(John, x)
food(Apple) Λ food(vegetables)
∀x ∀y ¬ eats(x, y) V killed(x) V food(y)
eats (Anil, Peanuts) Λ alive(Anil)
∀x ¬ eats(Anil, x) V eats(Harry, x)
∀x ¬killed(x) ] V alive(x)
∀x ¬ alive(x) V ¬ killed(x)
likes(John, Peanuts).
Rename or standardize variables
∀x ¬ food(x) V likes(John, x)
food(Apple) Λ food(vegetables)
∀y ∀z ¬ eats(y, z) V killed(y) V food(z)
eats (Anil, Peanuts) Λ alive(Anil)
∀w¬ eats(Anil, w) V eats(Harry, w)
∀g ¬killed(g) ] V alive(g)
∀k ¬ alive(k) V ¬ killed(k)
likes(John, Peanuts).
Eliminate existential quantifier and skolemization: not required in this example.
Drop universal quantifiers.
¬ food(x) V likes(John, x)
food(Apple)
food(vegetables)
¬ eats(y, z) V killed(y) V food(z)
eats (Anil, Peanuts)
alive(Anil)
¬ eats(Anil, w) V eats(Harry, w)
killed(g) V alive(g)
¬ alive(k) V ¬ killed(k)
likes(John, Peanuts).
Distribute conjunction over disjunction: no change in this example
Step-3: Negate the statement to be
proved
In this statement, we will apply negation to the conclusion statements, which will be written as
¬likes(John, Peanuts)
Step 4: Draw Resolution Graph
Explanation of the Resolution Graph
In the first step of resolution graph, ¬likes(John, Peanuts) , and likes(John, x) get
resolved(canceled) by substitution of {Peanuts/x}, and we are left with ¬ food(Peanuts)
In the second step of the resolution graph, ¬ food(Peanuts) , and food(z) get resolved (canceled)
by substitution of { Peanuts/z}, and we are left with ¬ eats(y, Peanuts) V killed(y) .
In the third step of the resolution graph, ¬ eats(y, Peanuts) and eats (Anil, Peanuts) get resolved
by substitution {Anil/y}, and we are left with Killed(Anil) .
In the fourth step of the resolution graph, Killed(Anil) and ¬ killed(k) get resolve by
substitution {Anil/k}, and we are left with ¬ alive(Anil) .
In the last step of the resolution graph ¬ alive(Anil) and alive(Anil) get resolved.
Natural Deduction
Testing whether a proposition is a tautology by testing every possible truth assignment is
expensive—there are exponentially many. We need a deductive system, which will allow us to
construct proofs of tautologies in a step-by-step fashion.
The system we will use is known as natural deduction. The system consists of a set of rules of
inference for deriving consequences from premises. One builds a proof tree whose root is the
proposition to be proved and whose leaves are the initial assumptions or axioms (for proof
trees, we usually draw the root at the bottom and the leaves at the top).
Example: Modus ponens.