Presentation is loading. Please wait.

Presentation is loading. Please wait.

Normal Forms and Resolution in FOL automated reasoning with predicates.

Similar presentations


Presentation on theme: "Normal Forms and Resolution in FOL automated reasoning with predicates."— Presentation transcript:

1 Normal Forms and Resolution in FOL automated reasoning with predicates

2 D Goforth - COSC 4117, fall Conjunctive normal form  KB must be in CNF for resolution conjunction of disjunctions of predicates or negations

3 1a. eliminate A B A => B ^ B => A 1b. eliminate => A => B ~A  B

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

5 D Goforth - COSC 4117, fall 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?

6  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 ?

7  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)

8  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) 1.eliminate => and  x ~(Smart(x)  ~Poor(x))  Happy(x)

9  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) 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 Wealthy(x)  Poor(x)  x Smart(x)  Stupid(x)  x ~Smart(x)  ~Stupid(x)

10  x ~(Smart(x)  ~Poor(x))  Happy(x) (2. ~ inwards)  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) 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)

11  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)

12 D Goforth - COSC 4117, fall ~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) Conjunctive normal form

13 D Goforth - COSC 4117, fall 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)

14 D Goforth - COSC 4117, fall 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?

15 D Goforth - COSC 4117, fall ~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)  Show by resolution refutation that: Exciting(K) Question in CNF

16 D Goforth - COSC 4117, fall 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

17 D Goforth - COSC 4117, fall  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 Resolution refutation (1)

18 ~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) Resolution refutation (2) ~Exciting(k)~Happy(z)  Exciting(z) ~Happy(k) {k/z} ~Smart(x)  Poor(x)  Happy(x) {k/x} ~Smart(k)  Poor(k) Smart(s)  Stupid(s) ~Read(y)  ~Stupid(y) ~Read(y)  Smart(y) {y/s} ~Read(k)  Poor(k) {k/y} ~Wealthy(u)  ~Poor(u) Wealthy(John) ~Poor(John) {John/u} ~Read(John) Read(John) {John/k} {} nil

19 D Goforth - COSC 4117, fall  conflict Read(John), ~Read(John) => nil  initial assumption of ~  x Exciting(x) is wrong  so  x Exciting(x) Resolution refutation (3)


Download ppt "Normal Forms and Resolution in FOL automated reasoning with predicates."

Similar presentations


Ads by Google