© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Ch.1 (Part 1): The Foundations: Logic and Proofs Introduction.

Slides:



Advertisements
Similar presentations
1. Propositions A proposition is a declarative sentence that is either true or false. Examples of propositions: The Moon is made of green cheese. Trenton.
Advertisements

© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 1: (Part 2): The Foundations: Logic and Proofs.
CSE 311 Foundations of Computing I Spring 2013 Lecture 1 Propositional Logic.
The Foundation: Logic Conditional Statements Muhammad Arief download dari
CSE 311 Foundations of Computing I Autumn 2011 Lecture 1 Propositional Logic.
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
1 Section 1.1 Logic. 2 Proposition Statement that is either true or false –can’t be both –in English, must contain a form of “to be” Examples: –Cate Sheller.
Logic - Elementary Discrete Math1 Discrete Mathematics Jim Skon Mount Vernon Nazarene College Chapter 1.
CSE115/ENGR160 Discrete Mathematics 01/17/12 Ming-Hsuan Yang UC Merced 1.
Adapted from Discrete Math
Chapter 1, Part I: Propositional Logic With Question/Answer Animations.
The Foundations: Logic and Proofs
Intro to Discrete Structures
Propositions and Truth Tables
The Foundations: Logic and Proofs
2009/9 1 Logic and Proofs §1.1 Introduction §1.2 Propositional Equivalences §1.3 Predicates and Quantifiers §1.4 Nested Quantifiers §1.5~7 Methods of Proofs.
Discrete Maths 2. Propositional Logic Objective
CSE 311 Foundations of Computing I Autumn 2012 Lecture 1 Propositional Logic 1.
Discrete Mathematics and Its Applications
COS 150 Discrete Structures Assoc. Prof. Svetla Boytcheva Fall semester 2014.
Mathematical Structures A collection of objects with operations defined on them and the accompanying properties form a mathematical structure or system.
CS 285- Discrete Mathematics Lecture 2. Section 1.1 Propositional Logic Propositions Conditional Statements Truth Tables of Compound Propositions Translating.
Chapter 1: The Foundations: Logic and Proofs
Applications of discrete mathematics: Formal Languages (computer languages) Compiler Design Data Structures Computability Automata Theory Algorithm Design.
CSci 2011 Textbook ^Discrete Mathematics and Its Applications,  Rosen  6th Edition  McGraw Hill  2006.
Discrete Structures – CS Text Discrete Mathematics and Its Applications Kenneth H. Rosen (7 th Edition) Chapter 1 The Foundations: Logic and Proofs.
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.
CS 381 DISCRETE STRUCTURES Gongjun Yan Aug 25, November 2015Introduction & Propositional Logic 1.
LOGIC Lesson 2.1. What is an on-the-spot Quiz  This quiz is defined by me.  While I’m having my lectures, you have to be alert.  Because there are.
Lecture 9 Conditional Statements CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Thinking Mathematically
Propositional Logic ITCS 2175 (Rosen Section 1.1, 1.2)
Chapter 1: The Foundations: Logic and Proofs
Section 1.1. Section Summary Propositions Connectives Negation Conjunction Disjunction Implication; contrapositive, inverse, converse Biconditional Truth.
Logic The Lost Art of Argument. Logic - Review Proposition – A statement that is either true or false (but not both) Conjunction – And Disjunction – Or.
Mathematics for Comter I Lecture 2: Logic (1) Basic definitions Logical operators Translating English sentences.
LECTURE 1. Disrete mathematics and its application by rosen 7 th edition THE FOUNDATIONS: LOGIC AND PROOFS 1.1 PROPOSITIONAL LOGIC.
رياضيات متقطعة لعلوم الحاسب MATH 226. Text books: (Discrete Mathematics and its applications) Kenneth H. Rosen, seventh Edition, 2012, McGraw- Hill.
Section 1.1. Propositions A proposition is a declarative sentence that is either true or false. Examples of propositions: a) The Moon is made of green.
Conditional statement or implication IF p then q is denoted p ⇒ q p is the antecedent or hypothesis q is the consequent or conclusion ⇒ means IF…THEN.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 01: Boolean Logic Sections 1.1 and 1.2 Jarek Rossignac.
CS104 The Foundations: Logic and Proof 1. 2 What is Discrete Structure?  Discrete Objects  Separated from each other (Opposite of continuous)  e.g.,
Chapter 1. Chapter Summary  Propositional Logic  The Language of Propositions (1.1)  Logical Equivalences (1.3)  Predicate Logic  The Language of.
Logical Operators (Connectives) We will examine the following logical operators: Negation (NOT,  ) Negation (NOT,  ) Conjunction (AND,  ) Conjunction.
Simple Logic.
Discrete Structures for Computer Science Presented By: Andrew F. Conn Slides adapted from: Adam J. Lee Lecture #1: Introduction, Propositional Logic August.
Chapter 1 Propositional Logic
2. The Logic of Compound Statements Summary
CSNB 143 Discrete Mathematical Structures
Niu Kun Discrete Mathematics Chapter 1 The Foundations: Logic and Proof, Sets, and Functions Niu Kun 离散数学.
Logic.
COT 3100, Spr Applications of Discrete Structures
(CSC 102) Discrete Structures Lecture 2.
Ch.1 (Part 1): The Foundations: Logic and Proofs
The Foundations: Logic and Proofs
Principles of Computing – UFCFA3-30-1
Information Technology Department
CS 220: Discrete Structures and their Applications
Chapter 3 Introduction to Logic 2012 Pearson Education, Inc.
TRUTH TABLES.
Applied Discrete Mathematics Week 1: Logic
TRUTH TABLES continued.
Discrete Mathematics and Its Applications Kenneth H
CSE 321 Discrete Structures
MAT 3100 Introduction to Proof
The Foundations: Logic and Proofs
Truth Tables for the Conditional and Biconditional
The Foundations: Logic and Proofs
Presentation transcript:

© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Ch.1 (Part 1): The Foundations: Logic and Proofs Introduction Introduction Propositional Logic (Section 1.1) Propositional Logic (Section 1.1)

Ch.1 (part 1): The foundations: Logic & Proof, Sets, and Functions 1 Introduction: Areas in which discrete mathematics concepts are present Formal Languages (computer languages) Formal Languages (computer languages) Compiler Design Compiler Design Data Structures Data Structures Computability Computability Automata Theory Automata Theory Algorithm Design Algorithm Design Relational Database Theory Relational Database Theory Complexity Theory (counting) Complexity Theory (counting)

Ch.1 (part 1): The foundations: Logic & Proof, Sets, and Functions 2 Example (counting): The Traveling Salesman Problem The Traveling Salesman Problem Important in circuit design circuit design many other CS problems many other CS problems______________________Given: n cities c 1, c 2,..., c n n cities c 1, c 2,..., c n distance between city i and j, d ij distance between city i and j, d ij Find the shortest tour.

Ch.1 (part 1): The foundations: Logic & Proof, Sets, and Functions 3 Assume a very fast PC: 1 flop = 1 nanosecond = sec. = 1,000,000,000 ops/sec = 1 GHz. A tour requires n-1 additions. How many different tours? Choose the first city n ways, the second city n-1 ways, the third city n-2 ways, etc. # tours = n (n-1) (n-2)....(2) (1) = n! (Combinations)

Ch.1 (part 1): The foundations: Logic & Proof, Sets, and Functions 4 Total number of additions = n(n-1)! (Rule of Product) If n=8, T(n) = 8 7! = 40,320 flops < 1/3 second. HOWEVER If n=50, T(n) = 50 49! = = seconds = minutes = hours = days = weeks = years....a long time. You ’ ll be an old person (dead) before it ’ s finished! There are some problems for which we do not know if efficient algorithms exist to solve them!

Ch.1 (part 1): The foundations: Logic & Proof, Sets, and Functions 5 Section 1.1: Propositional Logic proposition : true = T (or 1) or false = F (or 0) (binary logic) ‘ the moon is made of green cheese ’ ‘ go to town! ’ X - imperative ‘ What time is it? ’ X – interrogative propositional variables: P, Q, R, S,... New Propositions from old: calculus of propositions - relate new propositions to old using TRUTH TABLES

Ch.1 (part 1): The foundations: Logic & Proof, Sets, and Functions 6 Logical operators: unary, binary Logical operators: unary, binary Unary: Unary: Negation Negation Binary Binary Conjunction Conjunction Disjunction Disjunction Exclusive OR Exclusive OR Implication Implication Biconditional Biconditional

Ch.1 (part 1): The foundations: Logic & Proof, Sets, and Functions 7 Unary Unary Negation Negation ‘ not ’ Symbol:  Example: P: I am going to town  P: I am not going to town;  P: I am not going to town; It is not the case that I am going to town; It is not the case that I am going to town; I ain ’ t goin ’. I ain ’ t goin ’. P  P P P P F(0)T(1)T(1)F(0) Truth Table

Ch.1 (part 1): The foundations: Logic & Proof, Sets, and Functions 8 Binary Binary Conjunction: ‘ and ’ Conjunction: ‘ and ’ Symbol:  Symbol:  Example: P - ‘ I am going to town ’ Q - ‘ It is going to rain ’ Q - ‘ It is going to rain ’ P  Q: ‘ I am going to town and it is going to rain. ’ P  Q: ‘ I am going to town and it is going to rain. ’ Note: Both P and Q must be true!!!!! PQ P  Q Truth Table

