- 1. Based on the discussion in Chapter 15 on ML, which of the followings will be the value of newList after applying th
Posted: Sat Nov 27, 2021 2:40 pm
statement? A) distance (X,Y) :- speed (X, Speed), time (X, Time), Y is Speed * Time. B) grandparent(X, 2):- parent (X,Y), parent (Y,Z). C) speed (dodge, 95). D) parent (X,Y):- mother (X,Y). 5. Based on the discussion in Chapter 16 on deficiencies of Prolog, which of the followings is called "the negation problem" for Prolog? A) The only knowledge is what is in the database; B) Anything not stated in the database is assumed to be false; C) The order of attempted matches is nondeterministic and all matches would be attempted concurrently; D) It is easy to state a sort process in logic, but difficult to actually implement it.
6. Based on the discussion of Chapter 16, which of the following statements is true? A) Prolog uses breadth-first search: B) Depth-first search means to work on all subgoals in parallel; C) Prolog implementations use backward chaining; D) Breadth-first search means to find a complete proof for the first subgoal before working on others. 7. Which of the followings is not one of logical operators in Java? A) B) 11 C) && D)! E) 8. Based on the discussion of Chapter 16, which of the following statements is not true? A) Top-down resolution is backward chaining, where we begin with goal and attempt to find sequence that leads to set of facts in database; B) Matching in a logical programming language refers to the process of proving a proposition; C) Bottom-up resolution is forward chaining, where we begin with facts and rules of database and attempt to find sequence that leads to goal; D) Top-down resolution works well with a large set of possibly correct answers. 9. Based on the discussion in Chapter 16, which of the following statements is not true to logical programming languages? A) In logic programming languages, a logical inferencing process is used to produce results; B) A particular form of symbolic logic used for logic programming is called predicate calculus; C) In addition to the specification of results, the steps in reaching the results must also be detailed in logic programming languages; D) Programs in logic programming languages are expressed in a form of symbolic logic. 10. Based on the discussion in Chapter 16, which of the following statements refers to "instantiation?" A) an inference principle that allows inferred propositions to be computed from given propositions; B) finding values for variables in propositions that allows matching process to succeed; C) discovering new theorems that can be inferred from known axioms and theorems; D) assigning temporary values to variables to allow unification to succeed.
- 1. Based on the discussion in Chapter 15 on ML, which of the followings will be the value of newList after applying the map function defined as val newList = map (fn * > * * *, 12, 4, 6]); ? A) [2, 4, 61 B) 14, 8, 12) C) 4, 12, 24) D) 14, 16, 361 E) Your answer 2. Based on the discussion in Chapter 15 on "Haskell Lists," which of the followings will be the result of the evaluation of 1, 3..9) ? A) (1, 3, 4, 5, 6, 7, 8, 9] B) [1, 3, 6, 9] C) [1, 3, 5, 7, 91 D) (3, 4, 5, 6, 7, 8, 9] E) Your answer: 3. Based on the discussion in Chapter 16, all the followings are recognized as Prolog statements except A) Assignment statements; B) Facts; C) Goals; D) Rules 4. Based on the discussion in Chapter 16 on Prolog, which of the followings is a fact 6. Based on the discussion of Chapter 16, which of the following statements is true? A) Prolog uses breadth-first search: B) Depth-first search means to work on all subgoals in parallel; C) Prolog implementations use backward chaining; D) Breadth-first search means to find a complete proof for the first subgoal before working on others. 7. Which of the followings is not one of logical operators in Java? A) B) 11 C) && D)! E) 8. Based on the discussion of Chapter 16, which of the following statements is not true? A) Top-down resolution is backward chaining, where we begin with goal and attempt to find sequence that leads to set of facts in database; B) Matching in a logical programming language refers to the process of proving a proposition; C) Bottom-up resolution is forward chaining, where we begin with facts and rules of database and attempt to find sequence that leads to goal; D) Top-down resolution works well with a large set of possibly correct answers. 9. Based on the discussion in Chapter 16, which of the following statements is not true to logical programming languages? A) In logic programming languages, a logical inferencing process is used to produce results; B) A particular form of symbolic logic used for logic programming is called predicate calculus; C) In addition to the specification of results, the steps in reaching the results must also be detailed in logic programming languages; D) Programs in logic programming languages are expressed in a form of symbolic logic. 10. Based on the discussion in Chapter 16, which of the following statements refers to "instantiation?" A) an inference principle that allows inferred propositions to be computed from given propositions; B) finding values for variables in propositions that allows matching process to succeed; C) discovering new theorems that can be inferred from known axioms and theorems; D) assigning temporary values to variables to allow unification to succeed.