MathIsimple
DM-08
Course 8

Induction and Recursion

Learn the powerful techniques of mathematical induction for proving statements about integers, and recursion for defining functions and structures.

Learning Objectives
  • Understand the principle of mathematical induction
  • Apply weak induction to prove statements
  • Use strong induction for complex proofs
  • Create recursive definitions
  • Prove properties using structural induction
  • Understand the well-ordering principle

1. Mathematical Induction

Theorem 8.1: Principle of Mathematical Induction

To prove that P(n)P(n) is true for all positive integers nn, it suffices to show:

  1. Base Case: P(1)P(1) is true.
  2. Inductive Step: For all k1k \geq 1, if P(k)P(k) is true, then P(k+1)P(k+1) is true.

The assumption that P(k)P(k) is true is called the inductive hypothesis.

Example: Sum of First n Positive Integers

Claim: For all n1n \geq 1, i=1ni=n(n+1)2\sum_{i=1}^{n} i = \frac{n(n+1)}{2}

Base Case (n = 1):

LHS: i=11i=1\sum_{i=1}^{1} i = 1. RHS: 122=1\frac{1 \cdot 2}{2} = 1. ✓

Inductive Step:

Assume i=1ki=k(k+1)2\sum_{i=1}^{k} i = \frac{k(k+1)}{2} for some k1k \geq 1.

We must show: i=1k+1i=(k+1)(k+2)2\sum_{i=1}^{k+1} i = \frac{(k+1)(k+2)}{2}

i=1k+1i=i=1ki+(k+1)\sum_{i=1}^{k+1} i = \sum_{i=1}^{k} i + (k+1)

=k(k+1)2+(k+1)= \frac{k(k+1)}{2} + (k+1) (by inductive hypothesis)

=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}

By mathematical induction, the formula holds for all n1n \geq 1. ∎

2. Strong Induction

Definition 8.1: Strong Induction

Strong induction allows us to assume P(1),P(2),,P(k)P(1), P(2), \ldots, P(k)are all true to prove P(k+1)P(k+1).

  1. Base Case: Prove P(1)P(1) (and possibly more base cases)
  2. Inductive Step: Prove that if P(1)P(2)P(k)P(1) \land P(2) \land \cdots \land P(k)are all true, then P(k+1)P(k+1) is true
Example: Every Integer > 1 Has a Prime Factor

Claim: Every integer >1> 1 has a prime divisor.

Base Case (n = 2): 2 is prime, so it is its own prime divisor. ✓

Inductive Step:

Assume every integer jj with 2jk2 \leq j \leq k has a prime divisor.

Consider k+1k+1. Either:

  • k+1k+1 is prime: then it's its own prime divisor. ✓
  • k+1k+1 is composite: then k+1=abk+1 = ab where 1<a,b<k+11 < a, b < k+1. By hypothesis, aa has a prime divisor pp, which also divides k+1k+1. ✓

By strong induction, every integer >1> 1 has a prime divisor. ∎

3. Recursive Definitions

Definition 8.2: Recursive Definition

A recursive definition defines an object in terms of simpler versions of itself:

  1. Base Case(s): Specify the value(s) for the initial input(s).
  2. Recursive Step: Define the value for larger inputs in terms of smaller inputs.
Example: Recursively Defined Functions

Factorial

Base: 0!=10! = 1

Recursive: n!=n(n1)!n! = n \cdot (n-1)! for n1n \geq 1

Power Function

Base: a0=1a^0 = 1

Recursive: an=aan1a^n = a \cdot a^{n-1} for n1n \geq 1

Fibonacci Numbers

Base: F1=1,F2=1F_1 = 1, F_2 = 1

Recursive: Fn=Fn1+Fn2F_n = F_{n-1} + F_{n-2} for n3n \geq 3

4. Well-Ordering Principle

Theorem 8.2: Well-Ordering Principle

Every non-empty set of positive integers has a least (smallest) element.

Remark

The well-ordering principle, mathematical induction, and strong induction are all equivalent—each can be proved from the others.

Practice Quiz

Induction and Recursion Quiz
10
Questions
0
Correct
0%
Accuracy
1
In a proof by mathematical induction, the base case typically shows that:
Easy
Not attempted
2
In the inductive step, we assume P(k)P(k) is true and prove:
Easy
Not attempted
3
What is i=1ni\sum_{i=1}^{n} i according to the formula proved by induction?
Easy
Not attempted
4
Strong induction differs from weak induction because:
Medium
Not attempted
5
The Fibonacci sequence is defined by F1=1,F2=1F_1 = 1, F_2 = 1, and Fn=Fn1+Fn2F_n = F_{n-1} + F_{n-2}. What is F7F_7?
Medium
Not attempted
6
A recursive definition must always include:
Easy
Not attempted
7
To prove n!>2nn! > 2^n for n4n \geq 4, which base case should we verify?
Medium
Not attempted
8
The well-ordering principle states that:
Hard
Not attempted
9
If f(0)=1f(0) = 1 and f(n)=2f(n1)f(n) = 2 \cdot f(n-1) for n1n \geq 1, what is f(5)f(5)?
Medium
Not attempted
10
Structural induction is used to prove properties about:
Hard
Not attempted

Frequently Asked Questions

When should I use weak induction vs strong induction?

Use weak induction when P(k+1)P(k+1) depends only on P(k)P(k).

Use strong induction when P(k+1)P(k+1) might depend on earlier values.

Why do we need a base case?

Without a base case, the inductive step has nothing to build on. The base case anchors the proof.

Can induction start at values other than 1?

Yes! If your statement is "for all nn0n \geq n_0," start the base case at n0n_0.

What's the connection between recursion and induction?

They are two sides of the same coin:

  • Recursion defines things in terms of smaller versions
  • Induction proves things by building up from base cases

How do I handle multiple base cases?

When your recurrence uses more than one previous value (like Fibonacci), verify the statement for enough initial values so the recurrence can take over.