Chapter 3 Introduction to Logic © 2008 Pearson Addison-Wesley.

Slides:



Advertisements
Similar presentations
Artificial Intelligence
Advertisements

Chapter 3 Introduction to Logic © 2008 Pearson Addison-Wesley.
3.5 – Analyzing Arguments with Euler Diagrams
CS128 – Discrete Mathematics for Computer Science
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
SEVENTH EDITION and EXPANDED SEVENTH EDITION
Statements and Quantifiers
Chapter 3 Introduction to Logic © 2008 Pearson Addison-Wesley. All rights reserved.
Chapter 2: The Logic of Compound Statements 2.1 Logical Forms and Equivalence 12.1 Logical Forms and Equivalences Logic is a science of the necessary laws.
Chapter 3 Section 5 - Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
Chapter 3 Introduction to Logic © 2008 Pearson Addison-Wesley. All rights reserved.
Adapted from Discrete Math
Chapter 3 Introduction to Logic © 2008 Pearson Addison-Wesley. All rights reserved.
3.2 – Truth Tables and Equivalent Statements
Chapter 3 – Introduction to Logic The initial motivation for the study of logic was to learn to distinguish good arguments from bad arguments. Logic is.
1.1 Sets and Logic Set – a collection of objects. Set brackets {} are used to enclose the elements of a set. Example: {1, 2, 5, 9} Elements – objects inside.
Chapter 3 Section 4 – Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
3.6 Analyzing Arguments with Truth Tables
Discrete Maths 2. Propositional Logic Objective
Chapter 3 – Introduction to Logic
BY: MISS FARAH ADIBAH ADNAN IMK. CHAPTER OUTLINE: PART III 1.3 ELEMENTARY LOGIC INTRODUCTION PROPOSITION COMPOUND STATEMENTS LOGICAL.
Chapter 3 Introduction to Logic © 2008 Pearson Addison-Wesley. All rights reserved.
Chapter 3 Introduction to Logic © 2008 Pearson Addison-Wesley. All rights reserved.
Chapter 2: The Logic of Compound Statements 2.2 Conditional Statements
Lecture 4. CONDITIONAL STATEMENTS: Consider the statement: "If you earn an A in Math, then I'll buy you a computer." This statement is made up of two.
1 CMSC 250 Discrete Structures CMSC 250 Lecture 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 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.
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.
 2012 Pearson Education, Inc. Slide Chapter 3 Introduction to Logic.
 2012 Pearson Education, Inc. Slide Chapter 3 Introduction to Logic.
Chapter 2 Fundamentals of Logic 1. What is a valid argument or proof?
 2012 Pearson Education, Inc. Slide Chapter 3 Introduction to Logic.
3.3 – The Conditional A conditional statement is a compound statement that uses the connective if…then. The conditional is written with an arrow, so “if.
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.
Logic and Truth Tables Winter 2012 COMP 1380 Discrete Structures I Computing Science Thompson Rivers University.
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.
Chapter 1 Logic and proofs
Chapter 1 Propositional Logic
Introduction to Logic © 2008 Pearson Addison-Wesley.
2. The Logic of Compound Statements Summary
Discrete Mathematics Logic.
Truth Tables and Equivalent Statements
Chapter 3: Introduction to Logic
COMP 1380 Discrete Structures I Thompson Rivers University
The Conditional And Circuits
Chapter 3 Introduction to Logic 2012 Pearson Education, Inc.
Chapter 3 Introduction to Logic 2012 Pearson Education, Inc.
Chapter 8 Logic Topics
Chapter 3 Introduction to Logic 2012 Pearson Education, Inc.
2 Chapter Introduction to Logic and Sets
Chapter 3 Introduction to Logic © 2008 Pearson Addison-Wesley.
CS201: Data Structures and Discrete Mathematics I
Chapter 3 Introduction to Logic © 2008 Pearson Addison-Wesley.
Chapter 3 Introduction to Logic 2012 Pearson Education, Inc.
Chapter 3 Introduction to Logic © 2008 Pearson Addison-Wesley.
Chapter 3 Introduction to Logic 2012 Pearson Education, Inc.
(1.4) An Introduction to Logic
Chapter 3 Introduction to Logic 2012 Pearson Education, Inc.
1 Chapter An Introduction to Problem Solving
Discrete Mathematics and Its Applications Kenneth H
Chapter 3 Introduction to Logic 2012 Pearson Education, Inc.
Discrete Mathematics Logic.
1 Chapter An Introduction to Problem Solving
Chapter 3 Introduction to Logic © 2008 Pearson Addison-Wesley.
COMP 1380 Discrete Structures I Thompson Rivers University
Chapter 3 Introduction to Logic © 2008 Pearson Addison-Wesley.
Chapter 3 Introduction to Logic © 2008 Pearson Addison-Wesley.
CS201: Data Structures and Discrete Mathematics I
Presentation transcript:

