Discrete Math by R.S. Chang, Dept. CSIE, NDHU1 Fundamentals of Logic 1. What is a valid argument or proof? 2. Study system of logic 3. In proving theorems.

Slides:



Advertisements
Similar presentations
Chapter 2 Fundamentals of Logic Dept of Information management National Central University Yen-Liang Chen.
Advertisements

CS128 – Discrete Mathematics for Computer Science
Chapter 1 The Logic of Compound Statements. Section 1.2 – 1.3 (Modus Tollens) Conditional and Valid & Invalid Arguments.
Logic 3 Tautological Implications and Tautological Equivalences
Discrete Mathematics Lecture 1 Logic of Compound Statements Harper Langston New York University.
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
Propositional Logic. Negation Given a proposition p, negation of p is the ‘not’ of p.
Discrete Mathematics Math 6A Instructor: M. Welling.
Introduction to Logic Logical Form: general rules
Fall 2002CMSC Discrete Structures1 Let’s proceed to… Mathematical Reasoning.
Adapted from Discrete Math
Propositions and Truth Tables
Chapter 3 Section 4 – Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
Chapter 2 – Fundamentals of Logic. Outline Basic Connectives and Truth Tables Logical Equivalence: The Laws of Logic Ligical Implication: Rules of Inference.
CSCI 115 Chapter 2 Logic. CSCI 115 §2.1 Propositions and Logical Operations.
Discrete Mathematics and Its Applications
Mathematical Structures A collection of objects with operations defined on them and the accompanying properties form a mathematical structure or system.
1 Logic Logic is a discipline that studies the principles and methods used in correct reasoning It includes: A formal language for expressing statements.
Chapter 1: The Foundations: Logic and Proofs
Review I Rosen , 3.1 Know your definitions!
Chap. 2 Fundamentals of Logic. Proposition Proposition (or statement): an declarative sentence that is either true or false, but not both. e.g. –Margret.
Chapter 5 – Logic CSNB 143 Discrete Mathematical Structures.
Discrete Mathematics CS 2610 August 24, Agenda Last class Introduction to predicates and quantifiers This class Nested quantifiers Proofs.
Chapter 1 Logic Section 1-1 Statements Open your book to page 1 and read the section titled “To the Student” Now turn to page 3 where we will read the.
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
COS 150 Discrete Structures Assoc. Prof. Svetla Boytcheva Fall semester 2014.
2.3Logical Implication: Rules of Inference From the notion of a valid argument, we begin a formal study of what we shall mean by an argument and when such.
Lecture Propositional Equivalences. Compound Propositions Compound propositions are made by combining existing propositions using logical operators.
1 CMSC 250 Discrete Structures CMSC 250 Lecture 1.
Reading: Chapter 4 (44-59) from the text book
CS 381 DISCRETE STRUCTURES Gongjun Yan Aug 25, November 2015Introduction & Propositional Logic 1.
Fundamentals of Logic 1. What is a valid argument or proof? 2. Study system of logic 3. In proving theorems or solving problems, creativity and insight.
Chapter Four Proofs. 1. Argument Forms An argument form is a group of sentence forms such that all of its substitution instances are arguments.
Hazırlayan DISCRETE COMPUTATIONAL STRUCTURES Propositional Logic PROF. DR. YUSUF OYSAL.
Chapter 3: Introduction to Logic. Logic Main goal: use logic to analyze arguments (claims) to see if they are valid or invalid. This is useful for math.
1 Introduction to Abstract Mathematics Expressions (Propositional formulas or forms) Instructor: Hayk Melikya
Section 1.2: Propositional Equivalences In the process of reasoning, we often replace a known statement with an equivalent statement that more closely.
Chapter 2 Logic 2.1 Statements 2.2 The Negation of a Statement 2.3 The Disjunction and Conjunction of Statements 2.4 The Implication 2.5 More on Implications.
Chapter 2 Symbolic Logic. Section 2-1 Truth, Equivalence and Implication.
CSNB143 – Discrete Structure Topic 4 – Logic. Learning Outcomes Students should be able to define statement. Students should be able to identify connectives.
Chapter 2 Fundamentals of Logic 1. What is a valid argument or proof?
Mathematics for Comter I Lecture 2: Logic (1) Basic definitions Logical operators Translating English sentences.
Week 4 - Friday.  What did we talk about last time?  Floor and ceiling  Proof by contradiction.
Mathematics for Comter I Lecture 3: Logic (2) Propositional Equivalences Predicates and Quantifiers.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 01: Boolean Logic Sections 1.1 and 1.2 Jarek Rossignac.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Discrete Mathematical Structures: Theory and Applications 1 Logic: Learning Objectives  Learn about statements (propositions)  Learn how to use logical.
Chapter 1 Logic and proofs
Chapter 1 Propositional Logic
2. The Logic of Compound Statements Summary
Chapter 2 Fundamentals of Mathematical Logic
CSE15 Discrete Mathematics 01/23/17
Discrete Mathematics Lecture 1 Logic of Compound Statements
CSNB 143 Discrete Mathematical Structures
Discrete Mathematics Logic.
COMP 1380 Discrete Structures I Thompson Rivers University
(CSC 102) Discrete Structures Lecture 2.
Principles of Computing – UFCFA3-30-1
CS100: Discrete structures
Information Technology Department
CHAPTER 1: LOGICS AND PROOF
CS201: Data Structures and Discrete Mathematics I
Applied Discrete Mathematics Week 1: Logic
Discrete Mathematics and Its Applications Kenneth H
Discrete Mathematics Logic.
Foundations of Discrete Mathematics
COMP 1380 Discrete Structures I Thompson Rivers University
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
1.3 Propositional Equivalences
CS201: Data Structures and Discrete Mathematics I
Presentation transcript:

Discrete Math by R.S. Chang, Dept. CSIE, NDHU1 Fundamentals of Logic 1. What is a valid argument or proof? 2. Study system of logic 3. In proving theorems or solving problems, creativity and insight are needed, which cannot be taught Chapter 1

Discrete Math by R.S. Chang, Dept. CSIE, NDHU2 Chapter 1. Fundamentals of Logic 1.1 Basic connectives and truth tables statements (propositions): declarative sentences that are either true or false--but not both. E.g., Margaret Mitchell wrote Gone with the Wind. 2+3=5 Kuala Lumpur is a capital city of Malaysia not statements: What a beautiful morning! Get up and do your exercises.

Discrete Math by R.S. Chang, Dept. CSIE, NDHU3 Chapter 1. Fundamentals of Logic ä = 7 ä X + 1 = 5 ä ä Go away! ä TSK1223 is course code for discrete math ä I wear a red shirt ä = 4 Proposition with truth value (F) Not a proposition Proposition with truth value (T) Proposition with truth value (F) Proposition with truth value (T) Exercise:

Discrete Math by R.S. Chang, Dept. CSIE, NDHU4 Chapter 1. Fundamentals of Logic 1.1 Basic connectives and truth tables primitive and compound statements combined from primitive statements by logical connectives or by negation ( ) p: Margaret Mitchell wrote Gone with the Wind. q: 2+3=5 r: Kuala Lumpur is a capital city of Malaysia The preceding statements represented by letters p, q, r are considered to be primitive statements. There is no way to break them down into anything simpler

Discrete Math by R.S. Chang, Dept. CSIE, NDHU5 Chapter 1. Fundamentals of Logic logical connectives: (a) conjunction (AND): (b) disjunction(inclusive OR): (c) exclusive or: (d) implication: (if p then q) (e) biconditional: (p if and only if q, or p iff q)

Discrete Math by R.S. Chang, Dept. CSIE, NDHU6 Let p and q be propositions. The conjunction of p and q is denoted by p ^ q, which is read “p and q” True only both p and q are true and false otherwise. E.g.,: x : I am a women y : I have one daughter I am a women and I have one daughter Conjunction(AND): p  q Chapter 1. Fundamentals of Logic

Discrete Math by R.S. Chang, Dept. CSIE, NDHU7 7 Disjunction(inclusive OR): p  q ä Disjunction of p and q, is denoted by p v q which is read “p or q”. ä or is used in inclusive way – The proposition is false only when both p and q are false, otherwise it is true. ä The exclusive or is denoted by p v q. ä The compound proposition is true only p or q is true but not both are true or false. p : I am a girl q : I am a boy

Discrete Math by R.S. Chang, Dept. CSIE, NDHU8 8 ä We say “p implies q” ä p → q ä Alternatively ä If p, then q ä p is sufficient for q ä p is a sufficient condition for q ä q is necessary for p ä q is necessary condition for p ä p only if q Implication: p  q (if p then q)

Discrete Math by R.S. Chang, Dept. CSIE, NDHU : Logical Form p → q ä The proposition p is called hypothesis of the implication whereas q is called the conclusion. ä This compound proposition does not need any causal relationship between the statements for the implication to be true. ä Example: y : I go to school everyday. q : I score A y → q “If I go to school everyday then I score A” Implication:(continue)

