You are on page 1of 2

ECE 412C Artificial

intelligence

Homework Ch8 & Ch9


Ch.8
1. This exercise uses the function MapColor and predicates In(x, y),
Borders(x, y), and Country(x), whose arguments are geographical regions,
along with constant symbols for various regions. In each of the following we
give an English sentence and a number of candidate logical expressions. For
each of the logical expressions, state whether it (1) correctly expresses the
English sentence; (2) is syntactically invalid and therefore meaningless; or
(3) is syntactically valid but does not express the meaning of the English
sentence.

a. Paris and Marseilles are both in France.


(i) In(Paris ∧ Marseilles, France). 2
(ii) In(Paris, France) ∧ In(Marseilles, France). 1
(iii) In(Paris, France) ∨ In(Marseilles, France). 3
b. There is a country that borders both Iraq and Pakistan.
(i) ∃ c Country(c) ∧ Border(c, Iraq) ∧ Border(c, Pakistan). 1
(ii) ∃ c Country(c) ⇒ [Border(c, Iraq) ∧ Border(c, Pakistan)]. 2
(iii) [∃ c Country(c)] ⇒ [Border(c, Iraq) ∧ Border(c, Pakistan)].2
(iv) ∃ c Border(Country(c), Iraq ∧ Pakistan). 2

c. All countries that border Ecuador are in South America.


(i) ∀ c Country(c) ∧ Border(c, Ecuador) ⇒ In(c, SouthAmerica). 1
(ii) ∀ c Country(c) ⇒ [Border(c, Ecuador) ⇒ In(c, SouthAmerica)]. 3
(iii) ∀ c [Country(c) ⇒ Border(c, Ecuador)] ⇒ In(c, SouthAmerica). 3
(iv) ∀ c Country(c) ∧ Border(c, Ecuador) ∧ In(c, SouthAmerica). 2

d. No region in South America borders any region in Europe.


(i) ¬[∃ c, d In(c, SouthAmerica) ∧ In(d, Europe) ∧ Borders(c, d)]. 1
(ii) ∀ c, d [In(c, SouthAmerica) ∧ In(d, Europe)] ⇒ ¬Borders(c, d)].1
(iii) ¬∀ c In(c, SouthAmerica) ⇒ ∃ d In(d, Europe) ∧ ¬Borders(c, d). 3
(iv) ∀ c In(c, SouthAmerica) ⇒ ∀ d In(d, Europe) ⇒ ¬Borders(c, d). 2

Page 1
ECE 412C Artificial
intelligence

e. No two adjacent countries have the same map color.


(i) ∀ x, y ¬Country(x) ∨ ¬Country(y) ∨ ¬Borders(x, y) ∨
¬(MapColor(x) = MapColor(y)). 2
(ii) ∀ x, y (Country(x) ∧ Country(y) ∧ Borders(x, y) ∧ ¬(x = y)) ⇒
¬(MapColor(x) = MapColor(y)). 1
(iii) ∀ x, y Country(x) ∧ Country(y) ∧ Borders(x, y) ∧
¬(MapColor(x) = MapColor(y)). 2
(iv) ∀ x, y (Country(x) ∧ Country(y) ∧ Borders(x, y)) ⇒ MapColor(x
= y). 3

2. Assuming predicates Parent(p, q) and Female(p) and constants Joan and


Kevin, with the obvious meanings, express each of the following sentences
in first-order logic. (You may use the abbreviation ∃1 to mean “there exists
exactly one.”)
a. Joan has a daughter (possibly more than one, and possibly sons as
well).
b. Joan has exactly one daughter (but may have sons as well).
c. Joan has exactly one child, a daughter.
d. Joan and Kevin have exactly one child together.
e. Joan has at least one child with Kevin, and no children with anyone
else.

--------------------------------------------------------------------------------------------
Ch.9

3. Consider the following story:


- KB:
Everyone who loves all animals is loved by someone Anyone who kills
animals is loved by no-one Jack loves all animals. Either Curiosity or
Jack killed the cat, who is named Tuna
- Query: Did Curiousity kill the cat?
- Use the following Inference Procedure:
• Express sentences in FOL
• Convert to CNF form and negated query

Page 2

You might also like