Induction: One Step At A TimeSlide 2Slide 3Let’s start with dominoesDomino Principle: Line up any number of dominos in a row; knock the first one over and they will all fall.n dominoes numbered 1 to nSlide 7Slide 8n dominoes numbered 0 to n-1Standard Notation/Abbreviation “for all” is written “8”Slide 11The Natural NumbersSlide 13The Infinite Domino Principle Fk ´ The kth domino fallsSlide 15Mathematical Induction: statements proved instead of dominoes fallenInductive Proof / Reasoning To Prove k, SkSlide 18Inductive Proof / Reasoning To Prove k¸b, SkSlide 20Slide 21Slide 22Slide 23Sn “The sum of the first n odd numbers is n2.” “1 + 3 + 5 + (2k-1) + . . +(2n-1)= n2” Trying to establish that: 8n¸1 SnSlide 25Slide 26Slide 27Slide 28Slide 29Slide 30Slide 31Slide 32Sn ´ “n =n(n+1)/2” Use induction to prove k¸0, SkSlide 34Slide 35Slide 36Slide 37Slide 38Slide 39Slide 40All Previous Induction To Prove k, Sk“Strong” Induction To Prove k, SkLeast Counter-Example Induction to Prove k, SkSlide 44Slide 45“All Previous” Induction Can Be Repackaged As Standard InductionSlide 47Slide 48Slide 49Inductive Definition Of FunctionsSlide 51Inductive Definition Recurrence Relation for F(X)Slide 53Slide 54Slide 55Inductive Definition Recurrence Relation for F(X) = 2XInductive Definition Recurrence RelationSlide 58Slide 59Slide 60Inductive Definition Recurrence Relation F(X) = X for X a whole power of 2.Base Case: 8x2 P(X,0) = X Inductive Rule: 8x,y2, y>0, P(x,y) = P(x,y-1) + 1Slide 63Slide 64Slide 65Slide 66Slide 67Slide 68Slide 69For k = 0 to 3 P(k,0)=k For j = 1 to 7 For k = 0 to 3 P(k,j) = P(k,j-1) + 1Slide 71Slide 72Slide 73Slide 74Slide 75Slide 76Slide 77Slide 78Slide 79Procedure P(x,y): If y=0 return x Otherwise return P(x,y-1)+1;Slide 81Slide 82Leonardo FibonacciSlide 84Slide 85The rabbit reproduction modelSlide 87Slide 88Slide 89Slide 90Slide 91Slide 92Inductive Definition or Recurrence Relation for the Fibonacci NumbersSlide 94Slide 95What is a closed form formula for Fib(n) ????Slide 97Study BeeInduction: One Step At A TimeGreat Theoretical Ideas In Computer ScienceSteven RudichCS 15-251 Spring 2005Lecture 1 Jan 11, 2005 Carnegie Mellon UniversityToday we will talk about INDUCTIONInduction is the primary way we:1.Prove theorems2.Construct and define objectsLet’s start with dominoesDomino Principle: Line up any number of dominos in a row; knock the first one over and they will all fall.n dominoes numbered 1 to nFk ´ The kth domino fallsIf we set them all up in a row then we know that each one is set up to knock over the next one:For all 1 ≤ k < n:Fk ) Fk+1n dominoes numbered 1 to nFk ´ The kth domino fallsFor all 1 ≤ k < n:Fk ) Fk+1F1 ) F2 ) F3 ) …F1 ) All Dominoes FallComputer Scientists don’t start numbering things at 1, they start at 0.YOU will spend a career doing this, so GET USED TO IT NOW.n dominoes numbered 0 to n-1Fk ´ The kth domino fallsFor all 0 ≤ k < n-1:Fk ) Fk+1F0 ) F1 ) F2 ) …F0 ) All Dominoes FallStandard Notation/Abbreviation“for all” is written “8”Example:For all k>0, P(k)is equivalent to8 k>0, P(k)n dominoes numbered 0 to n-1Fk ´ The kth domino falls8 k, 0 ≤ k < n-1:Fk ) Fk+1F0 ) F1 ) F2 ) …F0 ) All Dominoes FallThe Natural Numbers = { 0, 1, 2, 3, . . .}The Natural Numbers = { 0, 1, 2, 3, . . .}One domino for each natural number:0 1 2 3 4 5 ….The Infinite Domino Principle Fk ´ The kth domino fallsSuppose F0Suppose for each natural number k,Fk ) Fk+1Then All Dominoes Fall!F0 ) F1 ) F2 ) …The Infinite Domino Principle Fk ´ The kth domino fallsSuppose F0Suppose for each natural number k,Fk ) Fk+1Then All Dominoes Fall!Proof: If they do not all fall, there must be a least numbered domino d>0 that did not fall. Hence, Fd-1 and not Fd . Fd-1 ) Fd. Hence, domino d fell and did not fall. Contradiction.Mathematical Induction: statements proved instead of dominoes fallenInfinite sequence of statements: S0, S1, …Fk ´ Sk provedInfinite sequence ofdominoes.Fk ´ domino k fallsEstablish 1) F02) 8 k, Fk ) Fk+1Conclude that Fk is true for all kInductive Proof / ReasoningTo Prove k, SkEstablish “Base Case”: S0Establish “Domino Property”: k, Sk ) Sk+1Assume hypothetically that Sk for any particular k; Conclude that Sk+1k, Sk ) Sk+1Inductive Proof / ReasoningTo Prove k, Sk“Induction Hypothesis” SkUse I.H. to show Sk+1k, Sk ) Sk+1Establish “Base Case”: S0Establish “Domino Property”: k, Sk ) Sk+1Inductive Proof / ReasoningTo Prove k¸b, SkEstablish “Base Case”: SbEstablish “Domino Property”: k¸b, Sk ) Sk+1Assume k¸ bAssume “Inductive Hypothesis”: Sk Prove that Sk+1 followsTheorem? The sum of the first n odd numbers is n2.Theorem? The sum of the first n odd numbers is n2.CHECK IT OUT ON SMALL VALUES:1 = 11+3 = 41+3+5 = 91+3+5+7 = 16Theorem: The sum of the first n odd numbers is n2. The kth odd number is expressed by the formula (2k – 1), when k>0.Sn “The sum of the first n odd numbers is n2.” Equivalently, Sn is the statement that:1· k· n (2k-1)=1 + 3 + 5 + (2k-1) + . . +(2n-1)= n2Sn “The sum of the first n odd numbers is n2.”“1 + 3 + 5 + (2k-1) + . . +(2n-1)= n2” Trying to establish that: 8n¸1 SnBase case: S1 is trueThe sum of the first 1 odd numbers is 1.Sn “The sum of the first n odd numbers is n2.”“1 + 3 + 5 + (2k-1) + . . +(2n-1)= n2” Trying to establish that: 8n¸1 SnAssume “Induction Hypothesis”: Sk (for any particular k¸ 1) 1+3+5+…+ (2k-1) = k2Sn “The sum of the first n odd numbers is n2.”“1 + 3 + 5 + (2k-1) + . . +(2n-1)= n2” Trying to establish that: 8n¸1 SnAssume “Induction Hypothesis”: Sk (for any particular k¸ 1) 1+3+5+…+ (2k-1) = k2Add (2k+1) to both sides.1+3+5+…+ (2k-1)+(2k+1) = k2 +(2k+1) Sum of first k+1 odd numbers = (k+1)2CONCLUSE: Sk+1Sn “The sum of the first n odd numbers is n2.”“1 + 3 + 5 + (2k-1) + . . +(2n-1)= n2” Trying to establish that: 8n¸1 SnEstablished base case: S1Established domino property: 8 k¸ 1 Sk ) Sk+1By induction of n, we conclude that:8n¸1 SnTHEOREM: The sum of the first n odd numbers is n2.Theorem? The sum of the first n numbers is ½n(n+1).Theorem? The sum of the first n numbers is ½n(n+1).Try it out on small numbers!1 = 1 = =½ 1(1+1).1+2 = 3 =½ 2(2+1).1+2+3 = 6 =½ 3(3+1).1+2+3+4 = 10=½ 4(4+1).Theorem? The sum of the first n numbers is ½n(n+1). = 0 = =½ 0(0+1).1
View Full Document