Chapter 5 1
Chapter Summary Mathematical Inductin Strng Inductin Recursive Definitins Structural Inductin Recursive Algrithms
Sectin 5.1 3
Sectin Summary Mathematical Inductin Examples f Prf by Mathematical Inductin Guidelines fr Prfs by Mathematical Inductin
Climbing an Infinite Ladder Suppse we have an infinite ladder: We can reach the first rung f the ladder. If we can reach a particular rung f the ladder, then we can reach the next rung. Can we reach every step n the ladder?
Principle f Mathematical Inductin Principle f Mathematical Inductin: T prve that P(n) is true fr all psitive integers n, we cmplete these steps: Basis Step: Shw that P(1) is true. Inductive Step: Shw that P(k) P(k + 1) is true fr all psitive integers k. T cmplete the inductive step, assuming the inductive hypthesis that P(k) hlds fr an arbitrary integer k, shw that must P(k + 1) be true. 6
Principle f Mathematical Inductin Climbing an Infinite Ladder Example: BASIS STEP: By (1), we can reach rung 1. INDUCTIVE STEP: Assume the inductive hypthesis that we can reach rung k. Then by (2), we can reach rung k + 1. Hence, P(k) P(k + 1) is true fr all psitive integers k. We can reach every rung n the ladder. 7
Imprtant Pints Mathematical inductin can be expressed as the rule f inference (P(1) k (P(k) P(k + 1))) n P(n), where the dmain is the set f psitive integers. In a prf by mathematical inductin, we dn t assume that P(k) is true fr all psitive integers! We shw that if we assume that P(k) is true, then P(k + 1) must als be true. Prfs by mathematical inductin d nt always start at the integer 1. In such a case, the basis step begins at a starting pint b where b is an integer. Mathematical inductin is valid because f the well rdering prperty
Hw Mathematical Inductin Wrks Cnsider an infinite sequence f dmines, labeled 1,2,3,, where each dmin is standing. Let P(n) be the prpsitin that the n th dmin is kncked ver. knw that the first dmin is kncked dwn, i.e., P(1) is true. We als knw that if whenever the k th dmin is kncked ver, it kncks ver the (k + 1) st dmin, i.e, P(k) P(k + 1) is true fr all psitive integers k. Hence, all dmins are kncked ver. P(n) is true fr all psitive integers n.
Examples Example: Shw that: Slutin: BASIS STEP: P(1) is true since 1(1 + 1)/2 = 1. INDUCTIVE STEP: Assume true fr P(k). The inductive hypthesis is Under this assumptin, Hence, we have shwn that P(k + 1) fllws frm P(k). Therefre the sum f the first n psitive integers is
Examples Example: Use mathematical inductin t shw that fr all nnnegative integers n Slutin: P(n): fr all nnnegative integers n BASIS STEP: P(0) is true since 2 0 = 1 = 2 1 1. This cmpletes the basis step. INDUCTIVE STEP: assume that P(k) is true fr an arbitrary nnnegative integer k 1 + 2 + 2 2 + +2 k = 2 k+1 1. shw that assume that P(k) is true, then P(k + 1) is als true. 1 + 2 + 2 2 + +2 k + 2 k+1 = 2 (k+1)+ 1 1 = 2 k+2 1 Under the assumptin f P(k), we see that 1 + 2 + 2 2 + +2 k + 2 k+1 = (1 + 2 + 2 2 + +2 k ) + 2 k+1 =(2 k+1 1) + 2 k+1 = 2 2 k+1 1= 2 k+2 1. Because we have cmpleted the basis step and the inductive step, by mathematical inductin we knw that P(n) is true fr all nnnegative integers n. That is, 1 + 2+ +2 n = 2 n+1 1 fr all nnnegative integers n.
Examples Example: Cnjecture and prve crrect a frmula fr the sum f the first n psitive dd integers. Then prve yur cnjecture. Slutin: We have: 1= 1, 1 + 3 = 4, 1 + 3 + 5 = 9, 1 + 3 + 5 + 7 = 16, 1 + 3 + 5 + 7 + 9 = 25. We can cnjecture that the sum f the first n psitive dd integers is n 2, 1 + 3 + 5 + + (2n 1) + (2n + 1) =n 2.
Examples P(n):1 + 3 + 5 + + (2n 1) + (2n + 1) =n 2. BASIS STEP: P(1) is true since 1 2 = 1. INDUCTIVE STEP: P(k) P(k + 1) fr every psitive integer k. Assume the inductive hypthesis hlds and then shw that P(k) hlds has well. Inductive Hypthesis: 1 + 3 + 5 + + (2k 1) =k 2 S, assuming P(k), it fllws that: 1 + 3 + 5 + + (2k 1) + (2k + 1) =[1 + 3 + 5 + + (2k 1)] + (2k + 1) = k 2 + (2k + 1) = k 2 + 2k + 1 = (k + 1) 2 Hence, we have shwn that P(k + 1) fllws frm P(k). Therefre the sum f the first n psitive dd integers is n 2.
Examples Example: Use mathematical inductin t prve that 2 n < n!, fr every integer n 4. Slutin: Let P(n) be the prpsitin that 2 n < n!. BASIS STEP: P(4) is true since 2 4 = 16 < 4! = 24. INDUCTIVE STEP: Assume P(k) hlds, i.e., 2 k integer k 4. T shw that P(k + 1) hlds: 2 k+1 = 2 2 k < 2 k! (by the inductive hypthesis) < (k + 1)k! = (k + 1)! Therefre, 2 n < n! hlds, fr every integer n 4. < k! fr an arbitrary
Examples Example: Use mathematical inductin t shw that if S is a finite set with n elements, where n is a nnnegative integer, then S has 2 n subsets. Slutin: P(n) be the prpsitin that a set with n elements has 2 n subsets. Basis Step: P(0) is true, because the empty set has nly itself as a subset and 2 0 = 1. Inductive Step: Assume P(k) is true fr an arbitrary nnnegative integer k. Inductive Hypthesis: Fr an arbitrary nnnegative integer k, every set with k elements has 2 k subsets. Let T be a set with k + 1 elements. Then T = S {a}, where a T and S = T {a}. Fr each subset X f S, there are exactly tw subsets f T, i.e., X and X {a}. By the inductive hypthesis S has 2 k subsets. Since there are tw subsets f T fr each subset f S, the number f subsets f T is 2 2 k = 2 k+1. Because we have cmpleted the basis step and the inductive step, by mathematical inductin if S is a finite set with n elements, where n is a nnnegative integer, then S has 2 n subsets.
Sectin 5.2
Sectin Summary Strng Inductin Example Prfs using Strng Inductin Well-rdering prperty
Strng Inductin Strng Inductin: T prve that P(n) is true fr all psitive integers n, where P(n) is a prpsitinal functin, cmplete tw steps: Basis Step: Verify that the prpsitin P(1) is true. Inductive Step: Shw the cnditinal statement [P(1) P(2) P(k)] P(k + 1) hlds fr all psitive integers k. Strng Inductin is smetimes called the secnd principle f mathematical inductin r cmplete inductin.
Strng Inductin and the Infinite Ladder Strng inductin tells us that we can reach all rungs if: We can reach the first rung f the ladder. Fr every integer k, if we can reach the first k rungs, then we can reach the (k + 1)st rung.
Examples Example: Suppse we can reach the first and secnd rungs f an infinite ladder, and we knw that if we can reach a rung, then we can reach tw rungs higher. Prve that we can reach every rung. Slutin: Prve the result using strng inductin. BASIS STEP: We can reach the first step. INDUCTIVE STEP: The inductive hypthesis is that we can reach the first k rungs, fr any k 2. We can reach the (k + 1)st rung since we can reach the (k 1)st rung by the inductive hypthesis. Hence, we can reach all rungs f the ladder.
Examples Example: Prve that every amunt f pstage f 12 cents r mre can be frmed using just 4-cent and 5-cent stamps. Prve the result using Mathematical inductin. BASIS STEP: Pstage f 12 cents can be frmed using three 4-cent stamps. INDUCTIVE STEP: assume P(k) is true. That is, pstage f k cents can be frmed using 4-cent and 5-cent stamps. T cmplete the inductive step, assume P(k) is true, then P(k + 1) is als true where k 12. That is, if we can frm pstage f k cents, then we can frm pstage f k + 1 cents. S, assume the inductive hypthesis is true; tw cases, when at least ne 4-cent stamp has been used and when n 4-cent stamps have been used. First, suppse that at least ne 4-cent stamp was used t frm pstage f k cents. Then we can replace this stamp with a 5-cent stamp t frm pstage f k + 1 cents. But if n 4-cent stamps were used, we can frm pstage f k cents using nly 5-cent stamps. Mrever, because k 12, we needed at least three 5-cent stamps t frm pstage f k cents. S, we can replace three 5-cent stamps with fur 4-cent stamps t frm pstage f k + 1 cents. This cmpletes the inductive step. Cnclusin
Examples Example: Prve that every amunt f pstage f 12 cents r mre can be frmed using just 4-cent and 5-cent stamps. Prve the result using Strng inductin. BASIS STEP: Shw that P(12), P(13), P(14), and P(15) are true. This cmpletes the basis step. INDUCTIVE STEP: The inductive hypthesis is the statement that P(j) is true fr 12 j k, where k is an integer with k 15. T cmplete the inductive step, assume that we can frm pstage f j cents, where 12 j k. Then shw that under the assumptin that P(k + 1) is true, we can als frm pstage f k + 1 cents. Using the inductive hypthesis, we can assume that P(k 3) is true because k 3 12, that is, we can frm pstage f k 3 cents using just 4-cent and 5-cent stamps. T frm pstage f k + 1 cents, we need nly add anther 4-cent stamp t the stamps we used t frm pstage f k 3 cents. That is, we have shwn that if the inductive hypthesis is true, then P(k + 1) is als true. This cmpletes the inductive step. Cnclusin
Well-rdering prperty The well-prperty prperty: every nnempty set f nnnegative integers has a least element. Used t prve the validity f mathematical inductin and strng inductin Mathematic inductin If P(1) is true and P(k)->P(k+1) is true, then P(n) must be true fr all integer n. Prf by cntradictin Assume at least ne psitive integer fr which P(n) is false, that is,the set S f psitive integers fr which P(n) is false is nnempty. By well-rdering prperty, S has a least element m m>1, then 0<m-1<m, hence, nt is S Then, P(m-1) must be true, then P(m-1)->P(m) is true which is a cntradictin.
Which Frm f Inductin Shuld Be Used? We can always use strng inductin instead f mathematical inductin. But there is n reasn t use it if it is simpler t use mathematical inductin. (See page 335 f text.) In fact, the principles f mathematical inductin, strng inductin, and the well-rdering prperty are all equivalent. (Exercises 41-43) Smetimes it is clear hw t prceed using ne f the three methds, but nt the ther tw.