Mathematical Induction
“Induction makes you feel guilty for getting something out of nothing,
and it is artificial, but it is one of the greatest ideas of
civilization.”
—Herbert S. Wilf
“The use of mathematical induction in demonstrations was, in the past,
something of a mystery. There seemed no reasonable doubt that it was a
valid method of proof, but no one quite knew why it was valid. ”
—Bertrand Russell
We assume you have already seen proofs by induction in your previous
math classes. In this section, we focus on what induction actually is, and why it works.
Proofs by induction are common in mathematics and ubiquitous in Computer
Science.
Example
Theorem: for every n∈N, ∑i=0ni = 2n(n+1).
Proof (by induction on the natural numbers):
- Base case: If n=0 the equation holds because 0=0.
- Inductive case: Let n≥0 and assume n satisfies the above
equation. Then
∑i=0n+1i===(∑i=0ni) +n+12n(n+1)+n+12(n+1)((n+1)+1)(by IH) So n+1 satisfies the equation.
QED
What is Induction?
Suppose P is a property that natural numbers can have.
Example
- P(k) := k≥2.
- P(k) := k is prime.
- P(k) := k is either even or odd.
Then induction is a way to prove that P holds for all natural numbers
Specifically, a proof by induction on the natural numbers is a proof
that invokes the following property of the natural numbers, called
the Induction Principle for
N:
Definition
Induction Principle for N For any property P of natural numbers, if
- P(0), and
- for every n∈N, if P(n) then P(n+1),
then for every n∈N, P(n).
Or equivalently,
P(0)∧(∀n∈N (P(n)→P(n+1))) → (∀n∈N P(n))
So,
- if we prove
∀n∈N P(n) using the general strategy for quantifiers (i.e., assume we have an arbitrary n∈N, and directly prove that P(n)
holds), this is not an inductive proof.
- But if we prove that
∀n∈N P(n) by showing that the premises of the Induction Principle are true — namely, that P(0)
holds and that ∀n∈N (P(n)→P(n+1)) — then it is an inductive proof.
The Example above is a proof by induction in this sense because:
- The relevant property P is
P(n) := i=0∑ni = 2n(n+1).
- The “base case” argues that that P(0) is true.
- The “inductive case” shows that
∀n∈N (P(n)→P(n+1)) is true. The proof structure exactly matches the structure of this formula: it startwith an arbitrary natural numbern,
assumes that P(n) holds, and proves that P(n+1) holds).
Why Does Induction Work? Argument 1
Assume P(0), and that for every
n∈N, if P(n) then P(n+1). Then:
- P(0) by assumption.
- Since P(0)→P(1), we also have P(1).
- Since P(1)→P(2), we also have P(2).
- Since P(2)→P(3), we also have P(3).
- etc.
Thus for every n∈N, P(n).
While this makes sense, any proof that ends with “etc.” is hand-waving,
and is not a truly solid argument. Plus, the our intuition that this
sequence of steps eventually shows every natural number has property P
is essentially the same as our intuition that induction works, so it’s
somewhat of a circular argument.
Maybe we can do better?
Why Does Induction Work? Argument 2
The following idea is attributed to Peano:
Definition
Here’s how to tell whether a set S is the set of natural numbers:
- There exists an element z∈S and a function s:S→S (such
that)
-
(
z is not
s(x) for any
x∈S.)
z is not in the range of
s.
-
( if
x=y then
s(x)=s(y).)
s is injective a.k.a. one-to-one.
-
For any property
P, if
P(z) and
∀x∈S (P(x)→P(s(x))) then
∀x∈S P(x).
(Induction works for
S.)
Then we define N to be a set with these
four properties. Since one of those properties is that induction works,
we know that induction works for N!
(This argument is completely rigorous, but perhaps not completely
satisfying. We’ll consider one more approach to justifying Induction at
the end of this section.)
Induction Variations
Sets isomorphic to N
We can also do induction starting at 1, at 2, etc.
P(1)∧(∀n≥1 (P(n)→P(n+1))) → (∀n≥1 P(n))
P(2)∧(∀n≥2 (P(n)→P(n+1))) → (∀n≥2 P(n))
We can justify the first as follows:
- Suppose P(1) and (∀n≥1 (P(n)→P(n+1))) .
- Define Q(n):=P(n+1).
- Then Q(0) and (∀n≥0 (Q(n)→Q(n+1))) .
- By the Induction Principle, ∀n≥0 Q(n).
- That is, ∀n≥1 P(n).
In general, we can apply induction to any set which is isomorphic to N.
Strong Induction
Sometimes, it seems like we need something “stronger” than the usual
induction principle.
Example
The following proof has a flaw:
Theorem: Every natural number n≥2 is a product of primes.
Proof (by induction on the natural numbers):
-
Base case: If n=2, the factorization is just 2.
-
Inductive case: Let n≥2 and assume n is a product of
primes. We must show that n+1 is a product of primes.
- If n+1 is prime, we are done.
- If n+1 is not prime, then n+1=ab with
2≤a,b≤n. By the Inductive Hypothesis, a and b
are both products of primes, so n+1=ab is too.
In either case, though, n+1 is a product of primes.
QED
The problem is that we are applying the inductive hypothesis to a and
b, but we only assumed that n was a product of primes. To make this
proof work, we need to assume that all numbers between 2 and n are
product of primes, not just n.
One option is to switch from the Induction Principle to the
Strong Induction Principle:
Definition
Strong Induction Principle for N
For any property P of natural numbers, if
- P(0)
- for every n≥1: if P(k) for all k<n then P(n).
Then ∀n∈N P(n).
Equivalently,
∀n∈N ((∀k<n P(k))→P(n)) → (∀n∈N P(n))
(The symbolic form might look like it’s missing the base case, but when
n is zero the assumption
∀k<n P(n) is trivially true and doesn’t provide any help in proving P(0);
as a result, we normally have to prove the n=0 case with a separate
argument.)
Now we can fix our proof:
Example
Theorem: Every natural number n≥2 is a product of primes.
Proof (by strong induction on the natural numbers):
-
Base case: If n=2, the factorization is just 2.
-
Inductive case: Let n>2 and assume every number between
2 and n inclusive is a product of primes . We must show that
n+1 is a product of primes.
- If n+1 is prime, we are done.
- If n+1 is not prime, then n+1=ab with
2≤a,b≤n. By the Inductive Hypothesis, a and b
are both products of primes, so n+1=ab is too.
In either case, though, n+1 is a product of primes.
QED
Of course, with a little more thought, we can see that we could have
gotten the same result with the standard Induction Principle. In fact,
any proof that uses Strong Induction could be done with the standard
Induction Principle by strengthening the induction hypothesis;
strong induction isn’t actually stronger! (And the Strong Induction
Principle can be proved correct using the Induction Principle.)
Example
Theorem: For every natural number n≥2, every number
between 2 and n inclusive is a product of primes
Proof (by “standard” induction on the natural numbers):
-
Base case: If n=2, the factorization is just 2.
-
Inductive case: Let n>2 and assume every number between 2 and
n inclusive is a product of primes . We must show that
every number between 2 and n+1 inclusive is a
product of primes .
We only need to check n+1; everything else was
already assumed to work!
- If n+1 is prime, we are done.
- If n+1 is not prime, then n+1=ab with
2≤a,b≤n. By the Inductive Hypothesis, a and b
are both products of primes, so n+1=ab is too.
In either case, though, n+1 is a product of primes.
QED
Why Does Induction Work? Argument 3
Finally, here is one more way we could define the natural numbers:
Definition
N can alternatively be defined as the smallest set S such that
-
-
(
S is closed under successor)
If
x∈S then
sx∈S
This definition is perfectly rigorous. (One can show that there really
is a unique smallest such set; it is equal to the infinite intersection
of all sets S with those two properties.) Intuitively, it defines
the natural numbers as the set of strings
{z,sz,ssz,sssz,…}
(though the definition doesn’t appeal to informal ideas like ”…”).
Since this is basically unary notation, all the usual operations like +
and < can be defined on these strings; this set really is equivalent to
what we think of as the natural numbers.
The cool thing about this definition is that we can prove that
induction works!
Theorem (Induction Works)
If P(z) and (∀n∈N, P(n)→P(sn)),
then ∀n∈N P(n).
Proof:
- Suppose P(z) and that
∀n∈N (P(n)→P(sn)) .
- Define
Y := { n∈N ∣ P(n) }.
- Obviously Y⊆N.
- But Y contains z (because we assumed P(z) is true),
- and Y is closed under successor (because if n∈Y then P(n)
so P(sn) and hence
sn∈Y.
- Since N was defined as the smallest such
set, it must be that N⊆Y.
- Since Y⊆N and
N⊆Y, we conclude
Y=N.
- But all the members of Y of satisfy P, so
∀n∈N P(n). QED