CS 343
Homework 3
You
may do this assignment either by yourself or in a team. But each person must write up his or her own
solution.
Part A: Inference methods
and algorithms for reasoning with knowledge that is represented in logical
formalisms.
Propositional
Logic:
1) (R & N 7.8) Decide
whether each of the following sentences is valid, unsatisfiable,
or neither. You may use truth tables or
any of the standard sound rules for propositional inference. Show your argument.
a) Smoke ® Smoke
b) Smoke ® Fire
c) (Smoke ® Fire) ® (ØSmoke ® ØFire)
d) Smoke Ú Fire Ú ØFire
e) ((Smoke Ù Heat) ® Fire) Û ((Smoke ® Fire) Ú (Hear ® Fire))
f)
(Smoke ® Fire) ® ((Smoke Ù Heat) ® Fire)
g) Big Ú Dumb Ú (Big ® Dumb)
h) (Big Ù Dumb) Ú ØDumb
2) (R & N 7.9) Given the
following, can you prove that the unicorn is mythical? Magical?
Horned? Show your work.
If the unicorn is mythical, then it is immortal, but
if it is not mythical, then it is a mortal mammal. If the unicorn is either immortal or a
mammal, then it is horned. The unicorn
is magical if it is horned.
3) (R & N 7.12b) Show that
every propositional logic clause with at least one positive literal and one
negative literal can be written in the form (P1
Ù …Ù Pm)
® (Q1 Ú … Ú Qn), where the Ps and Qs are
proposition symbols. A knowledge base
consisting of such sentences is in implicative normal form or Kowalski form.
4) Consider the following KB:
winter Ú hot
winter ® Øsummer Ù Øspring Ù Øfall
rainy ® spring Ú winter
pollen ® winter
rivers ® rainy
spring ® bluebonnets
Øbluebonnets
rivers
a) Convert each of the
assertions to clause form.
b) Use resolution to prove winter.
FOPC
5) (R & N 8.4) Write down a
logical sentence such that every world in which it is true contains exactly one
object.
6) (R & N 9.4, R & K
5.3) Show the result of applying the unification algorithm given in class to
each of the following pairs of clauses: (We use the convention that lower case
characters are variables; upper case characters are constants, predicates, and
functions. We also use the convention
that if x is substituted for y we will write x/y. Note that R & N write it the other way,
as y/x.)
a) P(A, B, B), P(x, y, z)
b) Q(y, G(A, B)), Q(G(x, x), y)
c) Older(Father(y), y),
Older(Father(x), John)
d) Knows(Father(y), y),
Knows(x, x)
e) F(Marcus), F(Caesar)
f)
F(x), F(G(y))
g) F(Marcus, G(x, y), F(x,
G(Caesar, Marcus))
7) Consider the following KB:
·
"x Married(x) ® $y Spouse(x, y)
·
"x $y Spouse(x, y)
® Married(x)
·
"x "y Spouse(x, y) ® Spouse(y, x)
·
"x "y JointTaxFilers(x, y) ® Spouse(x, y)
·
JointTaxFilers(John, Mary)
·
Ø$y Spouse(Sue,
y)
a) Convert each of these formulas
to clause form.
b) Use resolution and this KB
to prove Married(Mary)
c) Use resolution and this KB
to prove ØMarried(Sue)
8) Consider again the facts we
have about painters, including the ones presented in class and those you added
in question 1 of Homework 2. Use
resolution to answer the question, “What language did Leonardo speak?”
9) (R & K 5.9) Suppose you
are given the following facts:
a) "x, y, z gt(x, y) Ù gt(y, z) ® gt(x, z)
b) "a, b succ(a, b) ® gt(a, b)
c) "x Øgt(x, x)
Using these facts, we want to prove gt(5, 2), which we should be able to do
with resolution. Consider the following
attempt at a resolution proof:
d) What went wrong? (Hint: watch very carefully what is going on
with the use of variable names.)
e) What needs to be added to
the resolution procedure we described in class to make sure that this problem
does not occur?
B. Representing facts and
reasoning with them
1) (R & K 5.4) Consider the
following sentences:
·
John likes all kinds of food.
·
Apples are food.
·
Chicken is food.
·
Anything anyone eats and isn't killed by is food.
·
Bill eats peanuts and is still alive.
·
Sue eats everything Bill eats.
a) Translate these sentences
into formulas in FOPC.
b) Use backward chaining to
prove that John likes peanuts.
c) Convert the formulas of part
a into clause form.
d) Use resolution to prove that
John likes peanuts.
e) Use resolution to answer the
question, "What food does Sue eat?"
2) (R & K 5.5) Consider the
following facts:
·
The members of the Elm St. Bridge Club are Joe, Sally, Bill and Ellen.
·
Joe is married to Saly.
·
Bill is Ellen's brother.
·
The spouse of every married person in the club is also in the club.
·
The last meeting of the club was at Joe's house.
a) Represent these facts in
FOPC.
b) From the facts given above,
most people would be able to decide on the truth of the following additional
statements:
·
The last meeting of the club was at Sally's house.
·
Ellen is not married.
Can you construct resolution proofs to demonstrate
the truth of each of these statements given the facts above? Do so if possible. Otherwise, add the facts you need and then
construct the proofs.
3) (R & K 5.11) 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.