Introduction Logic Inference. Discrete Mathematics Andrei Bulatov

Similar documents
Discrete Structures of Computer Science Propositional Logic III Rules of Inference

Methods of Proof. 1.6 Rules of Inference. Argument and inference 12/8/2015. CSE2023 Discrete Computational Structures

software design & management Gachon University Chulyun Kim

Rules of Inference. Arguments and Validity

Rules Build Arguments Rules Building Arguments

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

CS100: DISCRETE STRUCTURES. Lecture 5: Logic (Ch1)

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

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

2.2: Logical Equivalence: The Laws of Logic

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

PROPOSITIONAL CALCULUS

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

Intro to Logic and Proofs

CSC Discrete Math I, Spring Propositional Logic

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

KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS ) RULES OF INFERENCE. Discrete Math Team

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

The Logic of Compound Statements cont.

Sec$on Summary. Valid Arguments Inference Rules for Propositional Logic. Inference Rules for Quantified Statements. Building Arguments

CSCI-2200 FOUNDATIONS OF COMPUTER SCIENCE

Review. Propositions, propositional operators, truth tables. Logical Equivalences. Tautologies & contradictions

CS 2336 Discrete Mathematics

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

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

PHI Propositional Logic Lecture 2. Truth Tables

What is Logic? Introduction to Logic. Simple Statements. Which one is statement?

Review: Potential stumbling blocks

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.

Language of Propositional Logic

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

Discrete Mathematics Logics and Proofs. Liangfeng Zhang School of Information Science and Technology ShanghaiTech University

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

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

Advanced Topics in LP and FP

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

Logic and Inferences

Deductive Systems. Lecture - 3

Introduction Propositional Logic. Discrete Mathematics Andrei Bulatov

Knowledge Representation. Propositional logic.

Propositional Logic. Spring Propositional Logic Spring / 32

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

Inference in Propositional Logic

Solutions to Homework I (1.1)

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

Knowledge Representation. Propositional logic

1.1 Statements and Compound Statements

1 The Foundation: Logic and Proofs

THE LOGIC OF COMPOUND STATEMENTS

Propositional Logic Basics Propositional Equivalences Normal forms Boolean functions and digital circuits. Propositional Logic.

Discrete Structures of Computer Science Propositional Logic I

Boolean Algebra and Proof. Notes. Proving Propositions. Propositional Equivalences. Notes. Notes. Notes. Notes. March 5, 2012

1 The Foundation: Logic and Proofs

Section 1.2: Propositional Logic

ECOM Discrete Mathematics

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

Review. p q ~p v q Contrapositive: ~q ~p Inverse: ~p ~q Converse: q p

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

15414/614 Optional Lecture 1: Propositional Logic

Sec$on Summary. Valid Arguments Inference Rules for Propositional Logic. Inference Rules for Quantified Statements. Building Arguments

Compound Propositions

3 The Semantics of the Propositional Calculus

Review 1. Andreas Klappenecker

Propositional Calculus: Formula Simplification, Essential Laws, Normal Forms

Propositional Logic. Fall () Propositional Logic Fall / 30

Chapter 4, Logic using Propositional Calculus Handout

Proposition logic and argument. CISC2100, Spring 2017 X.Zhang

Where are my glasses?

DISCRETE MATH: LECTURE 3

Announcements. CS311H: Discrete Mathematics. Propositional Logic II. Inverse of an Implication. Converse of a Implication

A. Propositional Logic

CSCE 222 Discrete Structures for Computing. Review for Exam 1. Dr. Hyunyoung Lee !!!

Packet #1: Logic & Proofs. Applied Discrete Mathematics

Review for Midterm 1. Andreas Klappenecker

Inference Methods In Propositional Logic

Proof Tactics, Strategies and Derived Rules. CS 270 Math Foundations of CS Jeremy Johnson

CSC242: Intro to AI. Lecture 11. Tuesday, February 26, 13

8.8 Statement Forms and Material Equivalence

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

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

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

Manual of Logical Style

Predicate Logic. Andreas Klappenecker

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

Proof strategies, or, a manual of logical style

DERIVATIONS AND TRUTH TABLES

Proof Methods for Propositional Logic

Section 1.2 Propositional Equivalences. A tautology is a proposition which is always true. A contradiction is a proposition which is always false.

Unit I LOGIC AND PROOFS. B. Thilaka Applied Mathematics

ICS141: Discrete Mathematics for Computer Science I

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

What is the decimal (base 10) representation of the binary number ? Show your work and place your final answer in the box.

Section 1.1: Logical Form and Logical Equivalence

Inference Methods In Propositional Logic

Announcements. CS243: Discrete Structures. Propositional Logic II. Review. Operator Precedence. Operator Precedence, cont. Operator Precedence Example

Discrete Structures & Algorithms. Propositional Logic EECE 320 // UBC

Propositional logic II.

DISCRETE MATHEMATICS BA202

Logic and Propositional Calculus

Math 3336: Discrete Mathematics Practice Problems for Exam I

Transcription:

Introduction Logic Inference Discrete Mathematics Andrei Bulatov

Discrete Mathematics - Logic Inference 6-2 Previous Lecture Laws of logic Expressions for implication, biconditional, exclusive or Valid and invalid arguments Logic inference Rules of inference Modus Ponens Rule of Syllogism Modus Tollens Rule of Disjunctive Syllogism Rule for Proof by Cases Rule of Contradiction Rule of Simplification Rule of Amplification

Discrete Mathematics Logic Inference 6-3 Logic Inference The goal of an argument is to infer the required conclusion from given premises Formally, an argument is a sequence of statements, each of which is either a premise, or obtained from preceding statements by means of a rule of inference

Discrete Mathematics Logic Inference 6-4 Example Premises: ``It is not sunny this afternoon and it is colder than yesterday. We will go swimming only if it is sunny. If we do not go swimming, then we will take a canoe trip. If we take a canoe trip, then we will be home by sunset. Conclusion: ``We will be home by sunset. Notation: q - it is colder than yesterday r - we will go swimming p - it is sunny this afternoon s - we will take a canoe trip t - we will be home by sunset Premises: p q, r p, r s, and s t Conclusion: t

Discrete Mathematics Logic Inference 6-5 Example (cntd) We have p q, r p, r s, and s t Step Reason 1. p q premise 2. p simplification 3. r p premise 4. r modus tollens 5. r s premise 6. s modus ponens 7. s t premise 8. t modus ponens

Discrete Mathematics - Logic Inference 6-6 Logic Puzzles A prisoner must choose between two rooms each of which contains either a lady, or a tiger. If he chooses a room with a lady, he marries her, if he chooses a room with a tiger, he gets eaten by the tiger. The rooms have signs on them: I at least one of these rooms contains a lady II a tiger is in the other room It is known that either both signs are true or both are false

Discrete Mathematics - Logic Inference 6-7 Logic Puzzles (cntd) Notation: p - the first room contains a lady q - the second room contains a lady Premises: (p q) p, p (p q)

Discrete Mathematics - Logic Inference 6-8 Logic Puzzles (cntd) Argument Step Reason (p q) p, p (p q) 1. p (p q) premise 2. p p q expression for implication 3. p q idempotent law 4. (p q) p premise 5. p modus ponens 6. q rule of disjunctive syllogism to 3 and 5

Discrete Mathematics - Logic Inference 6-9 Conjunctive Normal Form A literal is a primitive statement (propositional variable) or its negation p, p, q, q A clause is a disjunction of one or more literals p q, p q r, q, s s r q A statement is said to be a Conjunctive Normal Form (CNF) if it is a conjunction of clauses p (p q) ( r p) p q ( r p) ( r q) (p q s r) ( r p) r

Discrete Mathematics - Logic Inference 6-10 CNF Theorem Theorem Every statement is logically equivalent to a certain CNF. Proof (sketch) Let Φ be a (compound) statement. Step 1. Express all logic connectives in Φ through negation, conjunction, and disjunction. Let Ψ be the obtained statement. Step 2. Using DeMorgan s laws move all the negations in Ψ to individual primitive statements. Let Θ denote the updated statement Step 3. Using distributive laws transform Θ into a CNF.

Discrete Mathematics - Logic Inference 6-11 Example Find a CNF logically equivalent to (p q) r Step 1. Step 2. ( p q) r (p q) r Step 3. (p r) ( q r)

Discrete Mathematics - Logic Inference 6-12 Rule of Resolution p q p r q r is called resolvent q r The corresponding tautology ((p q) ( p r)) (q r) ``Jasmine is skiing or it is not snowing. It is snowing or Bart is playing hockey. p - `it is snowing q - `Jasmine is skiing r - `Bart is playing hockey ``Therefore, Jasmine is skiing or Bart is playing hockey

Discrete Mathematics - Logic Inference 6-13 Computerized Logic Inference Convert the premises into CNF Convert the negation of the conclusion into CNF Consider the collection consisting of all the clauses that occur in the obtained CNFs Use the rule of resolution to obtain the empty clause ( ). If it is possible, then the argument is valid. Otherwise, it is not. Why empty clause? The only way to produce the empty clause is to apply the resolution rule to a pair of clauses of the form p and p. Therefore, the collection of clauses is contradictory. In other words, for any choice of truth values for the primitive statements, if premises are true, the conclusion cannot be false.

Discrete Mathematics - Logic Inference 6-14 Example A lady and a tiger Premises: p (p q), (p q) p Negation of the conclusion: q Clauses: p, p q, q Argument: p q premise resolvent q premise p resolvent p premise

Discrete Mathematics - Logic Inference 6-15 Homework Exercises from the Book: No. 5, 9a (page 84-85) - Prove that resolution is a valid rule of inference - Same arrangements as in the `A lady or a tiger problem. This time if a lady is in Room I, then the sign on it is true, but if a tiger is in it, then the sign is false. If a lady is in Room II, then the sign on it is false, and if a tiger is in it, then the sign is true. Signs are I both rooms contain ladies II both rooms contain ladies