Discrete Math by R.S. Chang, Dept. CSIE, NDHU10 ä Is denoted by p ↔ q or p iff q ä ↔ : which is read “if and only if” ä p ↔ q  (p → q) ^ (q → p) ä Example: y : I go to school everyday. q : I score A y ↔ q I go to school everyday if and only if I score A Biconditional: p  q (p if only if q, or p iff q)

Discrete Math by R.S. Chang, Dept. CSIE, NDHU11 Chapter 1. Fundamentals of Logic 1.1 Basic connectives and truth tables "The number x is an integer." is not a statement because its truth value cannot be determined until a numerical value is assigned for x.

Discrete Math by R.S. Chang, Dept. CSIE, NDHU12 Chapter 1. Fundamentals of Logic 1.1 Basic connectives and truth tables Truth Tables p q

Discrete Math by R.S. Chang, Dept. CSIE, NDHU13 Chapter 1. Fundamentals of Logic Question Find the truth table for the statement

Discrete Math by R.S. Chang, Dept. CSIE, NDHU14 Chapter 1. Fundamentals of Logic 2.1 Basic connectives and truth tables Ex. 2.1s: Phyllis goes out for a walk. t: The moon is out. u: It is snowing. If the moon is out and it is not snowing, then Phyllis goes out for a walk. If it is snowing and the moon is not out, then Phyllis will not go out for a walk. If it is not the case that Phyllis goes out for a walk if and only if it is snowing or the moon is out

Discrete Math by R.S. Chang, Dept. CSIE, NDHU15 Chapter 1. Fundamentals of Logic 1.1 Basic connectives and truth tables Def A compound statement is called a tautology(T 0 ) if it is true for all truth value assignments for its component statements. If a compound statement is false for all such assignments, then it is called a contradiction(F 0 ). : tautology : contradiction

Discrete Math by R.S. Chang, Dept. CSIE, NDHU16 Chapter 1. Fundamentals of Logic 1.1 Basic connectives and truth tables an argument: premisesconclusion If any one ofis false, then no matter what truth value q has, the implication is true. Consequently, if we start with the premises --each with truth value 1--and find that under these circumstances q also has value 1, then the implication is a tautology and we have a valid argument.

Discrete Math by R.S. Chang, Dept. CSIE, NDHU17 Chapter 1. Fundamentals of Logic 1.2 Logical Equivalence: The Laws of Logic Ex pq Def 2.2. logically equivalent

Discrete Math by R.S. Chang, Dept. CSIE, NDHU18 Chapter 1. Fundamentals of Logic 1.2 Logical Equivalence: The Laws of Logic logically equivalent We can eliminate the connectivesand from compound statements. (and,or,not) is a complete set.

Discrete Math by R.S. Chang, Dept. CSIE, NDHU19 Chapter 1. Fundamentals of Logic 1.2 Logical Equivalence: The Laws of Logic Ex 2.8. DeMorgan's Laws p and q can be any compound statements.

Discrete Math by R.S. Chang, Dept. CSIE, NDHU20 Chapter 1. Fundamentals of Logic 1.2 Logical Equivalence: The Laws of Logic Law of Double Negation Demorgan's Laws Commutative Laws Associative Laws

Discrete Math by R.S. Chang, Dept. CSIE, NDHU21 Chapter 1. Fundamentals of Logic 2.2 Logical Equivalence: The Laws of Logic Distributive Law Idempotent Law Identity Law Inverse Law Domination Law Absorption Law

Discrete Math by R.S. Chang, Dept. CSIE, NDHU22 Chapter 1. Fundamentals of Logic 1.2 Logical Equivalence: The Laws of Logic All the laws, aside from the Law of Double Negation, all fall naturally into pairs. Def. 1.3 Let s be a statement. If s contains no logical connectives other than and, then the dual of s, denoted s d, is the statement obtained from s by replacing each occurrence of and by and, respectively, and each occurrence of T 0 and F 0 by F 0 and T 0, respectively. Eg. The dual of is

Discrete Math by R.S. Chang, Dept. CSIE, NDHU23 Chapter 1. Fundamentals of Logic 1.2 Logical Equivalence: The Laws of Logic Theorem 1.1 (The Principle of Duality) Let s and t be statements. If, then. Ex. 2.10is a tautology. Replace each occurrence of p by is also a tautology. First Substitution Rule (replace each p by another statement q)

