ICS141: Discrete Mathematics for Computer Science I

Similar documents
Rules of Inference. Arguments and Validity

Logic and Proof. Aiichiro Nakano

Predicate Logic & Quantification

Rules Build Arguments Rules Building Arguments

Topic #3 Predicate Logic. Predicate Logic

Readings: Conjecture. Theorem. Rosen Section 1.5

ICS141: Discrete Mathematics for Computer Science I

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

PROPOSITIONAL CALCULUS

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

CSCE 222 Discrete Structures for Computing. Predicate Logic. Dr. Hyunyoung Lee. !!!!! Based on slides by Andreas Klappenecker

Review: Potential stumbling blocks

Outline. Rules of Inferences Discrete Mathematics I MATH/COSC 1056E. Example: Existence of Superman. Outline

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

CS 2336 Discrete Mathematics

Intro to Logic and Proofs

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

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

PHI Propositional Logic Lecture 2. Truth Tables

CSCI-2200 FOUNDATIONS OF COMPUTER SCIENCE

Predicate Logic. Andreas Klappenecker

Mat 243 Exam 1 Review

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

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

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

Proofs. Example of an axiom in this system: Given two distinct points, there is exactly one line that contains them.

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

Unit I LOGIC AND PROOFS. B. Thilaka Applied Mathematics

Math 3336: Discrete Mathematics Practice Problems for Exam I

Proofs. Introduction II. Notes. Notes. Notes. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Fall 2007

ECOM Discrete Mathematics

Discrete Structures for Computer Science

CS0441 Discrete Structures Recitation 3. Xiang Xiao

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

software design & management Gachon University Chulyun Kim

Logic. Logic is a discipline that studies the principles and methods used in correct reasoning. It includes:

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

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

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

First order Logic ( Predicate Logic) and Methods of Proof

Proofs: A General How To II. Rules of Inference. Rules of Inference Modus Ponens. Rules of Inference Addition. Rules of Inference Conjunction

Logic and Propositional Calculus

DISCRETE MATHEMATICS BA202

Analyzing Arguments with Truth Tables

MATH 22 INFERENCE & QUANTIFICATION. Lecture F: 9/18/2003

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

A. Propositional Logic

Discrete Structures of Computer Science Propositional Logic III Rules of Inference

1 The Foundation: Logic and Proofs

Introduction Logic Inference. Discrete Mathematics Andrei Bulatov

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

ICS141: Discrete Mathematics for Computer Science I

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.

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

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

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows.

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

1 The Foundation: Logic and Proofs

A Little Deductive Logic

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

Logic and Propositional Calculus

Do not start until you are given the green signal

Propositional Logic. Spring Propositional Logic Spring / 32

Supplementary Logic Notes CSE 321 Winter 2009

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

Where are my glasses?

A Quick Lesson on Negation

Chapter 1 Elementary Logic

Propositional Logic Not Enough

W3203 Discrete Mathema1cs. Logic and Proofs. Spring 2015 Instructor: Ilia Vovsha. hcp://

3. The Logic of Quantified Statements Summary. Aaron Tan August 2017

Steinhardt School of Culture, Education, and Human Development Department of Teaching and Learning. Mathematical Proof and Proving (MPP)

Propositional and First-Order Logic

A Little Deductive Logic

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

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

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

Math.3336: Discrete Mathematics. Nested Quantifiers/Rules of Inference

Packet #2: Set Theory & Predicate Calculus. Applied Discrete Mathematics

CSC 125 :: Final Exam May 3 & 5, 2010

UNIVERSITY OF CALICUT SCHOOL OF DISTANCE EDUCATION B Sc (MATHEMATICS) I Semester Core Course. FOUNDATIONS OF MATHEMATICS (MODULE I & ii) QUESTION BANK

Predicate Logic. Example. Statements in Predicate Logic. Some statements cannot be expressed in propositional logic, such as: Predicate Logic

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

CSI30. Chapter 1. The Foundations: Logic and Proofs Nested Quantifiers

