CS 23/MATH 23 Induction Proving a statement by mathematical induction is a two step process. In step one, the basis step, you prove that P(a) is true for a particular integer a. In step two, the inductive step, you prove that for all integers k a, if P(k)* is true, then P(k + 1)* is true. *If P(k – 1) is true, then P(k) is true could be substituted here as well. The inductive step is written formally, ( ) ( ) To prove the inductive step you suppose that P(k) is true, where k is a particular but arbitrarily chosen integer greater than or equal to a. This supposition is called the inductive hypothesis. Next you show that P(k + 1) is true. 1. For each positive integer n, let P(n) be the formula 12 + 22 + 32 + … + n2 = (n(n + 1)(2n + 1))/6 a) Write P(1). Is it true? b) Write P(k). c) Write P(k – 1) d) Write p(k + 1) 2. For each positive integer n, let P(n) be the inequality n2 < 2n a) Write P(5). Is it true and why 5? b) Write P(k). 1 Spring 2012 CS 23/MATH 23 Induction c) Write P(k – 1). d) Write P( k + 1). 3. Identify the steps in the following proof. For all integers n 1, 0 + 1 + 2 + 3 + … + n-1 = (n(n-1))/2 Rewrite 1 + 2 + 3 + … + n as a summation Proof (by mathematical induction) Show for P(1) 0 = 1(1 - 1)/2 0 = 0/2 0=0 so the formulas is true for n = 1. Show that for all integers k a, if the property is true for n = k, then it is true for n = k + 1 Suppose 0 +1 + 2 + 3 + … + k-1 = (k(k-1))/2 for some integer k We must show that, 1 0 +1 + 2 + 3 + … + (k-1) + k = ((k +1)(k + 1 -1))/2 But, 0 + 1 + 2 + 3 + … + k = 1 + 2 + 3 + … +(k -1) + k //add in the next term which is k = (k(k-1))/2 + k = (k(k-1))/2 + (k ) * 2/2 (why?) = (k(k - 1) + 2k)/2 = (k2 – k + 2k)/2 = (k2 + k)/2 = ((k + 1) k) /2 = ((k + 1) (k + 1 – 1))/2 Substituting n = k + 1 we arrive at (n( n – 1))/2. This is what we needed to prove. Therefore, by the principle of mathematical induction, the theorem, For all integers n 1, 0 + 1 + 2 + 3 + … + n-1 = (n(n-1))/2 is true. 2 Spring 2012 CS 23/MATH 23 Induction Principle of Direct Inference P(a) true (premise) Assume P(k) true for all k 1 Show P(k) P(k + 1) true…..then assumption must be true P(a) P(k) P(k) P(k + 1) T T T T F F F T T F F T One more for practice: 4. For each positive integer n, let P(n) be the formula 12 + 22 + 32 + … + n2 = (n(n + 1)(2n + 1))/6 Basis Step: Inductive Step: Inductive Hypothesis: 3 Spring 2012
© Copyright 2026 Paperzz