Applied Discrete Mathematics Week 1: Logic

Slides:



Advertisements
Similar presentations
Discrete Mathematics University of Jazeera College of Information Technology & Design Khulood Ghazal Mathematical Reasoning Methods of Proof.
Advertisements

Announcements Grading policy No Quiz next week Midterm next week (Th. May 13). The correct answer to the quiz.
1 Section 1.5 Rules of Inference. 2 Definitions Theorem: a statement that can be shown to be true Proof: demonstration of truth of theorem –consists of.
February 26, 2015Applied Discrete Mathematics Week 5: Mathematical Reasoning 1 Addition of Integers Example: Add a = (1110) 2 and b = (1011) 2. a 0 + b.
Chapter 3. Mathematical Reasoning 3.1 Methods of proof A theorem is a statement that can be shown to be true. A proof is to demonstrate that a theorem.
CS128 – Discrete Mathematics for Computer Science
Logic 3 Tautological Implications and Tautological Equivalences
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
CSE115/ENGR160 Discrete Mathematics 01/31/12 Ming-Hsuan Yang UC Merced 1.
Discrete Mathematics and its Applications
Fall 2002CMSC Discrete Structures1 Let’s proceed to… Mathematical Reasoning.
Adapted from Discrete Math
Welcome to CS/MATH 320L – Applied Discrete Mathematics Spring 2015
February 25, 2002Applied Discrete Mathematics Week 5: Mathematical Reasoning 1 Addition of Integers How do we (humans) add two integers? Example: 7583.
Spring 2003CMSC Discrete Structures1 Let’s get started with... Logic !
Chap. 2 Fundamentals of Logic. Proposition Proposition (or statement): an declarative sentence that is either true or false, but not both. e.g. –Margret.
March 3, 2015Applied Discrete Mathematics Week 5: Mathematical Reasoning 1Arguments Just like a rule of inference, an argument consists of one or more.
Fall 2002CMSC Discrete Structures1 Let’s get started with... Logic !
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
Discrete Structures (DS)
1 CMSC 250 Discrete Structures CMSC 250 Lecture 1.
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications Kenneth H. Rosen (5 th Edition) Chapter 3 The Foundations: Logic and Proof,
Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 11 The Foundations: Logic and Proofs Rules of inference.
CSci 2011 Discrete Mathematics Lecture 4 CSci 2011.
Spring 2003CMSC Discrete Structures1 Let’s get started with... Logic !
3/6/20161 Let’s get started with... Logic !. 3/6/20162 Logic Crucial for mathematical reasoningCrucial for mathematical reasoning Used for designing electronic.
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.
March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 1 Back to “Serious” Topics… Knowledge Representation.
Chapter 1 Logic and proofs
Discrete Mathematical
2. The Logic of Compound Statements Summary
CSE15 Discrete Mathematics 02/01/17
Advanced Algorithms Analysis and Design
Applied Discrete Mathematics Week 5: Mathematical Reasoning
DISCRETE MATHEMATICS CHAPTER I.
Discrete Mathematics Lecture 1 Logic of Compound Statements
CSNB 143 Discrete Mathematical Structures
CSE15 Discrete Mathematics 01/30/17
Knowledge Representation and Reasoning
Discrete Mathematics Logic.
Applied Discrete Mathematics Week 5: Mathematical Reasoning
COMP 1380 Discrete Structures I Thompson Rivers University
(CSC 102) Discrete Structures Lecture 2.
CPCS222 Discrete Structures I
Proposition & Predicates
Proof Techniques.
Rules of Inference Section 1.6.
CMSC Discrete Structures
Module #10: Proof Strategies
CSCI 3310 Mathematical Foundation of Computer Science
Information Technology Department
7.1 Rules of Implication I Natural Deduction is a method for deriving the conclusion of valid arguments expressed in the symbolism of propositional logic.
Chapter 1 The Foundations: Logic and Proof, Sets, and Functions
CS201: Data Structures and Discrete Mathematics I
Mathematical Reasoning
Methods of Proof. Methods of Proof Definitions A theorem is a valid logical assertion which can be proved using Axioms: statements which are given.
CMSC Discrete Structures
CS 220: Discrete Structures and their Applications
Back to “Serious” Topics…
Computer Security: Art and Science, 2nd Edition
Discrete Mathematics Logic.
Information Technology Department SKN-SITS,Lonavala.
Module #10: Proof Strategies
Foundations of Discrete Mathematics
COMP 1380 Discrete Structures I Thompson Rivers University
Valid and Invalid Arguments
Mathematical Reasoning
CS201: Data Structures and Discrete Mathematics I
Rules of inference Section 1.5 Monday, December 02, 2019
Presentation transcript:

Applied Discrete Mathematics Week 1: Logic Crucial for mathematical reasoning Used for designing electronic circuitry Logic is a system based on propositions. A proposition is a statement that is either true or false (not both). We say that the truth value of a proposition is either true (T) or false (F). Corresponds to 1 and 0 in digital circuits September 6, 2018 Applied Discrete Mathematics Week 1: Logic

The Statement/Proposition Game “Elephants are bigger than mice.” Is this a statement? yes Is this a proposition? yes What is the truth value of the proposition? true September 6, 2018 Applied Discrete Mathematics Week 1: Logic

The Statement/Proposition Game “520 < 111” Is this a statement? yes Is this a proposition? yes What is the truth value of the proposition? false September 6, 2018 Applied Discrete Mathematics Week 1: Logic

The Statement/Proposition Game “y > 5” Is this a statement? yes Is this a proposition? no Its truth value depends on the value of y, but this value is not specified. We call this type of statement a propositional function or open sentence. September 6, 2018 Applied Discrete Mathematics Week 1: Logic

The Statement/Proposition Game “Today is January 23 and 99 < 5.” Is this a statement? yes Is this a proposition? yes What is the truth value of the proposition? false September 6, 2018 Applied Discrete Mathematics Week 1: Logic

The Statement/Proposition Game “Please do not fall asleep.” Is this a statement? no It’s a request. Is this a proposition? no Only statements can be propositions. September 6, 2018 Applied Discrete Mathematics Week 1: Logic

The Statement/Proposition Game “If elephants were red, they could hide in cherry trees.” Is this a statement? yes Is this a proposition? yes What is the truth value of the proposition? probably false September 6, 2018 Applied Discrete Mathematics Week 1: Logic

The Statement/Proposition Game “x < y if and only if y > x.” Is this a statement? yes Is this a proposition? yes … because its truth value does not depend on specific values of x and y. What is the truth value of the proposition? true September 6, 2018 Applied Discrete Mathematics Week 1: Logic

Combining Propositions As we have seen in the previous examples, one or more propositions can be combined to form a single compound proposition. We formalize this by denoting propositions with letters such as p, q, r, s, and introducing several logical operators. September 6, 2018 Applied Discrete Mathematics Week 1: Logic

Logical Operators (Connectives) We will examine the following logical operators: Negation (NOT) Conjunction (AND) Disjunction (OR) Exclusive or (XOR) Implication (if – then) Biconditional (if and only if) Truth tables can be used to show how these operators can combine propositions to compound propositions. September 6, 2018 Applied Discrete Mathematics Week 1: Logic

Negation (NOT) Unary Operator, Symbol:  P P true false September 6, 2018 Applied Discrete Mathematics Week 1: Logic

Conjunction (AND) Binary Operator, Symbol:  P Q PQ true false September 6, 2018 Applied Discrete Mathematics Week 1: Logic

Disjunction (OR) Binary Operator, Symbol:  P Q PQ true false September 6, 2018 Applied Discrete Mathematics Week 1: Logic

Exclusive Or (XOR) Binary Operator, Symbol:  P Q PQ true false September 6, 2018 Applied Discrete Mathematics Week 1: Logic

Implication (if - then) Binary Operator, Symbol:  P Q PQ true false September 6, 2018 Applied Discrete Mathematics Week 1: Logic

Biconditional (if and only if) Binary Operator, Symbol:  P Q PQ true false September 6, 2018 Applied Discrete Mathematics Week 1: Logic

Statements and Operators Statements and operators can be combined in any way to form new statements. P Q P Q (P)(Q) true false September 6, 2018 Applied Discrete Mathematics Week 1: Logic

Statements and Operations Statements and operators can be combined in any way to form new statements. P Q PQ  (PQ) (P)(Q) true false September 6, 2018 Applied Discrete Mathematics Week 1: Logic

Equivalent Statements P Q (PQ) (P)(Q) (PQ)(P)(Q) true false The statements (PQ) and (P)(Q) are logically equivalent, because (PQ)(P)(Q) is always true. September 6, 2018 Applied Discrete Mathematics Week 1: Logic

Tautologies and Contradictions A tautology is a statement that is always true. Examples: R(R) (PQ)(P)(Q) If ST is a tautology, we write ST. If ST is a tautology, we write ST. September 6, 2018 Applied Discrete Mathematics Week 1: Logic

Tautologies and Contradictions A contradiction is a statement that is always false. Examples: R(R) ((PQ)(P)(Q)) The negation of any tautology is a contra- diction, and the negation of any contradiction is a tautology. September 6, 2018 Applied Discrete Mathematics Week 1: Logic

Mathematical Reasoning We need mathematical reasoning to determine whether a mathematical argument is correct or incorrect and construct mathematical arguments. Mathematical reasoning is not only important for conducting proofs and program verification, but also for artificial intelligence systems (drawing inferences). September 6, 2018 Applied Discrete Mathematics Week 1: Logic

Applied Discrete Mathematics Week 1: Logic Terminology An axiom is a basic assumption about mathematical structures that needs no proof. We can use a proof to demonstrate that a particular statement is true. A proof consists of a sequence of statements that form an argument. The steps that connect the statements in such a sequence are the rules of inference. Cases of incorrect reasoning are called fallacies. A theorem is a statement that can be shown to be true. September 6, 2018 Applied Discrete Mathematics Week 1: Logic