Discrete Math by R.S. Chang, Dept. CSIE, NDHU24 Chapter 1. Fundamentals of Logic 1.2 Logical Equivalence: The Laws of Logic Second Substitution Rule Ex. 1.11Then, because Ex Negate and simplify the compound statement

Discrete Math by R.S. Chang, Dept. CSIE, NDHU25 Chapter 1. Fundamentals of Logic 1.2 Logical Equivalence: The Laws of Logic Ex What is the negation of "If Joan goes to Lake George, then Mary will pay for Joan's shopping spree."? Because The negation is "Joan goes to Lake George, but (or and) Mary does not pay for Joan's shopping spree."

Discrete Math by R.S. Chang, Dept. CSIE, NDHU26 Chapter 2. Fundamentals of Logic 1.2 Logical Equivalence: The Laws of Logic Ex pq contrapositive of converse inverse

Discrete Math by R.S. Chang, Dept. CSIE, NDHU27 Chapter 1. Fundamentals of Logic 1.2 Logical Equivalence: The Laws of Logic simplification of compound statement Ex Demorgan's Law Law of Double Negation Distributive Law Inverse Law and Identity Law

Discrete Math by R.S. Chang, Dept. CSIE, NDHU28 Chapter 1. Fundamentals of Logic 1.3 Logical Implication: Rules of Inference an argument: premises conclusion is a valid argument is a tautology

Discrete Math by R.S. Chang, Dept. CSIE, NDHU29 Chapter 1. Fundamentals of Logic 1.3 Logical Implication: Rules of Inference Ex statements: p: Roger studies. q: Roger plays tennis. r: Roger passes discrete mathematics. premises: p 1 : If Roger studies, then he will pass discrete math. p 2 : If Roger doesn't play tennis, then he'll study. p 3 : Roger failed discrete mathematics. Determine whether the argumentis valid. which is a tautology, the original argument is true

Discrete Math by R.S. Chang, Dept. CSIE, NDHU30 Chapter 1. Fundamentals of Logic 1.3 Logical Implication: Rules of Inference p r s Ex a tautology deduced or inferred from the two premises

Discrete Math by R.S. Chang, Dept. CSIE, NDHU31 Chapter 1. Fundamentals of Logic 1.3 Logical Implication: Rules of Inference Def If p, q are any arbitrary statements such that is a tautology, then we say that p logically implies q and we to denote this situation.write meansis a tautology. meansis a tautology.

Discrete Math by R.S. Chang, Dept. CSIE, NDHU32 Chapter 1. Fundamentals of Logic 1.3 Logical Implication: Rules of Inference Rule of inference: use to validate or invalidate a logical implication without resorting to truth table (which will be prohibitively large if the number of variables are large) Ex 2.22 Modus Ponens (the method of affirming) or the Rule of Detachment

Discrete Math by R.S. Chang, Dept. CSIE, NDHU33 Chapter 1. Fundamentals of Logic 1.3 Logical Implication: Rules of Inference Example 1.23 Law of the Syllogism Ex 1.25

Discrete Math by R.S. Chang, Dept. CSIE, NDHU34 Chapter 2. Fundamentals of Logic 2.3 Logical Implication: Rules of Inference Ex Modus Tollens (method of denying) example:

Discrete Math by R.S. Chang, Dept. CSIE, NDHU35 Chapter 2. Fundamentals of Logic 2.3 Logical Implication: Rules of Inference Ex Modus Tollens (method of denying) example: another reasoning

Discrete Math by R.S. Chang, Dept. CSIE, NDHU36 Chapter 2. Fundamentals of Logic 2.3 Logical Implication: Rules of Inference fallacy (1) If Margaret Thatcher is the president of the U.S., then she is at least 35 years old. (2) Margaret Thatcher is at least 35 years old. (3) Therefore, Margaret Thatcher is the president of the US.

Discrete Math by R.S. Chang, Dept. CSIE, NDHU37 Chapter 2. Fundamentals of Logic 2.3 Logical Implication: Rules of Inference fallacy (1) If 2+3=6, then 2+4=6. (2) 2+3 (3) Therefore,

Discrete Math by R.S. Chang, Dept. CSIE, NDHU38 Chapter 2. Fundamentals of Logic 2.3 Logical Implication: Rules of Inference Ex 2.26 Rule of Conjunction Ex Rule of Disjunctive Syllogism

