Recursion Lecture 9

Recursion Lecture 9

Recursion Lecture 9 Justin Stevens Justin Stevens Recursion (Lecture 9) 1 / 26 Outline 1 Strong Induction Induction Strong Induction 2 Recursion 3 Parting Shots Justin Stevens Recursion (Lecture 9) 2 / 26 Base Case: Show P(1). Inductive Step: Show P(k) implies P(k + 1) for any integer k ≥ 1. The assumption we make is known as the induction hypothesis. Induction Theorem. Suppose we have a statement P that we wish to show is true for all positive integers at least 1. We can prove this in two steps: Justin Stevens Recursion (Lecture 9) 3 / 26 Induction Theorem. Suppose we have a statement P that we wish to show is true for all positive integers at least 1. We can prove this in two steps: Base Case: Show P(1). Inductive Step: Show P(k) implies P(k + 1) for any integer k ≥ 1. The assumption we make is known as the induction hypothesis. Justin Stevens Recursion (Lecture 9) 3 / 26 h i k(k + 1)2 13 + 23 + 33 + ··· + k3 + (k + 1)3 = + (k + 1)3 2 ! k2 = (k + 1)2 + k + 1 4 (k + 1)(k + 2)2 = . 2 This is the sum of cubes formula for n = k + 1, hence the identity holds. Proof. When n = 1, 1 = 12. We assume the formula is true for n = k: k(k + 1)2 13 + 23 + 33 + ··· + k3 = . (Hypothesis) 2 Adding the next cube to both sides of our assumption gives: Sum of Cubes Identity 2 3 3 3 3 h n(n+1) i Example. Prove the identity 1 + 2 + 3 + ··· + n = 2 . Justin Stevens Recursion (Lecture 9) 4 / 26 h i k(k + 1)2 13 + 23 + 33 + ··· + k3 + (k + 1)3 = + (k + 1)3 2 ! k2 = (k + 1)2 + k + 1 4 (k + 1)(k + 2)2 = . 2 This is the sum of cubes formula for n = k + 1, hence the identity holds. Adding the next cube to both sides of our assumption gives: Sum of Cubes Identity 2 3 3 3 3 h n(n+1) i Example. Prove the identity 1 + 2 + 3 + ··· + n = 2 . Proof. When n = 1, 1 = 12. We assume the formula is true for n = k: k(k + 1)2 13 + 23 + 33 + ··· + k3 = . (Hypothesis) 2 Justin Stevens Recursion (Lecture 9) 4 / 26 ! k2 = (k + 1)2 + k + 1 4 (k + 1)(k + 2)2 = . 2 This is the sum of cubes formula for n = k + 1, hence the identity holds. Sum of Cubes Identity 2 3 3 3 3 h n(n+1) i Example. Prove the identity 1 + 2 + 3 + ··· + n = 2 . Proof. When n = 1, 1 = 12. We assume the formula is true for n = k: k(k + 1)2 13 + 23 + 33 + ··· + k3 = . (Hypothesis) 2 Adding the next cube to both sides of our assumption gives: h i k(k + 1)2 13 + 23 + 33 + ··· + k3 + (k + 1)3 = + (k + 1)3 2 Justin Stevens Recursion (Lecture 9) 4 / 26 (k + 1)(k + 2)2 = . 2 This is the sum of cubes formula for n = k + 1, hence the identity holds. Sum of Cubes Identity 2 3 3 3 3 h n(n+1) i Example. Prove the identity 1 + 2 + 3 + ··· + n = 2 . Proof. When n = 1, 1 = 12. We assume the formula is true for n = k: k(k + 1)2 13 + 23 + 33 + ··· + k3 = . (Hypothesis) 2 Adding the next cube to both sides of our assumption gives: h i k(k + 1)2 13 + 23 + 33 + ··· + k3 + (k + 1)3 = + (k + 1)3 2 ! k2 = (k + 1)2 + k + 1 4 Justin Stevens Recursion (Lecture 9) 4 / 26 This is the sum of cubes formula for n = k + 1, hence the identity holds. Sum of Cubes Identity 2 3 3 3 3 h n(n+1) i Example. Prove the identity 1 + 2 + 3 + ··· + n = 2 . Proof. When n = 1, 1 = 12. We assume the formula is true for n = k: k(k + 1)2 13 + 23 + 33 + ··· + k3 = . (Hypothesis) 2 Adding the next cube to both sides of our assumption gives: h i k(k + 1)2 13 + 23 + 33 + ··· + k3 + (k + 1)3 = + (k + 1)3 2 ! k2 = (k + 1)2 + k + 1 4 (k + 1)(k + 2)2 = . 2 Justin Stevens Recursion (Lecture 9) 4 / 26 Sum of Cubes Identity 2 3 3 3 3 h n(n+1) i Example. Prove the identity 1 + 2 + 3 + ··· + n = 2 . Proof. When n = 1, 1 = 12. We assume the formula is true for n = k: k(k + 1)2 13 + 23 + 33 + ··· + k3 = . (Hypothesis) 2 Adding the next cube to both sides of our assumption gives: h i k(k + 1)2 13 + 23 + 33 + ··· + k3 + (k + 1)3 = + (k + 1)3 2 ! k2 = (k + 1)2 + k + 1 4 (k + 1)(k + 2)2 = . 2 This is the sum of cubes formula for n = k + 1, hence the identity holds. Justin Stevens Recursion (Lecture 9) 4 / 26 Proof Without Words of Sum of Cubes Figure 1: Alan L. Fry, Mathematical Association of America (1985) Justin Stevens Recursion (Lecture 9) 5 / 26 Solution. We begin by showing the first 4 base cases: 5, 75, 375, 9375. k k Assume that the number N = a1a2a3 ··· ak is divisible by 5 , so N = 5 A. Consider the k + 1-digit number for i ∈ {1, 3, 5, 7, 9}: k k k k Ni = ia1a2a3 ··· ak = i · 10 + 5 A = 5 i · 2 + A . From the reduced residue system, there exists i with i · 2k + A ≡ 0 (mod 5). k+1 Then Ni is a k + 1-digit number divisible by 5 all of whose digits are odd. n Digit Number Divisible by 5n Example. (USAMO) Prove that for every positive integer n, there exists an n-digit number divisible by 5n all of whose digits are odd. Justin Stevens Recursion (Lecture 9) 6 / 26 k k Assume that the number N = a1a2a3 ··· ak is divisible by 5 , so N = 5 A. Consider the k + 1-digit number for i ∈ {1, 3, 5, 7, 9}: k k k k Ni = ia1a2a3 ··· ak = i · 10 + 5 A = 5 i · 2 + A . From the reduced residue system, there exists i with i · 2k + A ≡ 0 (mod 5). k+1 Then Ni is a k + 1-digit number divisible by 5 all of whose digits are odd. n Digit Number Divisible by 5n Example. (USAMO) Prove that for every positive integer n, there exists an n-digit number divisible by 5n all of whose digits are odd. Solution. We begin by showing the first 4 base cases: 5, 75, 375, 9375. Justin Stevens Recursion (Lecture 9) 6 / 26 k k k k Ni = ia1a2a3 ··· ak = i · 10 + 5 A = 5 i · 2 + A . From the reduced residue system, there exists i with i · 2k + A ≡ 0 (mod 5). k+1 Then Ni is a k + 1-digit number divisible by 5 all of whose digits are odd. n Digit Number Divisible by 5n Example. (USAMO) Prove that for every positive integer n, there exists an n-digit number divisible by 5n all of whose digits are odd. Solution. We begin by showing the first 4 base cases: 5, 75, 375, 9375. k k Assume that the number N = a1a2a3 ··· ak is divisible by 5 , so N = 5 A. Consider the k + 1-digit number for i ∈ {1, 3, 5, 7, 9}: Justin Stevens Recursion (Lecture 9) 6 / 26 From the reduced residue system, there exists i with i · 2k + A ≡ 0 (mod 5). k+1 Then Ni is a k + 1-digit number divisible by 5 all of whose digits are odd. n Digit Number Divisible by 5n Example. (USAMO) Prove that for every positive integer n, there exists an n-digit number divisible by 5n all of whose digits are odd. Solution. We begin by showing the first 4 base cases: 5, 75, 375, 9375. k k Assume that the number N = a1a2a3 ··· ak is divisible by 5 , so N = 5 A. Consider the k + 1-digit number for i ∈ {1, 3, 5, 7, 9}: k k k k Ni = ia1a2a3 ··· ak = i · 10 + 5 A = 5 i · 2 + A . Justin Stevens Recursion (Lecture 9) 6 / 26 k+1 Then Ni is a k + 1-digit number divisible by 5 all of whose digits are odd. n Digit Number Divisible by 5n Example. (USAMO) Prove that for every positive integer n, there exists an n-digit number divisible by 5n all of whose digits are odd. Solution. We begin by showing the first 4 base cases: 5, 75, 375, 9375. k k Assume that the number N = a1a2a3 ··· ak is divisible by 5 , so N = 5 A. Consider the k + 1-digit number for i ∈ {1, 3, 5, 7, 9}: k k k k Ni = ia1a2a3 ··· ak = i · 10 + 5 A = 5 i · 2 + A . From the reduced residue system, there exists i with i · 2k + A ≡ 0 (mod 5). Justin Stevens Recursion (Lecture 9) 6 / 26 n Digit Number Divisible by 5n Example. (USAMO) Prove that for every positive integer n, there exists an n-digit number divisible by 5n all of whose digits are odd. Solution. We begin by showing the first 4 base cases: 5, 75, 375, 9375. k k Assume that the number N = a1a2a3 ··· ak is divisible by 5 , so N = 5 A. Consider the k + 1-digit number for i ∈ {1, 3, 5, 7, 9}: k k k k Ni = ia1a2a3 ··· ak = i · 10 + 5 A = 5 i · 2 + A . From the reduced residue system, there exists i with i · 2k + A ≡ 0 (mod 5).

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    76 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us