Applied Discrete Mathematics Week 1: Logic Terminology A lemma is a simple theorem used as an intermediate result in the proof of another theorem. A corollary is a proposition that follows directly from a theorem that has been proved. A conjecture is a statement whose truth value is unknown. Once it is proven, it becomes a theorem. September 6, 2018 Applied Discrete Mathematics Week 1: Logic

Applied Discrete Mathematics Week 1: Logic Rules of Inference Rules of inference provide the justification of the steps used in a proof. One important rule is called modus ponens or the law of detachment. It is based on the tautology (p(pq))  q. We write it in the following way: p p  q ____  q The two hypotheses p and p  q are written in a column, and the conclusion below a bar, where  means “therefore”. September 6, 2018 Applied Discrete Mathematics Week 1: Logic

Applied Discrete Mathematics Week 1: Logic Rules of Inference The general form of a rule of inference is: p1 p2 . pn ____  q The rule states that if p1 and p2 and … and pn are all true, then q is true as well. These rules of inference can be used in any mathematical argument and do not require any proof. September 6, 2018 Applied Discrete Mathematics Week 1: Logic

Applied Discrete Mathematics Week 1: Logic Rules of Inference q pq _____  p p _____  pq Modus tollens Addition pq qr _____  pr pq _____  p Hypothetical syllogism Simplification p q _____  pq pq p _____  q Conjunction Disjunctive syllogism September 6, 2018 Applied Discrete Mathematics Week 1: Logic

Applied Discrete Mathematics Week 1: Logic Arguments Just like a rule of inference, an argument consists of one or more hypotheses and a conclusion. We say that an argument is valid, if whenever all its hypotheses are true, its conclusion is also true. However, if any hypothesis is false, even a valid argument can lead to an incorrect conclusion. September 6, 2018 Applied Discrete Mathematics Week 1: Logic

Applied Discrete Mathematics Week 1: Logic Arguments Example: “If 101 is divisible by 3, then 1012 is divisible by 9. 101 is divisible by 3. Consequently, 1012 is divisible by 9.” Although the argument is valid, its conclusion is incorrect, because one of the hypotheses is false (“101 is divisible by 3.”). If in the above argument we replace 101 with 102, we could correctly conclude that 1022 is divisible by 9. September 6, 2018 Applied Discrete Mathematics Week 1: Logic

Applied Discrete Mathematics Week 1: Logic Arguments Which rule of inference was used in the last argument? p: “101 is divisible by 3.” q: “1012 is divisible by 9.” p pq _____  q Modus ponens Unfortunately, one of the hypotheses (p) is false. Therefore, the conclusion q is incorrect. September 6, 2018 Applied Discrete Mathematics Week 1: Logic

Applied Discrete Mathematics Week 1: Logic Arguments Another example: “If it rains today, then we will not have a barbeque today. If we do not have a barbeque today, then we will have a barbeque tomorrow. Therefore, if it rains today, then we will have a barbeque tomorrow.” This is a valid argument: If its hypotheses are true, then its conclusion is also true. September 6, 2018 Applied Discrete Mathematics Week 1: Logic

Applied Discrete Mathematics Week 1: Logic Arguments Let us formalize the previous argument: p: “It is raining today.” q: “We will not have a barbecue today.” r: “We will have a barbecue tomorrow.” So the argument is of the following form: pq qr _____  pr Hypothetical syllogism September 6, 2018 Applied Discrete Mathematics Week 1: Logic

Applied Discrete Mathematics Week 1: Logic Arguments Another example: Gary is either intelligent or a good actor. If Gary is intelligent, then he can count from 1 to 10. Gary can only count from 1 to 2. Therefore, Gary is a good actor. i: “Gary is intelligent.” a: “Gary is a good actor.” c: “Gary can count from 1 to 10.” September 6, 2018 Applied Discrete Mathematics Week 1: Logic

Applied Discrete Mathematics Week 1: Logic Arguments i: “Gary is intelligent.” a: “Gary is a good actor.” c: “Gary can count from 1 to 10.” Step 1: c Hypothesis Step 2: i  c Hypothesis Step 3: i Modus Tollens Steps 1 & 2 Step 4: a  i Hypothesis Step 5: a Disjunctive Syllogism Steps 3 & 4 Conclusion: a (“Gary is a good actor.”) September 6, 2018 Applied Discrete Mathematics Week 1: Logic

Applied Discrete Mathematics Week 1: Logic Arguments Yet another example: If you listen to me, you will pass CS 220. You passed CS 220. Therefore, you have listened to me. Is this argument valid? No, it assumes ((pq) q)  p. This statement is not a tautology. It is false if p is false and q is true. September 6, 2018 Applied Discrete Mathematics Week 1: Logic