Discrete Math by R.S. Chang, Dept. CSIE, NDHU39 Chapter 2. Fundamentals of Logic 2.3 Logical Implication: Rules of Inference Ex Rule of Contradiction Proof by Contradiction To prove we prove

Discrete Math by R.S. Chang, Dept. CSIE, NDHU40 Chapter 2. Fundamentals of Logic 2.3 Logical Implication: Rules of Inference Ex. 2.29

Discrete Math by R.S. Chang, Dept. CSIE, NDHU41 Chapter 2. Fundamentals of Logic 2.3 Logical Implication: Rules of Inference Ex p, t q r, s u No systematic way to prove except by truth table (2 n ).

Discrete Math by R.S. Chang, Dept. CSIE, NDHU42 Chapter 2. Fundamentals of Logic 2.3 Logical Implication: Rules of Inference Ex 2.32 Proof by Contradiction q r F0F0

Discrete Math by R.S. Chang, Dept. CSIE, NDHU43 Chapter 2. Fundamentals of Logic 2.3 Logical Implication: Rules of Inference reasoning

Discrete Math by R.S. Chang, Dept. CSIE, NDHU44 Chapter 2. Fundamentals of Logic 2.3 Logical Implication: Rules of Inference Ex 2.33 u, s r p

Discrete Math by R.S. Chang, Dept. CSIE, NDHU45 Chapter 2. Fundamentals of Logic 2.3 Logical Implication: Rules of Inference How to prove that an argument is invalid? Just find a counterexample (of assignments) for it ! Ex 2.34 Show the following to be invalid. 0 1 s=0,t=1 p=1 r=1 q=0

Discrete Math by R.S. Chang, Dept. CSIE, NDHU46 Chapter 2. Fundamentals of Logic 2.4 The Use of Quantifiers Def. 2.5 A declarative sentence is an open statement if (1) it contains one or more variables, and (2) it is not a statement, but (3) it becomes a statement when the variables in it are replaced by certain allowable choices. examples: The number x+2 is an even integer. x=y, x>y, x<y,... universe

Discrete Math by R.S. Chang, Dept. CSIE, NDHU47 Chapter 2. Fundamentals of Logic 2.4 The Use of Quantifiers notations:p(x): The number x+2 is an even integer. q(x,y): The numbers y+2, x-y, and x+2y are even integers. p(5): FALSE,: TRUE, q(4,2): TRUE p(6): TRUE, : FALSE, q(3,4): FALSE For some x, p(x) is true. For some x,y, q(x,y) is true. For some x, is true. For some x,y, is true. Therefore,

Discrete Math by R.S. Chang, Dept. CSIE, NDHU48 Chapter 2. Fundamentals of Logic 2.4 The Use of Quantifiers existential quantifier: For some x: universal quantifier: For all x: x in p(x): free variable x in : bound variable is either true or false.

Discrete Math by R.S. Chang, Dept. CSIE, NDHU49 Chapter 2. Fundamentals of Logic 2.4 The Use of Quantifiers Ex 2.36 universe: real numbers

Discrete Math by R.S. Chang, Dept. CSIE, NDHU50

Discrete Math by R.S. Chang, Dept. CSIE, NDHU51

Discrete Math by R.S. Chang, Dept. CSIE, NDHU52 Chapter 2. Fundamentals of Logic 2.4 The Use of Quantifiers Def. 2.6 Let p(x) and q(x) be open statements. The open statements are called logically equivalent

Discrete Math by R.S. Chang, Dept. CSIE, NDHU53 Chapter 2. Fundamentals of Logic 2.4 The Use of Quantifiers Ex Universe: all integers thenis false butis true Therefore, but for any p(x), q(x) and universe

Discrete Math by R.S. Chang, Dept. CSIE, NDHU54 Chapter 2. Fundamentals of Logic 2.4 The Use of Quantifiers For a prescribed universe and any open statements p(x), q(x): Note this!

Discrete Math by R.S. Chang, Dept. CSIE, NDHU55 Chapter 2. Fundamentals of Logic 2.4 The Use of Quantifiers How do we negate quantified statements that involve a single variable?

Discrete Math by R.S. Chang, Dept. CSIE, NDHU56 Chapter 2. Fundamentals of Logic 2.4 The Use of Quantifiers Ex p(x): x is odd. q(x): x 2 -1 is even. Negate(If x is odd, then x 2 -1 is even.) There exists an integer x such that x is odd and x 2 -1 is odd. (a false statement, the original is true)