Ch.1 (Part 1): The Foundations: Logic and Proofs

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

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
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
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Ch.1 (Part 1): The Foundations: Logic and Proofs Introduction.
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.
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.
Lecture 9 Conditional Statements CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Thinking Mathematically
1/10/ Math/CSE 1019N: Discrete Mathematics for Computer Science Winter 2007 Suprakash Datta Office: CSEB 3043 Phone:
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
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.
The Foundations: Logic and Proofs
Principles of Computing – UFCFA3-30-1
Information Technology Department
Chapter 1 The Foundations: Logic and Proof, Sets, and Functions
CS 220: Discrete Structures and their Applications
CHAPTER 1: LOGICS AND PROOF
Chapter 3 Introduction to Logic © 2008 Pearson Addison-Wesley.
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
The Foundations: Logic and Proofs
Presentation transcript:

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

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

Example (counting): The Traveling Salesman Problem Important in • circuit design • many other CS problems ______________________ Given: • n cities c1, c2, . . . , cn • distance between city i and j, dij Find the shortest tour. Ch.1 (part 1): The foundations: Logic & Proof, Sets, and Functions

A tour requires n-1 additions. How many different tours? Assume a very fast PC: 1 flop = 1 nanosecond = 10-9 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

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! = 3.04 1064 = 3.04 1055 seconds = 5.0 1053 minutes = 8.0 1051 hours = 3.0 1050 days = 4.0 1049 weeks = 7.0 1047 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

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

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

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

Binary Truth Table P Q P  Q 1 Conjunction: ‘and’ Symbol:  1 Binary Conjunction: ‘and’ Symbol:  Example: P - ‘I am going to town’ Q - ‘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!!!!! Ch.1 (part 1): The foundations: Logic & Proof, Sets, and Functions

Binary Disjunction: inclusive ‘or’ Symbol:  Example: P - ‘I am going to town’ 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. Truth Table: P Q P  Q 1 Ch.1 (part 1): The foundations: Logic & Proof, Sets, and Functions

Binary Truth Table P Q P  Q 1 Exclusive OR: Symbol  Example: 1 Binary 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. Ch.1 (part 1): The foundations: Logic & Proof, Sets, and Functions

Binary Implication: ‘If...then...’ Example: P - ‘I am going to town’ 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.’ Truth Table P Q P  Q 1 Ch.1 (part 1): The foundations: Logic & Proof, Sets, and Functions

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

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 Ch.1 (part 1): The foundations: Logic & Proof, Sets, and Functions

P = premise, hypothesis, antecedent Q = conclusion, consequence Terminology: 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

Find the converse and contrapositive of the following statement: Example: 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

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.’ ‘My not going to town is a sufficient condition for it raining tomorrow.’ Ch.1 (part 1): The foundations: Logic & Proof, Sets, and Functions

‘If you finish your meal then you can have dessert’ Truth Table P Q P  Q 1 Binary 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: ‘If you finish your meal then you can have dessert’ Ch.1 (part 1): The foundations: Logic & Proof, Sets, and Functions

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

Constructing a truth table: - one column for each propositional variable - one for the compound proposition - count in binary - n propositional variables = 2n 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

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