Artificial Intelligence: Knowledge Representation and Reasoning Week 2 Assessment 1 - Answers

Similar documents
MACM 101 Discrete Mathematics I. Exercises on Propositional Logic. Due: Tuesday, September 29th (at the beginning of the class)

The Logic of Compound Statements cont.

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

PROPOSITIONAL CALCULUS

2. The Logic of Compound Statements Summary. Aaron Tan August 2017

Propositional Logic. Argument Forms. Ioan Despi. University of New England. July 19, 2013

Section 1.2: Propositional Logic

Chapter 1: The Logic of Compound Statements. January 7, 2008

A Quick Lesson on Negation

Natural Deduction is a method for deriving the conclusion of valid arguments expressed in the symbolism of propositional logic.

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook)

n logical not (negation) n logical or (disjunction) n logical and (conjunction) n logical exclusive or n logical implication (conditional)

CSC Discrete Math I, Spring Propositional Logic

Introduction Logic Inference. Discrete Mathematics Andrei Bulatov

Logic and Proofs. Jan COT3100: Applications of Discrete Structures Jan 2007

10/5/2012. Logic? What is logic? Propositional Logic. Propositional Logic (Rosen, Chapter ) Logic is a truth-preserving system of inference

Chapter Summary. Propositional Logic. Predicate Logic. Proofs. The Language of Propositions (1.1) Applications (1.2) Logical Equivalences (1.

Propositional Logic. Jason Filippou UMCP. ason Filippou UMCP) Propositional Logic / 38

Chapter 1, Part I: Propositional Logic. With Question/Answer Animations

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system):

CS 2740 Knowledge Representation. Lecture 4. Propositional logic. CS 2740 Knowledge Representation. Administration

Propositional Logic: Review

Artificial Intelligence. Propositional logic

COM S 330 Homework 02 Solutions. Type your answers to the following questions and submit a PDF file to Blackboard. One page per problem.

Propositional Logic Arguments (5A) Young W. Lim 11/30/16

Packet #1: Logic & Proofs. Applied Discrete Mathematics

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Propositional Logic. Spring Propositional Logic Spring / 32

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

EECS 1028 M: Discrete Mathematics for Engineers

Supplementary Logic Notes CSE 321 Winter 2009

Homework 2: Solutions

Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014

Propositional Logic Arguments (5A) Young W. Lim 10/11/16

Logic Overview, I. and T T T T F F F T F F F F

Natural Deduction. Formal Methods in Verification of Computer Systems Jeremy Johnson

Logic for Computer Science - Week 4 Natural Deduction

Propositional Language - Semantics

COMP 182 Algorithmic Thinking. Proofs. Luay Nakhleh Computer Science Rice University

Logic: Propositional Logic (Part I)

THE LOGIC OF COMPOUND STATEMENTS

Test 1 Solutions(COT3100) (1) Prove that the following Absorption Law is correct. I.e, prove this is a tautology:

CS250: Discrete Math for Computer Science. L6: CNF and Natural Deduction for PropCalc

Logic. Definition [1] A logic is a formal language that comes with rules for deducing the truth of one proposition from the truth of another.

5. And. 5.1 The conjunction

Propositional Logic Arguments (5A) Young W. Lim 11/8/16

The Importance of Being Formal. Martin Henz. February 5, Propositional Logic

Knowledge based Agents

Logic and Inferences

Inference in Propositional Logic

1) Let h = John is healthy, w = John is wealthy and s = John is wise Write the following statement is symbolic form

Definition 2. Conjunction of p and q

Section 1.1: Logical Form and Logical Equivalence

5. And. 5.1 The conjunction

Advanced Topics in LP and FP

Predicate Logic. Andreas Klappenecker

5. Use a truth table to determine whether the two statements are equivalent. Let t be a tautology and c be a contradiction.

FORMAL PROOFS DONU ARAPURA

A Little Deductive Logic

Manual of Logical Style

Logical forms and substitution instances. Philosophy and Logic Unit 2, Section 2.1

Overview. Knowledge-Based Agents. Introduction. COMP219: Artificial Intelligence. Lecture 19: Logic for KR

At least one of us is a knave. What are A and B?

Natural Deduction for Propositional Logic

1.1 Statements and Compound Statements

Propositional Logic Arguments (5A) Young W. Lim 2/23/17

n Empty Set:, or { }, subset of all sets n Cardinality: V = {a, e, i, o, u}, so V = 5 n Subset: A B, all elements in A are in B

Introduction to Metalogic

MAI0203 Lecture 7: Inference and Predicate Calculus

Chapter 1, Part I: Propositional Logic. With Question/Answer Animations

Tautologies, Contradictions, and Contingencies

Chapter 2: The Logic of Compound Statements

A Little Deductive Logic

ANS: If you are in Kwangju then you are in South Korea but not in Seoul.

3/29/2017. Logic. Propositions and logical operations. Main concepts: propositions truth values propositional variables logical operations

First-Degree Entailment

Today s Lecture 2/25/10. Truth Tables Continued Introduction to Proofs (the implicational rules of inference)

2/2/2018. CS 103 Discrete Structures. Chapter 1. Propositional Logic. Chapter 1.1. Propositional Logic

PHI Propositional Logic Lecture 2. Truth Tables

Artificial Intelligence

3 The Semantics of the Propositional Calculus

Artificial Intelligence. Propositional Logic. Copyright 2011 Dieter Fensel and Florian Fischer

Logical Agents. September 14, 2004

Propositional Logic 1

Chapter 1, Logic and Proofs (3) 1.6. Rules of Inference

Inference Methods In Propositional Logic

Discrete Structures of Computer Science Propositional Logic III Rules of Inference

Description Logics. Foundations of Propositional Logic. franconi. Enrico Franconi

Propositional Logic: Part II - Syntax & Proofs 0-0

Midterm: Sample 3. ECS20 (Fall 2017) 1) Using truth tables, establish for each of the two propositions below if it is a tautology, a contradiction

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning

Deductive Systems. Lecture - 3

CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter p. 1/33

Box. Turn in your e xam to Kathy Stackhouse in Chem 303 by noon on Thursday, March 30.

Propositional Logic: Methods of Proof (Part II)

Artificial Intelligence Knowledge Representation I

Chapter 1 Elementary Logic

Language of Propositional Logic

Logic and Proofs. (A brief summary)

Intelligent Systems. Propositional Logic. Dieter Fensel and Dumitru Roman. Copyright 2008 STI INNSBRUCK

Transcription:

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!