EECS 1028 M: Discrete Mathematics for Engineers

Similar documents
Tools for reasoning: Logic. Ch. 1: Introduction to Propositional Logic Truth values, truth tables Boolean logic: Implications:

Chapter 2 Section 2.1: Proofs Proof Techniques. CS 130 Discrete Structures

COMP 182 Algorithmic Thinking. Proofs. Luay Nakhleh Computer Science Rice University

CSC 344 Algorithms and Complexity. Proof by Mathematical Induction

The following techniques for methods of proofs are discussed in our text: - Vacuous proof - Trivial proof

CSE 20 DISCRETE MATH. Fall

Today. Proof using contrapositive. Compound Propositions. Manipulating Propositions. Tautology

CSE 20 DISCRETE MATH. Winter

Discrete Mathematics. Spring 2017

Lecture 2: Proof Techniques Lecturer: Lale Özkahya

Section Summary. Proof by Cases Existence Proofs

EECS 1028 M: Discrete Mathematics for Engineers

Mathematical Reasoning Rules of Inference & Mathematical Induction. 1. Assign propositional variables to the component propositional argument.

CSE 20 DISCRETE MATH WINTER

CSE 20 DISCRETE MATH SPRING

Basic Proof Examples

EECS 1028 M: Discrete Mathematics for Engineers

Climbing an Infinite Ladder

EECS 1028 M: Discrete Mathematics for Engineers

Chapter 1, Logic and Proofs (3) 1.6. Rules of Inference

Outline. We will cover (over the next few weeks) Induction Strong Induction Constructive Induction Structural Induction

CISC-102 Fall 2017 Week 3. Principle of Mathematical Induction

Proof Terminology. Technique #1: Direct Proof. Learning objectives. Proof Techniques (Rosen, Sections ) Direct Proof:

Lecture 7 Feb 4, 14. Sections 1.7 and 1.8 Some problems from Sec 1.8

Proofs. Joe Patten August 10, 2018

Final Exam Review. 2. Let A = {, { }}. What is the cardinality of A? Is

Proofs. Chapter 2 P P Q Q

EECS 1028 M: Discrete Mathematics for Engineers

Math Circle Beginners Group February 28, 2016 Euclid and Prime Numbers

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

Climbing an Infinite Ladder

CMPSCI 250: Introduction to Computation. Lecture 11: Proof Techniques David Mix Barrington 5 March 2013

CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta

MATH CSE20 Homework 5 Due Monday November 4

Proofs. Introduction II. Notes. Notes. Notes. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Fall 2007

Introduction to proofs. Niloufar Shafiei

INDUCTION AND RECURSION. Lecture 7 - Ch. 4

Proof by Contradiction

Lecture 4: Probability, Proof Techniques, Method of Induction Lecturer: Lale Özkahya

Math Circle Beginners Group February 28, 2016 Euclid and Prime Numbers Solutions

Proofs. Chapter 2 P P Q Q

The Process of Mathematical Proof

Discrete Mathematics. Spring 2017

1. (16 points) Circle T if the corresponding statement is True or F if it is False.

9/5/17. Fermat s last theorem. CS 220: Discrete Structures and their Applications. Proofs sections in zybooks. Proofs.

Induction 1 = 1(1+1) = 2(2+1) = 3(3+1) 2

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

Normal Forms Note: all ppts about normal forms are skipped.

MATH 271 Summer 2016 Practice problem solutions Week 1

Announcements. Read Section 2.1 (Sets), 2.2 (Set Operations) and 5.1 (Mathematical Induction) Existence Proofs. Non-constructive

CSCE 222 Discrete Structures for Computing. Proofs. Dr. Hyunyoung Lee. !!!!! Based on slides by Andreas Klappenecker

First order Logic ( Predicate Logic) and Methods of Proof

Basic properties of the Integers

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics. Introductory Notes in Discrete Mathematics Solution Guide

means is a subset of. So we say A B for sets A and B if x A we have x B holds. BY CONTRAST, a S means that a is a member of S.

Sec$on Summary. Mathematical Proofs Forms of Theorems Trivial & Vacuous Proofs Direct Proofs Indirect Proofs

Proofs: A General How To II. Rules of Inference. Rules of Inference Modus Ponens. Rules of Inference Addition. Rules of Inference Conjunction

Disjunction/Conjunction Normal Form

2. Two binary operations (addition, denoted + and multiplication, denoted

CSE 1400 Applied Discrete Mathematics Proofs

Contradiction MATH Contradiction. Benjamin V.C. Collins, James A. Swenson MATH 2730

CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta

Proof by Induction. Andreas Klappenecker

We want to show P (n) is true for all integers

Discrete Mathematics Logics and Proofs. Liangfeng Zhang School of Information Science and Technology ShanghaiTech University

Carmen s Core Concepts (Math 135)

3 The language of proof

Example: Use a direct argument to show that the sum of two even integers has to be even. Solution: Recall that an integer is even if it is a multiple

Introduction to Induction (LAMC, 10/14/07)

CHAPTER2 PROOFS, RECURSION, AND ANALYSIS OF ALGORITHMS CHAPTER OBJECTIVES. Question: Is the contractor s estimate correct?

Solutions to Assignment 1

Argument. whenever all the assumptions are true, then the conclusion is true. If today is Wednesday, then yesterday is Tuesday. Today is Wednesday.

Example ( x.(p(x) Q(x))) ( x.p(x) x.q(x)) premise. 2. ( x.(p(x) Q(x))) -elim, 1 3. ( x.p(x) x.q(x)) -elim, x. P(x) x.

Mathematical Induction Assignments

1.1 Statements and Compound Statements

The Foundations: Logic and Proofs. Chapter 1, Part III: Proofs

(3,1) Methods of Proof

Section 3.1: Direct Proof and Counterexample 1

STUDY PROBLEMS FOR EXAM I CMSC 203 DISCRETE STRUCTURES. n (n +1)(2n +1), 6. j 2 = 1(1+1)(2 1+1) 6. k (k +1)(2k +1) 6

Chapter 2. Mathematical Reasoning. 2.1 Mathematical Models

CS 220: Discrete Structures and their Applications. Mathematical Induction in zybooks

Sums of Squares. Bianca Homberg and Minna Liu

Readings: Conjecture. Theorem. Rosen Section 1.5

Mathematical Induction. Section 5.1

Discrete Mathematics for CS Fall 2003 Wagner Lecture 3. Strong induction

Midterm Exam Solution

Proof. Theorems. Theorems. Example. Example. Example. Part 4. The Big Bang Theory

MATH 55 - HOMEWORK 6 SOLUTIONS. 1. Section = 1 = (n + 1) 3 = 2. + (n + 1) 3. + (n + 1) 3 = n2 (n + 1) 2.

Mat 243 Exam 1 Review

n(n + 1). 2 . If n = 3, then 1+2+3=6= 3(3+1) . If n = 2, then = 3 = 2(2+1)

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

Proofs of Mathema-cal Statements. A proof is a valid argument that establishes the truth of a statement.

n n P} is a bounded subset Proof. Let A be a nonempty subset of Z, bounded above. Define the set

Induction and Recursion

(e) Commutativity: a b = b a. (f) Distributivity of times over plus: a (b + c) = a b + a c and (b + c) a = b a + c a.

Numbers. 2.1 Integers. P(n) = n(n 4 5n 2 + 4) = n(n 2 1)(n 2 4) = (n 2)(n 1)n(n + 1)(n + 2); 120 =

Infinite Continued Fractions

What can you prove by induction?

CSCE 222 Discrete Structures for Computing. Proof by Induction. Dr. Hyunyoung Lee. !!!!!! Based on slides by Andreas Klappenecker

Transcription:

EECS 1028 M: Discrete Mathematics for Engineers Suprakash Datta Office: LAS 3043 Course page: http://www.eecs.yorku.ca/course/1028 Also on Moodle S. Datta (York Univ.) EECS 1028 W 18 1 / 32

Proofs Proofs Sec 1.7 Key questions: Why are proofs necessary? What is a (valid) proof? What can we assume? In what level of detail and rigour do we prove things? Caveat: In order to prove a statement, it MUST be True! S. Datta (York Univ.) EECS 1028 W 18 2 / 32

Proofs Assertion Types Domain R Axioms Proposition, Lemma, Theorem Corollary Conjecture S. Datta (York Univ.) EECS 1028 W 18 3 / 32

Proofs Types of proofs Direct proofs (including Proof by cases) Proof by contraposition Proof by contradiction Proof by construction Proof by Induction Other techniques S. Datta (York Univ.) EECS 1028 W 18 4 / 32

Direct Proofs Direct proofs The average of any two primes greater than 2 is an integer Every prime number greater than 2 can be written as the difference of two squares, i.e. a 2 b 2. S. Datta (York Univ.) EECS 1028 W 18 5 / 32

Direct Proofs Proof by Cases If n is an integer, then n(n+1) 2 is an integer Case 1: n is even. or n = 2a, for some integer a So n(n + 1)/2 = 2a (n + 1)/2 = a (n + 1), which is an integer. Case 2: n is odd. So n + 1 is even, or n + 1 = 2a, for an integer a So n(n + 1)/2 = n 2a/2 = n a, which is an integer. S. Datta (York Univ.) EECS 1028 W 18 6 / 32

Proofs by Contrapositive Proofs by Contrapositive If pq (p + q)/2, then p q Direct proof involves some algebraic manipulation Contrapositive: If p = q, then pq = (p + q)/2. Easy: Assuming p = q, we see that pq = pp = p 2 = p = (p + p)/2 = (p + q)/2. S. Datta (York Univ.) EECS 1028 W 18 7 / 32

Proofs by Contradiction Proofs by Contradiction Prove: 2 is irrational Proof: Suppose 2 is rational. Then 2 = p/q, p, q Z, q 0, such that p, q have no common factors. Squaring and transposing, p 2 = 2q 2 (so p 2 is an even number) So, p is even (a previous slide) Or p = 2x for some integer x So 4x 2 = 2q 2 or q 2 = 2x 2 So, q is even (a previous slide) So, p, q are both even they have a common factor of 2. CONTRADICTION. So 2 is NOT rational. S. Datta (York Univ.) EECS 1028 W 18 8 / 32

Proofs by Contradiction Proofs by Contradiction: Rationale In general, start with an assumption that statement A is true. Then, using standard inference procedures infer that A is false. This is the contradiction. Recall: for any proposition p, p p must be false. S. Datta (York Univ.) EECS 1028 W 18 9 / 32

Proofs by Contradiction Proofs by Contradiction: More Examples Pigeonhole Principle: If n + 1 balls are distributed among n bins then at least one bin has more than 1 ball Generalized Pigeonhole Principle: If n balls are distributed among k bins then at least one bin has at least n/k balls S. Datta (York Univ.) EECS 1028 W 18 10 / 32

Proofs by Construction Proofs by Construction aka Existence proofs Prove: There exists integers x, y, z satisfying x 2 + y 2 = z 2 Proof: x = 3, y = 4, z = 5. There exists irrational b, c, such that b c is rational (page 97). (Nonconstructive) Proof: Consider 2 2. Two cases are possible: 2 2 is rational: DONE (b = c = 2). 2 2 is irrational: Let b = 2 2, c = 2. Then b c = ( 2 2) 2 = ( 2) 2 2 = ( 2) 2 = 2. S. Datta (York Univ.) EECS 1028 W 18 11 / 32

Proofs by Construction Proofs of Uniqueness the equation ax + b = 0, a, b R, a 0 has a unique solution. Show that if n is an odd integer, there is a unique integer k such that n is the sum of k-2 and k+3. S. Datta (York Univ.) EECS 1028 W 18 12 / 32

Proofs by Construction The Use of Counterexamples All prime numbers are odd Every prime number can be written as the difference of two squares, i.e. a 2 b 2. S. Datta (York Univ.) EECS 1028 W 18 13 / 32

Proofs by Construction Examples Prove that there are no solutions in positive integers x and y to the equation 2x 2 + 5y 2 = 14. If x 3 is irrational then x is irrational. Prove or disprove if x, y are irrational, x + y is irrational. S. Datta (York Univ.) EECS 1028 W 18 14 / 32

Proofs by Construction Alternative problem statements show A is true if and only if B is true show that the statements A,B,C are equivalent Try: Q8, 10, 26, 28 on page 91 S. Datta (York Univ.) EECS 1028 W 18 15 / 32

Proofs by Construction The role of conjectures Not to be used frivolously Example: 3x + 1 conjecture. Game: Start from a given integer n. If n is even, replace n by n/2. If n is odd, replace n with 3n + 1. Keep doing this until you hit 1. e.g. n = 5 16 8 4 2 1 Q: Does this game terminate for all n? 3x + 1 conjecture: Yes! S. Datta (York Univ.) EECS 1028 W 18 16 / 32

Proofs by Construction Elegance in proofs Example: Prove that the only pair of positive integers satisfying ab = a + b is (2, 2). Many different proofs exist. What is the simplest one you can think of? S. Datta (York Univ.) EECS 1028 W 18 17 / 32

Proofs by Construction Elegance in proofs Example: Prove that the only pair of positive integers satisfying ab = a + b is (2, 2). Many different proofs exist. What is the simplest one you can think of? ab = a + b ab a b = 0 ab a b + 1 = 1 adding 1 to both sides (a 1)(b 1) = 1 factoring Since the only ways to factorize 1 are 1 1 and ( 1) ( 1), the only solutions are (0, 0), (2, 2). S. Datta (York Univ.) EECS 1028 W 18 17 / 32

Proofs by Construction Meaningful Diagrams - 1 S. Datta (York Univ.) EECS 1028 W 18 18 / 32

Proofs by Construction Meaningful Diagrams - 2 from https://www.math.upenn.edu/~deturck/probsolv/lp1ans.html S. Datta (York Univ.) EECS 1028 W 18 19 / 32

Proofs by Construction Meaningful Diagrams - 3 from http://math.rice.edu/~lanius/lessons/series/one.gif S. Datta (York Univ.) EECS 1028 W 18 20 / 32

Proofs by Construction Meaningful Diagrams - 3 from http://www.billthelizard.com/2009/07/six-visual-proofs_25.html S. Datta (York Univ.) EECS 1028 W 18 21 / 32

Proofs by Induction Proofs by Induction Mathematical Induction: Very simple Very powerful proof technique Guess and verify strategy S. Datta (York Univ.) EECS 1028 W 18 22 / 32

Proofs by Induction Induction: Steps Hypothesis: P(n) is true for all n N Base case/basis step (starting value): Show P(1) is true. Inductive step: Show that k N(P(k) P(k + 1)) is true. S. Datta (York Univ.) EECS 1028 W 18 23 / 32

Proofs by Induction Induction: Rationale Formally: (P(1) k NP(k) P(k + 1)) n NP(n) Intuition: Iterative modus ponens: P(k) (P(k) P(k + 1)) P(k + 1) Need a starting point (Base case) Proof is beyond the scope of this course S. Datta (York Univ.) EECS 1028 W 18 24 / 32

Proofs by Induction Induction: Example 1 P(n) : 1 + 2 +... + n = n(n + 1)/2 Base case: P(1). LHS = 1. RHS = 1(1 + 1)/2 = LHS Inductive step: Assume P(n) is true. Show P(n + 1) is true. Note: 1 + 2 + + n + (n + 1) = n(n + 1)/2 + (n + 1) = (n + 1)(n + 2)/2 So, by the principle of mathematical induction, n N, P(n). S. Datta (York Univ.) EECS 1028 W 18 25 / 32

Proofs by Induction Induction: Example 2 P(n) : 1 2 + 2 2 +... + n 2 = n(n + 1)(2n + 1)/6 Base case: P(1). LHS = 1. RHS = 1(1 + 1)(2 + 1)/6 = 1 = LHS Inductive step: Assume P(n) is true. Show P(n + 1) is true. Note: 1 2 + 2 2 +... + n 2 + (n + 1) 2 = n(n + 1)(2n + 1)/6 + (n + 1) 2 = (n + 1)(n + 2)(2n + 3)/6 So, by the principle of mathematical induction, n N, P(n). S. Datta (York Univ.) EECS 1028 W 18 26 / 32

Proofs by Induction Induction: Proving Inequalities P(n) : n < 4 n Base case: P(1). P(1) holds since 1 < 4. Inductive step: Assume P(n) is true, show P(n + 1) is true, i.e., show that n + 1 < 4 n+1 : n + 1 < 4 n + 1 < 4 n + 4 n < 4.4 n = 4 n+1 So, by the principle of mathematical induction, n N, P(n). S. Datta (York Univ.) EECS 1028 W 18 27 / 32

Proofs by Induction Induction: More Examples Sum of odd integers n 3 n is divisible by 3 Number of subsets of a finite set S. Datta (York Univ.) EECS 1028 W 18 28 / 32

Proofs by Induction Induction: Facts to Remember Base case does not have to be n = 1 Most common mistakes are in not verifying that the base case holds Usually guessing the solution is done first. S. Datta (York Univ.) EECS 1028 W 18 29 / 32

Proofs by Induction How can you guess a solution? Try simple tricks: e.g. for sums with similar terms n times the average or n times the maximum; for sums with fast increasing/decreasing terms, some multiple of the maximum term. Often proving upper and lower bounds separately helps. S. Datta (York Univ.) EECS 1028 W 18 30 / 32

Proofs by Induction Strong Induction Sometimes we need more than P(n) to prove P(n + 1) in these cases STRONG induction is used. Formally: [P(1) k(p(1)... P(k 1) P(k)) P(k + 1))] np(n) Note: Strong Induction is: Equivalent to induction use whichever is convenient Often useful for proving facts about algorithms S. Datta (York Univ.) EECS 1028 W 18 31 / 32

Proofs by Induction Strong Induction: Examples Fundamental Theorem of Arithmetic: every positive integer n, n > 1, can be expressed as the product of one or more prime numbers. every amount of postage of 12 cents or more can be formed using just 4-cent and 5-cent stamps. Fallacies/caveats: Proof that all Canadians are of the same age! http: //www.math.toronto.edu/mathnet/falseproofs/sameage.html S. Datta (York Univ.) EECS 1028 W 18 32 / 32