22C:19 Discrete Structures Logic and Proof Fall 2014 Sukumar Ghosh.

Slides:



Advertisements
Similar presentations
With examples from Number Theory
Advertisements

Discrete Math Methods of proof 1.
Introduction to Proofs
PROOF BY CONTRADICTION
The Foundations: Logic and Proofs
22C:19 Discrete Structures Logic and Proof Spring 2014 Sukumar Ghosh.
More Number Theory Proofs Rosen 1.5, 3.1. Prove or Disprove If m and n are even integers, then mn is divisible by 4. The sum of two odd integers is odd.
CSE115/ENGR160 Discrete Mathematics 02/07/12
CSE115/ENGR160 Discrete Mathematics 01/31/12 Ming-Hsuan Yang UC Merced 1.
CSE115/ENGR160 Discrete Mathematics 02/01/11
Logic: Connectives AND OR NOT P Q (P ^ Q) T F P Q (P v Q) T F P ~P T F
Introduction to Proofs ch. 1.6, pg. 87,93 Muhammad Arief download dari
CSE115/ENGR160 Discrete Mathematics 01/20/11 Ming-Hsuan Yang UC Merced 1.
Predicates and Quantifiers
CS 2210 (22C:019) Discrete Structures Logic and Proof Spring 2015 Sukumar Ghosh.
C OURSE : D ISCRETE STRUCTURE CODE : ICS 252 Lecturer: Shamiel Hashim 1 lecturer:Shamiel Hashim second semester Prepared by: amani Omer.
Methods of Proof & Proof Strategies
CSci 2011 Discrete Mathematics Lecture 3 CSci 2011.
CSCI 115 Chapter 2 Logic. CSCI 115 §2.1 Propositions and Logical Operations.
Introduction to Proofs
Introduction to Proofs
MATH 224 – Discrete Mathematics
1 Methods of Proof CS/APMA 202 Epp, chapter 3 Aaron Bloomfield.
Methods of Proof. This Lecture Now we have learnt the basics in logic. We are going to apply the logical rules in proving mathematical theorems. Direct.
CSE 311: Foundations of Computing Fall 2013 Lecture 8: More Proofs.
Section 1.8. Section Summary Proof by Cases Existence Proofs Constructive Nonconstructive Disproof by Counterexample Nonexistence Proofs Uniqueness Proofs.
Review I Rosen , 3.1 Know your definitions!
CSci 2011 Discrete Mathematics Lecture 6
1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT.
10/17/2015 Prepared by Dr.Saad Alabbad1 CS100 : Discrete Structures Proof Techniques(1) Dr.Saad Alabbad Department of Computer Science
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
1 Math/CSE 1019C: Discrete Mathematics for Computer Science Fall 2011 Suprakash Datta Office: CSEB 3043 Phone: ext
Chapter 5 Existence and Proof by contradiction
Methods of Proof Lecture 3: Sep 9. This Lecture Now we have learnt the basics in logic. We are going to apply the logical rules in proving mathematical.
First Order Logic Lecture 2: Sep 9. This Lecture Last time we talked about propositional logic, a logic on simple statements. This time we will talk about.
Chapter 2 The Logic of Quantified Statements. Section 2.1 Intro to Predicates & Quantified Statements.
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 1, Part III: Proofs With Question/Answer Animations 1.
First Order Logic Lecture 3: Sep 13 (chapter 2 of the book)
Predicates and Quantifiers Dr. Yasir Ali. 1.Predicates 2.Quantifiers a.Universal Quantifiers b.Existential Quantifiers 3.Negation of Quantifiers 4.Universal.
Method of proofs.  Consider the statements: “Humans have two eyes”  It implies the “universal quantification”  If a is a Human then a has two eyes.
Chapter 1, Part III: Proofs With Question/Answer Animations 1.
CSci 2011 Discrete Mathematics Lecture 4 CSci 2011.
CS104:Discrete Structures Chapter 2: Proof Techniques.
CSE 311: Foundations of Computing Fall 2013 Lecture 8: Proofs and Set theory.
Week 4 - Friday.  What did we talk about last time?  Floor and ceiling  Proof by contradiction.
Introduction to Proofs
1 CMSC 250 Chapter 3, Number Theory. 2 CMSC 250 Introductory number theory l A good proof should have: –a statement of what is to be proven –"Proof:"
Section 1.7. Definitions A theorem is a statement that can be shown to be true using: definitions other theorems axioms (statements which are given as.
Direct Proof and Counterexample I Lecture 11 Section 3.1 Fri, Jan 28, 2005.
1 Introduction to Abstract Mathematics Proof Methods , , ~, ,  Instructor: Hayk Melikya Purpose of Section:Most theorems in mathematics.
CSci 2011 Discrete Mathematics Lecture 5 CSci 2011.
Chapter 1, Part III: Proofs With Question/Answer Animations Copyright © McGraw-Hill Education. All rights reserved. No reproduction or distribution without.
Section 1.7. Section Summary Mathematical Proofs Forms of Theorems Direct Proofs Indirect Proofs Proof of the Contrapositive Proof by Contradiction.
Proof And Strategies Chapter 2. Lecturer: Amani Mahajoub Omer Department of Computer Science and Software Engineering Discrete Structures Definition Discrete.
Chapter 1 Logic and Proof.
Hubert Chan (Chapters 1.6, 1.7, 4.1)
The Foundations: Logic and Proofs
CS 2210:0001 Discrete Structures Logic and Proof
CSE15 Discrete Mathematics 02/01/17
Chapter 4 (Part 1): Induction & Recursion
Methods of Proof CS 202 Epp, chapter 3.
Predicate Calculus Validity
Chapter 1: The Foundations: Logic and Proofs
Hubert Chan (Chapters 1.6, 1.7, 4.1)
The Foundations: Logic and Proofs
CS 220: Discrete Structures and their Applications
First Order Logic Rosen Lecture 3: Sept 11, 12.
Direct Proof and Counterexample I
Predicates and Quantifiers
Presentation transcript:

22C:19 Discrete Structures Logic and Proof Fall 2014 Sukumar Ghosh

Predicate Logic Propositional logic has limitations. Consider this: Is x > 3 a proposition? No, it is a predicate. Call it P(x). P(4) is true, but P(1) is false. P(x) will create a proposition when x is given a value. Predicates are also known as propositional functions. Predicate logic is more powerful than propositional logic subject predicate

Predicate Logic

Examples of predicates

Quantifiers

Universal Quantifiers

Perhaps we meant all real numbers.

Universal Quantifiers

Existential Quantifiers ∃ x (x is a student in 22C:19 x has traveled abroad)

Existential Quantifiers Note that you still have to specify the domain of x. Thus, if x is Iowa, then P(x) = x+1 > x is not true.

Existential Quantifiers

Negating quantification

You

Translating into English Every student x in this class has studied Calculus. Let C(x) mean “x has studied Calculus,” and S(x) mean “x is a student in this class.”

Translating into English

Order of Quantifiers

Negating Multiple Quantifiers

More on Quantifiers ∀ x ∃ y ( x + y = 10 ) ∀ x ∀ y ( x + y = y+ x ) Negation of ∀ x P(x) is ∃ x (P(x) is false) (there is at least one x such that P(x) is false) Negation of ∃ x P(x) is ∀ x (P(x) is false) (for all x P(x) is false)

Rules of Inference p(Let p be true) p q(if p then q) q(therefore, q is true) Corresponding tautology [p ⋀ (p q)] q What is an example of this?

Other Rules of Inference [(p q) ⋀ (q r)] (p r) [(p ⋁ q) ⋀ ¬ p] q (p ⋀ q) p [(p ⋁ q) ⋀ (¬ p ⋁ r) q ⋁ r (if p is false then q holds, and if p is true then r holds) Find example of each Read page 72 of the book

Rules of Inference ¬ q(Let q be false) p  q (if p then q) ¬ p(therefore, p is false) Corresponding tautology [¬ q ⋀ (p  q)]  ¬ p What is an example of this?

Proofs To establish that something holds. Why is it important? What about proof by example, or proof by simulation, or proof by fame? Are these valid proofs?

Direct Proofs

Example. Prove that if n is odd then n 2 is odd. Let n = 2k + 1, so, n 2 = 4k 2 + 4k + 1 = 2 (2k 2 + 2k) + 1 By definition, this is odd. Uses the rules of inference

Indirect Proofs

Indirect Proof Example

Proof by Contradiction

Proof by contradiction: Example Assume that the statement of the theorem is false. Then show that something absurd will happen Example. If 3n+2 is odd then n is odd Assume that the statement is false. Then n= 2k. So 3n+2 = 3.2k + 2 = 6k+2 = 2(3k + 1). But this is even! A contradiction! This concludes the proof.

Proof by contradiction: Example

Example. Prove that square root of 2 is irrational. Assume that the proposition is false. Then square root of 2 = a/b (and a, b do not have a common factor) So, 2 = a 2 /b 2 So, a 2 = 2b 2. Therefore a 2 is even. So a = 2c So 2b 2 = 4c 2. Therefore b 2 = 2c 2. Therefore b 2 is even. This means b is even. Therefore a and b have a common factor (2) But (square root of 2 = a/b) does not imply that.

Exhaustive proof

Example 1. If n is a positive integer, and n ≤ 4, then (n+1) ≤ 3 n Prove this for n = 1, n = 2, n = 3, and n = 4, and you are done! Note. An exhaustive proof examines every possible case to establish the proof of the claim. Example 2. Every student of this class has a smartphone. Check with every student of this class to prove it.

Proof of Equivalence

Existence Proofs Constructive Proof Non-constructive Proof

Mistakes in proofs a=b So, a 2 = ab Therefore a 2 - b 2 = ab – b 2 So, (a+b).(a-b) = b.(a-b) Therefore a+b = b So, 2b = b This implies 2 = 1 What is wrong here?

Counterexample Given a predicate P, if you find a single counterexample to it, then the predicate P is false. Example (of a wrong claim) If n 2 is positive then n is positive To prove it wrong, just show that when n 2 =4, n can be -2. Once upon a time, there was a claim that if (2 n -1) divided by n produces the remainder 1, then n is an odd prime. The claim was later found to be false, when someone found a counterexample: the predicate is true for n=341, but 341 is not a prime number (11 x 31 = 341)

Proofs of tiling problems Two dominoes (a) (b)

Proofs of tiling problems (a) (b) 1. Can you tile board (a) with the dominoes of type (c)? 2. Can you tile board (a) (with one corner square removed) with the dominoes of type (c)? 3. Can you tile board (a) (with the top left and the bottom right corner squares removed) with the dominoes of type (c)? (c) (d)

Difficult problems Fermat’s last theorem The equation x n + y n = z n does not have an integer solution for x, y, z when x ≠ 0, y ≠ 0, z ≠ 0 and n > 2 (The problem was introduced in 1637 by Pierre de Fermat. It remained unsolved since the 17 th century, and was eventually solved around 1990 by Andrew Wiles)