Friday, June 28, 2013

Chapter 16 - Logic Programming Language

Review Question 1. What are the three primary uses of symbolic logic in formal logic ? - to express propositions, to express the relationships between propositions, and to describe how new propositions can be inferred from other propositions that are assumed to be true. 2. What are the two parts of a compound term ? - functor and and ordered list of of parameters 3. What are the two modes in which a proposition can be stated ? - one in which a proposition is defined to be true and one in which that the proposition is something to be determined. 4. What is general form of a proposition in clausal form ? -B1 U B2 U . . . U Bn C A1 n A2 n . . . n Am 5. What are antecedents ? Consequents ? - Antecedents are right side of a clausal form proposition. Consequent is left side of a clausal form propositions 6. Give general definitions of resolution and unification - Resolution : inference rule that allows inferred propositions to be computed from given propositions, thus providing a method with potential application to automatic theorem proving. Unification : Process of determining useful values for variables. 7. What are the forms of Horn clauses ? - a. Have a single atomic proposition on the left side b. empty left side. 9. What does it mean for a language to be nonprocedural ? - Language in which the programs do not exactly state how a result is to be computed but rather describe the form of the result. Problem Set 1. “All predicate calculus propositions can be algorithmically converted to clausal form”. Is this statement true or false ? Explain. - True. 8. Critically comment on the following statement : “ Logic programs are nonprocedural” - It is true, because logical programs use lots of different processes based on its conditions. If a certain logical requirement is true, then a program will execute the corresponding process, instead of procedurally executing the statements. 9. From a book on Prolog, learn and write a description of a monkey-banana prolem. Why does Prolog allow this problem to exist in its implementation ? - The problem is defined as this : a monkey is in a room. Suspended from the ceiling is a bunch of bananas, beyond the monkey’s reach. However, in the room there are also a chair and a stick. The ceiling is just the right height so that a monkey standing on a chair could knock the bananas down with the stick. The monkey knows how to move around, carry other things around, reach for the bananas, and wave a stick in the air. What is the best sequence of actions for the monkey? It exists to create a variation in output of Prolog. As Prolog is an AI programming language, a variation might be needed in AI output to make them respond relevant to the situation.

No comments:

Post a Comment