Beruflich Dokumente
Kultur Dokumente
Resolution
Reasoning Backward
(1) man(Marcus)
(2) Pompeian(Marcus)
(3) x Pompeian(x) Roman(x)
(4) ruler(Caesar)
(5) x Roman(x) loyalto(x, Caesar) hate(x, Caesar)
(6) x y loyalto(x, y)
(7) x y person(x) ruler(y) tryassassinate(x, y) loyalto(x, y)
(8) tryassassinate(Marcus, Caesar)
loyalto(Marcus, Caesar)
(Marcus/x) (Caesar/y)
person(Marcus)
ruler(Caesar)
tryassassinate(Marcus, Caesar)
Reasoning Backward
(1) man(Marcus)
(2) Pompeian(Marcus)
(3) x Pompeian(x) Roman(x)
(4) ruler(Caesar)
(5) x Roman(x) loyalto(x, Caesar) hate(x, Caesar)
(6) x y loyalto(x, y)
(7) x y person(x) ruler(y) tryassassinate(x, y) loyalto(x, y)
(8) tryassassinate(Marcus, Caesar)
(9) x man(x) person(x)
loyalto(Marcus, Caesar)
(Marcus/x) (Caesar/y)
person(Marcus)
(Marcus/x)
Man(Marcus)
ruler(Caesar)
tryassassinate(Marcus, Caesar)
alive(Marcus, now)
alive(Marcus, now)
(10)(Marcus/x)(now/t2)
died(Marcus, t1)
alive(Marcus, now)
(9a) (Marcus/x) (now/t)
dead(Marcus, now)
(7) (Marcus/x)(now/t2)
gt(now, t1)
(5) (Marcus/x)
(4) (Marcus/x)
(79/t1)
Pompeian(Marcus) gt(now, 79)
man(Marcus)
(2)
subst
T
(3) (40/t1)
(1)
gt(2004, 79)
eval
T
subst
subst
T
gt(2004-40,150)
eval
T
A Harder One
Given:
x [Roman(x) know(x, Marcus)]
[hate(x, Caesar) (y (z hate(y, z)) thinkcrazy(x, y))]
Roman(Isaac)
hate(Isaac, Caesar)
hate(Paulus, Marcus)
thinkcrazy(Isaac, Paulus)
Prove:
know(Isaac, Marcus)
a b is equivalent to
a b
x P(x) x Q(x)
x P(x) y Q(y)
Roman(S1)
x z father-of(x, z)
x father-of(x, S2(x))
Distributivity of and .
(P(x) Q(x)) T(x)
(P(x) T(x)) (Q(x)) T(x))
Resolution
Suppose we know:
winter summer
winter
summer
summer
nil
winter summer
winter cold
summer cold
Propositional Resolution
To prove that P follows from the assertions in some KB:
1. Convert all the propositions of the KB to clause form.
2. Negate P and convert it to clause form. Add it to the set of clauses
obtained in step 1.
3. Repeat until either a contradiction is found or no progress can be
made:
1. Select two clauses. Call them the parent clauses.
2. Resolve them together. The resulting clause, called the
resolvent, will be the disjunction of all the literals of both of the
parent clauses with the following exception: If there are any
pairs of literals L and L such that one of the parent clauses
contains L and the other contains L, then select one such pair
and eliminate both L and L from the resolvent.
3. If the resolvent is the empty clause, then a contradiction has
been found. If it is not, then add it to the set of clauses
available to the procedure.
P
P Q R
S Q
T Q
T
(1)
(2)
(3)
(4)
(5)
Prove R:
P Q R
R
P Q
T Q
P
Q
T
nil
(1)
(2)
Prove R:
P Q R
R
P Q
PQ
nil
Resolution in FOPC
To find a contradiction, we must show that the KB, augmented with
P, is unsatisfiable.
Herbrands theorem tells us:
1. To show that a set of clauses S is unsatisfiable, it is necessary to
consider only interpretations over a particular set called the
Herbrand universe of S, which is the set of all ground terms
constructable from the following:
1. The function symbols in S, if any.
2. The constant symbols in S, if any. If none, then the constant
symbol A.
2. A set of clauses S is unsatisfiable iff a finite subset of ground
instances (in which all bound variables have had a value
substituted for them) of S is unsatisfiable.
Resolution is an algorithm that finds contradictions without
enumerating most of the Herbrand universe.
Unification
In propositional logic, it is easy to identify complementary
literals such as P and P.
But in FOPC, what should we do about:
hate(x, y)
hate(Marcus, Caesar)
Or:
hate(Marcus, Caesar)
hate(Paulus, Caesar)
Or:
P(x, x)
P(Marcus, Caesar)
Using Resolution
Painter(Leonardo)
Composer(Palistrina)
Country(Italy)
Lived-In(Leonardo, Italy)
In(Italy,Europe)
Climate(Europe, moderate)
Painter(Rubens)
Lived-In(Rubens, Europe)
x,y In(x, y) Climate(y, moderate) Climate(x, moderate)
In(x, y) Climate(y, moderate) Climate(x, moderate)
?Painter(x) Lived-In(x,y) Climate(y, moderate)
Resolution
?Painter(x) Lived-In(x,y) Climate(y, moderate)
1. Painter(Leonardo)
2. Composer(Palistrina)
3. Country(Italy)
4. Lived-In(Leonardo, Italy)
5. In(Italy,Europe)
6. Climate(Europe, moderate)
7. Painter(Rubens)
8. Lived-In(Rubens, Europe)
9. Painter(Sargent)
10. In(x, y)
Climate(y, moderate)
Climate(x, moderate)
Resolution
?Painter(x) Lived-In(x,y) Climate(y, moderate)
1. Painter(Leonardo)
2. Composer(Palistrina)
3. Country(Italy)
4. Lived-In(Leonardo, Italy)
5. In(Italy,Europe)
6. Climate(Europe, moderate)
7. Painter(Rubens)
8. Lived-In(Rubens, Europe)
9. Painter(Sargent)
10. In(x, y)
Climate(y, moderate)
Climate(x, moderate)
Climate(Italy, moderate)
Resolving 5 and 10 (Italy/x, Europe/y):
Climate(Europe, moderate)
Climate(Italy, moderate)
Resolving with 6:
Climate(Italy, moderate)
Resolving with *:
nil
Back to Marcus
(1) man(Marcus)
(2) Pompeian(Marcus)
(3) x Pompeian(x) Roman(x)
(4) ruler(Caesar)
(5) x Roman(x) loyalto(x, Caesar) hate(x, Caesar)
(6) x y loyalto(x, y)
(7) x y man(x) ruler(y) tryassassinate(x, y) loyalto(x, y)
(8) tryassassinate(Marcus, Caesar)
(1) man(Marcus)
(2) Pompeian(Marcus)
(3) Pompeian(x1) Roman(x1)
(4) ruler(Caesar)
(5) Roman(x2) loyalto(x2, Caesar) hate(x2, Caesar)
(6) loyalto(x3, S1(x3))
(7) man(x4) ruler(y1) tryassassinate(x4, y1) loyalto(x4, y1)
(8) tryassassinate(Marcus, Caesar)
ruler(C) tryassassinate(M,C)
tryassassinate(M,C)
nil
ruler(C)
tryassassinate(M,C)
man(M)
* know(Isaac, Marcus)
A Winnie Example
Horn Clauses
A Horn Clause is a clause in which at most one literal is
positive.
A(x) B(x) C(x)
becomes
a Horn clause
Question Answering
When did Marcus die?
died(Marcus, ??)
Marcus must have died sometime, so we could try to prove:
x died(Marcus, x) by adding to the KB:
x died(Marcus, x). Converting to clause form:
x died(Marcus, x)
Pompeian(x1) died(x1,79)
(Marcus/x1)(79/x)
Pompeian(Marcus)
nil
Pompeian(Marcus)
Pompeian(x1) died(x1,79)
(Marcus/x1)(79/x)
Pompeian(Marcus)
died(Marcus, 79)
The underlined literal will get carried along and collect all the
substitutions. We stop when we generate a clause that contains
only it.