Problems on Logical Agents Artificial Intelligence Programming Spring 2016
Question 1 Under propositional logic, assume you have 6 propositions named A, B, C, D, E, and F (all Boolean). Observe that V is disjunction or OR, & is conjunction or AND, and ~ is negation or NOT. Answer the following. What is the total number of models defined in this language? 64. This the total combinations of truth values. What is the difference between the statement: a sentence is true and the statement: a sentence is valid? (use the concept of models to explain the difference). A sentence is true under a certain model; the same sentence can be false under a different model. When we say “a sentence is valid”, that means the sentence is true in ALL models. How many models are true under the statement A & B & C ? 8.
Question 2 Answer the following questions: a. What does it mean to say the A |= B or that A entails B? It means that in every model that A is true B is also true. b. Let the knowledge base KB contain the following statements : {a, a→~b}. Then which of the following is true? KB entails b and KB entails ~b KB entails ~b but does not entail b The only Model that is consistent with KB is a=true and b=true KB does not entail b or ~b Answer: b
Model Consistent with KB ( i.e., KB = true) Question 2b Solution Answer: b KB entails b and KB entails ~b KB entails ~b but does not entail b The only Model that is consistent with KB is a=true and b=true KB does not entail b or ~b From the table below we see that whenever KB is true , ~b is true. a b ~b a→~b Model Consistent with KB ( i.e., KB = true) T F No Yes
Question 3 Consider the following statements: An algorithm is sound if it derives all entailed sentences from a knowledge base. An algorithm is sound if it derives only entailed sentences from a knowledge base. An algorithm is complete if it derives all entailed sentences from a knowledge base. An algorithm is complete if it derives only entailed sentences from a knowledge base. Which of the following is true? I and IV II and III Only II Only IV
Question 3 Consider the following statements: An algorithm is sound if it derives all entailed sentences from a knowledge base. An algorithm is sound if it derives only entailed sentences from a knowledge base. An algorithm is complete if it derives all entailed sentences from a knowledge base. An algorithm is complete if it derives only entailed sentences from a knowledge base. Which of the following is true? I and IV II and III Only II Only IV Answer: b
Question 4 Assume the following knowledge base: Sentence 1: Knight(Philip) V Queen(Elizabeth) V ~Prince(Henry) Sentence 2: Princess(Mary) V Prince(Henry) Sentence 3: ~Princess(Mary) Sentence 4: ~Knight(Philip) Use unification and resolution to prove that the following statement is true: Queen(Elizabeth)
Question 4 Assume the following knowledge base: Sentence 1: Knight(Philip) V Queen(Elizabeth) V ~Prince(Henry) Sentence 2: Princess(Mary) V Prince(Henry) Sentence 3: ~Princess(Mary) Sentence 4: ~Knight(Philip) Add new sentence: ~Queen(Elizabeth) Sentences 1 and 2 yield: Knight(Philip) V Queen(Elizabeth) V Princess(Mary) Combining with ~Queen(Elizabeth) yields Knight(Philip) V Princess(Mary) Combining with sentence 3: Knight(Philip) Combing with sentence 4: Contradiction.
Question 5 Assume the following knowledge base: Sentence 1: Robot(X) V Jedi(X) V ~RoboCop(X) Sentence 2: RoboCop(C3PO) V Jedi(Joda) Sentence 3: ~Jedi(Y) Sentence 4: RoboCop(R2D2) V Jedi(Luke) V Clone(Vader) Sentence 5: ~Clone(Z) Use unification and resolution to prove that the following statement is true: Robot(R2D2) Explain your substitutions clearly.
Question 5 Assume the following knowledge base: Sentence 1: Robot(X) V Jedi(X) V ~RoboCop(X) Sentence 2: RoboCop(C3PO) V Jedi(Joda) Sentence 3: ~Jedi(Y) Sentence 4: RoboCop(R2D2) V Jedi(Luke) V Clone(Vader) Sentence 5: ~Clone(Z) Add new sentence: ~Robot(R2D2) Sentences 1 and previous statement yield: Jedi(R2D2) V ~RoboCop(R2D2) with X/R2D2 Combining with Sentence 3: ~RoboCop(R2D2) with Y/R2D2 Combining with sentence 4: Jedi(Luke) V Clone(Vader) Combining with sentence 3: Clone(Vader) with Y/Luke Combining with sentence 5: Contradiction with Y/Vader Sentence 2 is not used.
Question 6 Let P and Q be two Boolean variables . Then which of the following is true? [V=OR, ^=AND] P V Q is valid and P ^ Q is satisfiable P V ~P is valid and P ^ ~P is satisfiable P V ~Q is valid and P ^ ~Q is satisfiable P V ~P is valid and P ^ Q is satisfiable
Question 6 Let P and Q be two Boolean variables . Then which of the following is true? [V=OR, ^=AND] P V Q is valid and P ^ Q is satisfiable P V ~P is valid and P ^ ~P is satisfiable P V ~Q is valid and P ^ ~Q is satisfiable P V ~P is valid and P ^ Q is satisfiable Answer: d Looking at the tables below we can say that only P V ~P is valid. P V Q , P ^ Q , P V ~Q and P ^ ~Q are satisfiable. P Q P V Q P ^ Q P V ~Q P ^ ~Q T F P P V ~P P ^ ~P T F
Question 7 Draw an AND-OR Graph for the following Horn Clauses: P → Q L ∧ M → P B ∧ L → M A ∧ P → L A ∧ B → L A B (Artificial Intelligence A Modern Approach by Stuart Russell and Peter Norvig. 3rd Edition, Prentice Hall, 2010)
Question 7 Draw an AND-OR Graph for the following Horn Clauses: P → Q L ∧ M → P Answer : B ∧ L → M A ∧ P → L A ∧ B → L A B (Artificial Intelligence A Modern Approach by Stuart Russell and Peter Norvig. 3rd Edition, Prentice Hall, 2010)