4. [25 pts.] Consider the Datalog knowledge base defined below. has_access(X,library) student(X). has_access(X,library
Posted: Mon May 09, 2022 2:32 pm
4. [25 pts.] Consider the Datalog knowledge base defined below.
has_access(X,library) student(X). has_access(X,library)
faculty(X). has_access(X,library)parent(Y,X)
has_access(Y,library) has_acces(X,office) has_keys(X).
faculty(karen). faculty(ming). student(diane). student(william).
student(mary). parent(diane,robyn). parent(susan,sarah).
parent(sarah,ariel). parent(karen,mary). parent(karen,todd). Use
the top-down proof procedure to find the answer to the following
query: ask has_access(todd,library) When matching rules, proceed
from top to bottom, and evaluate subgoals from left to right. You
must show your search tree using the same form I did in class: Each
node should contain a list of subgoals remaining to be proven, and
each child reflects the match of match subsequent recursive call.
Also label each arc with the rule that was matched and give the
substitutions that permit the match.
has_access(X,library) student(X). has_access(X,library)
faculty(X). has_access(X,library)parent(Y,X)
has_access(Y,library) has_acces(X,office) has_keys(X).
faculty(karen). faculty(ming). student(diane). student(william).
student(mary). parent(diane,robyn). parent(susan,sarah).
parent(sarah,ariel). parent(karen,mary). parent(karen,todd). Use
the top-down proof procedure to find the answer to the following
query: ask has_access(todd,library) When matching rules, proceed
from top to bottom, and evaluate subgoals from left to right. You
must show your search tree using the same form I did in class: Each
node should contain a list of subgoals remaining to be proven, and
each child reflects the match of match subsequent recursive call.
Also label each arc with the rule that was matched and give the
substitutions that permit the match.