Mathematical Iductio c:9 Chapter 4 Hatao Zhag How do you program a robot to climb ifiite stairs? First, you let the robot get to the base platform of the staircase The repeat: From the curret positio, let the robot to move oe step up Let s use that as a proof method First, show P(x) is true for x0 This is the base of the stairs The, show that if it s true for some value, the it is true for + Show: P() P(+) This is climbig the stairs Let 0. Sice it s true for P(0) (base case), it s true for Let. Sice it s true for P() (previous bullet), it s true for Let. Sice it s true for P() (previous bullet), it s true for 3 Let 3 Ad owards to ifiity Thus,wehaveshowittobetrueforall o-egative umbers 3
What is iductio? A method of proof It does ot geerate aswers: it oly ca prove them Three parts: Base case(s): show it is true for oe elemet (get to the stair s base platform) Iductive hypothesis: assume it is true for ay give elemet (assume you are o a stair) Must be clearly labeled!!! Show that if it true for the ext higher elemet (show you ca move to the ext stair) 4 Iductio example Show that the sum of the first odd itegers is Example:If 5, +3+5+7+9 5 5 Formally, show: P( ) where P( ) Base case: Show that P() is true P() ( i) i 5 Iductio example, cotiued Iductive hypothesis: assume true for Thus, we assume that P() is true, or that i Note: we do t yet ow if this is true or ot! Iductive step: show true for + We wat to show that: + i ( + )
Iductio example, cotiued Recall the iductive hypothesis: Proof of iductive step: + ( + ) + i i ( + ) + + ( + ) + + + + + + + i 7 What did we show Base case: P() If P() was true, the P(+) is true i.e., P() P(+) We ow it s true for P() Because of P() P(+), if it s true for P(), the it s true for P() Because of P() P(+), if it s true for P(), the it s true for P(3) Because of P() P(+), if it s true for P(3), the it s true for P(4) Because of P() P(+), if it s true for P(4), the it s true for P(5) Ad owards to ifiity Thus, it is true for all possible values of I other words, we showed that: [ P( ) ( P( ) P( + ) )] P( ) 8 The idea behid iductive proofs Show the base case Show the iductive hypothesis Maipulate the iductive step so that you ca substitute t i part of the iductive hypothesis Show the iductive step 9 3
Secod iductio example Show the sum of the first positive eve itegers is + Rephrased: P( ) where P( ) i + The three parts: Base case Iductive hypothesis Iductive step 0 Secod iductio example, cotiued Base case: Show P(): Iductive hypothesis: Assume Iductive step: Show P( ) P() ( i) + i + P( + ) + i ( + ) + ( + ) Secod iductio example, cotiued Recall our iductive hypothesis: P( ) i + + i ( + ) + + ( + ) + i ( + ) + + ( + ) + + ( + ) + + + 3 + + 3 + 4
Notes o proofs by iductio We maipulate the + case to mae part of it loo lie the case We the replace that part with the other side of the case P( ) i + + ( + ) + i ( + ) + + i ( + ) + + ( + ) + + ( + ) + + + 3 + + 3 + 3 Third iductio example Show ( + )( + ) i Base case: ( + )( + ) i i Iductive hypothesis: assume ( + )( + ) i 4 Third iductio example Iductive step: show 3 + ( + ) + i + ( + )(( + ) + )(( + ) + ) i ( + )(( + ) + )(( + ) + ) i ( + )( + )( + ( + )( + ) ( + )( + )( ( + ) + + ( + ) + ( + )( + ) ( + )( + )( + 3) 3 + 9 + 3 + + 9 + 3 + 3) 3) ( + )( + 5 i ) 5
Third iductio agai: what if your iductive hypothesis was wrog? Show: ( + )( i + Base case: : ) But let s cotiue ayway Iductive hypothesis: assume i ( + )( i 7 7 + ( + )( + ) ) Third iductio agai: what if your iductive hypothesis was wrog? Iductive step: show 3 ( + ) + i ( + )(( + ) + )(( + ) + + i ( + )(( + ) + )(( + ) + + i ( + )( + )( + ( + )( + ) ( + )( + )( ( + ) + + ( + ) + ( + )( + ) ( + )( + )( + 4) 3 + 0 + 4 + + 0 + + 8 4) 4) ) ( )( ) + + 7 i ) Fourth iductio example S that! < for all > Base case:! < <4 Iductive hypothesis: assume! < Iductive step: show that (+)! < (+) + ( +)! ( + )! < ( +) < ( + )( + ) ( + ) + 8
Strog iductio Wea mathematical iductio proves P(0) is true ad assumes P() is true, ad uses that (ad oly that!) to show P(+) is true Strog mathematical iductio proves P(0), P(),, P(b) are true, ad assumes P(-b), P(-b+),, P() are all true, ad uses that to show that P(+) is true. [ P( b) P( b + ) P( b + )... P( ) ] P( + ) 9 Strog iductio vs. o-strog iductio Determie which amouts of postage ca be writte with 5 ad cet stamps Prove usig both versios of iductio Aswer: ay postage 0 plus 5,, 0,,, 5,, 7, 8. 0 Aswer via mathematical iductio Show base case: P(0): 05+5+5+5 Iductive hypothesis: Assume P() istrue Iductive step: Show that P(+) is true IfP() uses a 5 cet stamp, replace that stamp with a cet stamp IfP() does ot use a 5 cet stamp, it must use oly cet stamps Sice > 8, there must be four cet stamps Replace these with five 5 cet stamps to obtai + 7
Aswer via strog iductio Show base cases: P(0), P(), P(), P(3), ad P(4) 05+5+5+5 5+5+5+ 5+5++ 3 5 + + + 4+++ Iductive hypothesis: Assume P(-4), P(-3),, P() are all true Iductive step: Show that P(+) is true, where +>4 We will obtai P(+) by addig a 5 cet stamp to P(+-5) Sice we ow P(+-5) P(-4) is true, where -4>9, our proof is complete Strog iductio vs. o-strog iductio, tae Show that every postage amout cets or more ca be formed usig oly 4 ad 5 cet stamps Similar to the previous example 3 Aswer via mathematical iductio Show base case: P(): 4+4+4 Iductive hypothesis: Assume P() istrue Iductive step: Show that P(+) is true IfP() uses a 4 cet stamp, replace that stamp with a 5 cet stamp to obtai P(+) IfP() does ot use a 4 cet stamp, it must use oly 5 cet stamps Sice > 0, there must be at least three 5 cet stamps Replace these with four 4 cet stamps to obtai + Note that oly P() wasassumedtobetrue 4 8
Aswer via strog iductio Show base cases: P(), P(3), P(4), ad P(5) 4+4+4 34+4+5 44+5+5 55+5+5 Iductive hypothesis: Assume P(-3), P(-), P(-), P() are all true For 5 Iductive step: Show that P(+) is true We will obtai P(+) by addig a 4 cet stamp to P(+-4) Sice we ow P(+-4) P(-3) is true, our proof is complete Note that P(-3), P(-), P(-), P() wereallassumedtobetrue 5 Strog iductio Wea mathematical iductio proves P(0) is true ad assumes P() is true, ad uses that (ad oly that!) to show P(+) is true Strog mathematical iductio proves P(0), P(),, P(b) are true, ad assumes P(-b), P(-b+),, P() are all true, ad uses that to show that P(+) is true. [ P( b) P( b + ) P( b + )... P( ) ] P( + ) 7 5 4 3 Chess ad iductio Ca the ight reach ay square i a fiite umber of moves? Show that the ight ca reach ay square (i, j) for which i+j where >. Base cases: 0,, Iductive hypothesis: assume the ight ca reach ay square (i, j) for which i+j where >. 0 0 3 4 5 7 Iductive step: show the ight ca reach ay square (i, j) for which i+j+ where >. 7 9
Chess ad iductio Iductive step: show the ight ca reach ay square (i, j) forwhichi+j+ where >. Note that + 3, ad oe of i or j is Ifi, the ight could have moved from (i-, j+) Sice i+j +, i- + j+, which is assumed true Ifj, the ight could have moved from (i+, j-) Sice i+j +, i+ + j-, which is assumed true 8 Strog iductio (compact form) Strog mathematical iductio proves P(0), P(),, P(b) are true, ad assumes P(-b), P(-b+),, P() are all true, ad uses that to show that P(+) is true. [ P( b) P( b + ) P( b + )... P( ) ] P( + ) Strog mathematical iductio proves P(0), ad assumes P(0), P(),, P() are all true, ad uses that to show that P(+) is true. [ P( 0) P() P()... P( ) ] P( + ) 9 Iductig stoes Tae a pile of stoes Split the pile ito two smaller piles of size r ad s Repeat util you have piles of stoe each Tae the product of all the splits Soallther s ad s s from each split Sum up each of these products ( ) Prove that this product, f(), equals 30 0
Iductig stoes 0 7 3 4 3 4 ( ) 0*9 f ( ) + + + 4 + + + + + 45 3 Iductig stoes We will show by iductio that P() istrue for all > 0, where P(): f() (+)/. Base case: No splits ecessary, so the sum of the products 0 f() *(-)/ 0 Base case prove 3 Iductig stoes Iductive hypothesis: assume that P(), P(),, P() are all true This is strog iductio! Iductive step: Show that P(+) is true We assume that we split the + pile ito a pile of i stoes ad a pile of +-i stoes Thus, we wat to show that (i)*(+-i) + f(i) + f(+-i) (+)((+)-)/ Sice0<i < +, bothi ad +-i are betwee ad, iclusive 33
Iductig stoes Thus, we wat to show that i i P( i) : f ( i) (i)*(+-i) + f(i) + f(+ +-i) (+)/ ( + i)( + i ) P( + i) : f ( + i) ( + )( + ) + We prove P( + ) : f ( + ) Because f ( + ) ( i)*( + i) + f ( i) + f ( + i) i i i + i i + + + i i i i + i i + i i + + i i + i + + + + + i i + i 34 Typical Iductio Errors For all positive itegers, 3 iseve. P(): 3 is eve. Iductio hypothesis: Assume P() is true Iductive case: We wat to show P(+) is true. Because 3 + 3*3 *3 +(3 ), *3 is eve (3 ) is eve by Iductio hypothesis So 3 + is eve. 35 Typical Iductio Errors All positive itegers are odd. P(): is odd Base case: P() is true Iductio hypothesis: Assume P(), P(),, P(-), P(-) are true Iductive case: P(-) is true meas - is odd. So is (-)+. Hece P() is true. 3
Typical Iductio Errors All horses are the same color. P(): horses are the same color Base case: P() is true Iductio hypothesis: Assume P(-) is true Iductive case: Suppose we have horses, they are a,a,a 3,,a.Siceboth{a,a,a 3,, a - }ad{a,a 3,,a } have - horses, they have the same color. Sice a,a 3,,a - are commo i both sets, so all have the same colors. 37 Typical Iductio Errors A camel ca always carry all the straw i a bar. P(): camel ca carry straws Base case: P() is true Iductio hypothesis: Assume P(-) is true Iductive case: Sice the camel ca carry - straws, it has o problem to carry oe more straw. The last straw that broe the camel s bac 38 Harmoic Number 3 H :: + + + + 3 Estimate H : x+ 3 0 3 4 5 7 8 3
Itegral Method 0 dx + + +...+ x+ 3 + dx H x l( +) H Now H as, so Harmoic series ca go to ifiity! Boo Stacig How far out?? overhag The classical solutio Usig blocs we ca get a overhag of Harmoic Stacs 4
Product (5!) + + ( ) / Factorial Factorial defies a product: How to estimate t!? Tur product ito a sum taig logs: l(!) l( 3 ( ) ) l + l + + l( ) + l() l(i) Itegral Method l l (x+) l (x) l 5 l 4 l 3 l l 5 l 3 l 4 l l - l 3 4 5 5
l(x) dx l(i) l (x+)dx 0 Remider: Aalysis (OPTIONAL) x lxdxxl e l(/e) + l(i) (+) l((+)/e) + so guess: l(i) + l e Stirlig s Formula l(i) + l e expoetiatig: Stirlig s formula:! /e e! ~ π e