You are on page 1of 2

AI chapter 8 homework problems

8.2 Consider a knowledge base containing just two sentences: P(a) and P(b). Does this knowledge base
entail x P(x)? Explain your answer in terms of models.
No, this knowledge base does not entail x P(x). Suppose P(a) means a is male and P(b) means b is male
and a model y is added that is female. Then, P(y) is false and the knowledge base does not entail P(y), so
it did not entail x P(x).
8.3 Is the sentence x, y x = y valid? Explain.
Yes, the sentence is valid, but not useful by itself. According to page 253 of the text, the equality symbol
can be used to make statements to the effect that two terms refer to the same object.

8.6 Represent the following sentences in first-order logic, using a consistent vocabulary (which you must
define):
a. Some students took French in spring 2001.
x, y student(x) ^ student(y) ^ Takes(x, French) ^ Takes(y, French) ^ (x = y).
b. Every student who takes French passes it.
x Student(x) ^ Takes(x, French) Passes(x, French).
c. Only one student took Greek in spring 2001.
x y Student(x) ^ TakesDuring(x, Greek, spring 2001) ^ Student(y) TakesDuring(y, Greek, spring
2001) (x = y).
or
1 x Student(x) ^ TakesDuring(x, Greek, spring 2001)
See page 251 in text.
d. The best score in Greek is always higher than the best score in French.
x, y BestScore(x, Greek) ^ BestScore(y, French) ^ GreaterThan(x, y).
e. Every person who buys a policy is smart.
x BuysPolicy(x) Smart(x).
f. No person buys an expensive policy.
x, y Person(x) ^ buysThePolicy(x, y) ^ CostPolicy(y, expensive).
g. There is an agent who sells policies only to people who are not insured.
x y Agent(x) ^ SellsPolicyTo(x, y) Insured(y).
h. There is a barber who shaves all men in town who do not shave themselves.
x y Barber(x) ^ InTown(y) ^ Shaves(x, y) Shaves(y, y) ^ (x = y).

i. A person born in the UK, each of whose parents is a UK citizen or a UK resident, is a UK citizen by
birth.
x BornIn(x, UK) ^ ((Citizen(Mother(x), UK) v Resident(Mother(x), UK)) ^ ((Citizen(Father(x), UK) v
Resident(Father(x), UK)) Citizen(x, UK) ^ CitizenBy(x, birth).
j. A person born outside the UK, one of whose parents is a UK citizen by birth, is a UK citizen by descent.
x BornOutside(x, UK) ^ (Citizen(Mother(x), UK)) ^ (CitizenBy(Mother(x), birth)) v
(Citizen(Father(x), UK)) ^ (CitizenBy(Father(x), birth)) Citizen(x, UK) ^ CitizenBy(x, descent).
k. Politicians can fool some of the people all of the time, and they can fool all of the people some of the
time, but they cant fool all of the people all of the time.
x t [Person(x) ^ Time(t) PoliticiansCanFool(x, t)] ^ x t [Person(x) ^ Time(t)
PoliticiansCanFool(x, t)] ^ x, t [Person(x) ^ Time(t) politiciansCanFool(x, t)].

8.7 Represent the sentence All Germans speak the same languages in predicate calculus. Use Speaks(x,
l), meaning that person x speaks language l.

x, y, l Nationality(x, German) ^ Nationality(y, German) ^ Speaks(x, l) ^ (x = y) Speaks(y, l)


or
x, y, l Nationality(x, German) ^ Nationality(y, German) ^ Speaks(x, l) ^ Speaks(y, l) ^ (x = y).
or
x y, l Nationality(x, German) ^ Nationality(y, German) ^ Speaks(x, l) Speaks(y, l) ^ (x = y).
8.8 What axiom is needed to infer the fact Female(Laura) given the facts Male(Jim) and Spouse(Jim,
Laura)?

w, h Wife(h, w) Female(w) ^ Spouse(h, w).


See page 254 for
h, w Husband(w, h) Male(h) ^ Spouse(h, w).
.

You might also like