Mathematical Induction

1293 words
6 min read
Python Week 1: the first filter for runtime behavior
Visual companion
Python
Type and operator map

Python Week 1: the first filter for runtime behavior

View
Revision summary

What this note is really saying

Short form

# Mathematical Induction ## ๐ŸŽฏ Learning Objectives - State the **principle of mathematical induction** (weak form) - Apply induction to prove formulas, inequalities, and divisibility - Use **strong induction** when multiple previous cases are needed - Recognise which form of induction is appropriate - Construct comp...

Mathematical Induction

๐ŸŽฏ Learning Objectives

  • State the principle of mathematical induction (weak form)
  • Apply induction to prove formulas, inequalities, and divisibility
  • Use strong induction when multiple previous cases are needed
  • Recognise which form of induction is appropriate
  • Construct complete inductive proofs with base case and inductive step

4.1 Intuition: The Domino Effect

Mathematical induction works like a row of dominoes:
  1. Base case: Knock over the first domino.
  2. Inductive step: If domino kk falls, domino k+1k+1 falls.
  3. Conclusion: All dominoes fall.
๐Ÿ”‘ Key Insight: Induction proves statements about infinitely many natural numbers using only two steps.

4.2 Weak (Simple) Induction

Principle

To prove P(n)P(n) for all nโˆˆNn \in \mathbb{N} (starting from some n0n_0):
  1. Base case: Prove P(n0)P(n_0) is true.
  2. Inductive hypothesis: Assume P(k)P(k) is true for some kโ‰ฅn0k \geq n_0.
  3. Inductive step: Show P(k)โ†’P(k+1)P(k) \to P(k+1).
  4. Conclusion: By induction, P(n)P(n) is true for all nโ‰ฅn0n \geq n_0.

Example 1: Sum of First nn Natural Numbers

Theorem: 1+2+3+โ‹ฏ+n=n(n+1)21 + 2 + 3 + \dots + n = \frac{n(n+1)}{2} for all nโ‰ฅ1n \geq 1. Proof:
  • Base case (n=1n=1): LHS = 1, RHS = 1(2)2=1\frac{1(2)}{2} = 1. โœ“
  • Inductive hypothesis: Assume 1+2+โ‹ฏ+k=k(k+1)21 + 2 + \dots + k = \frac{k(k+1)}{2}.
  • Inductive step: Show for k+1k+1:
1+2+โ‹ฏ+k+(k+1)=k(k+1)2+(k+1)1 + 2 + \dots + k + (k+1) = \frac{k(k+1)}{2} + (k+1) =k(k+1)+2(k+1)2=(k+1)(k+2)2= \frac{k(k+1) + 2(k+1)}{2} = \frac{(k+1)(k+2)}{2}
Which is (k+1)((k+1)+1)2\frac{(k+1)((k+1)+1)}{2}. โœ“ โ–ก\square

Example 2: Sum of Squares

Theorem: โˆ‘i=1ni2=n(n+1)(2n+1)6\sum_{i=1}^n i^2 = \frac{n(n+1)(2n+1)}{6}. Proof:
  • Base (n=1n=1): 1=1โ‹…2โ‹…36=11 = \frac{1 \cdot 2 \cdot 3}{6} = 1. โœ“
  • IH: Assume for n=kn=k.
  • Step: โˆ‘i=1k+1i2=k(k+1)(2k+1)6+(k+1)2\sum_{i=1}^{k+1} i^2 = \frac{k(k+1)(2k+1)}{6} + (k+1)^2
=k(k+1)(2k+1)+6(k+1)26= \frac{k(k+1)(2k+1) + 6(k+1)^2}{6} =(k+1)[k(2k+1)+6(k+1)]6= \frac{(k+1)[k(2k+1) + 6(k+1)]}{6} =(k+1)(2k2+7k+6)6= \frac{(k+1)(2k^2 + 7k + 6)}{6} =(k+1)(k+2)(2k+3)6= \frac{(k+1)(k+2)(2k+3)}{6} =(k+1)((k+1)+1)(2(k+1)+1)6.โ–ก= \frac{(k+1)((k+1)+1)(2(k+1)+1)}{6}. \square

Example 3: Divisibility

Theorem: 7nโˆ’17^n - 1 is divisible by 6 for all nโ‰ฅ1n \geq 1. Proof:
  • Base (n=1n=1): 71โˆ’1=67^1 - 1 = 6, divisible by 6. โœ“
  • IH: Assume 7kโˆ’17^k - 1 is divisible by 6, i.e., 7k=6m+17^k = 6m + 1.
  • Step: 7k+1โˆ’1=7โ‹…7kโˆ’1=7(6m+1)โˆ’1=42m+7โˆ’1=42m+6=6(7m+1)7^{k+1} - 1 = 7 \cdot 7^k - 1 = 7(6m + 1) - 1 = 42m + 7 - 1 = 42m + 6 = 6(7m + 1). Thus 7k+1โˆ’17^{k+1} - 1 is divisible by 6. โ–ก\square