Manual of Logical Style

EECS 1028 M: Discrete Mathematics for Engineers

Section 1.2: Propositional Logic

Section Summary. Section 1.5 9/9/2014

Formal Logic. Critical Thinking

WUCT121. Discrete Mathematics. Logic. Tutorial Exercises

2. Use quantifiers to express the associative law for multiplication of real numbers.

Agenda. Introduction to Proofs Dr Patrick Chan School of Computer Science and Engineering South China University of Technology

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

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

THE LOGIC OF COMPOUND STATEMENTS

Example. Logic. Logical Statements. Outline of logic topics. Logical Connectives. Logical Connectives

(Refer Slide Time: 02:20)

Mathacle. PSet ---- Algebra, Logic. Level Number Name: Date: I. BASICS OF PROPOSITIONAL LOGIC

2/18/14. What is logic? Proposi0onal Logic. Logic? Propositional Logic, Truth Tables, and Predicate Logic (Rosen, Sections 1.1, 1.2, 1.

Predicate Logic Thursday, January 17, 2013 Chittu Tripathy Lecture 04

Transcription:

ICS141: Discrete Mathematics for Computer Science I Dept. Information & Computer Sci., Originals slides by Dr. Baek and Dr. Still, adapted by J. Stelovsky Based on slides Dr. M. P. Frank and Dr. J.L. Gross Provided by McGraw-Hill 5-1

Lecture 5 Chapter 1. he Foundations 1.4 Nested Quantifiers 1.5 Rules of Inference 5-2

Previously 5-3

opic #3 Predicate Logic Nesting of Quantifiers Example: Let the domain of x and y be people. Let L(x,y) = x likes y (A statement with 2 free variables not a proposition) hen y L(x,y) = here is someone whom x likes. (A statement with 1 free variable x not a proposition) hen x ( y L(x,y)) = Everyone has someone whom they like. (A with free variables.) 5-4

Nested Quantifiers Nested quantifiers are quantifiers that occur within the scope of other quantifiers. he order of the quantifiers is important, unless all the quantifiers are universal quantifiers or all are existential quantifiers. 5-5

Nested Quantifiers Let the domain of x and y is R, and P(x,y): xy = 0. Find the truth value of the following propositions. x y P(x, y) x y P(x, y) x y P(x, y) x y P(x, y) (F) () () () R: set of real numbers x y P(x,y) y x P(x,y) For every x, there exists y such that x + y = 0. here exists y such that, for every x, x + y = 0. () (F) 5-6

Nested Quantifiers: Example Let the domain = {1, 2, 3}. Find an expression equivalent to x y P(x,y) where the variables are bound by substitution instead: Expand from inside out or outside in. Outside in: x y P(x,y) y P(1,y) y P(2,y) y P(3,y) [P(1,1) P(1,2) P(1,3)] [P(2,1) P(2,2) P(2,3)] [P(3,1) P(3,2) P(3,3)] 5-7

opic #3 Predicate Logic Quantifier Exercise If R(x,y)= x relies upon y, express the following in unambiguous English when the domain is all people x( y R(x,y)) = Everyone has someone to rely on. y( x R(x,y)) = x( y R(x,y)) = y( x R(x,y)) = here s a poor overburdened soul whom everyone relies upon (including himself)! here s some needy person who relies upon everybody (including himself). Everyone has someone who relies upon them. x( y R(x,y)) = Everyone relies upon everybody, (including themselves)! 5-8

Negating Nested Quantifiers Successively apply the rules for negating statements involving a single quantifier Example: Express the negation of the statement x y (P(x,y) z R(x,y,z)) so that all negation symbols immediately precede predicates. x y (P(x,y) z R(x,y,z)) x y (P(x,y) z R(x,y,z)) x y (P(x,y) z R(x,y,z)) x y ( P(x,y) z R(x,y,z)) x y ( P(x,y) z R(x,y,z)) 5-9

opic #3 Predicate Logic Equivalence Laws x y P(x,y) y x P(x,y) x y P(x,y) y x P(x,y) x (P(x) Q(x)) ( x P(x)) ( x Q(x)) x (P(x) Q(x)) ( x P(x)) ( x Q(x)) Exercise: See if you can prove these yourself. 5-10

opic #3 Predicate Logic Notational Conventions Quantifiers have higher precedence than all logical operators from propositional logic: x P(x) Q(x) ( ) Consecutive quantifiers of the same type can be combined: x y z P(x,y,z) x,y,z P(x,y,z) or even xyz P(x,y,z) 5-11

1.5 Rules of Inference An argument: a sequence of statements that end with a conclusion Some forms of argument ( valid ) never lead from correct statements to an incorrect conclusion. Some other forms of argument ( fallacies ) can lead from true statements to an incorrect conclusion. A logical argument consists of a list of (possibly compound) propositions called premises/hypotheses and a single proposition called the conclusion. Logical rules of inference: methods that depend on logic alone for deriving a new statement from a set of other statements. (emplates for constructing valid arguments.) 5-12

Valid Arguments (I) Example: A logical argument If I dance all night, then I get tired. I danced all night. herefore I got tired. Logical representation of underlying variables: p: I dance all night. q: I get tired. Logical analysis of argument: q p q premise 1 p premise 2 conclusion 5-13

Valid Arguments (II) A form of logical argument is valid if whenever every premise is true, the conclusion is also true. A form of argument that is not valid is called a fallacy. 5-14

Inference Rules: General Form An Inference Rule is A pattern establishing that if we know that a set of premise statements of certain forms are all true, then we can validly deduce that a certain related conclusion statement is true. premise 1 premise 2. conclusion means therefore 5-15

Inference Rules & Implications Each valid logical inference rule corresponds to an implication that is a tautology. premise 1 premise 2. conclusion Inference rule Corresponding tautology: ((premise 1) (premise 2) ) conclusion 5-16

Modus Ponens p Rule of Modus ponens p q (a.k.a. law of detachment) q (p (p q)) q is a tautology the mode of affirming p q p q p (p q) (p (p q)) q F F F F F F F F Notice that the first row is the only one where premises are all true 5-17

Modus Ponens: Example If hen p q : If it snows today then we will go skiing p.: It is snowing today q : We will go skiing assumed RUE is RUE If hen p q : If n is divisible by 3 then n 2 is divisible by 3 p. : n is divisible by 3 q : n 2 is divisible by 3 assumed RUE is RUE 5-18

Modus ollens If hen q Rule of Modus tollens p q p the mode of denying ( q (p q)) p is a tautology Example p q : If this jewel is really a diamond then it will scratch glass q. : he jewel doesn t scratch glass p : he jewel is not a diamond assumed RUE is RUE 5-19

More Inference Rules p Rule of Addition p q autology: p (p q) p q Rule of Simplification p p q p q autology: (p q) p Rule of Conjunction autology: [(p) (q)] p q 5-20

Examples State which rule of inference is the basis of the following arguments: It is below freezing now. herefore, it is either below freezing or raining now. It is below freezing and raining now. herefore, it is below freezing now. p: It is below freezing now. q: It is raining now. p (p q) (rule of addition) (p q) p (rule of simplification) 5-21

Hypothetical Syllogism p q Rule of Hypothetical syllogism q r autology: p r [(p q) (q r)] (p r) Example: State the rule of inference used in the argument: p q If it rains today, then we will not have a q barbecue today. If we do not have a barbecue today, then we will have a barbecue tomorrow. r herefore, if it rains today, then we will have a barbecue tomorrow. p r 5-22

Disjunctive Syllogism p q Rule of Disjunctive syllogism p q autology: [(p q) ( p)] q Example Ed s wallet is in his back pocket or it is on his desk. (p q) p q Ed s wallet is not in his back pocket. ( p) herefore, Ed s wallet is on his desk. (q) 5-23