Clausal Form - Artificial Intelligence - Exam, Exams of Artificial Intelligence

Main points of this exam paper are: Clausal Form, Reasonable Constants, Predicates, Fopc Interpretations, Formal Interpretation, Clausal Form, Pattern Matching, Lowercase Letters

Typology: Exams

2012/2013

Uploaded on 04/08/2013

savitri_85
savitri_85 🇮🇳

4

(5)

70 documents

1 / 8

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS 540-1: Introduction to Artificial Intelligence
Exam 2: 7:15-9:15pm, November 20, 1995
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
(7) problems on eight (8) pages.
Name ________________________________________________
Student ID ________________________________________________
Problem Score Max Score
1 _____ 18
2 _____ 15
3 _____ 10
4 _____ 15
5 _____ 14
6 _____ 14
7 _____ 14
Total _____ 100
(over)
pf3
pf4
pf5
pf8

Partial preview of the text

Download Clausal Form - 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, November 20, 1995

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 (7) problems on eight (8) pages.

Name ________________________________________________

Student ID ________________________________________________

Problem Score Max Score

1 _____ 18

2 _____ 15

3 _____ 10

4 _____ 15

5 _____ 14

6 _____ 14

7 _____ 14

Total _____ 100

PROBLEM 1 - First-Order Predicate Calculus (18 points)

Give one (1) predicate calculus representation for each of these English sentences. If you feel a sentence is ambiguous, provide a more detailed sentence that better captures the version represented by your FOPC. Choose reasonable constants, predicates. and functions - the predicate John’s-car-is-red is not an acceptable answer to the first question.

hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

i) John’s car is red.

hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

ii) All of Wendt’s books are cataloged.

hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

iii) Every player on [the sports teams] the Packers and the Brewers is rich.

hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

iv) Every living thing likes Thanksgiving, except for the turkeys.

hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

v) Unless it is a blizzard, Mary has some mode of transportation for getting to school. [note: use situation calculus to represent this sentence]

PROBLEM 3 - Clausal Form (10 points)

Convert (separately) the following FOPC wff’s to clausal form.

hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

¬ [ ∀ x,y { P(x,y) ∧ ¬ Q(F(x), G(x, y)) } ]

hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

∃ x ∀ y ∃ z [ P(x,y,z) ⇔ P(z,y,x) ]

PROBLEM 4 - Pattern Matching (15 points)

i) What is the most general unifier of the following pairs of wff’s? (If none exists, report ‘‘fail.’’) Assume that capital letters are constants and lowercase letters are variables.

hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

P(x, y, x, z) P(F(w), A, F(B), w)

hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

Q(x, F(x), G(F(x))) Q(1, y, G(F(y)))

hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

ii) Given the following Working Memory (WM), what are the valid variable-binding sets for the production rule listed below? WM: { P(0,0), P(1,2), P(2,1), Q(0,0), Q(0,1), Q(1,2), R(0,0,0), R(0,0,1), R(0,1,2), R(1,2,2) }

Rule: ∀ x,y,z [ P(x,y) ∧ Q(x,z) ∧ R(x, y, z) ] ⇒ Action(x, y, z)

If negation by failure were used, would the above rule match the above WM more, fewer, or the same number of times? Explain your answer.

PROBLEM 6 - Resolution Theorem Proving (14 points)

Consider the following formalization of a recent news story.

(1) Student 1 said that the University should construct more on-campus parking. Student(S1) ∧ [ BuildsParkingLots(Univ) ⇒ ListenedTo(Univ, S1) ]

(2) Student 2 said that the University should not build more parking lots. Student(S2) ∧ [ ¬BuildsParkingLots(Univ) ⇒ ListenedTo(Univ, S2) ]

(3) Student 3 said the University never listens to students. ∀ x [ Student(x) ⇒ ¬ListenedTo(Univ, x) ]

Use resolution theorem proving to show that Student 3’s statement is false.

hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

First, prepare and number your clauses.

hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

Next, repeatedly apply the resolution inference rule.

PROBLEM 7 - Production Systems (14 points)

Consider the following set of production rules. Assume that the conflict resolution strategy is to pick the rule with the most preconditions that (a) matches working memory (WM) and (b) has not already been used. Break ties by choosing the lowest numbered rule. Also assume that the production system terminates when either (a) no unused rules match WM or (b) the system executes a PRINT action.

ASSERT’ing X means that ¬X is removed from WM and X is added, while RETRACT’ing X means that X is removed from WM and ¬X is added.

(1) Q ∧ ¬S ⇒ ASSERT(R) (2) P ∧ Q ∧ ¬R ⇒ RETRACT(Q), ASSERT(S) (3) R ⇒ PRINT("Eureka!") (4) S ⇒ PRINT("Eureka!") (5) P ∧ S ⇒ RETRACT(P), RETRACT(S), ASSERT(Q) (6) ¬P ∧ ¬Q ∧ ¬R ∧ ¬S ⇒ PRINT("I’m Stuck!")

Illustrate the operation of this production system by filling out the table below.

hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

Time Working Matching Chosen Step Memory Unused Rules Rule hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

0 {P, Q, ¬R, ¬S}

(The End!)