Chapter 3 Introduction to Logic © 2008 Pearson Addison-Wesley. All rights reserved

Chapter 3: Introduction to Logic 3.1 Statements and Quantifiers 3.2 Truth Tables and Equivalent Statements 3.3 The Conditional and Circuits 3.4 More on the Conditional 3.5 Analyzing Arguments with Euler Diagrams 3.6 Analyzing Arguments with Truth Tables © 2008 Pearson Addison-Wesley. All rights reserved

Section 3-1 Chapter 1 Statements and Quantifiers © 2008 Pearson Addison-Wesley. All rights reserved

Statements and Qualifiers Negations Symbols Quantifiers Sets of Numbers © 2008 Pearson Addison-Wesley. All rights reserved

© 2008 Pearson Addison-Wesley. All rights reserved Statements A statement is defined as a declarative sentence that is either true or false, but not both simultaneously. © 2008 Pearson Addison-Wesley. All rights reserved

© 2008 Pearson Addison-Wesley. All rights reserved Compound Statements A compound statement may be formed by combining two or more statements. The statements making up the compound statement are called the component statements. Various connectives such as and, or, not, and if…then, can be used in forming compound statements. © 2008 Pearson Addison-Wesley. All rights reserved

Example: Compound Statements Decide whether each statement is compound. a) If Amanda said it, then it must be true. b) The gun was made by Smith and Wesson. © 2008 Pearson Addison-Wesley. All rights reserved

© 2008 Pearson Addison-Wesley. All rights reserved Negations The sentence “Max has a valuable card” is a statement; the negation of this statement is “Max does not have a valuable card.” The negation of a true statement is false and the negation of a false statement is true. © 2008 Pearson Addison-Wesley. All rights reserved

© 2008 Pearson Addison-Wesley. All rights reserved Inequality Symbols Use the following inequality symbols for the next example. Symbolism Meaning a is less than b a is greater than b a is less than or equal to b a is greater than or equal to b © 2008 Pearson Addison-Wesley. All rights reserved

Example: Forming Negations Give a negation of each inequality. Do not use a slash symbol. © 2008 Pearson Addison-Wesley. All rights reserved

© 2008 Pearson Addison-Wesley. All rights reserved Symbols To simplify work with logic, we use symbols. Statements are represented with letters, such as p, q, or r, while several symbols for connectives are shown below. Connective Symbol Type of Statement and Conjunction or Disjunction not Negation © 2008 Pearson Addison-Wesley. All rights reserved

Example: Translating from Symbols to Words Let p represent “It is raining,” and let q represent “It is March.” Write each symbolic statement in words. © 2008 Pearson Addison-Wesley. All rights reserved

© 2008 Pearson Addison-Wesley. All rights reserved Quantifiers The words all, each, every, and no(ne) are called universal quantifiers, while words and phrases such as some, there exists, and (for) at least one are called existential quantifiers. Quantifiers are used extensively in mathematics to indicate how many cases of a particular situation exist. © 2008 Pearson Addison-Wesley. All rights reserved

Negations of Quantified Statements All do. Some do not. Some do. None do. © 2008 Pearson Addison-Wesley. All rights reserved