Ch.1 (part 1): The foundations: Logic & Proof, Sets, and Functions 9 Binary Binary Disjunction: inclusive ‘or’ Disjunction: inclusive ‘or’ Symbol:  Symbol:  Example: P - ‘I am going to town’ Q - ‘It is going to rain’ Q - ‘It is going to rain’ P  Q: ‘I am going to town or it is going to rain.’ Note: Only one of P and Q must be true. Hence, the inclusive nature. PQ P P  Q Truth Table:

Ch.1 (part 1): The foundations: Logic & Proof, Sets, and Functions 10 Binary Binary Exclusive OR: Symbol  Example: Exclusive OR: Symbol  Example: P - ‘ I am going to town ’ Q - ‘ It is going to rain ’ P  Q: ‘ Either I am going to town or it is going to rain. ’ Note: Only one of P and Q must be true. PQ P  Q Truth Table

Ch.1 (part 1): The foundations: Logic & Proof, Sets, and Functions 11 Binary Binary Implication: ‘ If...then... ’ Implication: ‘ If...then... ’ Symbol:  Symbol: Example: P - ‘ I am going to town ’ Q - ‘ It is going to rain ’ P  Q: ‘ If I am going to town then it is going to rain. ’ PQ P  Q Truth Table

Ch.1 (part 1): The foundations: Logic & Proof, Sets, and Functions 12 Implication (cont.) Implication (cont.) Equivalent forms: If P, then Q P implies Q If P, Q P only if Q P is a sufficient condition for Q Q if P Q whenever P Q is a necessary condition for P Note: The implication is false only when P is true and Q is false!

Ch.1 (part 1): The foundations: Logic & Proof, Sets, and Functions 13 There is no causality implied here! ‘ If the moon is made of green cheese then I have more money than Bill Gates ’ (T) ‘ If the moon is made of green cheese then I ’ m on welfare ’ (T) ‘ If 1+1=3 then your grandma wears combat boots ’ (T) ‘ If I ’ m wealthy then the moon is not made of green cheese. ’ (T) ‘ If I ’ m not wealthy then the moon is not made of green cheese. ’ (T)

Ch.1 (part 1): The foundations: Logic & Proof, Sets, and Functions 14Terminology: P = premise, hypothesis, antecedent Q = conclusion, consequence More terminology: Q  P is the CONVERSE of P  Q  Q   P is the CONTRAPOSITIVE of P  Q

Ch.1 (part 1): The foundations: Logic & Proof, Sets, and Functions 15Example: Find the converse and contrapositive of the following statement: R: ‘ Raining tomorrow is a sufficient condition for my not going to town. ’

Ch.1 (part 1): The foundations: Logic & Proof, Sets, and Functions 16 Step 1: Assign propositional variables to component propositions P: It will rain tomorrow Q: I will not go to town Step 2: Symbolize the assertion R: P  Q Step 3: Symbolize the converse Q  P Step 4: Convert the symbols back into words ‘ If I don ’ t go to town then it will rain tomorrow ’ or ‘ Raining tomorrow is a necessary condition for my not going to town. ’ or ‘ My not going to town is a sufficient condition for it raining tomorrow. ’

Ch.1 (part 1): The foundations: Logic & Proof, Sets, and Functions 17 Binary Binary Biconditional: ‘ if and only if ’, ‘ iff ’ Biconditional: ‘ if and only if ’, ‘ iff ’ Symbol:  Example: P - ‘ I am going to town ’, Q - ‘ It is going to rain ’ P  Q: ‘ I am going to town if and only if it is going to rain. ’ Note: Both P and Q must have the same truth value. Imprecision of the natural language: Imprecision of the natural language: ‘ If you finish your meal then you can have dessert ’ PQ P  Q Truth Table

Ch.1 (part 1): The foundations: Logic & Proof, Sets, and Functions 18 Breaking assertions into component propositions - look for the logical operators! Breaking assertions into component propositions - look for the logical operators! Example: ‘ If I go to Harry ’ s or go to the country I will not go shopping. ’ P: I go to Harry ’ s Q: I go to the country R: I will go shopping If......P......or.....Q.....then....not.. … R (P V Q)   R

Ch.1 (part 1): The foundations: Logic & Proof, Sets, and Functions 19 Constructing a truth table: - one column for each propositional variable - one for the compound proposition - count in binary - n propositional variables = 2 n rows You may find it easier to include columns for propositions which themselves are component propositions.

Ch.1 (part 1): The foundations: Logic & Proof, Sets, and Functions 20PQR (P V Q)   R Truth Table