foundations of computational agents
Consider a domain with two individuals (✂ and ☎), two predicate symbols ( and ), and three constants (, , and ). The knowledge base is defined by
Give one interpretation that is a model of .
Give one interpretation that is not a model of .
How many interpretations are there? Give a brief justification for your answer.
How many of these interpretations are models of ? Give a brief justification for your answer.
Suppose a language has constant symbols , , and ; predicate symbols and ; and no function symbols. The following knowledge bases are built from this language:
Consider possible interpretations for this language of the form , where ✂, ☎, ✈, ✎.
How many interpretations with the four domain elements exist for our simple language? Give a brief justification for your answer. [Hint: Determine the number of possible assignments for the constant symbols. Consider how many extensions predicates and can have to determine how many assignments exist.] Do not try to enumerate all possible interpretations.
Of the interpretations outlined above, how many are models of ? Give a brief justification for your answer.
Of the interpretations outlined above, how many are models of ? Give a brief justification for your answer.
Of the interpretations outlined above, how many are models of ? Give a brief justification for your answer.
Consider the following knowledge base:
Show the set of ground atomic consequences derivable from this knowledge base. Use the bottom-up proof procedure assuming, at each iteration, the first applicable clause is selected in the order shown. Furthermore, applicable constant substitutions are chosen in “alphabetic order” if more than one applies to a given clause; for example, if and are both applicable for a clause at some iteration, derive first. In what order are consequences derived?
Consider the following knowledge base:
Provide an SLD derivation of the query , similar to Figure 15.6.
The query has two SLD derivations. Give both, but do not show the clauses chosen or the substitutions.
Is there a derivation for ? Explain why, or why not.
Explain why the set of answers to the query is empty.
Suppose the following clause is added to the knowledge base:
What are the answers to the query ?
What is the result of the following applications of substitutions?
Give a most general unifier of the following pairs of expressions:
and
and
and
For each of the following pairs of atoms, either give a most general unifier or explain why one does not exist:
and
and
and
and .
List all of the ground atomic logical consequences of the following knowledge base:
Consider the following logic program:
Give a top-down derivation, showing all substitutions for the query
What is the answer corresponding to this derivation?
Is there a second answer? If yes, show the derivation; if not, explain why.
Consider the following logic program:
Give a top-down derivation (including all substitutions) for one answer to the query
Are there any other answers? If so, explain where a different choice could be made in the derivation in the previous answer, and continue the derivation, showing another answer. If there are no other answers, explain why not.
[You are meant to do this exercise as if you were a computer, without knowing what the symbols mean. If you want to give a meaning to this program, you could read as , as , as , and as .]
The aim of this question is to get practice writing simple logic programs.
Write a relation that is true if is the list resulting from removing one instance of from list . The relation is false if is not a member of .
Give all of the answers to the following queries:
Write a relation that is true if list contains a subset of the elements of in the same order.
How many different proofs are there for each of the following queries:
Explain why there are that many.
In this question, you are to write a definite-clause knowledge base for the design of custom video presentations.
Assume that the video is annotated using the relation
where is an identifier for the segment. (In a real application this will be enough information to extract the video segment.) is the running time of the segment (in seconds). is a list of topics covered by the video segment. An example of a video annotation is the database
A presentation is a sequence of segments. Represent a presentation by a list of segment identifiers.
Axiomatize a predicate
that is true if is a presentation whose total running time is less than or equal to seconds, such that all of the topics in the list are covered by a segment in the presentation. The aim of this predicate is to design presentations that cover a certain number of topics within a time limit.
For example, the query
should return at least the following two answers (perhaps with the segments in some other order):
Give the intended interpretation of all symbols used and demonstrate that you have tested your axiomatization (including finding all answers to your query) in AIPython (aipython.org) or Prolog. Explain briefly why each answer is an answer.
Assuming you have a good user interface and a way to actually view the presentations, list three things that the preceding program does not do that you may want in such a presentation system. (There is no correct answer for this part. You must be creative to get full marks.)
The extra arguments in a definite-clause grammar makes it strictly more powerful than a context-free grammar. The language , which consists of sentences that are made up of a number of s, followed by the same number of s followed by the same number of s cannot be defined with a context-free grammar. Define this language using a definite clause grammar. [Hint: Define a predicate for a non-terminal that creates copies of one of its arguments, and represent numbers using for zero and for the numbers after .]
Construct a knowledge base and a dictionary based on Figure 15.12 to answer geographical questions such as that given in Figure 1.3. For each query, either show how it can be answered or explain why it is difficult to answer given the tools presented in this chapter.
Consider what would happen in Example 15.44 if had been defined as
Suppose the rest of the knowledge base is
What is Clark’s completion of the clause for ?
What is a counter example to the soundness of the completion? Give an instance of the clause for which the body is true and the head is false.
What does an implementation with negation as failure (e.g., Prolog) give? Compare with