Example: Forming Negations of Quantified Statements Form the negation of each statement. Some cats have fleas. Some cats do not have fleas. No cats have fleas. © 2008 Pearson Addison-Wesley. All rights reserved

© 2008 Pearson Addison-Wesley. All rights reserved Sets of Numbers Natural (counting) {1, 2, 3, 4, …} Whole numbers {0, 1, 2, 3, 4, …} Integers {…,–3, –2, –1, 0, 1, 2, 3, …} Rational numbers May be written as a terminating decimal, like 0.25, or a repeating decimal like 0.333… Irrational {x | x is not expressible as a quotient of integers} Decimal representations never terminate and never repeat. Real numbers {x | x can be expressed as a decimal} © 2008 Pearson Addison-Wesley. All rights reserved

Example: Deciding Whether the Statements are True or False Decide whether each of the following statements about sets of numbers is true or false. a) Every integer is a natural number. There exists a whole number that is not a natural number. © 2008 Pearson Addison-Wesley. All rights reserved

Section 3.1: Statements and Quantifiers 1. Form the negation of “none do.” a) All do b) Some do c) All do not © 2008 Pearson Addison-Wesley. All rights reserved

Section 3.1: Statements and Quantifiers Decide whether or not the following statement is a compound statement. “Jim is a good friend.” a) Yes b) No © 2008 Pearson Addison-Wesley. All rights reserved

Section 3-2 Chapter 1 Truth Tables and Equivalent Statements © 2008 Pearson Addison-Wesley. All rights reserved

Truth Tables and Equivalent Statements Conjunctions Disjunctions Negations Mathematical Statements Truth Tables Alternative Method for Constructing Truth Tables Equivalent Statements and De Morgan’s Laws © 2008 Pearson Addison-Wesley. All rights reserved

© 2008 Pearson Addison-Wesley. All rights reserved Conjunctions The truth values of component statements are used to find the truth values of compound statements. The truth values of the conjunction p and q, symbolized are given in the truth table on the next slide. The connective and implies “both.” © 2008 Pearson Addison-Wesley. All rights reserved

Conjunction Truth Table p and q p q T T T T F F F T F F © 2008 Pearson Addison-Wesley. All rights reserved

Example: Finding the Truth Value of a Conjunction Let p represent the statement 4 > 1, q represent the statement 12 < 9 find the truth of © 2008 Pearson Addison-Wesley. All rights reserved

© 2008 Pearson Addison-Wesley. All rights reserved Disjunctions The truth values of the disjunction p or q, symbolized are given in the truth table on the next slide. The connective or implies “either.” © 2008 Pearson Addison-Wesley. All rights reserved

© 2008 Pearson Addison-Wesley. All rights reserved Disjunctions p or q p q T T T T F F T F F F © 2008 Pearson Addison-Wesley. All rights reserved

Example: Finding the Truth Value of a Disjunction Let p represent the statement 4 > 1, q represent the statement 12 < 9 find the truth of © 2008 Pearson Addison-Wesley. All rights reserved

© 2008 Pearson Addison-Wesley. All rights reserved Negation The truth values of the negation of p, symbolized are given in the truth table below. not p p T F © 2008 Pearson Addison-Wesley. All rights reserved

Example: Mathematical Statements Let p represent the statement 4 > 1, q represent the statement 12 < 9, and r represent 0 < 1. Decide whether each statement is true or false. © 2008 Pearson Addison-Wesley. All rights reserved

© 2008 Pearson Addison-Wesley. All rights reserved Truth Tables Use the following standard format for listing the possible truth values in compound statements involving two component statements. p q Compound Statement T T T F F T F F © 2008 Pearson Addison-Wesley. All rights reserved

Example: Constructing a Truth Table Construct the truth table for © 2008 Pearson Addison-Wesley. All rights reserved

Number of Rows in a Truth Table A logical statement having n component statements will have 2n rows in its truth table. © 2008 Pearson Addison-Wesley. All rights reserved

Alternative Method for Constructing Truth Tables After making several truth tables, some people prefer a shortcut method where not every step is written out. © 2008 Pearson Addison-Wesley. All rights reserved

