Tutorial 6 Predicate Logic and Structured Knowledge: Artificial Intelligence Exercises Page 1/5

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Trng i Hc Bch Khoa Tp.

H Ch Minh Khoa Khoa Hc v K Thut My Tnh

Tutorial 6 PREDICATE LOGIC and STRUCTURED KNOWLEDGE

Question 1: Wrong in: gt(5, 2) succ(y, 2) combines with 6gt(x, y) gt(y, z) gt(x, z) by the substitution 5/x, y/z This combination is wrong because the variable y in each clause is different to each other. To correct the resolution, we have to change the name of variable y in either first clause or second clause. Question 2: What is wrong with the following argument: Men are widely distributed over the earth. Socrates is a man. Therefore, Socrates is widely distributed over the earth. How should the facts represented by these sentences be represented in logic so that this problem does not arise? Solution The conclusion is false because the property "widely distributed over the earth" is applicable over a set (group of men). Not to each individual in the set. To avoid that wrong conclusion, we can represent these facts like this: man(Socrates). widelyDistributed(men,earth) Question 3: Consider the following axioms: 1. All hounds howl at night. 2. Anyone who has any cats will not have any mice. 3. Light sleepers do not have anything which howls at night. 4. John has either a cat or a hound. Use resolution with predicate logic to affirm the following conclusion: If John is a light sleeper, then John does not have any mice. Solution

Artificial Intelligence Exercises

Page 1/5

Trng i Hc Bch Khoa Tp.H Ch Minh Khoa Khoa Hc v K Thut My Tnh

Before going to do resolution, we have to represent these facts in predicate logic: 1. x(HOU N D(x) HOW L(x)) 2. xy(HAV E(x, y) CAT (y) z(HAV E(x, z) M OU SE(z))) 3. x(LS(x) y(HAV E(x, y) HOW L(y))) 4. x(HAV E(John, x) ((CAT (x) HOU N D(x)) (CAT (x) HOU N D(x))) Conclusion: LS(John) z(HAV E(John, z) M OU SE(z)) Convert to clause form 1.HOU N D(x) HOW L(x) 2.HAV E(x, y) CAT (y) HAV E(x, z) M OU SE(z) 3.LS(x) HAV E(x, y) HOW L(y) 4a.HAV E(John, a) 4b.CAT (a) HOU N D(a) 4c. CAT (a) HOU N D(a) Negation of conclusion 5a.LS(John) 5b.HAV E(John, b) 5c.M OU SE(b) Resolution 5c b/z 2 6.HAV E(x, y) CAT (y) HAV E(x, b) 5b John/x 6 7.HAV E(John, y) CAT (y) 4b a/y 7 8.HAV E(John, a) HOU N D(a) 4a 8 9.HOW L(a) 3 a/y 9 10.LS(x) HAV E(x, a) 4a John/x 10 11.LS(John) 5a 11 [] Question 4: Prove that each of the following sentences is valid by using existential graphs rules of inferences: a. P (Q P ) b. ((Smoke F ire) (Heat F ire)) ((Smoke Heat) F ire) c. (Q P ) ((Q P ) Q) d. ((P Q) (P R)) ((P Q) (P R)) Solution

Artificial Intelligence Exercises

Page 2/5

Trng i Hc Bch Khoa Tp.H Ch Minh Khoa Khoa Hc v K Thut My Tnh

a ( () ) (P () ) (P ( (()) ) ) (P ( ((P)) ) ) (P ( ( Q (P) ) ) ) (P ( ( Q (P) ) ) ) Double negation Insertion Double negation Iteration Insertion Insertion

b: ( ( ( (S (F)) ) ( (H (F)) ) ) ((S H (F))) ) ( ( ( ( ( ( ( () ) () ((S H (F))) ) ( ((S H (F))) ) ((S H (F))) ) ( S H (F) ) ((S H (F))) ) ( S H (F) (F) ) ((S H (F))) ) ( S (F) ((H (F))) ) ((S H (F))) ) ( ((S (F))) ((H (F))) ) ((S H (F))) ) Double negation Insertion Iteration Double negation Iteration Double negation Double negation

c: ( (Q ((P))) ((Q (P)) ((Q))) ) ( ( ( ( ( ( ( ( () ) () ((Q (P)) ((Q)))) () ((Q (P)) ((Q))) ((Q (P)) ((Q))) ) () ((Q (P)) Q) ((Q (P)) ((Q))) ) () (((P)) Q) ((Q (P)) ((Q))) ) () ( P Q) ((Q (P)) ((Q))) ) ( (P Q) ) (P Q) ((Q (P)) ((Q))) ) ( (Q ((P))) ) (P Q) ((Q (P)) ((Q))) ) Double negation Insertion Iteration Double negation Deiteration Double negation iteration Double negation

Artificial Intelligence Exercises

Page 3/5

Trng i Hc Bch Khoa Tp.H Ch Minh Khoa Khoa Hc v K Thut My Tnh

d: ( (P (Q)) ((P) (R)) (((P Q) ((P) R))) ) ( ( ( ( ( ( ( ( ( ( () ) () ((P)) ((Q)) ((P) (R))) (((P)) ((Q))) ((P)) ((Q)) ((P) (R)) ) (P Q) ((P)) ((Q)) ((R)) ((P) (R)) ) (P Q) ((P)) ((Q) ((P)) ) ((P) (R)) ) (P Q) ((P)) ((Q) P) ((P) (R)) ) (P Q) ((Q) P) ((P) ((P) (R))) ((P) (R)) ) (P Q) ((Q) P) ( (P) R ) ((P) (R)) ) (P (Q)) ((P) (R)) (P Q) ((P) R) ) (P (Q)) ((P) (R)) (( (P Q) ((P) R) )) ) Double negation Insertion Iteration Double negation Iteration Double negation Iteration Deiteration + Double negation Just reorder Double negation

Question 5: Convert the following sentence into predicate logic, existential graph (EG) and conceptual graph (CG): If a cat is on a mat, then it is a happy pet. Solution Prediate logic: xy : cat(x) mat(y) on(x, y) happyP et(x) (xy : cat(x) mat(y) on(x, y) happyP et(x) Another possible solution: xyz((cat(x) mat(y) on(x, y)) (pet(x) happy(z) haveattr(x, z)))

Artificial Intelligence Exercises

Page 4/5

Trng i Hc Bch Khoa Tp.H Ch Minh Khoa Khoa Hc v K Thut My Tnh

Artificial Intelligence Exercises

Page 5/5

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy