Docsity

Production Systems - Artificial Intelligence - Exam, Exams of Artificial Intelligence

Toggle sidebar
bg1
CS 540-1: Introduction to Artificial Intelligence
Exam 2: 7:15-9:15pm, April 13, 1998
CLOSED BOOK
(one page of notes allowed)
Write your answers on these pages and show your work. If you feel that a question is not fully
specified, state any assumptions you need to make in order to solve the problem. You may use
the backs of these sheets for scratch work.
Write your name on this and all other pages of this exam. Make sure your exam contains seven
problems on eight pages.
Name ________________________________________________
Student ID ________________________________________________
Problem Score Max Score
1 _____ 25
2 _____ 10
3 _____ 15
4 _____ 10
5 _____ 15
6 _____ 15
7 _____ 10
Total _____ 100
(over)
pf3
pf4
pf5
pf8

Partial preview of the text

Download Production Systems - Artificial Intelligence - Exam and more Exams Artificial Intelligence in PDF only on Docsity!

CS 540-1: Introduction to Artificial Intelligence

Exam 2: 7:15-9:15pm, April 13, 1998

CLOSED BOOK

(one page of notes allowed)

Write your answers on these pages and show your work. If you feel that a question is not fully specified, state any assumptions you need to make in order to solve the problem. You may use the backs of these sheets for scratch work. Write your name on this and all other pages of this exam. Make sure your exam contains seven problems on eight pages.

Name ________________________________________________ Student ID ________________________________________________

Problem Score Max Score 1 _____ 25 2 _____ 10 3 _____ 15 4 _____ 10 5 _____ 15 6 _____ 15 7 _____ 10 Total _____ 100

PROBLEM 1 - Knowledge Representation (25 points)

Convert the following English sentences to first-order predicate calculus. Be sure to use reasonable predicates and functions.

hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

Squares have three sides.

hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

John is Mary’s brother.

hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

Growing flowers makes one content.

hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

Someone owes Susan money.

hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

Alice is younger than all of Bill’s children.

hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

Currently, apples cost more per pound than any other fruit.

hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

Getting a speeding ticket increases one’s insurance rates. [You must use situation calculus here, where the action is gotTrafficTicket(?ticketType, ?person) .]

PROBLEM 3 - Prolog (15 points)

Consider the Prolog program below. a(1, 3). a(2, 2). a(3, 1). b(2, 4). b(3, 6). b(4, 8). r(X, Y) :- a(X, Z), b(Z, Y). r(X, Y) :- a(X, X). What would Prolog return if given the following queries? (Report all the answers returned, in the order Prolog would return them.) hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

?- r(2, 2).

hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

?- r(V, W).

hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

Show below the search tree that Prolog explores when given the r(2, 2) query. Number the nodes to indicate the order they were visited.

PROBLEM 4 - Semantic Networks (10 points)

Draw a semantic network that captures the following (hypothetical) world knowledge.

There are three kinds of computers: mainframe, mini, and personal (PCs). All computers run Unix. Windows95 only runs on personal computers. The price of mainframes is high, of minicomputers is moderate, and of PCs is low. The XYZ brand of personal computers has a very low price, but does not run Windows95.

PROBLEM 6 - Formal Proofs (15 points)

(A) Starting with the following givens, formally prove (for simplicity, the predicate state() and some additional frame axioms are not used here): ∃ s color(Box1, Red, s) WFF Justification hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

1 box(Box1) ∧ box(Box2) ∧ (Box1 != Box2) ∧ paint(Red) ∧ given location(Loc1) ∧ location(Loc2) ∧ (Loc1 != Loc2) 2 at(Box1, Loc1, S0) ∧ at(Box2, Loc2, S0) ∧ given color(Box1, Blue, S0) ∧ color(Box2, Red, S0) 3 ∀ b,p,s box(b) ∧ paint(p) ∧ at(b, Loc2, s) given ⇒ color(b, p, result(Paint(b, p), s)) 4 ∀ b1,b2,p1,p2,s box(b1) ∧ (b1 != b2) ∧ color(b1, p1, s) given ⇒ color(b1, p1, result(Paint(b2, p2), s)) 5 ∀ b,x,y,s location(y) ∧ at(b, x, s) ∧ (x != y) given ⇒ at(b, y, result(Move(b, y), s)) 6 ∀ b1,b2,x,y,s at(b1, x, s) ∧ (b1 != b2) given ⇒ at(b1, x, result(Move(b2, y), s)) 7 ∀ x,y (x != y) ⇒ (y != x) given

(B) Circle one (1) frame axiom in the above (just circle its identifying number).

PROBLEM 7 - Interpretations (10 points)

Devise an interpretation that shows that the following predicate calculus does not capture the accompanying English sentence. Justify your answer by calculating the truth value of the logical sentence in the interpretation you devised.

Every person can see someone. ∀ x { ∃ y [ person(x) ∧ person(y) ⇒ sees(x, y) ] }