Equivalent Statements Two statements are equivalent if they have the same truth value in every possible situation. © 2008 Pearson Addison-Wesley. All rights reserved

Example: Equivalent Statements Are the following statements equivalent? © 2008 Pearson Addison-Wesley. All rights reserved

© 2008 Pearson Addison-Wesley. All rights reserved De Morgan’s Laws For any statements p and q, © 2008 Pearson Addison-Wesley. All rights reserved

Example: Applying De Morgan’s Laws Find a negation of each statement by applying De Morgan’s Law. a) I made an A or I made a B. b) She won’t try and he will succeed. © 2008 Pearson Addison-Wesley. All rights reserved

Section 3.2: Truth Tables and Equivalent Statements 1. If q is a true statement, then is a) True b) False © 2008 Pearson Addison-Wesley. All rights reserved

Section 3.2: Truth Tables and Equivalent Statements 2. A logical statement with 3 component statements will have how many rows in its truth table? a) 2 b) 4 c) 8 d) 16 © 2008 Pearson Addison-Wesley. All rights reserved

Section 3-3 Chapter 1 The Conditional and Circuits © 2008 Pearson Addison-Wesley. All rights reserved

The Conditional and Circuits Conditionals Negation of a Conditional Circuits © 2008 Pearson Addison-Wesley. All rights reserved

© 2008 Pearson Addison-Wesley. All rights reserved Conditionals A conditional statement is a compound statement that uses the connective if…then. The conditional is written with an arrow, so “if p then q” is symbolized We read the above as “p implies q” or “if p then q.” The statement p is the antecedent, while q is the consequent. © 2008 Pearson Addison-Wesley. All rights reserved

Truth Table for The Conditional, If p, then q p q T T T T F F F T F F © 2008 Pearson Addison-Wesley. All rights reserved

Special Characteristics of Conditional Statements is false only when the antecedent is true and the consequent is false. If the antecedent is false, then is automatically true. If the consequent is true, then is automatically true. © 2008 Pearson Addison-Wesley. All rights reserved

Example: Determining Whether a Conditional Is True or False Decide whether each statement is True or False (T represents a true statement, F a false statement). © 2008 Pearson Addison-Wesley. All rights reserved

© 2008 Pearson Addison-Wesley. All rights reserved Tautology A statement that is always true, no matter what the truth values of the components, is called a tautology. They may be checked by forming truth tables. © 2008 Pearson Addison-Wesley. All rights reserved

Negation of a Conditional The negation of © 2008 Pearson Addison-Wesley. All rights reserved

Writing a Conditional as an “or” Statement © 2008 Pearson Addison-Wesley. All rights reserved

Example: Determining Negations Determine the negation of each statement. a) If you ask him, he will come. b) All dogs love bones. © 2008 Pearson Addison-Wesley. All rights reserved

© 2008 Pearson Addison-Wesley. All rights reserved Circuits Logic can be used to design electrical circuits. p p q Series circuit q Parallel circuit © 2008 Pearson Addison-Wesley. All rights reserved

Equivalent Statements Used to Simplify Circuits © 2008 Pearson Addison-Wesley. All rights reserved

Equivalent Statements Used to Simplify Circuits If T represents any true statement and F represents any false statement, then © 2008 Pearson Addison-Wesley. All rights reserved

Example: Drawing a Circuit for a Conditional Statement Draw a circuit for © 2008 Pearson Addison-Wesley. All rights reserved

Section 3.3: The Conditional and Circuits 1. If q is a true statement and p is a false statement, which of the following is false? © 2008 Pearson Addison-Wesley. All rights reserved

Section 3.3: The Conditional and Circuits 2. is equivalent to © 2008 Pearson Addison-Wesley. All rights reserved

Section 3-4 Chapter 1 More on the Conditional © 2008 Pearson Addison-Wesley. All rights reserved

More on the Conditional Converse, Inverse, and Contrapositive Alternative Forms of “If p, then q” Biconditionals Summary of Truth Tables © 2008 Pearson Addison-Wesley. All rights reserved