Example 4: Inequality

Theorem: 2n>n2^n > n for all nโ‰ฅ1n \geq 1. Proof:
  • Base (n=1n=1): 21=2>12^1 = 2 > 1. โœ“
  • IH: Assume 2k>k2^k > k.
  • Step: 2k+1=2โ‹…2k>2โ‹…k=k+kโ‰ฅk+12^{k+1} = 2 \cdot 2^k > 2 \cdot k = k + k \geq k + 1 (since kโ‰ฅ1k \geq 1). Thus 2k+1>k+12^{k+1} > k + 1. โ–ก\square

Example 5: Sum of Odd Numbers

Theorem: The sum of the first nn odd numbers is n2n^2. Proof:
  • Base (n=1n=1): 1=121 = 1^2. โœ“
  • IH: Assume 1+3+5+โ‹ฏ+(2kโˆ’1)=k21 + 3 + 5 + \dots + (2k-1) = k^2.
  • Step: Add the next odd number (2k+1)(2k+1):
1+3+โ‹ฏ+(2kโˆ’1)+(2k+1)=k2+(2k+1)=(k+1)2.โ–ก1 + 3 + \dots + (2k-1) + (2k+1) = k^2 + (2k+1) = (k+1)^2. \square

4.3 Strong Induction

Principle

Same as weak induction, but the inductive hypothesis assumes PP holds for all smaller numbers, not just kk.
  1. Base case(s): Prove P(n0),P(n0+1),โ€ฆ,P(m)P(n_0), P(n_0+1), \dots, P(m).
  2. Inductive hypothesis: Assume P(j)P(j) for all jj with n0โ‰คjโ‰คkn_0 \leq j \leq k.
  3. Inductive step: Use this to prove P(k+1)P(k+1).

When to Use Strong Induction

When proving P(k+1)P(k+1) requires knowing PP for multiple earlier values (not just kk).

Example 1: Prime Factorization

Theorem: Every integer nโ‰ฅ2n \geq 2 can be expressed as a product of primes. Proof (strong induction):
  • Base (n=2n=2): 22 itself is prime. โœ“
  • IH: Assume every integer from 2 up to kk has a prime factorization.
  • Step: Consider n=k+1n = k+1.
    • If k+1k+1 is prime, done.
    • If k+1k+1 is composite, then k+1=abk+1 = ab where 2โ‰คa,bโ‰คk2 \leq a, b \leq k.
    • By IH, aa and bb have prime factorizations. Their product is a prime factorization of k+1k+1. โ–ก\square

Example 2: Fibonacci Numbers

Theorem: The Fibonacci numbers FnF_n satisfy Fnโ‰ฅ(32)nโˆ’2F_n \geq (\frac{3}{2})^{n-2} for nโ‰ฅ1n \geq 1, where F1=F2=1F_1 = F_2 = 1 and Fn=Fnโˆ’1+Fnโˆ’2F_n = F_{n-1} + F_{n-2}. Proof (strong induction):
  • Base (n=1,2n=1,2): F1=1โ‰ฅ(32)โˆ’1=23F_1 = 1 \geq (\frac{3}{2})^{-1} = \frac{2}{3} โœ“; F2=1โ‰ฅ(32)0=1F_2 = 1 \geq (\frac{3}{2})^0 = 1 โœ“.
  • IH: Assume true for all jโ‰คkj \leq k.
  • Step: For n=k+1n = k+1:
Fk+1=Fk+Fkโˆ’1โ‰ฅ(32)kโˆ’2+(32)kโˆ’3F_{k+1} = F_k + F_{k-1} \geq (\frac{3}{2})^{k-2} + (\frac{3}{2})^{k-3} =(32)kโˆ’3(32+1)=(32)kโˆ’3โ‹…52= (\frac{3}{2})^{k-3}(\frac{3}{2} + 1) = (\frac{3}{2})^{k-3} \cdot \frac{5}{2} >(32)kโˆ’3โ‹…(32)2=(32)kโˆ’1โ–ก> (\frac{3}{2})^{k-3} \cdot (\frac{3}{2})^2 = (\frac{3}{2})^{k-1} \square

Example 3: Binary Representation

Theorem: Every positive integer can be written as a sum of distinct powers of 2. Proof (strong induction):
  • Base (n=1n=1): 1=201 = 2^0. โœ“
  • IH: True for all j<nj < n.
  • Step: Let 2k2^k be the largest power of 2 with 2kโ‰คn2^k \leq n.
    • If n=2kn = 2^k, done.
    • If n>2kn > 2^k, write n=2k+rn = 2^k + r, where r<2kr < 2^k and r<nr < n.
    • By IH, rr is a sum of distinct powers of 2, none exceeding 2kโˆ’12^{k-1} (since r<2kr < 2^k).
    • Together with 2k2^k, we get the representation. โ–ก\square

