Mathematical Induction

Similar documents
Mathematical Induction

Proof by Contradiction

Homework #2 Solutions Due: September 5, for all n N n 3 = n2 (n + 1) 2 4

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

Carmen s Core Concepts (Math 135)

Climbing an Infinite Ladder

Problem Set 5 Solutions

21 Induction. Tom Lewis. Fall Term Tom Lewis () 21 Induction Fall Term / 14

Discrete Mathematics. Spring 2017

CSE 311: Foundations of Computing. Lecture 14: Induction

CS1800: Mathematical Induction. Professor Kevin Gold

CS 360, Winter Morphology of Proof: An introduction to rigorous proof techniques

Climbing an Infinite Ladder

CHAPTER 8: EXPLORING R

At the start of the term, we saw the following formula for computing the sum of the first n integers:

Chapter Summary. Mathematical Induction Strong Induction Well-Ordering Recursive Definitions Structural Induction Recursive Algorithms

Proofs. Joe Patten August 10, 2018

Some Review Problems for Exam 1: Solutions

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction

Another Proof By Contradiction: 2 is Irrational

Mathematical Induction. Section 5.1

Mathematical Induction. Defining Functions. Overview. Notation for recursive functions. Base case Sn(0) = 0 S(n) = S(n 1) + n for n > 0

Fall 2017 Test II review problems

Mathematical Induction Assignments

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

Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination I (Spring 2008)

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

1 Examples of Weak Induction

With Question/Answer Animations

MATH 102 INTRODUCTION TO MATHEMATICAL ANALYSIS. 1. Some Fundamentals

Sum of Squares. Defining Functions. Closed-Form Expression for SQ(n)

Induction and recursion. Chapter 5

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 1

Sequences of Real Numbers

INDUCTION AND RECURSION. Lecture 7 - Ch. 4

Chapter 2. Mathematical Reasoning. 2.1 Mathematical Models

ASSIGNMENT 1 SOLUTIONS

Induction and Recursion

Mathematical Fundamentals

MATH 324 Summer 2011 Elementary Number Theory. Notes on Mathematical Induction. Recall the following axiom for the set of integers.

x P(x) x P(x) CSE 311: Foundations of Computing announcements last time: quantifiers, review: logical Inference Fall 2013 Lecture 7: Proofs

0.Axioms for the Integers 1

Mathematical Induction. How does discrete math help us. How does discrete math help (CS160)? How does discrete math help (CS161)?

CSC 344 Algorithms and Complexity. Proof by Mathematical Induction

Induction. Announcements. Overview. Defining Functions. Sum of Squares. Closed-form expression for SQ(n) There have been some corrections to A1

Matrix Multiplication

Discrete Math, Spring Solutions to Problems V

Proof Techniques (Review of Math 271)

Disproof MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Disproof Fall / 16

Induction. Induction. Induction. Induction. Induction. Induction 2/22/2018

Mat Week 8. Week 8. gcd() Mat Bases. Integers & Computers. Linear Combos. Week 8. Induction Proofs. Fall 2013

Student Responsibilities Week 8. Mat Section 3.6 Integers and Algorithms. Algorithm to Find gcd()

Lecture 5: Loop Invariants and Insertion-sort

CSE 1400 Applied Discrete Mathematics Proofs

THE ISLAMIC UNIVERSITY OF GAZA ENGINEERING FACULTY DEPARTMENT OF COMPUTER ENGINEERING DISCRETE MATHMATICS DISCUSSION ECOM Eng. Huda M.

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

1. Problem I calculated these out by hand. It was tedious, but kind of fun, in a a computer should really be doing this sort of way.

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

Any Wizard of Oz fans? Discrete Math Basics. Outline. Sets. Set Operations. Sets. Dorothy: How does one get to the Emerald City?

Mathematical Induction. Part Two

Heaps Induction. Heaps. Heaps. Tirgul 6

Direct Proof MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Direct Proof Fall / 24

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

Math 430 Exam 2, Fall 2008

Mathematical Induction. Part Two

1.2 The Well-Ordering Principle

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

Mathematical Induction

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 3

586 Index. vertex, 369 disjoint, 236 pairwise, 272, 395 disjoint sets, 236 disjunction, 33, 36 distributive laws

3 The language of proof

NOTES (1) FOR MATH 375, FALL 2012

Inference and Proofs (1.6 & 1.7)

What is proof? Lesson 1

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

Exercises for Discrete Maths

Mathematical Induction Again

Math 3000 Section 003 Intro to Abstract Math Homework 6

CS173 Strong Induction and Functions. Tandy Warnow

Limits and Continuity

Mathematical Structures Combinations and Permutations

Note that r = 0 gives the simple principle of induction. Also it can be shown that the principle of strong induction follows from simple induction.

HW2 Solutions Problem 1: 2.22 Find the sign and inverse of the permutation shown in the book (and below).

SETS AND FUNCTIONS JOSHUA BALLEW

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

Mathematical Induction Again

Quiz 3 Reminder and Midterm Results

CSCE 222 Discrete Structures for Computing. Dr. Hyunyoung Lee

Math /Foundations of Algebra/Fall 2017 Foundations of the Foundations: Proofs

Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination II (Fall 2007)

1. Model existence theorem.

Lecture 12 : Recurrences DRAFT

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

MATHEMATICAL INDUCTION

Math 283 Spring 2013 Presentation Problems 4 Solutions

Module 9: Mathematical Induction

3 Finite continued fractions

Logic, Sets, and Proofs

CSE 20 DISCRETE MATH WINTER

CSE 20 DISCRETE MATH SPRING

Transcription:

Mathematical Induction MAT231 Transition to Higher Mathematics Fall 2014 MAT231 (Transition to Higher Math) Mathematical Induction Fall 2014 1 / 21

Outline 1 Mathematical Induction 2 Strong Mathematical Induction MAT231 (Transition to Higher Math) Mathematical Induction Fall 2014 2 / 21

Motivation How many multiplications will carried out by the following code fragment? c = 0 for i in range (10): for j in range (5): c = c + a[ i] * b[ j] MAT231 (Transition to Higher Math) Mathematical Induction Fall 2014 3 / 21

Motivation How many multiplications will carried out by the following code fragment? c = 0 for i in range (10): for j in range (5): c = c + a[ i] * b[ j] outer-loop body executed 10 times inner-loop body executed 5 times for each outer-loop execution one multiplication per each inner-loop body execution MAT231 (Transition to Higher Math) Mathematical Induction Fall 2014 3 / 21

Motivation How many multiplications will carried out by the following code fragment? c = 0 for i in range (10): for j in range (5): c = c + a[ i] * b[ j] outer-loop body executed 10 times inner-loop body executed 5 times for each outer-loop execution one multiplication per each inner-loop body execution The number of multiplications can be computed as 10 5 = 50 multiplications. MAT231 (Transition to Higher Math) Mathematical Induction Fall 2014 3 / 21

Motivation Now consider this slightly different code fragment. How many multiplications are done? c = 0 for i in range (10): for j in range (i): c = c + a[ i] * b[ j] MAT231 (Transition to Higher Math) Mathematical Induction Fall 2014 4 / 21

Motivation Now consider this slightly different code fragment. How many multiplications are done? c = 0 for i in range (10): for j in range (i): c = c + a[ i] * b[ j] outer-loop body executed 10 times inner-loop body executed a different number of times for each outer-loop execution one multiplication per each inner-loop body execution MAT231 (Transition to Higher Math) Mathematical Induction Fall 2014 4 / 21

Motivation Now consider this slightly different code fragment. How many multiplications are done? c = 0 for i in range (10): for j in range (i): c = c + a[ i] * b[ j] outer-loop body executed 10 times inner-loop body executed a different number of times for each outer-loop execution one multiplication per each inner-loop body execution This time the number of multiplications can be computed with a sum: 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 = 55 multiplications MAT231 (Transition to Higher Math) Mathematical Induction Fall 2014 4 / 21

Motivation Finally, suppose we wanted to generalize this. Assuming n is provided through some user input, our code fragment might be c = 0 for i in range (n): for j in range (i): c = c + a[ i] * b[ j] Some experimentation might lead us to suspect that we can count the multiplications with 1 + 2 + 3 + + n = n(n + 1) 2 This works for all the cases we try, but how can we know it works for all n > 0? MAT231 (Transition to Higher Math) Mathematical Induction Fall 2014 5 / 21

Mathematical Induction This sort of problem is solved using mathematical induction. Some key points: Mathematical induction is used to prove that each of list of statements is true. Often this list is countably infinite (i.e. indexed by the natural numbers). It consists of two parts: (1) a basis step and (2) an inductive step. MAT231 (Transition to Higher Math) Mathematical Induction Fall 2014 6 / 21

Mathematical Induction Here is a list of statements corresponding to the sum we are interested in. S 1 : 1 = (1)(1 + 1)/2 S 2 : 1 + 2 = (2)(2 + 1)/2 S 3 : 1 + 2 + 3 = (3)(3 + 1)/2.. S n 1 : 1 + 2 + 3 + + (n 1) = (n 1)((n 1) + 1)/2 S n : 1 + 2 + 3 + + (n 1) + n = (n)(n + 1)/2 Notice that the list is finite as it contains n statements. However, proving all these are true for any positive integer n means that we have proved an infinite number of statements. MAT231 (Transition to Higher Math) Mathematical Induction Fall 2014 7 / 21

Mathematical Induction As suggested in our text, using mathematical induction is a bit like setting up cascading dominos: We begin by proving S 1 is true. This is the basis step. We next show that S k S k+1 for k 1. This is the inductive step. We now know that S 1 S 2. But as soon as S 2 is known to be true we can say S 2 S 3. But then S 3 S 4, S 4 S 5, S 5 S 6,... MAT231 (Transition to Higher Math) Mathematical Induction Fall 2014 8 / 21

Mathematical Induction Proof Proposition 1 + 2 + + n = n(n + 1) 2 for any n N. Proof. We prove this by mathematical induction. (Basis Step) When n = 1 we find 1 = 1(1 + 1) 2 so the statement is true when n = 1. = 2 2 = 1 MAT231 (Transition to Higher Math) Mathematical Induction Fall 2014 9 / 21

Mathematical Induction Proof Proof. (Continued) (Inductive Step) We now want to show that if 1 + 2 + + k = k(k + 1) 2 for some k N then 1 + 2 + + k + (k + 1) = (k + 1)((k + 1) + 1) 2 = (k + 1)(k + 2). 2 (Note: Stating this does not prove anything, but is very helpful. It forces us to explicitly write what we are going to prove, so both we (as prover) and the reader know what to look for in the remainder of the inductive step.) MAT231 (Transition to Higher Math) Mathematical Induction Fall 2014 10 / 21

Mathematical Induction Proof Proof. (Continued) Suppose 1 + 2 + + k = k(k + 1) 2 for some k N. Then k(k + 1) 1 + 2 + + k = 2 k(k + 1) 1 + 2 + + k + (k + 1) = + (k + 1) 2 k(k + 1) 2(k + 1) 1 + 2 + + k + (k + 1) = + 2 2 k(k + 1) + 2(k + 1) 1 + 2 + + k + (k + 1) = 2 (k + 1)(k + 2) 1 + 2 + + k + (k + 1) = 2 It follows by induction that 1 + 2 + + n = n(n + 1) 2 for all n N. MAT231 (Transition to Higher Math) Mathematical Induction Fall 2014 11 / 21

Mathematical Induction Logic Notice that mathematical induction is an application of Modus Ponens: (S 1 ) ( k N, (S k S k+1 )) ( n N, S n ) Some notes: The actual indexing scheme used is unimportant. For example, we could start with S 0, S 2, or even S 1 rather than S 1. The key is that we start with a specific statement, and then prove that any one statements implies the next. To prove something about statements indexed by the integers, the inductive step would include two parts S k S k+1 and S k S k 1. MAT231 (Transition to Higher Math) Mathematical Induction Fall 2014 12 / 21

Example 2 Proposition Show that 3 (n 3 n) whenever n is a positive integer. Proof. We use mathematical induction. When n = 1 we find n 3 n = 1 1 = 0 and 3 0 so the statement is proved for n = 1. Now we need to show that if 3 (k 3 k) for some integer k > 0 then 3 ((k + 1) 3 (k + 1)). MAT231 (Transition to Higher Math) Mathematical Induction Fall 2014 13 / 21

Example 2 Proof. (Continued) Suppose that 3 (k 3 k). Then (k 3 k) = 3a for some integer a. Then, starting with (k + 1) 3 (k + 1), we find (k + 1) 3 (k + 1) = k 3 + 3k 2 + 3k + 1 k 1 = (k 3 k) + 3k 2 + 3k = 3a + 3k 2 + 3k = 3(a + k 2 + k). By the closure properties of integers we know that a + k 2 + k is an integer so we see that (k + 1) 3 (k + 1) is a multiple of 3. Then, by definition, 3 ((k + 1) 3 (k + 1)). It follows by induction that 3 (n 3 n) for all integers n > 0. MAT231 (Transition to Higher Math) Mathematical Induction Fall 2014 14 / 21

Strong Mathematical Induction Sometimes it is helpful to use a slightly different inductive step. In particular, it may be difficult or impossible to show S k S k+1 but easier (or possible) to show that (S 1 S 2 S k ) S k+1. In other words, assume that all statements from S 1 to S k have been proved and use some combination of them to prove S k+1. This is called strong mathematical induction. MAT231 (Transition to Higher Math) Mathematical Induction Fall 2014 15 / 21

Strong Mathematical Induction Example Proposition Any integer n > 11 can be written in the form n = 4a + 5b for a, b Z. Proof. We use mathematical induction. We note that S 12 : 12 = 4(3) + 5(0) S 13 : 13 = 4(2) + 5(1) S 14 : 14 = 4(1) + 5(2) S 15 : 15 = 4(0) + 5(3) which shows that 12, 13, 14, and 15 can all be written in the form 4a + 5b. MAT231 (Transition to Higher Math) Mathematical Induction Fall 2014 16 / 21

Strong Mathematical Induction Example Proof. (Continued) Now, suppose that S k 3, S k 2, S k 1, and S k have all been proved. This means that S k 3 is true, so we know that k 3 = 4a + 5b for some integers a and b. Adding 4 to both sides we have k 3 + 4 = 4a + 5b + 4 k + 1 = 4(a + 1) + 5b so S k+1 must be true. This means that S 12 S 16, S 13 S 17, S 14 S 18, S 15 S 19, S 16 S 20,..., completing the induction. MAT231 (Transition to Higher Math) Mathematical Induction Fall 2014 17 / 21

Another Mathematical Induction Example Proposition 9 (10 n 1) for all integers n 0. Proof. (By induction on n.) When n = 0 we find 10 n 1 = 10 0 1 = 0 and since 9 0 we see the statement holds for n = 0. Now suppose the statement holds for all values of n up to some integer k; we need to show it holds for k + 1. Since 9 (10 k 1) we know that 10 k 1 = 9x for some x Z. Multiplying both sides by 10 gives 10 (10 k 1) = 10 9x 10 k+1 10 = 9 10x 10 k+1 1 = 9 10x + 9 = 9 (10x + 1) which clearly shows that 9 (10 k+1 1). This completes the induction. MAT231 (Transition to Higher Math) Mathematical Induction Fall 2014 18 / 21

Proof by Smallest Counterexample As already noted, mathematical induction is well suited for statements of the form n N, P(n). 1 Our text introduces an approach called proof by smallest counterexample and illustrates it with a problem similar to the one we just completed. 2 Basic idea is to assume the inductive hypothesis holds for all values of n up to some particular value k but that it fails for k + 1 and then show that this leads to a contradiction. 3 While that does work for the proof we just completed, a direct proof of the inductive hypothesis like the one shown is more straightforward. MAT231 (Transition to Higher Math) Mathematical Induction Fall 2014 19 / 21

Fibonacci Numbers The Fibonacci sequence is defined as the sequence starting with F 1 = 1 and F 2 = 1, and then recursively as F n = F n 1 + F n 2. The Fibonacci sequence starts off with 1, 1, 2, 3, 5, 8, 13, 21, 34,.... MAT231 (Transition to Higher Math) Mathematical Induction Fall 2014 20 / 21

Fibonacci Numbers Proposition Prove that F 1 + F 2 + F 3 + + F n = F n+2 1 for n 2. Proof. We use induction. As our basis step, notice that F 1 + F 2 = F 4 1 since F 1 + F 2 = 1 + 1 = 2, and F 4 1 = 3 1 = 2. Suppose that F 1 + F 2 + + F k = F k+2 1. Adding F k+1 on both sides gives F 1 + F 2 + + F k + F k+1 = F k+2 1 + F k+1 = F k+1 + F k+2 1 which completes the induction. = F k+3 1. MAT231 (Transition to Higher Math) Mathematical Induction Fall 2014 21 / 21