0% found this document useful (0 votes)
132 views19 pages

64 Fol Resolution

1. The document discusses converting first-order logic knowledge bases to conjunctive normal form for use with resolution-based automated reasoning. It provides steps for reducing statements with implications and equivalences to CNF. 2. An example knowledge base regarding smart, poor, happy and other people is converted to CNF through a series of reduction steps. 3. Resolution is then used to show that the assumption "there is no one with an exciting life" leads to a contradiction, resolving the query in the affirmative.

Uploaded by

Nitin Handa
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
132 views19 pages

64 Fol Resolution

1. The document discusses converting first-order logic knowledge bases to conjunctive normal form for use with resolution-based automated reasoning. It provides steps for reducing statements with implications and equivalences to CNF. 2. An example knowledge base regarding smart, poor, happy and other people is converted to CNF through a series of reduction steps. 3. Resolution is then used to show that the assumption "there is no one with an exciting life" leads to a contradiction, resolving the query in the affirmative.

Uploaded by

Nitin Handa
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 19

Normal Forms and Resolution in FOL

automated reasoning with predicates

Conjunctive normal form


KB must be in CNF for resolution
conjunction of disjunctions of predicates or negations

D Goforth - COSC 4117, fall 2003

1a. eliminate <=> A <=> B A => B ^ B => A 1b. eliminate => A => B ~A B

reduction to CNF
1. 2. 3. 4. 5. 6. 7. eliminate => and <=> move negatives inward to predicates Standardize apart variables Skolemize (eliminate existentials) Drop universals (assumed for variables) Distribute conjunction over disjunction Standardize apart again if necessary
D Goforth - COSC 4117, fall 2003 4

example reduction (Luger and Stubblefiled, 1993)


All people who are smart and not poor are happy. Those people who read are not stupid. Happy people have exciting lives. John can read and is wealthy. Can anyone be found who has an exciting life?

D Goforth - COSC 4117, fall 2003

All people who are smart and not poor are happy. Those people who read are not stupid. Happy people have exciting lives. John can read and is wealthy. Can anyone be found who has an exciting life?
x (Smart(x) ~Poor(x)) => Happy(x) x Read(x) => ~Stupid(x) x Happy(x) => Exciting(x) Read(John) Wealthy(John) x Exciting(x)

also need general knowledge


?

All people who are smart and not poor are happy. Those people who read are not stupid. Happy people have exciting lives. John can read and is wealthy. Can anyone be found who has an exciting life?
x (Smart(x) ~Poor(x)) => Happy(x) x Read(x) => ~Stupid(x) x Happy(x) => Exciting(x) Read(John) Wealthy(John) x Exciting(x)

also need general knowledge


x Wealthy(x) <=> ~Poor(x) x Smart(x) <=> ~Stupid(x)

x (Smart(x) ~Poor(x)) => Happy(x) x Read(x) => ~Stupid(x) x Happy(x) => Exciting(x) Read(John) Wealthy(John) x Exciting(x) x Wealthy(x) <=> ~Poor(x) x Smart(x) <=> ~Stupid(x) x ~(Smart(x) ~Poor(x)) Happy(x)

1. eliminate => and <=>

x (Smart(x) ~Poor(x)) => Happy(x) x Read(x) => ~Stupid(x) x Happy(x) => Exciting(x) Read(John) Wealthy(John) x Exciting(x) x Wealthy(x) <=> ~Poor(x) x Smart(x) <=> ~Stupid(x) x ~(Smart(x) ~Poor(x)) Happy(x) x ~Read(x) ~Stupid(x) x ~Happy(x) Exciting(x) Read(John) Wealthy(John) x Exciting(x) x ~Wealthy(x) ~Poor(x) x Wealthy(x) Poor(x) x Smart(x) Stupid(x) x ~Smart(x) ~Stupid(x)

1. eliminate => and <=>

x ~(Smart(x) ~Poor(x)) Happy(x) x ~Smart(x) Poor(x) Happy(x) x ~Read(x) ~Stupid(x) x ~Happy(x) Exciting(x) Read(John) Wealthy(John) x Exciting(x) x ~Wealthy(x) ~Poor(x) x Wealthy(x) Poor(x) x Smart(x) Stupid(x) x ~Smart(x) ~Stupid(x)

(2. ~ inwards)

3. standardize apart variables


