Provide short answers for these questions
tutorial7.pdf

Unformatted Attachment Preview

Tutorial 7: CS3243 Introduction to AI
Semester II, 2016/17
National University of Singapore
School of Computing
CS3243 Introduction to AI
Tutorial 7: Inference in First-Order Logic
Issue: March 27, 2017
Due: March 31, 2017
Important Instructions:
• Your solutions for this tutorial must be TYPE-WRITTEN.
• Make TWO copies of your solutions: one for you and one to be SUBMITTED TO THE
TUTOR IN CLASS. Your submission in your respective tutorial class will be used to indicate
your CLASS ATTENDANCE. Late submission will NOT be entertained.
• YOUR SOLUTION TO QUESTION 1 will be GRADED for this tutorial.
• You may discuss the content of the questions with your classmates. But everyone should
work out and write up ALL the solutions by yourself.
1. (Question 9.4 from AIMA 3rd edition) For the following pairs of atomic sentences, give the
most general unifier if one exists:
(a) P (A, B, B), P (x, y, z)
(b) Q(y, G(A, B)), Q(G(x, x), y)
(c) Older(F ather(y), y), Older(F ather(x), John)
(d) Knows(F ather(y), y), Knows(x, x)
2. What is the problem in each the following first order logic statements? Suggest how these
statements can be corrected.
(a) ∀ x Boy(x) ∧ T all(x)
(Intended meaning: all boys are tall)
(b) ∃ x Boy(x) ⇒ T all(x)
(Intended meaning: some boy is tall)
1
Tutorial 7: CS3243 Introduction to AI
Semester II, 2016/17
3. An atheist asked two knowledge engineers to write a rule to say that “Nothing is divine.”
The first engineer wrote ¬∃ x Divine(x) and transformed it into the following clause:
¬Divine(G1)
where G1 is a Skolem constant. The second engineer wrote ∀ x ¬Divine(x) and transformed it into the following clause:
¬Divine(x)
Why did they produce two different versions? Which version is correct?
4. Two English sentences “Anyone who takes an AI course is smart” and “Any course that
teaches an AI topic is an AI course” have been represented in first-order logic:
∀ x (∃ y AI course(y) ∧ T akes(x, y)) ⇒ Smart(x)
∀ x (∃ y AI topic(y) ∧ T eaches(x, y)) ⇒ AI course(x)
It is also known that John takes CS3243 and CS3243 teaches Inference, which is an AI
topic. Represent these facts as first-order logic sentences. Now convert all first-order logic
sentences into conjunctive normal form and use resolution to prove that “John is smart.”
5. (Slightly modified from Question 9.24 of AIMA 3rd edition) Here are two sentences in the
language of first-order logic:
(A) : ∀ x ∃ y (x ≥ y)
(B) : ∃ y ∀ x (x ≥ y)
(a) Assume that the variables range over all the natural numbers 0, 1, 2, . . . and that the
“≥” predicate means “is greater than or equal to”. Under this interpretation, translate
(A) and (B) into English.
(b) Is (A) true under this interpretation? Is (B) true under this interpretation?
(c) Does (A) logically entail (B)? Does (B) logically entail (A)? Justify your answers.
6. PSA would like to implement its tax system on ships and cargo for its Brani port as part
of a first-order logic system. You have been hired as a knowledge engineer to convert the
following predicates into FOL representation. You may use any predicate that you create in
previous parts for subsequent parts. You may also define new constants and predicates.
Note that variables are in lowercase, whereas constant, predicate and function symbols start
with uppercase. Given the functions:
Arrival T ime(ship)
Departure T ime(ship)
2
Tutorial 7: CS3243 Introduction to AI
Semester II, 2016/17
And the predicates:
U nload F rom Ship(cargo, ship, arrival time)
Load Onto Ship(cargo, ship, departure time)
W eapons(cargo)
(a) In the PSA system, can ship objects (n.b., not constant symbols) arrive at the Brani port
multiple times? Justify your answer.
(b) Write a FOL predicate of a simplified tax law for cargos entering and not departing
Singapore. Note that ships unload and load at their arrival and departure times.
(c) Aside from cargo, ships are also taxed. A ship is taxable upon entry to Singapore unless
all the ship’s cargo are weapons (slated for the armed forces).
(d) State your answer from Part (c) in Conjunctive Normal Form.
(e) Using the following observations, use resolution by refutation to answer the query
T axable(Storm King):
U nload F rom Ship(T orpedos, Storm King, Arrival T ime(Storm King))
W eapons(T orpedo)
U nload F rom Ship(Laser P arts, Storm King, Arrival T ime(Storm King))
¬W eapons(Laser P arts)
3

Purchase answer to see full
attachment