MATHEMATICAL INDUCTION Mathematical induction is a

MATHEMATICAL INDUCTION
MATH 512
Mathematical induction is a powerful technique used to prove properties about
finite or countable sets. In the following, we let N = {1, 2, 3, . . .} denote the set of
positive integers.1
Mathematical Induction. Let P (n) denote that n has property P , where n ∈ N.
If both of the following are true:
(1) P (1)
(1 has property P )
(2) For any n ∈ N, P (n) ⇒ P (n + 1)
(if n has P , then n + 1 has P )
Then, P (n) holds for all integers n ∈ N.
Mathematical Induction, generic base case. More generally, if
(1) P (a) for some a ∈ Z, and
(2) P (n) ⇒ P (n + 1) for any n ≥ a,
then P (n) for all integers n ≥ a.
In the above, the first property is usually called the base case or initial case, and the
second property is called the inductive step. To prove something using induction,
you need to prove both of these. We will explain why induction works in a moment,
but first let’s look at how one uses this tool.
Proposition 1.
n
X
(2i − 1) = 1 + 3 + · · · + (2n − 1) = n2
i=1
Proof. We prove by induction. For n = 1,
1
X
(2i − 1) = 2(1) − 1 = 1 = 12 .
X
i=1
Assume the formula holds for n. Then for n + 1,
n+1
X
(2i − 1) =
i=1
n
X
(2i − 1) + [2(n + 1) − 1] = n2 + 2n + 1 = (n + 1)2 .
X
i=1
Stylistically, this is what most proofs by induction look like. There are a lot
of technical details omitted from the written proof because they are completely
standard. However, if you are not used to proofs by induction, this may seem very
mysterious. Let’s go ahead and spell out all the details.
Date: February 13, 2013.
1N denotes the natural numbers, but whether 0 ∈ N is not a fixed convention.
2
MATH 512
“Uncensored Proof” of Proposition 1. Consider the following function f from the
positive integers N → R
n
X
f (n) =
(2i − 1).
i=1
2
We want to show that f (n) = n for all n ∈ N. Let P be the set of n such that the
equation holds; i.e.
P = {n f (n) = n2 }.
Equivalently, we can think of this in terms of truth values:
(
T f (n) = n2 ,
P (n) =
F f (n) 6= n2 .
We want to show that P = N, or P (n) is True for all n ≥ 1. We will use the method
of “Proof by Induction.”
Part 1: The base case. A direct calculation shows f (1) = 12 , hence P (1) is True.
Part 2: The inductive step. Assume that P (n) is True; i.e. assume that
f (n) =
n
X
(2i − 1) = n2 .
i=1
By rearranging terms, we know
f (n + 1) =
n+1
X
(2i − 1) =
n
X
(2i − 1) + [2(n + 1) − 1].
i=1
i=1
Pn
By our inductive assumption (or inductive hypothesis) we know that i=1 (2i−1) =
n2 , and we use this to simplify our formula for f (n + 1). Plugging in gives
f (n + 1) = n2 + 2n + 1 = (n + 1)2 .
We have now shown that P (n) ⇒ P (n + 1).
Since we have shown P (1) P
and P (n) ⇒ P (n + 1), by induction we know P (n)
n
for all n ≥ 1. In other words, i=1 (2i − 1) = n2 for all n ≥ 1.
Why does induction work? Assume we have proven P (1) and P (n) ⇒ P (n+1).
Below is a proof of P (5).
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
P (n) ⇒ P (n + 1)
P (1) ⇒ P (2)
P (2) ⇒ P (3)
P (3) ⇒ P (4)
P (4) ⇒ P (5)
P (1)
P (2)
P (3)
P (4)
P (5)
Proven
1, n = 1
1, n = 2
1, n = 3
1, n = 4
Proven
MP(2, 6)
MP(3, 7)
MP(4, 8)
MP(5, 9)
There is nothing special about the number 5. In theory, one could write a finite
proof of P (N ) for any positive integer N . It would look just like the one above,
MATHEMATICAL INDUCTION
3
but longer. The inductive step allows us to build a long string of implications, and
the base case allows us to kick off a long string of Modus Ponens.
The following uses the more general notion of proof by induction. The key is that
if one proves both a base case and an inductive step, one can prove the statement
for all integers above the base case.
Proposition 2. n2 > 3n for all n ≥ 4.
Proof by induction. For n = 4,
n2 = 42 = 16 > 12 = 3(4) = 3n.
X
2
Assume that n > 3n. Then,
(n + 1)2 = n2 + 2n + 1 > 3n + 2n + 1 ≥ 3n + 3 = 3(n + 1).
The first inequality follows from the inductive hypothesis. The second inequality
follows from 2n + 1 ≥ 3 when n ≥ 1. Therefore, (n + 1)2 > 3(n + 1), and the proof
follows by induction.
Proposition 3 below is not actually true. The “proof” uses induction incorrectly.
Proposition 3. The product
n
Y
i = 1 · 2 · 3 · . . . · n = 0.
i=1
Proof. We use proof by induction. Assume
1 · 2 · 3 · . . . · n = 0.
Then for n + 1 we have
n+1
Y
i = 1 · 2 · 3 · . . . · n (n + 1) = 0(n + 1) = 0.
i=1
By induction, then
Qn
i=1
i = 0 for all n.
What went wrong? The proof of the inductive step was correct. But, we never
proved a base case, so we cannot use proof by induction. Without proving the
formula in some specific case, we can never start the long chain of modus ponens.
Homework.
1. Use mathematical induction to prove the following two formulas.
n
X
n(n + 1)
i = 1 + 2 + ... + n =
2
i=1
n
X
i=i
i2 = 12 + 22 + . . . + n2 =
n(n + 1)(2n + 1)
6
2. Play (have fun) with the following ”Google Doodle” game based on the Turing
machine: http://www.google.com/doodles/alan-turings-100th-birthday
If you can’t figure out what you are supposed to do, the following link will explain
the game and how to solve the first puzzle or two.
http://www.i-programmer.info/news/82-heritage/4403-google-doodle-a-turing-machinepuzzle.html