x ~Smart(x) Poor(x) Happy(x) y ~Read(y) ~Stupid(y) z ~Happy(z) Exciting(z) Read(John) Wealthy(John) v Exciting(v) u ~Wealthy(u) ~Poor(u) t Wealthy(t) Poor(t) s Smart(s) Stupid(s) r ~Smart(r) ~Stupid(r)

x ~Smart(x) Poor(x) Happy(x) y ~Read(y) ~Stupid(y) z ~Happy(z) Exciting(z) Read(John) Wealthy(John) v Exciting(v) (4. Skolemize) Exciting(K) u ~Wealthy(u) ~Poor(u) t Wealthy(t) Poor(t) s Smart(s) Stupid(s) r ~Smart(r) ~Stupid(r)

5. Drop universals
~Smart(x) Poor(x) Happy(x) ~Read(y) ~Stupid(y) ~Happy(z) Exciting(z) Read(John) Wealthy(John) Exciting(K) ~Wealthy(u) ~Poor(u) Wealthy(t) Poor(t) Smart(s) Stupid(s) ~Smart(r) ~Stupid(r)

6. Distrubute over (none), 7.restandardize apart (none)

Conjunctive normal form


~Smart(x) Poor(x) Happy(x) ~Read(y) ~Stupid(y) ~Happy(z) Exciting(z) Read(John) Wealthy(John) Exciting(K) ~Wealthy(u) ~Poor(u) Wealthy(t) Poor(t) Smart(s) Stupid(s) ~Smart(r) ~Stupid(r)

D Goforth - COSC 4117, fall 2003

12

Resolution with FOL


Predicates can be resolved (positive with negative) only if they can be unified P(x) ~Q(x), R(y) ~P(y) Subst({x/y}) ~Q(y) R(y) (in effect, need to establish that general knowledge applies to facts)

D Goforth - COSC 4117, fall 2003

13

example resolution (continued) (Luger and Stubblefiled, 1993)


All people who are smart and not poor are happy. Those people who read are not stupid. Happy people have exciting lives. John can read and is wealthy. Can anyone be found who has an exciting life?

D Goforth - COSC 4117, fall 2003

14

Question in CNF
~Smart(x) Poor(x) Happy(x) ~Read(y) ~Stupid(y) ~Happy(z) Exciting(z) Read(John) Wealthy(John) ~Wealthy(u) ~Poor(u) Wealthy(t) Poor(t) Smart(s) Stupid(s) ~Smart(r) ~Stupid(r) Exciting(K)

Show by resolution refutation that:

D Goforth - COSC 4117, fall 2003

15

Strategy of Resolution refutation


convert to CNF assume inverse of question and add to KB
~x Exciting(x) or x ~Exciting(x)

show by resolution that a contradiction results refute assumption

D Goforth - COSC 4117, fall 2003

16

Resolution refutation (1)


Assume inverse, add to KB
~Smart(x) Poor(x) Happy(x) ~Read(y) ~Stupid(y) ~Happy(z) Exciting(z) Read(John) Wealthy(John) ~Wealthy(u) ~Poor(u) Wealthy(t) Poor(t) Smart(s) Stupid(s) ~Smart(r) ~Stupid(r) ~Exciting(k) // assumption note variable k
D Goforth - COSC 4117, fall 2003 17

Resolution refutation (2)

~Exciting(k)

~Happy(z) Exciting(z)

{k/z}

~Happy(k) ~Smart(x) Poor(x) Happy(x) ~Smart(x) Poor(x) Happy(x) {k/x} ~Read(y) ~Stupid(y) ~Smart(k) Poor(k) ~Happy(z) Exciting(z) Read(John) ~Read(y) ~Stupid(y) Wealthy(John) {y/s} ~Wealthy(u) ~Poor(u) Smart(s) Stupid(s) Wealthy(t) Poor(t) ~Read(y) Smart(y) Smart(s) Stupid(s) {k/y} ~Smart(r) ~Stupid(r) ~Read(k) Poor(k) ~Exciting(k) ~Wealthy(u) ~Poor(u) {John/u}

{John/k}
~Read(John) {} nil

~Poor(John) Read(John)

Wealthy(John)

Resolution refutation (3)


conflict Read(John) , ~Read(John) => nil

initial assumption of
so

~x Exciting(x) is wrong

x Exciting(x)

D Goforth - COSC 4117, fall 2003

19

You might also like