Quiz 2

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 nNn \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 kn0k \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 nn0n \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 n1n \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=1236=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: 7n17^n - 1 is divisible by 6 for all n1n \geq 1. Proof:
  • Base (n=1n=1): 711=67^1 - 1 = 6, divisible by 6. ✓
  • IH: Assume 7k17^k - 1 is divisible by 6, i.e., 7k=6m+17^k = 6m + 1.
  • Step: 7k+11=77k1=7(6m+1)1=42m+71=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+117^{k+1} - 1 is divisible by 6. \square

Example 4: Inequality

Theorem: 2n>n2^n > n for all n1n \geq 1. Proof:
  • Base (n=1n=1): 21=2>12^1 = 2 > 1. ✓
  • IH: Assume 2k>k2^k > k.
  • Step: 2k+1=22k>2k=k+kk+12^{k+1} = 2 \cdot 2^k > 2 \cdot k = k + k \geq k + 1 (since k1k \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++(2k1)=k21 + 3 + 5 + \dots + (2k-1) = k^2.
  • Step: Add the next odd number (2k+1)(2k+1):
1+3++(2k1)+(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 n0jkn_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 n2n \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 2a,bk2 \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)n2F_n \geq (\frac{3}{2})^{n-2} for n1n \geq 1, where F1=F2=1F_1 = F_2 = 1 and Fn=Fn1+Fn2F_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 jkj \leq k.
  • Step: For n=k+1n = k+1:
Fk+1=Fk+Fk1(32)k2+(32)k3F_{k+1} = F_k + F_{k-1} \geq (\frac{3}{2})^{k-2} + (\frac{3}{2})^{k-3} =(32)k3(32+1)=(32)k352= (\frac{3}{2})^{k-3}(\frac{3}{2} + 1) = (\frac{3}{2})^{k-3} \cdot \frac{5}{2} >(32)k3(32)2=(32)k1> (\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 2kn2^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 2k12^{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 jkj \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!2n1n! \geq 2^{n-1} for n1n \geq 1.
Solution
Base (n=1n=1): 1!=120=11! = 1 \geq 2^{0} = 1. ✓ IH: k!2k1k! \geq 2^{k-1}. Step: (k+1)!=(k+1)k!(k+1)2k122k1=2k(k+1)! = (k+1)k! \geq (k+1)2^{k-1} \geq 2 \cdot 2^{k-1} = 2^k (since k+12k+1 \geq 2 for k1k \geq 1). Thus (k+1)!2k(k+1)! \geq 2^k. \square Q3: Prove 2nn22^n \geq n^2 for n4n \geq 4. Solution
Base (n=4n=4): 24=1642=162^4 = 16 \geq 4^2 = 16. ✓ IH: 2kk22^k \geq k^2 for k4k \geq 4. Step: 2k+1=22k2k22^{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)=k22k1=(k1)222k^2 - (k^2 + 2k + 1) = k^2 - 2k - 1 = (k-1)^2 - 2. For k4k \geq 4, (k1)2292=7>0(k-1)^2 - 2 \geq 9 - 2 = 7 > 0. So 2k2>(k+1)22k^2 > (k+1)^2 and 2k+12k2(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+111k+1 \geq 11, consider (k+1)3=k28(k+1) - 3 = k - 2 \geq 8. By IH, k2k-2 can be formed. Add one 3-cent stamp. \square Q5: Prove that Fn<2nF_n < 2^n for all n1n \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 Fk1<2k1F_{k-1} < 2^{k-1}. Step: Fk+1=Fk+Fk1<2k+2k1=32k1=322k<22k=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
System Normal // Awaiting Context

Intelligence Hub

Navigate the knowledge graph to generate context. The Hub adapts dynamically to surface backlinks, related notes, and metadata insights.