mathematical induction
play

Mathematical Induction Reading: EC 2.3 Peter J. Haas INFO 150 - PowerPoint PPT Presentation

Mathematical Induction Reading: EC 2.3 Peter J. Haas INFO 150 Fall Semester 2019 Lecture 8 1/ 16 Mathematical Induction Overview First Examples Sentences About the Positive Integers Formal Mathematical Induction Examples Strong versus


  1. Mathematical Induction Reading: EC 2.3 Peter J. Haas INFO 150 Fall Semester 2019 Lecture 8 1/ 16

  2. Mathematical Induction Overview First Examples Sentences About the Positive Integers Formal Mathematical Induction Examples Strong versus Weak Induction Lecture 8 2/ 16

  3. Overview What is induction? I Ordinary usage: infer the future based on the past (”the sun will rise tomorrow”) I Mathematical induction: prove the truth of the next integer, from the past I Exploit fact that recurrence relations are often relatively simple I The perfect tool for attacking complexity Lecture 8 3/ 16

  4. Overview What is induction? I Ordinary usage: infer the future based on the past (”the sun will rise tomorrow”) I Mathematical induction: prove the truth of the next integer, from the past I Exploit fact that recurrence relations are often relatively simple I The perfect tool for attacking complexity Example I 1 + 2 + · · · + 100 = 5 , 050 I 1 + 2 + · · · + 100 + 101 =? I Since first answer is correct: 1 + 2 + · · · + 100 + 101 = (1 + 2 + · · · + 100) + 101 = (5 , 050) + 101 = 5 , 151 Lecture 8 3/ 16

  5. Induction as a Game Example I a k = a k − 1 + (2 k − 1) with a 1 = 1 I Try some values: a 1 = 1, a 2 = 4, a 3 = 9, a 4 = 16, a 5 = 25 I It looks like a n = n 2 , but can you prove this? I Try a Big Honking Table: n 2 Is a n = n 2 ? n Formula for a n Value of a n 1 a 1 = 1 1 1 yes 2 a 2 = a 1 + (2 · 2 − 1) 1 + 3 = 4 4 yes . . . . . . . . . . . . . . . 49 a 49 = a 48 + (2 · 49 − 1) 2304 + 97 = 2401 2401 yes 50 a 50 = a 49 + (2 · 50 − 1) 2401 + 99 = 2500 2500 yes Look at the last row: a 50 = a 49 + (2 · 50 − 1) = 49 2 + (2 · 50 − 1) Generalize: a m = ( m − 1) 2 + (2 · m − 1) Lecture 8 4/ 16

  6. A First Inductive Proof Proposition The sequence defined recursively by a 1 = 1 and a k = a k − 1 + (2 k − 1) has closed form a n = n 2 . Proof: 1. Check every row in the table up through m − 1 2. For the m th row, a m = a m − 1 + (2 m − 1) 3. Since we have checked row m − 1, we know that a m − 1 = ( m − 1) 2 4. Substitute and solve: " " a m = a m − 1 + (2 m − 1) = ( m − 1) 2 + (2 m − 1) = m 2 − 2 m + 1 + 2 m − 1 = m 2 , and so row m of the table checks out. 5. We therefore know that, repeating this procedure, every row will check out Lecture 8 5/ 16

  7. Example, Continued A tabular view of the general case n 2 Is a n = n 2 ? Formula for a n Value of a n n 1 a 1 = 1 1 1 yes 2 a 2 = a 1 + (2 · 2 − 1) 1 + 3 = 4 4 yes 3 a 3 = a 2 + (2 · 3 − 1) 4 + 5 = 9 9 yes . . . . . . . . . . . . . . . ( m − 1) 2 ( m − 1) 2 m − 1 a m − 1 = a m − 2 + � 2 · ( m − 1) − 1 � yes r � � mr m a m = a m − 1 + 2 · m − 1 ??? mr yes A from slide previous Example: given row n = 29 , check row n = 30 n 2 Is a n = n 2 ? n Formula for a n Value of a n � � 29 2 29 2 29 a 29 = a 28 + 2 · 29 − 1 yes a 30 = a 29 + (2 · 30 − 1) = 29 2 + (2 · 30 − 1) = 841 + 59 = 900 = 30 2 X Lecture 8 6/ 16

  8. Another Example Recursive sequence: a n = a n − 1 + 2 · n with a 1 = 2 Proposed closed form: a n = n ( n + 1) Tabular setup Formula for a n Value of a n n ( n + 1) Is a n = n ( n + 1)? n 1 a 1 = 2 2 1 · 2 yes 2 a 2 = a 1 + 2 · 2 2 + 4 = 6 2 · 3 yes . . . . . . . . . . . . . . . m − 1 a m − 1 = a m − 2 + 2 · ( m − 1) ( m − 1) m ( m − 1) m yes Yes m a m = a m − 1 + 2 · m ? m ( m + 1) ??? ✓ th ) Check row m : , ) dm - it many Lm m = - 1) m th m = am 2M = - it am= Lecture 8 7/ 16

  9. Closed Formulas for Sums i =1 i = 1 + 2 + · · · + n = n ( n +1) Claim: P n 2 P n n ( n +1) sum = n ( n +1) n i =1 i or 1 + 2 + · · · + n Simplified sum ? 2 2 P 1 1 · 2 1 i =1 i = 1 1 2 = 1 Yes P 2 2 · 3 2 i =1 i = 1 + 2 1 + 2 = 3 2 = 3 Yes P 3 3 · 4 3 i =1 i = (1 + 2) + 3 3 + 4 = 6 2 = 6 Yes P 4 4 · 5 4 i =1 i = (1 + 2 + 3) + 4 6 + 4 = 10 2 = 10 Yes . . . . . . . . . . . . . . . P 34 34 · 35 34 i =1 i = (1 + 2 + · · · + 33) + 34 561 + 34 = 595 = 595 Yes 2 343+35595433=630 I ( it Yes Ei " 3521=630 t Lt - 35 . - i - I . . . . . - . . . . . . . . . . P m − 1 ( m − 1) m ( m − 1) m m − 1 i =1 i = 1 + 2 = · · · + ( m − 1) Yes 2 2 P m m ( m +1) m i =1 i = 1 + 2 = · · · + m ??? ??? 2 ! Lm - 1) -21Mt ,¥ tm DMTLM C Hht M t C m - m - - - I - - Check row m : = - th ) 2 m ( ( m - 1) MLMTD ✓ = = Check row 146: - - I 2 2 this Do exercise as an Lecture 8 8/ 16

  10. Sentences About the Positive Integers Definition A statement about the positive integers is a predicate P ( n ) with the set of positive integers as its domain. Example: Which are statements about the positive integers? x I I n 2 + n is even I 100 − n I 100 − n > 83 ✓ I John has fewer than n apples in his refrigerator Example: For each predicate, write the sentence when n = 2 and n = 30 and determine whether it is true or false T - T EGO ) EH - I E ( n ) is the statement “ n 2 + n is even” - - , f 6130 ) I GCL ) T = I G ( n ) is the statement “100 − n > 83” ) ✓ , 5121--11-2=2 I S ( n ) is the statement “1 + 2 + · · · + n = n ( n +1) ” 2 ✓ t 30=465 =3 5130 ) It = - - - Lecture 8 9/ 16

  11. Sentences, Continued Example I P ( n ) is “If there are n students in the class, the room will be too small” the 35 students the class there - D= Ii it If I What is P (35)? in are , be small in the class will too room students , I What is P ( m − 1)? there be too will If , are small ma room the Example I S ( n ) is “1 + 4 + 9 + · · · + n 2 = n ( n +1)(2 n +1) ” 6 sense E. I Rewrite using Σ notation ie . I Write S (1), S (2), and S (3) and determine if true or false D= if , T= 2¥ it # I ✓ SC It ✓ Scs ) = ' ¥t¥ = I 245=14 3641 - ✓ e SC 3) 2 it i = , I Write S ( m − 1) and simplify it - is Hit tem son . 6 . . . ul ) = 6 Lecture 8 10/ 16

  12. Sentences, Continued 15,93=19 Example 9=11 a , I Define sequence by a 1 = 11 and a k = a k − 1 + 4 I R ( n ) is “ a n = 4 n + 7” I Write R (1), R (2), and R (3) and determine if true or false ✓ 4.247=15 91=4 V AE 7=11 Rh ) Ru ) It : : - ✓ 93=4.31-7--19 ) Rls : I Write R ( m − 1) and simplify it 3 4Mt - Dtt = 4. cm = - D am Acm : , Lecture 8 11/ 16

  13. The Principle of Mathematical Induction The Principle of Mathematical Induction Let P ( n ) be a statement about the positive integers. If one can prove that " Bus ? i. P (1) is true; and → case ii. for every integer m ≥ 2, whenever P (1) , P (2) , . . . , P ( m − 1) are all true, it follows that P ( m ) is true, then P ( n ) is true for every positive integer n . i =1 i = n ( n +1) Example: Prove that P n for every positive integer n 2 i =1 i = n ( n +1) 1. Let P ( n ) = “ P n ” 2 2. P (1) states that 1 = 1(1+1) , which is clearly true 2 3. Let m ≥ 2 and suppose that P (1) , P (2) , . . . , P ( m − 1) are true 4. Consider P ( m ): m X i = 1 + 2 + · · · + m = (1 + 2 + · · · + ( m − 1)) + m i =1 = ( m − 1) m + m since S ( m − 1) is true 2 � ( m − 1) + 2 � = ( m − 1) m + 2 m = m = m ( m + 1) . 2 2 2 5. Thus P ( m ) is true, completing the induction Lecture 8 12/ 16

  14. Examples i =1 2 i − 1 = 2 n − 1” Example 1: Prove P ( n ) = “ P n ✓ : ! 's j ' i. PhD ? , I - all true = - 1) are that . , Plm Pll ) and suppose . Let . 32 , - ' - ! m - ' I z poms : Iii ' ' In I hi 20=1--2 . - ' in ' " it 2. I - . a t = - V - 3. = am I - result induction follows by so Example 2: Given a 1 = 1 and a k = a k − 1 + (2 k − 1) for k ≥ 2, prove that a n = n 2 for p C n ) all n ≥ 1 " ' ' ' an : ' n are all true ✓ get - D Pll ) : and suppose that put , . , Plm i. . . Let - 1) is miss PL 'm a - - d.my#2m-l=Lm-D2f2m since . I - true assumed Plm ) am : 3. T K Hmt 4M - I so that am . ; - ) t mh - = m2 ✓ s Lecture 8 13/ 16

  15. Exercise Given a 1 = 2 and a k = a k − 1 + 2 k for k ≥ 2, prove that a n = n ( n + 1) for all n ≥ 1 Curti ) P Ch ) i n ane ✓ - fit D= 2 I P LD go : I - D true . Pcm PCI ) are and . Let assume me 2 . . . , , 2 Ams want to show what mcm xD ← we Plm ) am : = 3 - ' I . Plm = ( - 1) km since ) t am Dti t Lm m am . , ÷÷÷÷ : Lecture 8 14/ 16

  16. All Puppies are the Same Color Puppy Theorem Let P ( n ) be the predicate that any set of n puppies are all the same color. Then P ( n ) holds for n ≥ 1. Inductive Proof: 1. Base case: P (1) holds trivially (a puppy is the same color as itself) Line , for some 2. Assume that P (1) , P (2) , . . . , P ( m − 1) all hold for some m > 1 32 ) 3. Inductive argument for P ( m ), i.e. for a set of m puppies: M argument 3.1 Remove one puppy (say, Whiskers), leaving m − 1 puppies hold 3.2 By induction, the m − 1 puppies have the same color (say, white), since must P ( m − 1) holds for all 3.3 Pick one of those puppies (say, Bella), who must be white 3.4 Remove Bella and add back Whiskers, leaving m − 1 puppies 32 m , 3.5 Since P ( m − 1) is assumed to hold, all of the puppies are the same color, f- so Whiskers is white also but 3.6 Hence all of the puppies are white, and hence are the same color fails Pls ) , i.e for argument for man . , Lecture 8 15/ 16

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend