Solutions 1

You might also like

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

Problem 4

Predicate calculus alphabet:

Santa

L(x,y) - x loves y

Child(x) - x is a child

Reind(x) – x is reindeer

Rudolph

Red(x) – x has a red nose

Weird(x) – x is weird

Scrooge

Clown(x) – x is a clown

Knowledge base & negation of the goal

Child(x) -> L(x,Santa)

L(x,Santa) ^ Reind(y) -> L(x,y)

Reind(Rudolph)

Red(Rudolph)

Red(x)-> Weird(x) v Clown(x)

Reind(x) -> ~ Clown(x)

Weird(x) -> ~L(Scrooge, x)

Child(x)

Corresponding set of clauses

(1) ~Child(x) v L(x,Santa)


(2) ~L(x,Santa) v ~Reind(y) v L(x,y)
(3) Reind(Rudolph)
(4) Red(Rudolph)
(5) ~Red(x) v Weird(x) v Clown(x)
(6) ~Reind(x) v ~ Clown(x)
(7) ~Weird(x) v ~L(Scrooge, x)
(8) Child(x)
Proof by resolution:

(9)=(1)+(8): L(x,Santa)

(12)=(9)+(2): ~Reind(y) v L(x,y)

(10)=(3)+(6): ~ Clown(Rudolph)

(11)=(10)+(5)+(4): Weird(Rudolph)

(13)=(11)+(7): ~L(Scrooge, Rudolph)

(14)=(12)+(13): ~Reind(Rudolph)

(3)+(14)= NIL

Problem 7

Predicate calculus alphabet:

Mary(x) – Mary loves x

John

Footb(x) – x is a football star

Stud(x) – x is a student

Pass(x) – x does not pass

Play(x) – x does not play

Study(x) - x does not study

Knowledge base & negation of the goal

Mary(x) -> Footb(x)

Stud(x) ^ Pass(x) -> Play(x)

Stud(John)

Study(x) -> Pass(x)

Play(x) -> ~Footb(x)

Study(John) -> ~Mary(John) (this has to be proved)


Corresponding set of clauses

(1) ~Mary(x) v Footb(x)


(2) ~Stud(x) v ~Pass(x) v Play(x)
(3) Stud(John)
(4) ~Study(x) v Pass(x)
(5) ~Play(x) v ~Footb(x)
(6) Study(John)
(7) Mary(John)

Proof by resolution:

(8)=(7)+(1): Footb(John)

(9)=(6)+(4): Pass(John)

(10)=(8)+(5): ~Play(John)

(11)=(9)+(10)+(2): ~Stud(John)

(11)+(3)= NIL
Problem 9

Predicate calculus alphabet:

Har(x) – x rides Harley

RH(x) – x is a rough character

Biker(x) – x is biker

BMW(x) – x rides BMW

Yp(x) – x is a yuppie

La(x) – x Is a lawyer

N(x) – x is nice girl Mary John

Date(x,y) – x dates y (observation: x dates y <-> y dates x)

N(c) <-> ~RH(x) (observation: rough <-> not nice)

Knowledge base & negation of the goal

Har(x) -> ~N(x)

Biker(x1) -> (Har(x1) v BMD(x1))

BMW(x2) -> Yp(x2)

Yp(x3) -> La(x3)

N(y) ^ ~N(z) -> ~Date(y,z)

N(Mary) Biker(John)

Date(Mary, John) <-> Date(John, Mary) (added)

~La(John) -> ~Date(Mary, John) ??

Corresponding set of clauses + negation of the goal

(1) ~Har(x) v ~N(x)


(2) ~Biker(x1) v Har(x1) v BMD(x1)
(3) ~BMW(x2) v Yp(x2)
(4) ~Yp(x3) v La(x3)
(5) N(y) v ~N(z) v ~Date(y,z)
(6) N(Mary) Biker(John)
(7) ~La(John)
(8) Date(Mary, John) Date(John, Mary)
Proof by resolution:

(9)=(7)+(4): ~Yp(John) (10)=(9)+(3): ~BMW(John)

(11)=(2)+(10): ~Biker(John) v Har(John)

(12)=(6)+(11): Har(John) (13)= (12)+(1): ~N(John)

(5)+(8): N(Mary) v ~N(John) (14)=(13)+(5): ~N(z) v ~Date(John,z)

(15)=(14)+(8): ~N(Mary)

(15)+(6) = NIL

You might also like