CSE390D Notes for Friday, 10/18/24
turning to induction, chapter 5
Trying to prove some P(n) for n in some set of integers that has a
least one element. Two step process:
1) Prove P(min) where min is least
2) Prove that P(k) -> P(k + 1) whenever k in set
ladder analogy
recursion analogy
There is a certain template that I want to follow for these proofs.
Best to follow some examples.
-------------------------------------------------------------------------------
Show that:
1 + 2^1 + 2^2 + ... + 2^n = 2^(n+1) - 1
We prove using induction P(n): sum(i = 0 to n of 2^i) = 2^n-1 for n in N
Prove P(0): 1 = 2 - 1 = 2^1 - 1 = 2^(0+1) - 1
Prove that P(k) -> P(k+1) for k in N
P(k): sum(i=0 to k of 2^i) = 2^(k + 1) - 1
P(k+1): sum(i=0 to k+1 of 2^i) = 2^(k+2) - 1
Assume P(k) is true for some k in N
sum(i=0 to k+1 of 2^i) = sum(i=0 to k of 2^i) + 2^(k+1)
using inductive hypothesis:
= 2^(k+1) - 1 + 2^(k+1)
= 2 * 2^(k+1) - 1
= 2^(k+2) - 1
QED
-------------------------------------------------------------------------------
Why does it work?
proof by contradiction
well-ordering principle
-------------------------------------------------------------------------------
Show that 2^n < n! for n in {x | x in an integer >= 4}
P(4): 2^4 = 16 < 24 = 4!
Prove that P(k) -> P(k+1) for k in N
P(k): 2^k < k!
P(k+1): 2^(k+1) < (k+1)!
Assume P(k) is true for some k in N
2^(k+1) = 2 * 2^k
using inductive hypothesis:
< 2 * k!
< (k+1) * k! (because k+1 > 2)
= (k+1)!
QED
-------------------------------------------------------------------------------
Show that:
3 | (n^3 - n) for all nonnegative n
We prove using induction
P(n): 3 | (n^3 - n) for n in N
Prove P(0): 0^3 - 0 = 0 = 0 * 3
Prove that P(k) -> P(k+1) for k in N
P(k): 3 | (n^3 - n)
n^3 - n = 3a (for some a)
P(k+1): 3 | (n+1)^3 - (n + 1)
(n+1)^3 - (n + 1) = 3b (for some b)
Assume P(k) is true for some k in N
(n+1)^3 - (n + 1) = (n^3 + 3n^2 + 3n + 1) - (n + 1) =
(n^3 + 3n^2 + 3n) - n = (n^3 - n) + 3(n^2 + n2)
using inductive hypothesis, exists a such that n^3 - n = 3a
(n+1)^3 - (n+1) = n^3 - n + 3(n^2 + n) = 3a + 3(n^2+n)
= 3(a + n^2 + n) (algebra)
So 3 | ((n+1)^3 - (n+1))
QED
-------------------------------------------------------------------------------
Show that:
1^2 + 2^2 + 3^2 + ... + n^2 = n(n+1)(2n+1)/6
We prove using induction
P(n): sum(i = 1 to n of i^2) = n(n+1)(2n+1)/6 for n in Z+
Prove P(1): 1^2 = 1 = 6/6 = 1*2*3/6 = 1*(1+1)(2*1+1)/6
Prove that P(k) -> P(k+1) for k in N
P(k): sum(i = 1 to k of i^2) = k(k+1)(2k+1)/6
P(k+1): sum(i = 1 to k+1 of i^2) = (k+1)(k + 2)(2(k+1) + 1)/6
Assume P(k) is true for some k in N
sum(i = 1 to k+1 of i^2) = sum(i = 1 to k of i^2) + (k+1)^2
using inductive hypothesis:
= k(k+1)(2k+1)/6 + (k+1)^2
= (k+1)(k(2k+1)/6 + k + 1)
= (k+1)(k(2k+1)/6 + 6(k+1)/6)
= (k+1)(k(2k+1) + 6(k+1))/6
= (k+1)(2k^2 + k + 6k + 6)/6
= (k+1)(2k^2 + 7k + 6)/6
= (k+1)(k + 2)(2k + 3)/6
= (k+1)(k + 2)(2(k+1) + 1)/6
QED
Stuart Reges
Last modified: Fri Oct 18 13:07:18 PDT 2024