Artificial Intelligence: Knowledge Representation and Reasoning Week 2 Assessment 1 - Answers 1. When is an inference rule {a1, a2,.., an} c sound? (b) a. When ((a1 a2 an) c) is a tautology b. When ((a1 a2 an) c) is a tautology c. When (a1 a2 an c) is a tautology d. When (a1 a2 an c) is a tautology 2. What are the features of Frege s propositional calculus? (a, d) a. It consists of just two operators - negation and implication b. It consists of just two operators - implication and disjunction c. It consists of 11 inference rules d. It consists of 1 inference rule 3. Is the following proof valid for the premises, P, (P Q), (R Q), R to get the result S? (a) 1. P 2. P Q 3. Q (1, 2, modus ponens) 4. Q S (3, addition) 5. R 6. R Q 7. Q (5, 6, modus ponens) 8. S (4, 7, disjunctive syllogism) a. valid, you can derive anything in an inconsistent KB b. not valid c. valid but not interpretable d. not valid because KB is inconsistent 4. Which formula(s) is/are equivalent to (P op Q) defined in the following truth table? (b, c) a. P Q b. (P Q) c. (P Q) ( P Q) d. P Q P Q P op Q T T T T F F F T F F F T
5. Which of the following are equivalent? (b) 1. P Q 2. P Q 3. Q P 4. P or Q a. Only 1 and 2 b. Only 1, 2 and 3 c. Only 1, 2 and 4 d. none are equivalent 6. There are two kinds of people on an island - Knights and Knaves. Knights always speak the truth and Knaves always lie. You are on this island. You meet two people who say the following. Suresh: Neither of us are knights Smitha: If Suresh is a knight, then I am a knave Which of the following is true? (Please see the appendix below for discussion) (c) a. Suresh is a knight and Smitha is a knave b. Suresh is a knight and Smitha is a knight c. Suresh is a knave and Smitha is a knight d. Suresh is a knave and Smitha is a knave. 7. Which of the following sets of connectives are functionally complete? (a, b, c, d) a. {not, and} b. {nand} c. {not, and, or} d. {nor} 8. Identify the tautology/tautologies below. (a, b, c) a. P P b. (( P Q) P) P c. (P Q) (Q P) d. P ʌ P 9. Consider the 4 propositions P, Q, R, S. Given P Q and R S, which of the following is true or entailed (a,c) a. P (Q S) b. Q P c. S R d. Q P
10. In the course introduction video, there were two arguments A1: If the earth were spherical, it would cast curved shadows on the moon. It casts curved shadows on the moon. So, it must be spherical. A2: If he used good bait (G) and the fish weren t smarter ( S) than he was, then he didn t go hungry ( H). But he used good bait (G) and he did go hungry (H), so the fish must ve been smarter (S) than he was. Which of the following is true? (c) a. A1 is a valid argument but not A2 b. Both are valid arguments c. A2 is a valid argument but not A1 d. Neither is a valid argument Consider A1. Let us name the relevant propositions. S - The earth is spherical C - The earth casts curved shadows on the moon S C C ---------------------------------------- S This is not a sound/valid argument, this is abduction (From Q and P Q, infer Q). This can be shown by showing that ((P Q) ʌ Q) P is not a tautology. Alternatively one can give a counter example where the premises are true and the conclusion false. For example, if S is false, and C is true, the conclusion S is false. Consider A2 : This is a valid argument. The proof is given below. Given the premises, 1. (G S) H 2. G H To derive: S 3. H 2 Simplification 4. (G S) 3, 1, Modus tollens 5. G S 4, de Morgan 6. G 2, Simplification 7. S 5, 6, Disjunctive Syllogism
11. Which of the following is a result of the application of the Resolution Rule on the two clauses (P Q) and ( P Q)? (b,c) a. null/empty clause b.(p P) (a Tautology) c. (Q Q) (a Tautology) d. Cannot be resolved 12. Given the following set of clauses: 1. P Q 2. P S R 3. S T P 4. Q R 5. T Q 6. R S Q Which of the following pairs can be resolved together? (a, c, f, h, i, j) a. 1, 2 (P Q), ( P S R) ( Q S R) b. 1, 4 c. 3, 5 (S T P), ( T Q) (S P Q) d. 4, 6 e. 2, 5 f. 2, 6 ( P S R), (R S Q) ( P S Q) g. 1, 6 h. 3, 6 (S T P), (R S Q) (T R Q) i. 4, 5 ( Q R), ( T Q) (R T) j. 1, 5 (P Q), ( T Q) (P T)
Appendix: Formalizing knights and knaves problems There are two kinds of people on an island - knights and knaves. Knights always speak the truth and knaves always lie. You are on this island. You meet two people who say the following. Suresh: Neither of us are knights Smita: If Suresh is a knight, then I am a knave The task is to determine whether each of Suresh and Smita is a knight or a knave. The problem states that there are two types of people, knights and knaves. If a person is a knight, then whatever she says is true. Similarly, if a person is knave, then whatever she says is false. The fact that knights always tell the truth and knaves always lie cannot be represented in FOL. This is because the utterances made by people are themselves sentences. However, extensions to Modal Logic can capture such facts. Then we can express the facts as shown below. Observe that the argument P to Says is a sentence (and not a term). x (Knight(x) P(Says(x, P) P))) x (Knave(x) P(Says(x, P) P))) Working with Propositional Language we can circumvent the Modal statements and directly relate the nature of the speaker with what she says, and we have to do this for each statement in the problem. For a given statement P, Knight P and Knave P Further, since each person is either a knight or a knave, the following holds for each of Suresh and Smita. Knave(Suresh) Knight(Suresh) Knave(Smita) Knight(Smita) We need two propositions, say H and A to represent Knight(Suresh) and Knight(Smita) respectively. Then H and A will represent that Suresh and Smita are knaves respectively. We need to assert the conditional truth values of each utterance as follows. For example, if Suresh has asserted the proposition/sentence P, then the following holds, (H P) ( H P) Note that this is equivalent to (H P). In the given problem, Suresh says that neither he nor Smita is a knight i.e. ( H A). Thus we have, H ( H A)
Smita says that if Suresh is a knight, then she is a knave i.e. (H A). Thus we have, A (H A) The problem then reduces to finding a satisfying assignment for the two statements, that is, for (H ( H A)) (A (H A)) This can be done by inspecting the complete truth table. We leave that as an exercise for the reader. Here we show how one can reason with assumptions. Case 1: (Assume H) Suresh is a knight. If Suresh is a knight, then his statement ( H A) is true. 1. H (Assumption) 2. H A (because (H ( H A))) 3. H (2, simplification) 4. H H (1, 3,addition) 5. False (4, contradiction) 6. H (negation of assumption 1 by contradiction) Therefore Suresh is a knave. Hence the negation of his statement must be true, because ( H ( H A)). 7. ( H A) (6 and because ( H ( H A))) 8. H A (7, de Morgan s Law) 9. A (6, 8, disjunctive syllogism) Thus Suresh is a knave ( H is true), and Smita is a knight (A is true). We encourage the reader to show that this problem has no other solution. That is, any other assignment to H and A leads to a contradiction. Or equivalently no other row in the truth table has true in the last column for (H ( H A)) (A (H A)). The interested reader would have noted that the conclusion was arrived at only on the basis of the statement made by Suresh. What if Smita had told a lie too? She could have, for example, made the same statement as Suresh i.e. ( H A). The reader is encouraged to ponder over this impossible scenario!