4.4 Induction Pitfalls

MistakeWhy It's WrongFix
Skipping the base caseThe dominoes never start fallingAlways prove at least one base case
Assuming P(k+1)P(k+1) to prove P(k+1)P(k+1)Circular reasoningOnly assume P(k)P(k) (or P(j)P(j) for jโ‰คkj \leq k )
Wrong base valueStatement may be false for early nnCheck the first few values
Weak induction when strong neededCan't reach earlier needed casesUse strong induction

๐Ÿ“Š Formula Summary

FormHypothesisStep
Weak inductionP(k)P(k) trueProve P(k+1)P(k+1)
Strong inductionP(n0),โ€ฆ,P(k)P(n_0), \dots, P(k) trueProve P(k+1)P(k+1)

โœ… Practice Questions

Q1: Prove 1+4+9+โ‹ฏ+n2=n(n+1)(2n+1)61 + 4 + 9 + \dots + n^2 = \frac{n(n+1)(2n+1)}{6} by induction (already done above โ€” review it). Q2: Prove n!โ‰ฅ2nโˆ’1n! \geq 2^{n-1} for nโ‰ฅ1n \geq 1.
Solution
Base (n=1n=1): 1!=1โ‰ฅ20=11! = 1 \geq 2^{0} = 1. โœ“ IH: k!โ‰ฅ2kโˆ’1k! \geq 2^{k-1}. Step: (k+1)!=(k+1)k!โ‰ฅ(k+1)2kโˆ’1โ‰ฅ2โ‹…2kโˆ’1=2k(k+1)! = (k+1)k! \geq (k+1)2^{k-1} \geq 2 \cdot 2^{k-1} = 2^k (since k+1โ‰ฅ2k+1 \geq 2 for kโ‰ฅ1k \geq 1). Thus (k+1)!โ‰ฅ2k(k+1)! \geq 2^k. โ–ก\square Q3: Prove 2nโ‰ฅn22^n \geq n^2 for nโ‰ฅ4n \geq 4. Solution
Base (n=4n=4): 24=16โ‰ฅ42=162^4 = 16 \geq 4^2 = 16. โœ“ IH: 2kโ‰ฅk22^k \geq k^2 for kโ‰ฅ4k \geq 4. Step: 2k+1=2โ‹…2kโ‰ฅ2k22^{k+1} = 2 \cdot 2^k \geq 2k^2. Need to show 2k2โ‰ฅ(k+1)2=k2+2k+12k^2 \geq (k+1)^2 = k^2 + 2k + 1. 2k2โˆ’(k2+2k+1)=k2โˆ’2kโˆ’1=(kโˆ’1)2โˆ’22k^2 - (k^2 + 2k + 1) = k^2 - 2k - 1 = (k-1)^2 - 2. For kโ‰ฅ4k \geq 4, (kโˆ’1)2โˆ’2โ‰ฅ9โˆ’2=7>0(k-1)^2 - 2 \geq 9 - 2 = 7 > 0. So 2k2>(k+1)22k^2 > (k+1)^2 and 2k+1โ‰ฅ2k2โ‰ฅ(k+1)22^{k+1} \geq 2k^2 \geq (k+1)^2. โ–ก\square Q4: Prove that any amount of postage โ‰ฅ8\geq 8 cents can be formed using 3-cent and 5-cent stamps. Solution
Base: 8=3+58 = 3 + 5, 9=3+3+39 = 3 + 3 + 3, 10=5+510 = 5 + 5. โœ“ IH: True for all values from 8 to kk. Step: For k+1โ‰ฅ11k+1 \geq 11, consider (k+1)โˆ’3=kโˆ’2โ‰ฅ8(k+1) - 3 = k - 2 \geq 8. By IH, kโˆ’2k-2 can be formed. Add one 3-cent stamp. โ–ก\square Q5: Prove that Fn<2nF_n < 2^n for all nโ‰ฅ1n \geq 1 (Fibonacci numbers). Solution
Base: F1=1<21F_1 = 1 < 2^1, F2=1<22F_2 = 1 < 2^2. โœ“ IH: Assume Fk<2kF_k < 2^k and Fkโˆ’1<2kโˆ’1F_{k-1} < 2^{k-1}. Step: Fk+1=Fk+Fkโˆ’1<2k+2kโˆ’1=3โ‹…2kโˆ’1=32โ‹…2k<2โ‹…2k=2k+1F_{k+1} = F_k + F_{k-1} < 2^k + 2^{k-1} = 3 \cdot 2^{k-1} = \frac{3}{2} \cdot 2^k < 2 \cdot 2^k = 2^{k+1}. โ–ก\square Join Discord PreviousLogical FallaciesNextAdvanced Proofs
Document outline

Keep your place and jump directly to a heading.

Table of contents

No note selected

Open a chapter to see its outline, backlinks, and sources here.