Converse, Inverse, and Contrapositive Conditional Statement If p, then q Converse If q, then p Inverse If not p, then not q Contrapositive If not q, then not p © 2008 Pearson Addison-Wesley. All rights reserved

Example: Determining Related Conditional Statements Given the conditional statement If I live in Wisconsin, then I shovel snow, determine each of the following: a) the converse b) the inverse c) the contrapositive © 2008 Pearson Addison-Wesley. All rights reserved

© 2008 Pearson Addison-Wesley. All rights reserved Equivalences A conditional statement and its contrapositive are equivalent, and the converse and inverse are equivalent. © 2008 Pearson Addison-Wesley. All rights reserved

Alternative Forms of “If p, then q” The conditional can be translated in any of the following ways. If p, then q. p is sufficient for q. If p, q. q is necessary for p. p implies q. All p are q. p only if q. q if p. © 2008 Pearson Addison-Wesley. All rights reserved

Example: Rewording Conditional Statements Write each statement in the form “if p, then q.” a) You’ll be sorry if I go. b) Today is Sunday only if yesterday was Saturday. c) All Chemists wear lab coats. © 2008 Pearson Addison-Wesley. All rights reserved

© 2008 Pearson Addison-Wesley. All rights reserved Biconditionals The compound statement p if and only if q (often abbreviated p iff q) is called a biconditional. It is symbolized , and is interpreted as the conjunction of the two conditionals © 2008 Pearson Addison-Wesley. All rights reserved

Truth Table for the Biconditional p if and only if q p q T T T T F F F T F F © 2008 Pearson Addison-Wesley. All rights reserved

Example: Determining Whether Biconditionals are True or False Determine whether each biconditional statement is true or false. a) 5 + 2 = 7 if and only if 3 + 2 = 5. b) 3 = 7 if and only if 4 = 3 + 1. c) 7 + 6 = 12 if and only if 9 + 7 = 11. © 2008 Pearson Addison-Wesley. All rights reserved

Summary of Truth Tables 1. The negation of a statement has truth value opposite of the statement. The conjunction is true only when both statements are true. The disjunction is false only when both statements are false. The biconditional is true only when both statements have the same truth value. © 2008 Pearson Addison-Wesley. All rights reserved

© 2008 Pearson Addison-Wesley. All rights reserved Section 3.4: More on the Conditional 1. Given which of the following is the inverse? © 2008 Pearson Addison-Wesley. All rights reserved

Section 3.4: More on the Conditional 2. Given which of the following is the converse? © 2008 Pearson Addison-Wesley. All rights reserved

Section 3-5 Chapter 1 Analyzing Arguments with Euler Diagrams © 2008 Pearson Addison-Wesley. All rights reserved

Analyzing Arguments with Euler Diagrams Logical Arguments Arguments with Universal Quantifiers Arguments with Existential Quantifiers © 2008 Pearson Addison-Wesley. All rights reserved

© 2008 Pearson Addison-Wesley. All rights reserved Logical Arguments A logical argument is made up of premises (assumptions, laws, rules, widely held ideas, or observations) and a conclusion. Together, the premises and the conclusion make up the argument. © 2008 Pearson Addison-Wesley. All rights reserved

Valid and Invalid Arguments An argument is valid if the fact that all the premises are true forces the conclusion to be true. An argument that is not valid is invalid. It is called a fallacy. © 2008 Pearson Addison-Wesley. All rights reserved

Arguments with Universal Quantifiers Several techniques can be used to check the validity of an argument. One of these is a visual technique based on Euler Diagrams. © 2008 Pearson Addison-Wesley. All rights reserved

© 2008 Pearson Addison-Wesley. All rights reserved Example: Using an Euler Diagram to Determine Validity (Universal Quantifier) Is the following argument valid? All cats are animals. Figgy is a cat. Figgy is an animal. © 2008 Pearson Addison-Wesley. All rights reserved

© 2008 Pearson Addison-Wesley. All rights reserved Example: Using an Euler Diagram to Determine Validity (Universal Quantifier) Is the following argument valid? All sunny days are hot. Today is not hot Today is not sunny. © 2008 Pearson Addison-Wesley. All rights reserved

© 2008 Pearson Addison-Wesley. All rights reserved Example: Using an Euler Diagram to Determine Validity (Universal Quantifier) Is the following argument valid? All cars have wheels. That vehicle has wheels. That vehicle is a car. © 2008 Pearson Addison-Wesley. All rights reserved

© 2008 Pearson Addison-Wesley. All rights reserved Example: Using an Euler Diagram to Determine Validity (Existential Quantifier) Is the following argument valid? Some students drink coffee. I am a student . I drink coffee . © 2008 Pearson Addison-Wesley. All rights reserved

Section 3.5: Analyzing Arguments with Euler Diagrams Are “Valid” and “true” the same? Yes No © 2008 Pearson Addison-Wesley. All rights reserved

Section 3.5: Analyzing Arguments with Euler Diagrams 2. Premises are Assumptions Rules Laws All of the above © 2008 Pearson Addison-Wesley. All rights reserved

Section 3-6 Chapter 1 Analyzing Arguments with Truth Tables © 2008 Pearson Addison-Wesley. All rights reserved

Analyzing Arguments with Truth Tables Truth Tables (Two Premises) Valid and Invalid Argument Forms Truth Tables (More Than Two Premises) Arguments of Lewis Carroll © 2008 Pearson Addison-Wesley. All rights reserved

© 2008 Pearson Addison-Wesley. All rights reserved Truth Tables In section 3.5 Euler diagrams were used to test the validity of arguments. These work well with simple arguments but may not work well with more complex ones. If the words “all,” “some,” or “no” are not present, it may be better to use a truth table than an Euler diagram to test validity. © 2008 Pearson Addison-Wesley. All rights reserved

Testing the Validity of an Argument with a Truth Table Step 1 Assign a letter to represent each component statement in the argument. Step 2 Express each premise and the conclusion symbolically. Continued on the next slide… © 2008 Pearson Addison-Wesley. All rights reserved

Testing the Validity of an Argument with a Truth Table Step 3 Form the symbolic statement of the entire argument by writing the conjunction of all the premises as the antecedent of a conditional statement, and the conclusion of the argument as the consequent. Step 4 Complete the truth table for the conditional statement formed in Step 3. If it is a tautology, then the argument is valid; otherwise it is invalid. © 2008 Pearson Addison-Wesley. All rights reserved

Example: Truth Tables (Two Premises) Is the following argument valid? If the door is open, then I must close it. The door is open. I must close it. © 2008 Pearson Addison-Wesley. All rights reserved

© 2008 Pearson Addison-Wesley. All rights reserved Valid Argument Forms Modus Ponens Modus Tollens Disjunctive Syllogism Reasoning by Transitivity © 2008 Pearson Addison-Wesley. All rights reserved

Invalid Argument Forms (Fallacies) Fallacy of the Converse Fallacy of the Inverse © 2008 Pearson Addison-Wesley. All rights reserved

Example: Truth Tables (More Than Two Premises) Determine whether the argument is valid or invalid. If Pat goes skiing, then Amy stays at home. If Amy does not stay at home, then Cade will play video games. Cade will not play video games. Therefore, Pat does not go skiing. © 2008 Pearson Addison-Wesley. All rights reserved

Example: Arguments of Lewis Carroll Supply a conclusion that yields a valid argument for the following premises. Babies are illogical. Nobody is despised who can manage a crocodile. Illogical persons are despised. Let p be “you are a baby,” let q be “you are logical,” let r be “you can manage a crocodile,” and let s be “you are despised.” © 2008 Pearson Addison-Wesley. All rights reserved

Section 3.6: Analyzing Arguments with Truth Tables When testing the validity of an argument and the words “all,” “some,” and “no” are not present you would probably use a) an Euler diagram. b) a truth table. © 2008 Pearson Addison-Wesley. All rights reserved

Section 3.6: Analyzing Arguments with Truth Tables 2. Are the conditional and converse equivalent? a) Yes No © 2008 Pearson Addison-Wesley. All rights reserved