Exercise 12.7 Consider the following knowledge base: has access(X, library) student(X). has access(X, library) faculty(X).

Question:

Exercise 12.7 Consider the following knowledge base:

has access(X, library) ← student(X).

has access(X, library) ← faculty(X).

has access(X, library) ← has access(Y, library) ∧ parent(Y,X).

has access(X, office) ← has keys(X).

faculty(diane).

faculty(ming).

student(william).

student(mary).

parent(diane, karen).

parent(diane, robyn).

parent(susan, sarah).

parent(sarah, ariel).

parent(karen, mary).

parent(karen, todd).

(a) Provide an SLD derivation of the query ask has access(todd, library).

(b) The query ask has access(mary, library) has two SLD derivations. Give both of them.

(c) Does there exist an SLD derivation for ask has access(ariel, library)? Explain why or why not.

(d) Explain why the set of answers to the query ask has access(X, office) is empty.

(e) Suppose following the clause is added to the knowledge base:

has keys(X) ← faculty(X).

What are the answers to the query ask has access(X, office)?

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: