Download Mathematical Induction - Discrete Mathematics - Lecture Slides and more Slides Discrete Mathematics in PDF only on Docsity! 1 Mathematical Induction Docsity.com 2 How do you climb infinite stairs? • Not a rhetorical question! • First, you get to the base platform of the staircase • Then repeat: – From your current position, move one step up Docsity.com 5 • Show that the sum of the first n odd integers is n2 – Example: If n = 5, 1+3+5+7+9 = 25 = 52 – Formally, show: • Base case: Show that P(1) is true Induction example ∑ = ==− n i ni 1 212 11 11)(2 1 1 2 == ==−∑ =i i =∀ )P( where)P( nnn =)1P( = Docsity.com 6 • Inductive hypothesis: assume true for k – Thus, we assume that P(k) is true, or that – Note: we don’t yet know if this is true or not! • Inductive step: show true for k+1 – We want to show that: ∑ = ==− k i ki 1 212 ∑ + = +==− 1 1 2)1(12 k i ki Induction example, continued Docsity.com 7 12121)1(2 2 1 ++==−+−+ ∑ = kkik k i 121)1(2 22 ++==+−+ kkkk Induction example, continued • Recall the inductive hypothesis: • Proof of inductive step: ∑ = ==− k i ki 1 212 1212 22 ++==++ kkkk 2 1 1 )1(12 +==−∑ + = ki k i Docsity.com 10 Second induction example • Show the sum of the first n positive even integers is n2 + n – Rephrased: • The three parts: – Base case – Inductive hypothesis – Inductive step ∑ = +===∀ n i nninnn 1 22)P( where)P( Docsity.com 11 Second induction example, continued • Base case: Show P(1): • Inductive hypothesis: Assume • Inductive step: Show 22 11)(2)1P( 1 1 2 === +===∑ =i i ∑ = +=== k i kkik 1 22)P( )1()1(2)1P( 2 1 1 +++===+ ∑ + = kkik k i Docsity.com 12 2323 22 ++==++ kkkk 1)1()1(2 22 +++==+++ kkkkk 1)1(2)1(2 2 1 +++==++ ∑ = kkik k i 1)1(2 2 1 1 +++==∑ + = kki k i Second induction example, continued • Recall our inductive hypothesis: ∑ = +=== k i kkik 1 22)P( Docsity.com 15 Third induction example • Inductive step: show 6 )1)1(2)(1)1)((1(1 1 2 +++++=∑ + = kkki k i 6 )32)(2)(1()1( 1 22 +++=++ ∑ = kkkik k i 6139261392 2323 +++=+++ kkkkkk )32)(2)(1()12)(1()1(6 2 +++=++++ kkkkkkk 6 )32)(2)(1( 6 )12)(1()1( 2 +++=++++ kkkkkkk 6 )1)1(2)(1)1)((1(1 1 2 +++++=∑ + = kkki k i 6 )12)(1( 1 2 ++=∑ = kkki k i Docsity.com 16 Third induction again: what if your inductive hypothesis was wrong? • Show: • Base case: n = 1: • But let’s continue anyway… • Inductive hypothesis: assume 6 )22)(1( 1 2 ++=∑ = nnni n i 6 71 6 71 6 )22)(11(1 2 1 1 2 ≠ = ++ =∑ =i i 6 )22)(1( 1 2 ++=∑ = kkki k i Docsity.com 17 Third induction again: what if your inductive hypothesis was wrong? • Inductive step: show 6 )2)1(2)(1)1)((1(1 1 2 +++++=∑ + = kkki k i 6 )42)(2)(1()1( 1 22 +++=++ ∑ = kkkik k i 816102614102 2323 +++≠+++ kkkkkk )42)(2)(1()22)(1()1(6 2 +++=++++ kkkkkkk 6 )42)(2)(1( 6 )22)(1()1( 2 +++=++++ kkkkkkk 6 )2)1(2)(1)1)((1(1 1 2 +++++=∑ + = kkki k i 6 )22)(1( 1 2 ++=∑ = kkki k i Docsity.com 20 Strong induction example 1 • Show that any number > 1 can be written as the product of one or more primes • Base case: P(2) – 2 is the product of 2 (remember that 1 is not prime!) • Inductive hypothesis: assume P(2), P(3), …, P(k) are all true • Inductive step: Show that P(k+1) is true Docsity.com 21 Strong induction example 1 • Inductive step: Show that P(k+1) is true • There are two cases: – k+1 is prime • It can then be written as the product of k+1 – k+1 is composite • It can be written as the product of two composites, a and b, where 2 ≤ a ≤ b < k+1 • By the inductive hypothesis, both P(a) and P(b) are true Docsity.com 22 Strong induction vs. non-strong induction • Determine which amounts of postage can be written with 5 and 6 cent stamps – Prove using both versions of induction • Answer: any postage ≥ 20 Docsity.com 25 Strong induction vs. non-strong induction, take 2 • Show that every postage amount 12 cents or more can be formed using only 4 and 5 cent stamps • Similar to the previous example Docsity.com 26 Answer via mathematical induction • Show base case: P(12): – 12 = 4 + 4 + 4 • Inductive hypothesis: Assume P(k) is true • Inductive step: Show that P(k+1) is true – If P(k) uses a 4 cent stamp, replace that stamp with a 5 cent stamp to obtain P(k+1) – If P(k) does not use a 4 cent stamp, it must use only 5 cent stamps • Since k > 10, there must be at least three 5 cent stamps • Replace these with four 4 cent stamps to obtain k+1 • Note that only P(k) was assumed to be true Docsity.com 27 Answer via strong induction • Show base cases: P(12), P(13), P(14), and P(15) – 12 = 4 + 4 + 4 – 13 = 4 + 4 + 5 – 14 = 4 + 5 + 5 – 15 = 5 + 5 + 5 • Inductive hypothesis: Assume P(12), P(13), …, P(k) are all true – For k ≥ 15 • Inductive step: Show that P(k+1) is true – We will obtain P(k+1) by adding a 4 cent stamp to P(k+1-4) – Since we know P(k+1-4) = P(k-3) is true, our proof is complete • Note that P(12), P(13), …, P(k) were all assumed to be true Docsity.com 30 Inducting stones • Take a pile of n stones – Split the pile into two smaller piles of size r and s – Repeat until you have n piles of 1 stone each • Take the product of all the splits – So all the r’s and s’s from each split • Sum up each of these products • Prove that this product equals 2 )1( −nn Docsity.com 31 10 3 14 7 1 12 2 2 1 23 1 1 1 1 1 1 21 12 2 4 2 1 1 1 1 Inducting stones 2 )1( −nn 2 9*104511112421221 ==++++++++ Docsity.com 32 Inducting stones • We will show it is true for a pile of k stones, and show it is true for k+1 stones – So P(k) means that it is true for k stones • Base case: n = 1 – No splits necessary, so the sum of the products = 0 – 1*(1-1)/2 = 0 – Base case proven Docsity.com