Vous êtes sur la page 1sur 197

Mathematical Induction

Everybody – do the wave!


The Wave
● If done properly, everyone will eventually end
up joining in.
● Why is that?
● Someone (me!) started everyone off.
● Once the person before you did the wave, you did
the wave.
The principle of mathematical induction states
that if for some property P(n), we have that

P(0) is true

and

For any natural number n, P(n) → P(n + 1)

Then

For any natural number n, P(n) is true.


The principle of mathematical induction states
that if for some property P(n), we have that

P(0) is true
If it starts...
and

For any natural number n, P(n) → P(n + 1)

Then

For any natural number n, P(n) is true.


The principle of mathematical induction states
that if for some property P(n), we have that

P(0) is true and it keeps

If it starts... going...
and

For any natural number n, P(n) → P(n + 1)

Then

For any natural number n, P(n) is true.


The principle of mathematical induction states
that if for some property P(n), we have that

P(0) is true and it keeps

If it starts... going...
and

For any natural number n, P(n) → P(n + 1)


...then it's
Then
always true

For any natural number n, P(n) is true.


Another Example of Induction
Human Dominoes
● Everyone (except that last guy) eventually fell
over.
● Why is that?
● Someone fell over.
● Once someone fell over, the next person fell over
as well.
The principle of mathematical induction states
that if for some property P(n), we have that

P(0) is true

and

For any natural number n, P(n) → P(n + 1)

Then

For any natural number n, P(n) is true.


Induction, Intuitively
● It's true for 0.
● Since it's true for 0, it's true for 1.
● Since it's true for 1, it's true for 2.
● Since it's true for 2, it's true for 3.
● Since it's true for 3, it's true for 4.
● Since it's true for 4, it's true for 5.
● Since it's true for 5, it's true for 6.
● …
Proof by Induction
● Suppose that you want to prove that some property
P(n) holds of all natural numbers. To do so:
● Prove that P(0) is true.
● This is called the basis or the base case.
● Prove that for any natural number n, if P(n) is true,
then P(n + 1) is true as well.
● This is called the inductive step.
● P(n) is called the inductive hypothesis.
● Conclude by induction that P(n) holds for all n.
Some Sums

0=0
0+1=1
0+1+2=3
0+1+2+3=6
0 + 1 + 2 + 3 + 4 = 10
0 + 1 + 2 + 3 + 4 + 5 = 15
1 + 2 + … + (n – 1) + n = n(n+1) / 2

n+1
Some Sums

0=0
0+1=1
0+1+2=3
0+1+2+3=6
0 + 1 + 2 + 3 + 4 = 10
0 + 1 + 2 + 3 + 4 + 5 = 15
Some Sums

0 = 0 = 0(0 + 1) / 2
0 + 1 = 1 = 1(1 + 1) / 2
0 + 1 + 2 = 3 = 2(2 + 1) / 2
0 + 1 + 2 + 3 = 6 = 3(3 + 1) / 2
0 + 1 + 2 + 3 + 4 = 10 = 4(4 + 1) / 2
0 + 1 + 2 + 3 + 4 + 5 = 15 = 5(5 + 1) / 2
Our First Proof By Induction
Theorem: The sum of the first n positive natural numbers is n(n + 1)/2.
Proof: By induction. Let P(n) be “the sum of the first n positive natural
numbers is n(n + 1) / 2.” We show that P(n) is true for all natural
numbers n.
For our base case, we need to show P(0) is true, meaning that the sum
of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of
the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true.
For the inductive step, assume that for some n, P(n) holds, so
1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds,
meaning that the sum of the first n + 1 natural numbers is
(n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural
numbers. This is the sum of the first n positive natural numbers, plus
n + 1. By the inductive hypothesis, this is given by

Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural
numbers n. ■
Our First Proof By Induction
Theorem: The sum of the first n positive natural numbers is n(n + 1)/2.
Proof: By induction. Let P(n) be “the sum of the first n positive natural
numbers is n(n + 1) / 2.” We show that P(n) is true for all natural
numbers n.
For our base case, we need to show P(0) is true, meaning that the sum
of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of
the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true.
For the inductive step, assume that for some n, P(n) holds, so
1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds,
meaning that the sum of the first n + 1 natural numbers is
(n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural
numbers. This is the sum of the first n positive natural numbers, plus
n + 1. By the inductive hypothesis, this is given by

Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural
numbers n. ■
Our First Proof By Induction
Theorem: The sum of the first n positive natural numbers is n(n + 1)/2.
Proof: By induction. Let P(n) be “the sum of the first n positive natural
numbers is n(n + 1) / 2.” We show that P(n) is true for all natural
numbers n.
For our base case, we need to show P(0) is true, meaning that the sum
of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of
theAlways
first zeromention
positive that
natural numbers is 0 = 0(0 + 1)/2, P(0) is true.
you're
Forplanning
the inductive step, assume
on doing that for some n, P(n) holds, so
the proof
1 + 2by+ … + n = n(n + 1) / 2. We need to show that P(n + 1) holds,
induction, just as you
meaning that the sum of the first n + 1 natural numbers is
(n +would by contradiction
1)(n + 2)/2. or of the first n + 1 positive natural
Consider the sum
numbers. contrapositive.
This is the sum of the first n positive natural numbers, plus
n + 1. By the inductive hypothesis, this is given by

Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural
numbers n. ■
Our First Proof By Induction
Theorem: The sum of the first n positive natural numbers is n(n + 1)/2.
Proof: By induction. Let P(n) be “the sum of the first n positive natural
numbers is n(n + 1) / 2.” We show that P(n) is true for all natural
numbers n.
For our base case, we need to show P(0) is true, meaning that the sum
of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of
the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true.
For the inductive step, assume that for some n, P(n) holds, so
1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds,
meaning that the sum of the first n + 1 natural numbers is
(n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural
numbers. This is the sum of the first n positive natural numbers, plus
n + 1. By the inductive hypothesis, this is given by

Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural
numbers n. ■
Our First Proof By Induction
Theorem: The sum of the first n positive natural numbers is n(n + 1)/2.
Proof: By induction. Let P(n) be “the sum of the first n positive natural
numbers is n(n + 1) / 2.” We show that P(n) is true for all natural
numbers n.
For our base case, we need to show P(0) is true, meaning that the sum
of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of
the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true.
For the inductive step, assume that for some n, P(n) holds, so
1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds,
meaning that the sum of the first n + 1 natural numbers is
(n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural
numbers. This is the sum of the first n positive natural numbers, plus
n + 1. By the inductive hypothesis, this is given by

Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural
numbers n. ■
Our First Proof By Induction
Theorem: The sum of the first n positive natural numbers is n(n + 1)/2.
Proof: By induction. Let P(n) be “the sum of the first n positive natural
numbers is n(n + 1) / 2.” We show that P(n) is true for all natural
numbers n.
For our base case, we need to show P(0) is true, meaning that the sum
of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of
the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true.
For the inductive step, assume that for some n, P(n) holds, so
1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds,
Explicitly
meaning that the state
sum of the first n +what property
1 natural numbers is
you're
(n + 1)(n + 2)/2. trying
Consider the sumto show
of the first for all
n + 1 positive natural
numbers. This is the sum of the first n positive natural numbers, plus
thehypothesis,
n + 1. By the inductive natural this numbers.
is given by

Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural
numbers n. ■
Our First Proof By Induction
Theorem: The sum of the first n positive natural numbers is n(n + 1)/2.
Proof: By induction. Let P(n) be “the sum of the first n positive natural
numbers is n(n + 1) / 2.” We show that P(n) is true for all natural
numbers n.
For our base case, we need to show P(0) is true, meaning that the sum
of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of
the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true.
For the inductive step, assume that for some n, P(n) holds, so
1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds,
meaning that the sum of the first n + 1 natural numbers is
(n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural
numbers. This is the sum of the first n positive natural numbers, plus
n + 1. By the inductive hypothesis, this is given by

Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural
numbers n. ■
Our First Proof By Induction
Theorem: The sum of the first n positive natural numbers is n(n + 1)/2.
Proof: By induction. Let P(n) be “the sum of the first n positive natural
numbers is n(n + 1) / 2.” We show that P(n) is true for all natural
numbers n.
For our base case, we need to show P(0) is true, meaning that the sum
of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of
the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true.
For the inductive step, assume that for some n, P(n) holds, so
1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds,
meaning that the sum of the first n + 1 natural numbers is
(n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural
numbers. This is the sum of the first n positive natural numbers, plus
n + 1. By theState what
inductive you're this
hypothesis, trying to by
is given prove for P(0),
then go and prove it. You can use any
proof technique you'd like.
Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural
numbers n. ■
Our First Proof By Induction
Theorem: The sum of the first n positive natural numbers is n(n + 1)/2.
Proof: By induction. Let P(n) be “the sum of the first n positive natural
numbers is n(n + 1) / 2.” We show that P(n) is true for all natural
numbers n.
For our base case, we need to show P(0) is true, meaning that the sum
of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of
the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true.
For the inductive step, assume that for some n, P(n) holds, so
1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds,
meaning that the sum of the first n + 1 natural numbers is
(n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural
numbers. This is the sum of the first n positive natural numbers, plus
n + 1. By the inductive hypothesis, this is given by

Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural
numbers n. ■
Our First Proof By Induction
Theorem: The sum of the first n positive natural numbers is n(n + 1)/2.
Proof: By induction. Let P(n) be “the sum of the first n positive natural
numbers is n(n + 1) / 2.” We show that P(n) is true for all natural
numbers n.
For our base case, we need to show P(0) is true, meaning that the sum
of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of
the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true.
For the inductive step, assume that for some n, P(n) holds, so
1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds,
meaning that the sum of the first n + 1 natural numbers is
(n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural
numbers. This is the sum of the first n positive natural numbers, plus
n + 1. By the inductive hypothesis, this is given by

Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural
numbers n. ■
Our First Proof By Induction
Theorem: The sum of the first n positive natural numbers is n(n + 1)/2.
Proof: By induction. Let P(n) be “the sum of the first n positive natural
numbers is n(n + 1) / 2.” We show that P(n) is true for all natural
numbers n.
For our base case, we need to show P(0) is true, meaning that the sum
of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of
the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true.
For the inductive step, assume that for some n, P(n) holds, so
1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds,
meaning that the sum of the first n + 1 natural numbers is
(n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural
numbers. This is the sum of the first n positive natural numbers, plus
n + 1. By the In this step,
inductive we this
hypothesis, need to prove
is given by
“For any natural number n, P(n) → P(n + 1)”
To prove this, we choose an arbitrary n, then
Thus P(n + 1) holds whenassume P(n).
P(n) is true, so P(n) is true for all natural
numbers n. ■
Our First Proof By Induction
Theorem: The sum of the first n positive natural numbers is n(n + 1)/2.
Proof: By induction. Let P(n) be “the sum of the first n positive natural
numbers is n(n + 1) / 2.” We show that P(n) is true for all natural
numbers n.
For our base case, we need to show P(0) is true, meaning that the sum
of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of
the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true.
For the inductive step, assume that for some n, P(n) holds, so
1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds,
meaning that the sum of the first n + 1 natural numbers is
(n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural
numbers. This is the sum of the first n positive natural numbers, plus
n + 1. By the inductive hypothesis, this is given by

Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural
numbers n. ■
Our First Proof By Induction
Theorem: The sum of the first n positive natural numbers is n(n + 1)/2.
Proof: By induction. Let P(n) be “the sum of the first n positive natural
numbers is n(n + 1) / 2.” We show that P(n) is true for all natural
numbers n.
For our base case, we need to show P(0) is true, meaning that the sum
of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of
the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true.
For the inductive step, assume that for some n, P(n) holds, so
1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds,
meaning that the sum of the first n + 1 natural numbers is
(n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural
numbers. This is the sum of the first n positive natural numbers, plus
n + 1. By the inductive hypothesis, this is given by

State what P(n + 1) means, then


Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural
numbers n. ■ try to prove it.
Our First Proof By Induction
Theorem: The sum of the first n positive natural numbers is n(n + 1)/2.
Proof: By induction. Let P(n) be “the sum of the first n positive natural
numbers is n(n + 1) / 2.” We show that P(n) is true for all natural
numbers n.
For our base case, we need to show P(0) is true, meaning that the sum
of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of
the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true.
For the inductive step, assume that for some n, P(n) holds, so
1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds,
meaning that the sum of the first n + 1 natural numbers is
(n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural
numbers. This is the sum of the first n positive natural numbers, plus
n + 1. By the inductive hypothesis, this is given by

Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural
numbers n. ■
Our First Proof By Induction
Theorem: The sum of the first n positive natural numbers is n(n + 1)/2.
Proof: By induction. Let P(n) be “the sum of the first n positive natural
numbers is n(n + 1) / 2.” We show that P(n) is true for all natural
numbers n.
For our base case, we need to show P(0) is true, meaning that the sum
of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of
the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true.
For the inductive step, assume that for some n, P(n) holds, so
1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds,
meaning that the sum of the first n + 1 natural numbers is
(n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural
numbers. This is the sum of the first n positive natural numbers, plus
n + 1. By the inductive hypothesis, this is given by

Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural
numbers n. ■
Our First Proof By Induction
Theorem: The sum of the first n positive natural numbers is n(n + 1)/2.
Proof: By induction. Let P(n) be “the sum of the first n positive natural
numbers is n(n + 1) / 2.” We show that P(n) is true for all natural
numbers n.
For our base case, we need to show P(0) is true, meaning that the sum
of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of
the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true.
For the inductive step, assume that for some n, P(n) holds, so
1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds,
meaning that the sum of the first n + 1 natural numbers is
(n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural
numbers. This is the sum of the first n positive natural numbers, plus
n + 1. By the inductive hypothesis, this is given by
n( n+1) n(n+1)+2(n+1) (n+1)(n+2)
1+...+n+n+1= +n+1= =
2 2 2
Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural
numbers n. ■
Our First Proof By Induction
Theorem: The sum of the first n positive natural numbers is n(n + 1)/2.
Proof: By induction. Let P(n) be “the sum of the first n positive natural
numbers is n(n + 1) / 2.” We show that P(n) is true for all natural
numbers n.
For our base case, we need to show P(0) is true, meaning that the sum
of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of
the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true.
For the inductive step, assume that for some n, P(n) holds, so
1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds,
meaning that the sum of the first n + 1 natural numbers is
(n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural
numbers. This is the sum of the first n positive natural numbers, plus
n + 1. By the inductive hypothesis, this is given by
n( n+1) n(n+1)+2(n+1) (n+1)(n+2)
1+...+n+n+1= +n+1= =
2 2 2
The inductive hypothesis is that P(n) is
Thus P(n + 1) holds when P(n) is true,
true. sowhy
It's P(n)we
is true
can for
use all
thenatural
result for n
numbers n. ■
to simplify this sum.
Our First Proof By Induction
Theorem: The sum of the first n positive natural numbers is n(n + 1)/2.
Proof: By induction. Let P(n) be “the sum of the first n positive natural
numbers is n(n + 1) / 2.” We show that P(n) is true for all natural
numbers n.
For our base case, we need to show P(0) is true, meaning that the sum
of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of
the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true.
For the inductive step, assume that for some n, P(n) holds, so
1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds,
meaning that the sum of the first n + 1 natural numbers is
(n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural
numbers. This is the sum of the first n positive natural numbers, plus
n + 1. By the inductive hypothesis, this is given by
n( n+1) n(n+1)+2(n+1) (n+1)(n+2)
1+...+n+n+1= +n+1= =
2 2 2
Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural
numbers n. ■
Our First Proof By Induction
Theorem: The sum of the first n positive natural numbers is n(n + 1)/2.
Proof: By induction. Let P(n) be “the sum of the first n positive natural
numbers is n(n + 1) / 2.” We show that P(n) is true for all natural
numbers n.
For our base case, we need to show P(0) is true, meaning that the sum
of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of
the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true.
For the inductive step, assume that for some n, P(n) holds, so
1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds,
meaning that the sum of the first n + 1 natural numbers is
(n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural
numbers. This is the sum of the first n positive natural numbers, plus
n + 1. By the inductive hypothesis, this is given by
n( n+1) n(n+1)+2(n+1) (n+1)(n+2)
1+...+n+n+1= +n+1= =
2 2 2
Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural
numbers n. ■
Our First Proof By Induction
Theorem: The sum of the first n positive natural numbers is n(n + 1)/2.
Proof: By induction. Let P(n) be “the sum of the first n positive natural
numbers is n(n + 1) / 2.” We show that P(n) is true for all natural
numbers n.
For our base case, we need to show P(0) is true, meaning that the sum
of the first zero positive natural numbers is 0(0 + 1)/2. Since the sum of
the first zero positive natural numbers is 0 = 0(0 + 1)/2, P(0) is true.
For the inductive step, assume that for some n, P(n) holds, so
1 + 2 + … + n = n(n + 1) / 2. We need to show that P(n + 1) holds,
meaning that the sum of the first n + 1 natural numbers is
(n + 1)(n + 2)/2. Consider the sum of the first n + 1 positive natural
numbers. This is the sum of the first n positive natural numbers, plus
n + 1. By the inductive hypothesis, this is given by
n( n+1) n(n+1)+2(n+1) (n+1)(n+2)
1+...+n+n+1= +n+1= =
2 2 2
Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural
numbers n. ■
Structuring a Proof by Induction
● State that you are attempting to prove something by induction.
● State what your choice of P(n) is.
● Prove the base case:
● State what P(0) is, then prove it.
● Prove the inductive step:
● State that you're assuming P(n) and what P(n) is.
● State what P(n + 1) is. (this is what you're trying to prove)
● Go prove P(n + 1)
● This is very rigorous, so as we gain more familiarity with
induction we will start being less formal in our proofs.
Notation: Summations
● Instead of writing 1 + 2 + 3 + … + n, we write

∑i
i=0
Notation: Summations
● Instead of writing 1 + 2 + 3 + … + n, we write

Sum from i = 0
n

∑i
i=0
Notation: Summations
● Instead of writing 1 + 2 + 3 + … + n, we write

Sum from i = 0 to n
n

∑i
i=0
Notation: Summations
● Instead of writing 1 + 2 + 3 + … + n, we write

Sum from i = 0 to n
n

∑i of i

i=0
Summation Examples
5

∑ i=1+2+3+4+5=15
i=1
3

∑ i =1 +2 +3 =1+4+9=14
2 2 2 2

i=1

∑ (i −i)=(0 −0)+(1 −1)+(2 −2)=2


2 2 2 2

i=0
The Empty Sum
● A sum of no numbers is defined to be zero.
● Examples:

0 42 −1

∑ 2 =0i
∑ i =0 i
∑ i=0
i=1 i=137 i=0
n
n(n+1)
Theorem: For any natural number n, ∑ i=
i=1 2
Proof: By induction. Let P(n) be
n
n(n+1)
P(n) ≡ ∑ i=
i=1 2
For our base case, we need to show P(0) is true, meaning that
0
0(0+1)
∑ i=0= 2
i=1
This is trivial, since the empty sum is defined to be zero.

For the inductive step, assume that for some n, P(n) holds, so
n
n(n+1)
∑ i= 2
i=1
We need to show that P(n + 1) holds, meaning that
n+1
(n+1)(n+2)
∑ i= 2
i=1
To see this, note that
n+1 n
n(n+1) n(n+1)+2(n+1) (n+1)(n+2)
∑ i=∑ i+( n+1)= 2 +n+1= 2
=
2
i=1 i=1
Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■
n
n(n+1)
Theorem: For any natural number n, ∑ i=
i=1 2
Proof: By induction. Let P(n) be
n
n(n+1)
P(n) ≡ ∑ i=
i=1 2
For our base case, we need to show P(0) is true, meaning that
0
0(0+1)
∑ i=0= 2
i=1
This is trivial, since the empty sum is defined to be zero.

For the inductive step, assume that for some n, P(n) holds, so
n
n(n+1)
∑ i= 2
i=1
We need to show that P(n + 1) holds, meaning that
n+1
(n+1)(n+2)
∑ i= 2
i=1
To see this, note that
n+1 n
n(n+1) n(n+1)+2(n+1) (n+1)(n+2)
∑ i=∑ i+( n+1)= 2 +n+1= 2
=
2
i=1 i=1
Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■
n
n(n+1)
Theorem: For any natural number n, ∑ i=
i=1 2
Proof: By induction. Let P(n) be
n
n(n+1)
P(n) ≡ ∑ i=
i=1 2
For our base case, we need to show P(0) is true, meaning that
0
0(0+1)
∑ i= 2
i=1
This is trivial, since the empty sum is defined to be zero.

For the inductive step, assume that for some n, P(n) holds, so
n
n(n+1)
∑ i= 2
i=1
We need to show that P(n + 1) holds, meaning that
n+1
(n+1)(n+2)
∑ i= 2
i=1
To see this, note that
n+1 n
n(n+1) n(n+1)+2(n+1) (n+1)(n+2)
∑ i=∑ i+( n+1)= 2 +n+1= 2
=
2
i=1 i=1
Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■
n
n(n+1)
Theorem: For any natural number n, ∑ i=
i=1 2
Proof: By induction. Let P(n) be
n
n(n+1)
P(n) ≡ ∑ i=
i=1 2
For our base case, we need to show P(0) is true, meaning that
0
0(0+1)
∑ i= 2
i=1
This is trivial, since the empty sum is defined to be zero.

For the inductive step, assume that for some n, P(n) holds, so
n
n(n+1)
∑ i= 2
i=1
We need to show that P(n + 1) holds, meaning that
n+1
(n+1)(n+2)
∑ i= 2
i=1
To see this, note that
n+1 n
n(n+1) n(n+1)+2(n+1) (n+1)(n+2)
∑ i=∑ i+( n+1)= 2 +n+1= 2
=
2
i=1 i=1
Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■
n
n(n+1)
Theorem: For any natural number n, ∑ i=
i=1 2
Proof: By induction. Let P(n) be
n
n(n+1)
P(n) ≡ ∑ i=
i=1 2
For our base case, we need to show P(0) is true, meaning that
0
0(0+1)
∑ i= 2
i=1
This is trivial, since the empty sum is defined to be zero.

For the inductive step, assume that for some n, P(n) holds, so
n
n(n+1)
∑ i= 2
i=1
We need to show that P(n + 1) holds, meaning that
n+1
(n+1)(n+2)
∑ i= 2
i=1
To see this, note that
n+1 n
n(n+1) n(n+1)+2(n+1) (n+1)(n+2)
∑ i=∑ i+( n+1)= 2 +n+1= 2
=
2
i=1 i=1
Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■
n
n(n+1)
Theorem: For any natural number n, ∑ i=
i=1 2
Proof: By induction. Let P(n) be
n
n(n+1)
P(n) ≡ ∑ i=
i=1 2
For our base case, we need to show P(0) is true, meaning that
0
0(0+1)
∑ i= 2
i=1
This is trivial, since the empty sum is defined to be zero.

For the inductive step, assume that for some n, P(n) holds, so
n
n(n+1)
∑ i= 2
i=1
We need to show that P(n + 1) holds, meaning that
n+1
(n+1)(n+2)
∑ i= 2
i=1
To see this, note that
n+1 n
n(n+1) n(n+1)+2(n+1) (n+1)(n+2)
∑ i=∑ i+( n+1)= 2 +n+1= 2
=
2
i=1 i=1
Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■
n
n(n+1)
Theorem: For any natural number n, ∑ i=
i=1 2
Proof: By induction. Let P(n) be
n
n(n+1)
P(n) ≡ ∑ i=
i=1 2
For our base case, we need to show P(0) is true, meaning that
0
0(0+1)
∑ i= 2
i=1
This is trivial, since the empty sum is defined to be zero.

For the inductive step, assume that for some n, P(n) holds, so
n
n(n+1)
∑ i= 2
i=1
We need to show that P(n + 1) holds, meaning that
n+1
(n+1)(n+2)
∑ i= 2
i=1
To see this, note that Pro tip – When proving
n+1 n
n(n+1) n(n+1)+2(n+1)
properties of (n+1)(n+2)
sums with
∑ i=∑ i+( n+1)= 2 +n+1= =
i=1 i=1 induction,2 it often helps 2to “peel
Thus P(n + 1) holds when P(n) is true, so P(n) off”
is truethe
for all
lastnatural
few numbers
terms. n. ■
n
n(n+1)
Theorem: For any natural number n, ∑ i=
i=1 2
Proof: By induction. Let P(n) be
n
n(n+1)
P(n) ≡ ∑ i=
i=1 2
For our base case, we need to show P(0) is true, meaning that
0
0(0+1)
∑ i= 2
i=1
This is trivial, since the empty sum is defined to be zero.

For the inductive step, assume that for some n, P(n) holds, so
n
n(n+1)
∑ i= 2
i=1
We need to show that P(n + 1) holds, meaning that
n+1
(n+1)(n+2)
∑ i= 2
i=1
To see this, note that
n+1 n
n(n+1) n(n+1)+2(n+1) (n+1)(n+2)
∑ i=∑ i+( n+1)= 2 +n+1= 2
=
2
i=1 i=1
Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■
n
n(n+1)
Theorem: For any natural number n, ∑ i=
i=1 2
Proof: By induction. Let P(n) be
n
n(n+1)
P(n) ≡ ∑ i=
i=1 2
For our base case, we need to show P(0) is true, meaning that
0
0(0+1)
∑ i= 2
i=1
This is trivial, since the empty sum is defined to be zero.

For the inductive step, assume that for some n, P(n) holds, so
n
n(n+1)
∑ i= 2
i=1
We need to show that P(n + 1) holds, meaning that
n+1
(n+1)(n+2)
∑ i= 2
i=1
To see this, note that
n+1 n
n(n+1) n(n+1)+2(n+1) (n+1)(n+2)
∑ i=∑ i+( n+1)= 2 +n+1= 2
=
2
i=1 i=1
Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■
n
n(n+1)
Theorem: For any natural number n, ∑ i=
i=1 2
Proof: By induction. Let P(n) be
n
n(n+1)
P(n) ≡ ∑ i=
i=1 2
For our base case, we need to show P(0) is true, meaning that
0
0(0+1)
∑ i= 2
i=1
This is trivial, since the empty sum is defined to be zero.

For the inductive step, assume that for some n, P(n) holds, so
n
n(n+1)
∑ i= 2
i=1
We need to show that P(n + 1) holds, meaning that
n+1
(n+1)(n+2)
∑ i= 2
i=1
To see this, note that
n+1 n
n(n+1) n(n+1)+2(n+1) (n+1)(n+2)
∑ i=∑ i+( n+1)= 2 +n+1= 2
=
2
i=1 i=1
Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■
An Incorrect Proof
n 2
1 1
Theorem: For any natural number n, ∑ i= ( n+ )
i=1 2 2
n 2
1 1
Proof: Let P(n) be P(n) ≡ ∑ i= ( n+ )
i=1 2 2
Now, assume that for some n, P(n) holds, so
n 2
1 1
∑ 2 2)
i= ( n+
i=1
We want to show that P(n + 1) is true, which means that we want to show
n+1 2 2

∑ i= 12 ( n+1+ 12 ) = 12 (n+ 32 )
i=1
To see this, note that
1 2 1 2
n+1 n 2 (n+ ) ( n+ ) +2( n+1)
1 1 2 2(n+1) 2
∑ ∑ i= i+n+1=
2
(n+
2
) +n+1=
2
+
2
=
2
i=1 i=1

2 1 2 9
n +n+ +2n+2 n +3n+ 2
4 4 (n+3/ 2)
= = =
2 2 2

So P(n + 1) follows from P(n), completing the induction. ■


An Incorrect Proof
n 2
1 1
Theorem: For any natural number n, ∑ i= ( n+ )
i=1 2 2
n 2
1 1
Proof: Let P(n) be P(n) ≡ ∑ i= ( n+ )
i=1 2 2
Now, assume that for some n, P(n) holds, so
n 2
1 1
∑ 2 2)
i= ( n+
i=1
We want to show that P(n + 1) is true, which means that we want to show
n+1 2 2

∑ i= 12 ( n+1+ 12 ) = 12 (n+ 32 )
i=1
To see this, note that
1 2 1 2
n+1 n 2 (n+ ) ( n+ ) +2( n+1)
1 1 2 2(n+1) 2
∑ ∑ i= i+n+1=
2
(n+
2
) +n+1=
2
+
2
=
2
i=1 i=1

2 1 2 9
n +n+ +2n+2 n +3n+ 2
4 4 (n+3/ 2)
= = =
2 2 2

So P(n + 1) follows from P(n), completing the induction. ■


An Incorrect Proof
n 2
1 1
Theorem: For any natural number n, ∑ i= ( n+ )
i=1 2 2
n 2
1 1
Proof: Let P(n) be P(n) ≡ ∑ i= ( n+ )
i=1 2 2
Now, assume that for some n, P(n) holds, so
n 2
1 1
∑ 2 2)
i= ( n+
i=1
We want to show that P(n + 1) is true, which means that we want to show
n+1 2 2

∑ i= 12 ( n+1+ 12 ) = 12 (n+ 32 )
i=1
To see this, note that
1 2 1 2
n+1 n 2 (n+ ) ( n+ ) +2( n+1)
1 1 2 2(n+1) 2
∑ ∑ i= i+n+1=
2
(n+
2
) +n+1=
2
+
2
=
2
i=1 i=1

2 1 2 9
n +n+ +2n+2 n +3n+ 2
4 4 (n+3/ 2)
= = =
2 2 2

So P(n + 1) follows from P(n), completing the induction. ■


An Incorrect Proof
n 2
1 1
Theorem: For any natural number n, ∑ i= ( n+ )
i=1 2 2
n 2
1 1
Proof: Let P(n) be P(n) ≡ ∑ i= ( n+ )
i=1 2 2
Now, assume that for some n, P(n) holds, so
n 2
1 1
∑ 2 2)
i= ( n+
i=1
We want to show that P(n + 1) is true, which means that we want to show
n+1 2 2

∑ i= 12 ( n+1+ 12 ) = 12 (n+ 32 )
i=1
To see this, note that
1 2 1 2
n+1 n 2 (n+ ) ( n+ ) +2( n+1)
1 1 2 2(n+1) 2
∑ ∑ i= i+n+1=
2
(n+
2
) +n+1=
2
+
2
=
2
i=1 i=1

2 1 2 9
n +n+ +2n+2 n +3n+ 2
4 4 (n+3/ 2)
= = =
2 2 2

So P(n + 1) follows from P(n), completing the induction. ■


An Incorrect Proof
n 2
1 1
Theorem: For any natural number n, ∑ i= ( n+ )
i=1 2 2
n 2
1 1
Proof: Let P(n) be P(n) ≡ ∑ i= ( n+ )
i=1 2 2
Now, assume that for some n, P(n) holds, so
n 2
1 1
∑ 2 2)
i= ( n+
i=1
We want to show that P(n + 1) is true, which means that we want to show
n+1 2 2

∑ i= 12 ( n+1+ 12 ) = 12 (n+ 32 )
i=1
To see this, note that
1 2 1 2
n+1 n 2 (n+ ) ( n+ ) +2( n+1)
1 1 2 2(n+1) 2
∑ ∑ i= i+n+1=
2
(n+
2
) +n+1=
2
+
2
=
2
i=1 i=1

2 1 2 9
n +n+ +2n+2 n +3n+ 2
4 4 (n+3/ 2)
= = =
2 2 2

So P(n + 1) follows from P(n), completing the induction. ■


An Incorrect Proof
n 2
1 1
Theorem: For any natural number n, ∑ i= ( n+ )
i=1 2 2
n 2
1 1
Proof: Let P(n) be P(n) ≡ ∑ i= ( n+ )
i=1 2 2
Now, assume that for some n, P(n) holds, so
n 2
1 1
∑ 2 2)
i= ( n+
i=1
We want to show that P(n + 1) is true, which means that we want to show
n+1 2 2

∑ i= 12 ( n+1+ 12 ) = 12 (n+ 32 )
i=1
To see this, note that
1 2 1 2
n+1 n 2 (n+ ) ( n+ ) +2( n+1)
1 1 2 2(n+1) 2
∑ ∑ i= i+n+1=
2
(n+
2
) +n+1=
2
+
2
=
2
i=1 i=1

2 1 2 9 3 2
n +n+ +2n+2 n +3n+ (n+ )
4 4 2
= = =
2 2 2

So P(n + 1) follows from P(n), completing the induction. ■


An Incorrect Proof
n 2
1 1
Theorem: For any natural number n, ∑ i= ( n+ )
i=1 2 2
n 2
1 1
Proof: Let P(n) be P(n) ≡ ∑ i= ( n+ )
i=1 2 2
Now, assume that for some n, P(n) holds, so
n 2
1 1
∑ 2 2)
i= ( n+
i=1
We want to show that P(n + 1) is true, which means that we want to show
n+1 2 2

∑ i= 12 ( n+1+ 12 ) = 12 (n+ 32 )
i=1
To see this, note that
1 2 1 2
n+1 n 2 (n+ ) ( n+ ) +2( n+1)
1 1 2 2(n+1) 2
∑ ∑ i= i+n+1=
2
(n+
2
) +n+1=
2
+
2
=
2
i=1 i=1

2 1 2 9 3 2
n +n+ +2n+2 n +3n+ (n+ )
4 4 2
= = =
2 2 2

So P(n + 1) follows from P(n), completing the induction. ■


An Incorrect Proof
n 2
1 1
Theorem: For any natural number n, ∑ i= ( n+ )
i=1 2 2
n 2
1 1
Proof: Let P(n) be P(n) ≡ ∑ i= ( n+ )
i=1 2 2
Now, assume that for some n, P(n) holds, so
n 2
1 1
∑ 2 2)
i= ( n+
i=1
We want to show that P(n + 1) is true, which means that we want to show
n+1 2 2

∑ i= 12 ( n+1+ 12 ) = 12 (n+ 32 )
i=1
To see this, note that
1 2 1 2
n+1 n 2 (n+ ) ( n+ ) +2( n+1)
1 1 2 2(n+1) 2
∑ ∑ i= i+n+1=
2
(n+
2
) +n+1=
2
+
2
=
2
i=1 i=1

2 1 2 9 3 2
n +n+ +2n+2 n +3n+ (n+ )
4 4 2
= = =
2 2 2

So P(n + 1) follows from P(n), completing the induction. ■


An Incorrect Proof
n 2
1 1
Theorem: For any natural number n, ∑ i= ( n+ )
i=1 2 2
n 2
1 1
Proof: Let P(n) be P(n) ≡ ∑ i= ( n+ ) Where did we prove
i=1 2 2
Now, assume that for some n, P(n) holds, so
n 2
the base case?
1 1
∑ 2 2)
i= ( n+
i=1
We want to show that P(n + 1) is true, which means that we want to show
n+1 2 2

∑ i= 12 ( n+1+ 12 ) = 12 (n+ 32 )
i=1
To see this, note that
1 2 1 2
n+1 n 2 (n+ ) ( n+ ) +2( n+1)
1 1 2 2(n+1) 2
∑ ∑ i= i+n+1=
2
(n+
2
) +n+1=
2
+
2
=
2
i=1 i=1

2 1 2 9 3 2
n +n+ +2n+2 n +3n+ (n+ )
4 4 2
= = =
2 2 2

So P(n + 1) follows from P(n), completing the induction. ■


An Incorrect Proof
n 2
1 1
Theorem: For any natural number n, ∑ i= ( n+ )
i=1 2 2
n 2
1 1
Proof: Let P(n) be P(n) ≡ ∑ i= ( n+ ) . Where did we prove
i=1 2 2
Now, assume that for some n, P(n) holds, so
n 2
the base case?
1 1
∑ 2 2)
i= ( n+
i=1
We want to show that P(n + 1) is true, which means that we want to show
n+1 2 2

∑ i= 12 ( n+1+ 12 ) = 12 (n+ 32 )
i=1
To see this, note that
1 2 1 2
n+1 n 2 (n+ ) ( n+ ) +2( n+1)
1 1 2 2(n+1) 2
∑ ∑ i= i+n+1=
2
(n+
2
) +n+1=
2
+
2
=
2
i=1 i=1

2 1 2 9
n +n+ +2n+2 n +3n+ 2
4 4 (n+3/ 2)
= = =
2 2 2

So P(n + 1) follows from P(n), completing the induction. ■


When proving P(n) is true for all n by induction,

make sure to show the base case!

Otherwise, your entire argument is invalid!


Stopping the Juggernaut

“Once he gets
a momentum,
nothing can stop
him”
- X Men 3
Stopping the Juggernaut

“Once he gets
a momentum,
nothing can stop
him”
- X Men 3
P(n) → P(n + 1)
is not enough!
Sums of Powers of Two

20 = 1 = 1
20 + 2 1 = 1 + 2 = 3
2 0 + 2 1 + 22 = 1 + 2 + 4 = 7
20 + 21 + 22 + 23 = 1 + 2 + 4 + 8 = 15
Sums of Powers of Two

20 = 1 = 1 = 2 1 – 1
20 + 2 1 = 1 + 2 = 3 = 22 – 1
2 0 + 2 1 + 22 = 1 + 2 + 4 = 7 = 2 3 – 1
20 + 21 + 22 + 23 = 1 + 2 + 4 + 8 = 15 = 24 – 1
Sums of Powers of Two

20 = 1 = 1 = 2 1 – 1
20 + 2 1 = 1 + 2 = 3 = 22 – 1
2 0 + 2 1 + 22 = 1 + 2 + 4 = 7 = 2 3 – 1
20 + 21 + 22 + 23 = 1 + 2 + 4 + 8 = 15 = 24 – 1
n

∑ 2 =2 i n+1
−1
i=0
n

Theorem: For any natural number n, ∑ 2i =2n+1−1


i=0
Proof: By induction. Let P(n) be
n

P(n) ≡ ∑ 2i =2n+1−1
i=0

For our base case, we need to show P(0) is true, meaning that
0

∑ 2i =21−1
i=0
Since 20 = 1 = 21 – 1, this is true.

For the inductive step, assume that for some n, P(n) holds, so
n

∑ 2 =2i n+1
−1
i=0
We need to show that P(n + 1) holds, meaning that
n+1

∑ 2i =2n+2−1
i=0
To see this, note that
n+1 n

∑ i=∑ i+2 n+1=2 n+1−1+2 n+1=2(2 n+1)−1=2n+2−1


i=0 i =0
Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■
n

Theorem: For any natural number n, ∑ 2i =2n+1−1


i=0
Proof: By induction. Let P(n) be
n

P(n) ≡ ∑ 2i =2n+1−1
i=0

For our base case, we need to show P(0) is true, meaning that
0

∑ 2i =21−1
i=0
Since 20 = 1 = 21 – 1, this is true.

For the inductive step, assume that for some n, P(n) holds, so
n

∑ 2 =2i n+1
−1
i=0
We need to show that P(n + 1) holds, meaning that
n+1

∑ 2i =2n+2−1
i=0
To see this, note that
n+1 n

∑ i=∑ i+2 n+1=2 n+1−1+2 n+1=2(2 n+1)−1=2n+2−1


i=0 i =0
Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■
n

Theorem: For any natural number n, ∑ 2i =2n+1−1


i=0
Proof: By induction. Let P(n) be
n

P(n) ≡ ∑ 2i =2n+1−1
i=0

For our base case, we need to show P(0) is true, meaning that
0

∑ 2i =21−1
i=0
Since 20 = 1 = 21 – 1, this is true.

For the inductive step, assume that for some n, P(n) holds, so
n

∑ 2 =2i n+1
−1
i=0
We need to show that P(n + 1) holds, meaning that
n+1

∑ 2i =2n+2−1
i=0
To see this, note that
n+1 n

∑ i=∑ i+2 n+1=2 n+1−1+2 n+1=2(2 n+1)−1=2n+2−1


i=0 i =0
Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■
n

Theorem: For any natural number n, ∑ 2i =2n+1−1


i=0
Proof: By induction. Let P(n) be
n

P(n) ≡ ∑ 2i =2n+1−1
i=0

For our base case, we need to show P(0) is true, meaning that
0

∑ 2i =21−1
i=0
Since 20 = 1 = 21 – 1, this is true.

For the inductive step, assume that for some n, P(n) holds, so
n

∑ 2 =2i n+1
−1
i=0
We need to show that P(n + 1) holds, meaning that
n+1

∑ 2i =2n+2−1
i=0
To see this, note that
n+1 n

∑ i=∑ i+2 n+1=2 n+1−1+2 n+1=2(2 n+1)−1=2n+2−1


i=0 i =0
Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■
n

Theorem: For any natural number n, ∑ 2i =2n+1−1


i=0
Proof: By induction. Let P(n) be
n

P(n) ≡ ∑ 2i =2n+1−1
i=0

For our base case, we need to show P(0) is true, meaning that
0

∑ 2i =21−1
i=0
Since 20 = 1 = 21 – 1, this is true.

For the inductive step, assume that for some n, P(n) holds, so
n

∑ 2 =2i n+1
−1
i=0
We need to show that P(n + 1) holds, meaning that
n+1

∑ 2i =2n+2−1
i=0
To see this, note that
n+1 n

∑ i=∑ i+2 n+1=2 n+1−1+2 n+1=2(2 n+1)−1=2n+2−1


i=0 i =0
Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■
n

Theorem: For any natural number n, ∑ 2i =2n+1−1


i=0
Proof: By induction. Let P(n) be
n

P(n) ≡ ∑ 2i =2n+1−1
i=0

For our base case, we need to show P(0) is true, meaning that
0

∑ 2i =21−1
i=0
Since 20 = 1 = 21 – 1, this is true.

For the inductive step, assume that for some n, P(n) holds, so
n

∑ 2 =2i n+1
−1
i=0
We need to show that P(n + 1) holds, meaning that
n+1

∑ 2i =2n+2−1
i=0
To see this, note that
n+1 n

∑ 2i =∑ 2i+2 n+1=2 n+1−1+2 n+1=2(2 n+1)−1=2n+2−1


i=0 i=0
Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■
n

Theorem: For any natural number n, ∑ 2i =2n+1−1


i=0
Proof: By induction. Let P(n) be
n

P(n) ≡ ∑ 2i =2n+1−1
i=0

For our base case, we need to show P(0) is true, meaning that
0

∑ 2i =21−1
i=0
Since 20 = 1 = 21 – 1, this is true.

For the inductive step, assume that for some n, P(n) holds, so
n

∑ 2 =2i n+1
−1
i=0
We need to show that P(n + 1) holds, meaning that
n+1

∑ 2i =2n+2−1
i=0
To see this, note that
n+1 n

∑ 2i =∑ 2i+2 n+1=2 n+1−1+2Seem


n+1 n+1
=2(2familiar?
n+2
)−1=2 −1
i=0 i=0
Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■
n

Theorem: For any natural number n, ∑ 2i =2n+1−1


i=0
Proof: By induction. Let P(n) be
n

P(n) ≡ ∑ 2i =2n+1−1
i=0

For our base case, we need to show P(0) is true, meaning that
0

∑ 2i =21−1
i=0
Since 20 = 1 = 21 – 1, this is true.

For the inductive step, assume that for some n, P(n) holds, so
n

∑ 2 =2i n+1
−1
i=0
We need to show that P(n + 1) holds, meaning that
n+1

∑ 2i =2n+2−1
i=0
To see this, note that
n+1 n

∑ 2i =∑ 2i+2 n+1=2 n+1−1+2 n+1=2(2 n+1)−1=2n+2−1


i=0 i=0
Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■
n

Theorem: For any natural number n, ∑ 2i =2n+1−1


i=0
Proof: By induction. Let P(n) be
n

P(n) ≡ ∑ 2i =2n+1−1
i=0

For our base case, we need to show P(0) is true, meaning that
0

∑ 2i =21−1
i=0
Since 20 = 1 = 21 – 1, this is true.

For the inductive step, assume that for some n, P(n) holds, so
n

∑ 2 =2i n+1
−1
i=0
We need to show that P(n + 1) holds, meaning that
n+1

∑ 2i =2n+2−1
i=0
To see this, note that
n+1 n

∑ 2i =∑ 2i+2 n+1=2 n+1−1+2 n+1=2(2 n+1)−1=2n+2−1


i=0 i=0
Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■
n

Theorem: For any natural number n, ∑ 2i =2n+1−1


i=0
Proof: By induction. Let P(n) be
n

P(n) ≡ ∑ 2i =2n+1−1
i=0

For our base case, we need to show P(0) is true, meaning that
0

∑ 2i =21−1
i=0
Since 20 = 1 = 21 – 1, this is true.

For the inductive step, assume that for some n, P(n) holds, so
n

∑ 2 =2i n+1
−1
i=0
We need to show that P(n + 1) holds, meaning that
n+1

∑ 2i =2n+2−1
i=0
To see this, note that
n+1 n

∑ 2i =∑ 2i+2 n+1=2 n+1−1+2 n+1=2(2 n+1)−1=2n+2−1


i=0 i=0
Thus P(n + 1) holds when P(n) is true, so P(n) is true for all natural numbers n. ■
The Counterfeit Coin Problem
Problem Statement
● You are given a set of three seemingly identical
coins, two of which are real and one of which is
counterfeit.
● The counterfeit coin weighs more than the rest
of the coins.
● You are given a balance. Using only one
weighing on the balance, find the counterfeit
coin.
Finding the Counterfeit Coin

3
Finding the Counterfeit Coin

1 2

3
Finding the Counterfeit Coin

3
Finding the Counterfeit Coin

3
Finding the Counterfeit Coin

3
Finding the Counterfeit Coin

3
Finding the Counterfeit Coin

1 2

3
Finding the Counterfeit Coin

1 2

3
A Harder Problem
● You are given a set of nine seemingly identical
coins, eight of which are real and one of which
is counterfeit.
● The counterfeit coin weighs more than the rest
of the coins.
● You are given a balance. Using only two
weighings on the balance, find the counterfeit
coin.
Finding the Counterfeit Coin

1 2 3

4 5 6

7 8 9
Finding the Counterfeit Coin

1 2 3 4 5 6

7 8 9
Finding the Counterfeit Coin

6
5
4
3
2
1
7 8 9
Finding the Counterfeit Coin

6
5
4
3
2
1
7 8 9
Finding the Counterfeit Coin

6
5
4
3
2
1
7 8 9

Now we have one weighing to find


the counterfeit out of these three
Finding the Counterfeit Coin

1
2
3
4
5
7 8 9 6
Finding the Counterfeit Coin

1
2
3
4
5
7 8 9 6
Finding the Counterfeit Coin

1
2
3
4
5
7 8 9 6

Now we have one weighing to find


the counterfeit out of these three
Finding the Counterfeit Coin

1 2 3 4 5 6

7 8 9
Finding the Counterfeit Coin

1 2 3 4 5 6

7 8 9
Finding the Counterfeit Coin

1 2 3 4 5 6

7 8 9

Now we have one weighing to find


the counterfeit out of these three
If we have n weighings on the scale, how many
coins can we have while still being able to find the
duplicate?
A Pattern
● If we have no weighings, how many coins can
we have while still being able to find the
counterfeit?
● One coin, since that coin has to be the counterfeit!
● If we have one weighing, we can find the
counterfeit out of three coins.
● If we have two weighings, we can find the
counterfeit out of nine coins.
So far, we have

1, 3, 9 = 30, 31, 32

Does this pattern continue?


Theorem: Given n weighings, we can detect which of the 3n coins is counterfeit.
Proof: By induction. Let P(n) be “Given n weighings, we can detect which of the 3 n
coins is counterfeit.” We prove that P(n) is true for all natural numbers n by
induction.
For the base case, we want to show that P(0) holds, which means that we need to
be able to detect which of the 30 = 1 coins is counterfeit in no weighings. But this
is trivial – if there is only one coin, it must be the counterfeit.
For the inductive step, suppose that for some n, P(n) holds, so we can detect
which of 3n coins is counterfeit using n weighings. We want to prove that P(n + 1)
holds, which is true if we can detect which of 3n+1 coins is counterfeit using n + 1
weighings. To do this, split the coins into three equal groups of size 3 n; call the
groups A, B, and C. Now, put the coins in set A on one side of the scale and the
coins in set B on the other side. There are three cases to consider:
Case 1: If side A is heavier, then the counterfeit coin must be in group A.
Case 2: If side B is heaver, then the counterfeit coin must be in group B.
Case 3: If the scale is balanced, then the counterfeit coin must be in group C,
since it isn't in groups A or B.
In any case, we can use one weighing to find which group of 3 n coins the
counterfeit coin is contained in. By the inductive hypothesis, it is therefore
possible to find which coin it is in n weighings. Combined with our original
weighing, this means that we can find the counterfeit of 3n + 1 coins in n + 1
weighings, so P(n + 1) holds. ■
Theorem: Given n weighings, we can detect which of the 3n coins is counterfeit.
Proof: By induction. Let P(n) be “Given n weighings, we can detect which of the 3 n
coins is counterfeit.” We prove that P(n) is true for all natural numbers n by
induction.
For the base case, we want to show that P(0) holds, which means that we need to
be able to detect which of the 30 = 1 coins is counterfeit in no weighings. But this
is trivial – if there is only one coin, it must be the counterfeit.
For the inductive step, suppose that for some n, P(n) holds, so we can detect
which of 3n coins is counterfeit using n weighings. We want to prove that P(n + 1)
holds, which is true if we can detect which of 3n+1 coins is counterfeit using n + 1
weighings. To do this, split the coins into three equal groups of size 3 n; call the
groups A, B, and C. Now, put the coins in set A on one side of the scale and the
coins in set B on the other side. There are three cases to consider:
Case 1: If side A is heavier, then the counterfeit coin must be in group A.
Case 2: If side B is heaver, then the counterfeit coin must be in group B.
Case 3: If the scale is balanced, then the counterfeit coin must be in group C,
since it isn't in groups A or B.
In any case, we can use one weighing to find which group of 3 n coins the
counterfeit coin is contained in. By the inductive hypothesis, it is therefore
possible to find which coin it is in n weighings. Combined with our original
weighing, this means that we can find the counterfeit of 3n + 1 coins in n + 1
weighings, so P(n + 1) holds. ■
Theorem: Given n weighings, we can detect which of the 3n coins is counterfeit.
Proof: By induction. Let P(n) be “Given n weighings, we can detect which of the 3 n
coins is counterfeit.” We prove that P(n) is true for all natural numbers n by
induction.
For the base case, we want to show that P(0) holds, which means that we need to
be able to detect which of the 30 = 1 coins is counterfeit in no weighings. But this
is trivial – if there is only one coin, it must be the counterfeit.
For the inductive step, suppose that for some n, P(n) holds, so we can detect
which of 3n coins is counterfeit using n weighings. We want to prove that P(n + 1)
holds, which is true if we can detect which of 3n+1 coins is counterfeit using n + 1
weighings. To do this, split the coins into three equal groups of size 3 n; call the
groups A, B, and C. Now, put the coins in set A on one side of the scale and the
coins in set B on the other side. There are three cases to consider:
Case 1: If side A is heavier, then the counterfeit coin must be in group A.
Case 2: If side B is heaver, then the counterfeit coin must be in group B.
Case 3: If the scale is balanced, then the counterfeit coin must be in group C,
since it isn't in groups A or B.
In any case, we can use one weighing to find which group of 3 n coins the
counterfeit coin is contained in. By the inductive hypothesis, it is therefore
possible to find which coin it is in n weighings. Combined with our original
weighing, this means that we can find the counterfeit of 3n + 1 coins in n + 1
weighings, so P(n + 1) holds. ■
Theorem: Given n weighings, we can detect which of the 3n coins is counterfeit.
Proof: By induction. Let P(n) be “Given n weighings, we can detect which of the 3 n
coins is counterfeit.” We prove that P(n) is true for all natural numbers n by
induction.
For the base case, we want to show that P(0) holds, which means that we need to
be able to detect which of the 30 = 1 coins is counterfeit in no weighings. But this
is trivial – if there is only one coin, it must be the counterfeit.
For the inductive step, suppose that for some n, P(n) holds, so we can detect
which of 3n coins is counterfeit using n weighings. We want to prove that P(n + 1)
holds, which is true if we can detect which of 3n+1 coins is counterfeit using n + 1
weighings. To do this, split the coins into three equal groups of size 3 n; call the
groups A, B, and C. Now, put the coins in set A on one side of the scale and the
coins in set B on the other side. There are three cases to consider:
Case 1: If side A is heavier, then the counterfeit coin must be in group A.
Case 2: If side B is heaver, then the counterfeit coin must be in group B.
Case 3: If the scale is balanced, then the counterfeit coin must be in group C,
since it isn't in groups A or B.
In any case, we can use one weighing to find which group of 3 n coins the
counterfeit coin is contained in. By the inductive hypothesis, it is therefore
possible to find which coin it is in n weighings. Combined with our original
weighing, this means that we can find the counterfeit of 3n + 1 coins in n + 1
weighings, so P(n + 1) holds. ■
Theorem: Given n weighings, we can detect which of the 3n coins is counterfeit.
Proof: By induction. Let P(n) be “Given n weighings, we can detect which of the 3 n
coins is counterfeit.” We prove that P(n) is true for all natural numbers n by
induction.
For the base case, we want to show that P(0) holds, which means that we need to
be able to detect which of the 30 = 1 coins is counterfeit in no weighings. But this
is trivial – if there is only one coin, it must be the counterfeit.
For the inductive step, suppose that for some n, P(n) holds, so we can detect
which of 3n coins is counterfeit using n weighings. We want to prove that P(n + 1)
holds, which is true if we can detect which of 3n+1 coins is counterfeit using n + 1
weighings. To do this, split the coins into three equal groups of size 3 n; call the
groups A, B, and C. Now, put the coins in set A on one side of the scale and the
coins in set B on the other side. There are three cases to consider:
Case 1: If side A is heavier, then the counterfeit coin must be in group A.
Case 2: If side B is heaver, then the counterfeit coin must be in group B.
Case 3: If the scale is balanced, then the counterfeit coin must be in group C,
since it isn't in groups A or B.
In any case, we can use one weighing to find which group of 3 n coins the
counterfeit coin is contained in. By the inductive hypothesis, it is therefore
possible to find which coin it is in n weighings. Combined with our original
weighing, this means that we can find the counterfeit of 3n + 1 coins in n + 1
weighings, so P(n + 1) holds. ■
Theorem: Given n weighings, we can detect which of the 3n coins is counterfeit.
Proof: By induction. Let P(n) be “Given n weighings, we can detect which of the 3 n
coins is counterfeit.” We prove that P(n) is true for all natural numbers n by
induction.
For the base case, we want to show that P(0) holds, which means that we need to
be able to detect which of the 30 = 1 coins is counterfeit in no weighings. But this
is trivial – if there is only one coin, it must be the counterfeit.
For the inductive step, suppose that for some n, P(n) holds, so we can detect
which of 3n coins is counterfeit using n weighings. We want to prove that P(n + 1)
holds, which is true if we can detect which of 3n+1 coins is counterfeit using n + 1
weighings. To do this, split the coins into three equal groups of size 3 n; call the
groups A, B, and C. Now, put the coins in set A on one side of the scale and the
coins in set B on the other side. There are three cases to consider:
Case 1: If side A is heavier, then the counterfeit coin must be in group A.
Case 2: If side B is heaver, then the counterfeit coin must be in group B.
Case 3: If the scale is balanced, then the counterfeit coin must be in group C,
since it isn't in groups A or B.
In any case, we can use one weighing to find which group of 3 n coins the
counterfeit coin is contained in. By the inductive hypothesis, it is therefore
possible to find which coin it is in n weighings. Combined with our original
weighing, this means that we can find the counterfeit of 3n + 1 coins in n + 1
weighings, so P(n + 1) holds. ■
Theorem: Given n weighings, we can detect which of the 3n coins is counterfeit.
Proof: By induction. Let P(n) be “Given n weighings, we can detect which of the 3 n
coins is counterfeit.” We prove that P(n) is true for all natural numbers n by
induction.
For the base case, we want to show that P(0) holds, which means that we need to
be able to detect which of the 30 = 1 coins is counterfeit in no weighings. But this
is trivial – if there is only one coin, it must be the counterfeit.
For the inductive step, suppose that for some n, P(n) holds, so we can detect
which of 3n coins is counterfeit using n weighings. We want to prove that P(n + 1)
holds, which is true if we can detect which of 3n+1 coins is counterfeit using n + 1
weighings. To do this, split the coins into three equal groups of size 3 n; call the
groups A, B, and C. Now, put the coins in set A on one side of the scale and the
coins in set B on the other side. There are three cases to consider:
Case 1: If side A is heavier, then the counterfeit coin must be in group A.
Case 2: If side B is heaver, then the counterfeit coin must be in group B.
Case 3: If the scale is balanced, then the counterfeit coin must be in group C,
since it isn't in groups A or B.
In any case, we can use one weighing to find which group of 3 n coins the
counterfeit coin is contained in. By the inductive hypothesis, it is therefore
possible to find which coin it is in n weighings. Combined with our original
weighing, this means that we can find the counterfeit of 3n + 1 coins in n + 1
weighings, so P(n + 1) holds. ■
Theorem: Given n weighings, we can detect which of the 3n coins is counterfeit.
Proof: By induction. Let P(n) be “Given n weighings, we can detect which of the 3 n
coins is counterfeit.” We prove that P(n) is true for all natural numbers n by
induction.
For the base case, we want to show that P(0) holds, which means that we need to
be able to detect which of the 30 = 1 coins is counterfeit in no weighings. But this
is trivial – if there is only one coin, it must be the counterfeit.
For the inductive step, suppose that for some n, P(n) holds, so we can detect
which of 3n coins is counterfeit using n weighings. We want to prove that P(n + 1)
holds, which is true if we can detect which of 3n+1 coins is counterfeit using n + 1
weighings. To do this, split the coins into three equal groups of size 3 n; call the
groups A, B, and C. Now, put the coins in set A on one side of the scale and the
coins in set B on the other side. There are three cases to consider:
Case 1: If side A is heavier, then the counterfeit coin must be in group A.
Case 2: If side B is heaver, then the counterfeit coin must be in group B.
Case 3: If the scale is balanced, then the counterfeit coin must be in group C,
since it isn't in groups A or B.
In any case, we can use one weighing to find which group of 3 n coins the
counterfeit coin is contained in. By the inductive hypothesis, it is therefore
possible to find which coin it is in n weighings. Combined with our original
weighing, this means that we can find the counterfeit of 3n + 1 coins in n + 1
weighings, so P(n + 1) holds. ■
Theorem: Given n weighings, we can detect which of the 3n coins is counterfeit.
Proof: By induction. Let P(n) be “Given n weighings, we can detect which of the 3 n
coins is counterfeit.” We prove that P(n) is true for all natural numbers n by
induction.
For the base case, we want to show that P(0) holds, which means that we need to
be able to detect which of the 30 = 1 coins is counterfeit in no weighings. But this
is trivial – if there is only one coin, it must be the counterfeit.
For the inductive step, suppose that for some n, P(n) holds, so we can detect
which of 3n coins is counterfeit using n weighings. We want to prove that P(n + 1)
holds, which is true if we can detect which of 3n+1 coins is counterfeit using n + 1
weighings. To do this, split the coins into three equal groups of size 3 n; call the
groups A, B, and C. Now, put the coins in set A on one side of the scale and the
coins in set B on the other side. There are three cases to consider:
Case 1: If side A is heavier, then the counterfeit coin must be in group A.
Case 2: If side B is heaver, then the counterfeit coin must be in group B.
Case 3: If the scale is balanced, then the counterfeit coin must be in group C,
since it isn't in groups A or B.
In any case, we can use one weighing to find which group of 3 n coins the
counterfeit coin is contained in. By the inductive hypothesis, it is therefore
possible to find which coin it is in n weighings. Combined with our original
weighing, this means that we can find the counterfeit of 3n + 1 coins in n + 1
weighings, so P(n + 1) holds. ■
Theorem: Given n weighings, we can detect which of the 3n coins is counterfeit.
Proof: By induction. Let P(n) be “Given n weighings, we can detect which of the 3 n
coins is counterfeit.” We prove that P(n) is true for all natural numbers n by
induction.
For the base case, we want to show that P(0) holds, which means that we need to
be able to detect which of the 30 = 1 coins is counterfeit in no weighings. But this
is trivial – if there is only one coin, it must be the counterfeit.
For the inductive step, suppose that for some n, P(n) holds, so we can detect
which of 3n coins is counterfeit using n weighings. We want to prove that P(n + 1)
holds, which is true if we can detect which of 3n+1 coins is counterfeit using n + 1
weighings. To do this, split the coins into three equal groups of size 3 n; call the
groups A, B, and C. Now, put the coins in set A on one side of the scale and the
coins in set B on the other side. There are three cases to consider:
Case 1: If side A is heavier, then the counterfeit coin must be in group A.
Case 2: If side B is heaver, then the counterfeit coin must be in group B.
Case 3: If the scale is balanced, then the counterfeit coin must be in group C,
since it isn't in groups A or B.
In any case, we can use one weighing to find which group of 3 n coins the
counterfeit coin is contained in. By the inductive hypothesis, it is therefore
possible to find which coin it is in n weighings. Combined with our original
weighing, this means that we can find the counterfeit of 3n + 1 coins in n + 1
weighings, so P(n + 1) holds. ■
Theorem: Given n weighings, we can detect which of the 3n coins is counterfeit.
Proof: By induction. Let P(n) be “Given n weighings, we can detect which of the 3 n
coins is counterfeit.” We prove that P(n) is true for all natural numbers n by
induction.
For the base case, we want to show that P(0) holds, which means that we need to
be able to detect which of the 30 = 1 coins is counterfeit in no weighings. But this
is trivial – if there is only one coin, it must be the counterfeit.
For the inductive step, suppose that for some n, P(n) holds, so we can detect
which of 3n coins is counterfeit using n weighings. We want to prove that P(n + 1)
holds, which is true if we can detect which of 3n+1 coins is counterfeit using n + 1
weighings. To do this, split the coins into three equal groups of size 3 n; call the
groups A, B, and C. Now, put the coins in set A on one side of the scale and the
coins in set B on the other side. There are three cases to consider:
Case 1: If side A is heavier, then the counterfeit coin must be in group A.
Case 2: If side B is heaver, then the counterfeit coin must be in group B.
Case 3: If the scale is balanced, then the counterfeit coin must be in group C,
since it isn't in groups A or B.
In any case, we can use one weighing to find which group of 3 n coins the
counterfeit coin is contained in. By the inductive hypothesis, it is therefore
possible to find which coin it is in n weighings. Combined with our original
weighing, this means that we can find the counterfeit of 3n + 1 coins in n + 1
weighings, so P(n + 1) holds. ■
Theorem: Given n weighings, we can detect which of the 3n coins is counterfeit.
Proof: By induction. Let P(n) be “Given n weighings, we can detect which of the 3 n
coins is counterfeit.” We prove that P(n) is true for all natural numbers n by
induction.
For the base case, we want to show that P(0) holds, which means that we need to
be able to detect which of the 30 = 1 coins is counterfeit in no weighings. But this
is trivial – if there is only one coin, it must be the counterfeit.
For the inductive step, suppose that for some n, P(n) holds, so we can detect
which of 3n coins is counterfeit using n weighings. We want to prove that P(n + 1)
holds, which is true if we can detect which of 3n+1 coins is counterfeit using n + 1
weighings. To do this, split the coins into three equal groups of size 3 n; call the
groups A, B, and C. Now, put the coins in set A on one side of the scale and the
coins in set B on the other side. There are three cases to consider:
Case 1: If side A is heavier, then the counterfeit coin must be in group A.
Case 2: If side B is heaver, then the counterfeit coin must be in group B.
Case 3: If the scale is balanced, then the counterfeit coin must be in group C,
since it isn't in groups A or B.
In any case, we can use one weighing to find which group of 3 n coins the
counterfeit coin is contained in. By the inductive hypothesis, it is therefore
possible to find which coin it is in n weighings. Combined with our original
weighing, this means that we can find the counterfeit of 3n + 1 coins in n + 1
weighings, so P(n + 1) holds. ■
Theorem: Given n weighings, we can detect which of the 3n coins is counterfeit.
Proof: By induction. Let P(n) be “Given n weighings, we can detect which of the 3 n
coins is counterfeit.” We prove that P(n) is true for all natural numbers n by
induction.
For the base case, we want to show that P(0) holds, which means that we need to
be able to detect which of the 30 = 1 coins is counterfeit in no weighings. But this
is trivial – if there is only one coin, it must be the counterfeit.
For the inductive step, suppose that for some n, P(n) holds, so we can detect
which of 3n coins is counterfeit using n weighings. We want to prove that P(n + 1)
holds, which is true if we can detect which of 3n+1 coins is counterfeit using n + 1
weighings. To do this, split the coins into three equal groups of size 3 n; call the
groups A, B, and C. Now, put the coins in set A on one side of the scale and the
coins in set B on the other side. There are three cases to consider:
Case 1: If side A is heavier, then the counterfeit coin must be in group A.
Case 2: If side B is heaver, then the counterfeit coin must be in group B.
Case 3: If the scale is balanced, then the counterfeit coin must be in group C,
since it isn't in groups A or B.
In any case, we can use one weighing to find which group of 3 n coins the
counterfeit coin is contained in. By the inductive hypothesis, it is therefore
possible to find which coin it is in n weighings. Combined with our original
weighing, this means that we can find the counterfeit of 3n + 1 coins in n + 1
weighings, so P(n + 1) holds. ■
Theorem: Given n weighings, we can detect which of the 3n coins is counterfeit.
Proof: By induction. Let P(n) be “Given n weighings, we can detect which of the 3 n
coins is counterfeit.” We prove that P(n) is true for all natural numbers n by
induction.
For the base case, we want to show that P(0) holds, which means that we need to
be able to detect which of the 30 = 1 coins is counterfeit in no weighings. But this
is trivial – if there is only one coin, it must be the counterfeit.
For the inductive step, suppose that for some n, P(n) holds, so we can detect
which of 3n coins is counterfeit using n weighings. We want to prove that P(n + 1)
holds, which is true if we can detect which of 3n+1 coins is counterfeit using n + 1
weighings. To do this, split the coins into three equal groups of size 3 n; call the
groups A, B, and C. Now, put the coins in set A on one side of the scale and the
coins in set B on the other side. There are three cases to consider:
Case 1: If side A is heavier, then the counterfeit coin must be in group A.
Case 2: If side B is heaver, then the counterfeit coin must be in group B.
Case 3: If the scale is balanced, then the counterfeit coin must be in group C,
since it isn't in groups A or B.
In any case, we can use one weighing to find which group of 3 n coins the
counterfeit coin is contained in. By the inductive hypothesis, we can use n more
weighings to find which of these 3n coins is counterfeit. Combined with our original
weighing, this means that we can find the counterfeit of 3n + 1 coins in n+1
weighings, so P(n + 1) holds. ■
Theorem: Given n weighings, we can detect which of the 3n coins is counterfeit.
Proof: By induction. Let P(n) be “Given n weighings, we can detect which of the 3 n
coins is counterfeit.” We prove that P(n) is true for all natural numbers n by
induction.
For the base case, we want to show that P(0) holds, which means that we need to
be able to detect which of the 30 = 1 coins is counterfeit in no weighings. But this
is trivial – if there is only one coin, it must be the counterfeit.
For the inductive step, suppose that for some n, P(n) holds, so we can detect
which of 3n coins is counterfeit using n weighings. We want to prove that P(n + 1)
holds, which is true if we can detect which of 3n+1 coins is counterfeit using n + 1
weighings. To do this, split the coins into three equal groups of size 3 n; call the
groups A, B, and C. Now, put the coins in set A on one side of the scale and the
coins in set B on the other side. There are three cases to consider:
Case 1: If side A is heavier, then the counterfeit coin must be in group A.
Case 2: If side B is heaver, then the counterfeit coin must be in group B.
Case 3: If the scale is balanced, then the counterfeit coin must be in group C,
since it isn't in groups A or B.
In any case, we can use one weighing to find which group of 3 n coins the
counterfeit coin is contained in. By the inductive hypothesis, we can use n more
weighings to find which of these 3n coins is counterfeit. Combined with our original
weighing, this means that we can find the counterfeit of 3n + 1 coins in n + 1
weighings, so P(n + 1) holds. ■
Theorem: Given n weighings, we can detect which of the 3n coins is counterfeit.
Proof: By induction. Let P(n) be “Given n weighings, we can detect which of the 3 n
coins is counterfeit.” We prove that P(n) is true for all natural numbers n by
induction.
For the base case, we want to show that P(0) holds, which means that we need to
be able to detect which of the 30 = 1 coins is counterfeit in no weighings. But this
is trivial – if there is only one coin, it must be the counterfeit.
For the inductive step, suppose that for some n, P(n) holds, so we can detect
which of 3n coins is counterfeit using n weighings. We want to prove that P(n + 1)
holds, which is true if we can detect which of 3n+1 coins is counterfeit using n + 1
weighings. To do this, split the coins into three equal groups of size 3 n; call the
groups A, B, and C. Now, put the coins in set A on one side of the scale and the
coins in set B on the other side. There are three cases to consider:
Case 1: If side A is heavier, then the counterfeit coin must be in group A.
Case 2: If side B is heaver, then the counterfeit coin must be in group B.
Case 3: If the scale is balanced, then the counterfeit coin must be in group C,
since it isn't in groups A or B.
In any case, we can use one weighing to find which group of 3 n coins the
counterfeit coin is contained in. By the inductive hypothesis, we can use n more
weighings to find which of these 3n coins is counterfeit. Combined with our original
weighing, this means that we can find the counterfeit of 3n + 1 coins in n + 1
weighings, so P(n + 1) holds. ■
Midway Reminder: Problem Session
● Problem Session tonight, 7-8PM in Y2E2, room
111.
● Purely optional, but should be a lot of fun!
● We'll try to get it recorded and posted on SCPD
in a few days.
The MU Puzzle
Gödel, Escher Bach: An Eternal Golden Braid

● Pulitzer-Prize winning
book exploring
recursion, computability,
and consciousness.
● Written by Douglas
Hofstadter, computer
scientist at Indiana
University.
● A great (but dense!)
read.
The MU Puzzle
● Begin with the string MI.
● Repeatedly apply one of the following operations:
● Double the contents of the string after the M: for example,
MIIU becomes MIIUIIU or MI becomes MII.
● Replace III with U: MIIII becomes MUI or MIU
● Append U to the string if it ends in I: MI becomes MIU
● Remove any UU: MUUU becomes MU
● Question: How do you transform MI to MU?
A) Double the contents
of the string after M.
B) Replace III with U.
C) Remove UU
D) Append U if the
string ends in I.
MI

A) Double the contents


of the string after M.
B) Replace III with U.
C) Remove UU
D) Append U if the
string ends in I.
MI
A
MII

A) Double the contents


of the string after M.
B) Replace III with U.
C) Remove UU
D) Append U if the
string ends in I.
MI
A
MII
A
A) Double the contents MIIII
of the string after M.
B) Replace III with U.
C) Remove UU
D) Append U if the
string ends in I.
MI
A
MII
A
A) Double the contents MIIII
of the string after M.
D
B) Replace III with U.
MIIIIU
C) Remove UU
D) Append U if the
string ends in I.
MI
A
MII
A
A) Double the contents MIIII
of the string after M.
D
B) Replace III with U.
MIIIIU
C) Remove UU
B
D) Append U if the MUIU
string ends in I.
MI
A
MII
A
A) Double the contents MIIII
of the string after M.
D
B) Replace III with U.
MIIIIU
C) Remove UU
B
D) Append U if the MUIU
string ends in I.
A
MUIUUIU
MI
A
MII
A
A) Double the contents MIIII
of the string after M.
D
B) Replace III with U.
MIIIIU
C) Remove UU
B
D) Append U if the MUIU
string ends in I.
A
MUIUUIU
C
MUIIU
Try It!

Starting with MI, apply these operations to make MU:


A) Double the contents
of the string after M.
B) Replace III with U.
C) Remove UU
D) Append U if the
string ends in I.
Not a single person in this room
was able to solve this puzzle.

Are we even sure that there is a solution?


Counting I's
Counting I's
MI
MII
MIIII
MIIIIU
MIIIIUIIIIU
MIIIIUUIU
MIIIIUUIUIIIIUUIU
MUIUUIUIIIIUUIU
Counting I's
MI 1

MII 2

MIIII 4

MIIIIU 4

MIIIIUIIIIU 8

MIIIIUUIU 5

MIIIIUUIUIIIIUUIU 10

MUIUUIUIIIIUUIU 7
Counting I's
MI 1

MII 2

MIIII 4
None of
these are
MIIIIU 4 multiples of
three...
MIIIIUIIIIU 8

MIIIIUUIU 5

MIIIIUUIUIIIIUUIU 10

MUIUUIUIIIIUUIU 7
The Key Insight
● Initially, the number of I's is not a multiple of
three.
● To make MU, the number of I's must end up as
a multiple of three.
● Can we ever make the number of I's a multiple
of three?
Lemma: After beginning with MI and applying any legal sequence of the specified
rules, the number of I's never becomes a multiple of three.
Proof: By induction. Let P(n) be “After making n legal moves after starting with MI,
the number of I's is not a multiple of 3.” We prove that P(n) holds for all natural
numbers n.
As a base case, to prove that P(0) is true, we need to show that after making no
moves the number of I's is not a multiple of 3. MI has one I in it, which is not a
multiple of 3.
For the inductive step, assume that P(n) holds and that after any sequence of n
operations, the number of I's is not a multiple of 3. To prove that P(n + 1) holds (that
after n + 1 operations the number of I's is not a multiple of 3), we note by the
inductive hypothesis that after the first n operations, the number of I's is not a
multiple of 3. Since it is not a multiple of 3, it must either have the form 3k + 1 or
3k + 2 for some k. Consider the (n + 1)st operation:
- If it's “double the string after the M,” then we either end up with 2(3k + 1) = 6k + 2 =
3(2k) + 2 or 2(3k + 2) = 6k + 4 = 3(2k + 1) + 1 I's, neither of which is a multiple of 3.
- If it's “delete UU” or “append U,” the number of I's is unchanged.
- If it's “delete III,” then we either go from 3k + 1 to 3k + 1 – 3 = 3(k – 1) + 1 or from
3k + 2 to 3k + 2 – 3 = 3(k – 1) + 2 I's, neither of which is a multiple of 3.
Thus any sequence of n + 1 legal operations starting with MI ends with the number
of I's not a multiple of three, so P(n + 1) holds. ■
Lemma: After beginning with MI and applying any legal sequence of the specified
rules, the number of I's never becomes a multiple of three.
Proof: By induction. Let P(n) be “After making n legal moves after starting with MI,
the number of I's is not a multiple of 3.” We prove that P(n) holds for all natural
numbers n.
As a base case, to prove that P(0) is true, we need to show that after making no
moves the number of I's is not a multiple of 3. MI has one I in it, which is not a
multiple of 3.
For the inductive step, assume that P(n) holds and that after any sequence of n
operations, the number of I's is not a multiple of 3. To prove that P(n + 1) holds (that
after n + 1 operations the number of I's is not a multiple of 3), we note by the
inductive hypothesis that after the first n operations, the number of I's is not a
multiple of 3. Since it is not a multiple of 3, it must either have the form 3k + 1 or
3k + 2 for some k. Consider the (n + 1)st operation:
- If it's “double the string after the M,” then we either end up with 2(3k + 1) = 6k + 2 =
3(2k) + 2 or 2(3k + 2) = 6k + 4 = 3(2k + 1) + 1 I's, neither of which is a multiple of 3.
- If it's “delete UU” or “append U,” the number of I's is unchanged.
- If it's “delete III,” then we either go from 3k + 1 to 3k + 1 – 3 = 3(k – 1) + 1 or from
3k + 2 to 3k + 2 – 3 = 3(k – 1) + 2 I's, neither of which is a multiple of 3.
Thus any sequence of n + 1 legal operations starting with MI ends with the number
of I's not a multiple of three, so P(n + 1) holds. ■
Lemma: After beginning with MI and applying any legal sequence of the specified
rules, the number of I's never becomes a multiple of three.
Proof: By induction. Let P(n) be “After making n legal moves after starting with MI,
the number of I's is not a multiple of 3.” We prove that P(n) holds for all natural
numbers n.
As a base case, to prove that P(0) is true, we need to show that after making no
moves the number of I's is not a multiple of 3. MI has one I in it, which is not a
multiple of 3.
For the inductive step, assume that P(n) holds and that after any sequence of n
operations, the number of I's is not a multiple of 3. To prove that P(n + 1) holds (that
after n + 1 operations the number of I's is not a multiple of 3), we note by the
inductive hypothesis that after the first n operations, the number of I's is not a
multiple of 3. Since it is not a multiple of 3, it must either have the form 3k + 1 or
3k + 2 for some k. Consider the (n + 1)st operation:
- If it's “double the string after the M,” then we either end up with 2(3k + 1) = 6k + 2 =
3(2k) + 2 or 2(3k + 2) = 6k + 4 = 3(2k + 1) + 1 I's, neither of which is a multiple of 3.
- If it's “delete UU” or “append U,” the number of I's is unchanged.
- If it's “delete III,” then we either go from 3k + 1 to 3k + 1 – 3 = 3(k – 1) + 1 or from
3k + 2 to 3k + 2 – 3 = 3(k – 1) + 2 I's, neither of which is a multiple of 3.
Thus any sequence of n + 1 legal operations starting with MI ends with the number
of I's not a multiple of three, so P(n + 1) holds. ■
Lemma: After beginning with MI and applying any legal sequence of the specified
rules, the number of I's never becomes a multiple of three.
Proof: By induction. Let P(n) be “After making n legal moves after starting with MI,
the number of I's is not a multiple of 3.” We prove that P(n) holds for all natural
numbers n.
As a base case, to prove that P(0) is true, we need to show that after making no
moves the number of I's is not a multiple of 3. MI has one I in it, which is not a
multiple of 3.
For the inductive step, assume that P(n) holds and that after any sequence of n
operations, the number of I's is not a multiple of 3. To prove that P(n + 1) holds (that
after n + 1 operations the number of I's is not a multiple of 3), we note by the
inductive hypothesis that after the first n operations, the number of I's is not a
multiple of 3. Since it is not a multiple of 3, it must either have the form 3k + 1 or
3k + 2 for some k. Consider the (n + 1)st operation:
- If it's “double the string after the M,” then we either end up with 2(3k + 1) = 6k + 2 =
3(2k) + 2 or 2(3k + 2) = 6k + 4 = 3(2k + 1) + 1 I's, neither of which is a multiple of 3.
- If it's “delete UU” or “append U,” the number of I's is unchanged.
- If it's “delete III,” then we either go from 3k + 1 to 3k + 1 – 3 = 3(k – 1) + 1 or from
3k + 2 to 3k + 2 – 3 = 3(k – 1) + 2 I's, neither of which is a multiple of 3.
Thus any sequence of n + 1 legal operations starting with MI ends with the number
of I's not a multiple of three, so P(n + 1) holds. ■
Lemma: After beginning with MI and applying any legal sequence of the specified
rules, the number of I's never becomes a multiple of three.
Proof: By induction. Let P(n) be “After making n legal moves after starting with MI,
the number of I's is not a multiple of 3.” We prove that P(n) holds for all natural
numbers n.
As a base case, to prove that P(0) is true, we need to show that after making no
moves the number of I's is not a multiple of 3. MI has one I in it, which is not a
multiple of 3.
For the inductive step, assume that P(n) holds and that after any sequence of n
operations, the number of I's is not a multiple of 3. To prove that P(n + 1) holds (that
after n + 1 operations the number of I's is not a multiple of 3), we note by the
inductive hypothesis that after the first n operations, the number of I's is not a
multiple of 3. Since it is not a multiple of 3, it must either have the form 3k + 1 or
3k + 2 for some k. Consider the (n + 1)st operation:
- If it's “double the string after the M,” then we either end up with 2(3k + 1) = 6k + 2 =
3(2k) + 2 or 2(3k + 2) = 6k + 4 = 3(2k + 1) + 1 I's, neither of which is a multiple of 3.
- If it's “delete UU” or “append U,” the number of I's is unchanged.
- If it's “delete III,” then we either go from 3k + 1 to 3k + 1 – 3 = 3(k – 1) + 1 or from
3k + 2 to 3k + 2 – 3 = 3(k – 1) + 2 I's, neither of which is a multiple of 3.
Thus any sequence of n + 1 legal operations starting with MI ends with the number
of I's not a multiple of three, so P(n + 1) holds. ■
Lemma: After beginning with MI and applying any legal sequence of the specified
rules, the number of I's never becomes a multiple of three.
Proof: By induction. Let P(n) be “After making n legal moves after starting with MI,
the number of I's is not a multiple of 3.” We prove that P(n) holds for all natural
numbers n.
As a base case, to prove that P(0) is true, we need to show that after making no
moves the number of I's is not a multiple of 3. MI has one I in it, which is not a
multiple of 3.
For the inductive step, assume that P(n) holds and that after any sequence of n
operations, the number of I's is not a multiple of 3. To prove that P(n + 1) holds (that
after n + 1 operations the number of I's is not a multiple of 3), we note by the
inductive hypothesis that after the first n operations, the number of I's is not a
multiple of 3. Since it is not a multiple of 3, it must either have the form 3k + 1 or
3k + 2 for some k. Consider the (n + 1)st operation:
- If it's “double the string after the M,” then we either end up with 2(3k + 1) = 6k + 2 =
3(2k) + 2 or 2(3k + 2) = 6k + 4 = 3(2k + 1) + 1 I's, neither of which is a multiple of 3.
- If it's “delete UU” or “append U,” the number of I's is unchanged.
- If it's “delete III,” then we either go from 3k + 1 to 3k + 1 – 3 = 3(k – 1) + 1 or from
3k + 2 to 3k + 2 – 3 = 3(k – 1) + 2 I's, neither of which is a multiple of 3.
Thus any sequence of n + 1 legal operations starting with MI ends with the number
of I's not a multiple of three, so P(n + 1) holds. ■
Lemma: After beginning with MI and applying any legal sequence of the specified
rules, the number of I's never becomes a multiple of three.
Proof: By induction. Let P(n) be “After making n legal moves after starting with MI,
the number of I's is not a multiple of 3.” We prove that P(n) holds for all natural
numbers n.
As a base case, to prove that P(0) is true, we need to show that after making no
moves the number of I's is not a multiple of 3. MI has one I in it, which is not a
multiple of 3.
For the inductive step, assume that P(n) holds and that after any sequence of n
operations, the number of I's is not a multiple of 3. To prove that P(n + 1) holds (that
after n + 1 operations the number of I's is not a multiple of 3), we note by the
inductive hypothesis that after the first n operations, the number of I's is not a
multiple of 3. Since it is not a multiple of 3, it must either have the form 3k + 1 or
3k + 2 for some k. Consider the (n + 1)st operation:
- If it's “double the string after the M,” then we either end up with 2(3k + 1) = 6k + 2 =
3(2k) + 2 or 2(3k + 2) = 6k + 4 = 3(2k + 1) + 1 I's, neither of which is a multiple of 3.
- If it's “delete UU” or “append U,” the number of I's is unchanged.
- If it's “delete III,” then we either go from 3k + 1 to 3k + 1 – 3 = 3(k – 1) + 1 or from
3k + 2 to 3k + 2 – 3 = 3(k – 1) + 2 I's, neither of which is a multiple of 3.
Thus any sequence of n + 1 legal operations starting with MI ends with the number
of I's not a multiple of three, so P(n + 1) holds. ■
Lemma: After beginning with MI and applying any legal sequence of the specified
rules, the number of I's never becomes a multiple of three.
Proof: By induction. Let P(n) be “After making n legal moves after starting with MI,
the number of I's is not a multiple of 3.” We prove that P(n) holds for all natural
numbers n.
As a base case, to prove that P(0) is true, we need to show that after making no
moves the number of I's is not a multiple of 3. MI has one I in it, which is not a
multiple of 3.
For the inductive step, assume that P(n) holds and that after any sequence of n
operations, the number of I's is not a multiple of 3. To prove that P(n + 1) holds (that
after n + 1 operations the number of I's is not a multiple of 3), we note by the
inductive hypothesis that after the first n operations, the number of I's is not a
multiple of 3. Since it is not a multiple of 3, it must either have the form 3k + 1 or
3k + 2 for some k. Consider the (n + 1)st operation:
- If it's “double the string after the M,” then we either end up with 2(3k + 1) = 6k + 2 =
3(2k) + 2 or 2(3k + 2) = 6k + 4 = 3(2k + 1) + 1 I's, neither of which is a multiple of 3.
- If it's “delete UU” or “append U,” the number of I's is unchanged.
- If it's “delete III,” then we either go from 3k + 1 to 3k + 1 – 3 = 3(k – 1) + 1 or from
3k + 2 to 3k + 2 – 3 = 3(k – 1) + 2 I's, neither of which is a multiple of 3.
Thus any sequence of n + 1 legal operations starting with MI ends with the number
of I's not a multiple of three, so P(n + 1) holds. ■
Lemma: After beginning with MI and applying any legal sequence of the specified
rules, the number of I's never becomes a multiple of three.
Proof: By induction. Let P(n) be “After making n legal moves after starting with MI,
the number of I's is not a multiple of 3.” We prove that P(n) holds for all natural
numbers n.
As a base case, to prove that P(0) is true, we need to show that after making no
moves the number of I's is not a multiple of 3. MI has one I in it, which is not a
multiple of 3.
For the inductive step, assume that P(n) holds and that after any sequence of n
operations, the number of I's is not a multiple of 3. To prove that P(n + 1) holds (that
after n + 1 operations the number of I's is not a multiple of 3), we note by the
inductive hypothesis that after the first n operations, the number of I's is not a
multiple of 3. Since it is not a multiple of 3, it must either have the form 3k + 1 or
3k + 2 for some k. Consider the (n + 1)st operation:
- If it's “double the string after the M,” then we either end up with 2(3k + 1) = 6k + 2 =
3(2k) + 2 or 2(3k + 2) = 6k + 4 = 3(2k + 1) + 1 I's, neither of which is a multiple of 3.
- If it's “delete UU” or “append U,” the number of I's is unchanged.
- If it's “delete III,” then we either go from 3k + 1 to 3k + 1 – 3 = 3(k – 1) + 1 or from
3k + 2 to 3k + 2 – 3 = 3(k – 1) + 2 I's, neither of which is a multiple of 3.
Thus any sequence of n + 1 legal operations starting with MI ends with the number
of I's not a multiple of three, so P(n + 1) holds. ■
Lemma: After beginning with MI and applying any legal sequence of the specified
rules, the number of I's never becomes a multiple of three.
Proof: By induction. Let P(n) be “After making n legal moves after starting with MI,
the number of I's is not a multiple of 3.” We prove that P(n) holds for all natural
numbers n.
As a base case, to prove that P(0) is true, we need to show that after making no
moves the number of I's is not a multiple of 3. MI has one I in it, which is not a
multiple of 3.
For the inductive step, assume that P(n) holds and that after any sequence of n
operations, the number of I's is not a multiple of 3. To prove that P(n + 1) holds (that
after n + 1 operations the number of I's is not a multiple of 3), we note by the
inductive hypothesis that after the first n operations, the number of I's is not a
multiple of 3. Since it is not a multiple of 3, it must either have the form 3k + 1 or
3k + 2 for some k. Consider the (n + 1)st operation:
- If it's “double the string after the M,” then we either end up with 2(3k + 1) = 6k + 2 =
3(2k) + 2 or 2(3k + 2) = 6k + 4 = 3(2k + 1) + 1 I's, neither of which is a multiple of 3.
- If it's “delete UU” or “append U,” the number of I's is unchanged.
- If it's “delete III,” then we either go from 3k + 1 to 3k + 1 – 3 = 3(k – 1) + 1 or from
3k + 2 to 3k + 2 – 3 = 3(k – 1) + 2 I's, neither of which is a multiple of 3.
Thus any sequence of n + 1 legal operations starting with MI ends with the number
of I's not a multiple of three, so P(n + 1) holds. ■
Lemma: After beginning with MI and applying any legal sequence of the specified
rules, the number of I's never becomes a multiple of three.
Proof: By induction. Let P(n) be “After making n legal moves after starting with MI,
the number of I's is not a multiple of 3.” We prove that P(n) holds for all natural
numbers n.
As a base case, to prove that P(0) is true, we need to show that after making no
moves the number of I's is not a multiple of 3. MI has one I in it, which is not a
multiple of 3.
For the inductive step, assume that P(n) holds and that after any sequence of n
operations, the number of I's is not a multiple of 3. To prove that P(n + 1) holds (that
after n + 1 operations the number of I's is not a multiple of 3), we note by the
inductive hypothesis that after the first n operations, the number of I's is not a
multiple of 3. Since it is not a multiple of 3, it must either have the form 3k + 1 or
3k + 2 for some k. Consider the (n + 1)st operation:
- If it's “double the string after the M,” then we either end up with 2(3k + 1) = 6k + 2 =
3(2k) + 2 or 2(3k + 2) = 6k + 4 = 3(2k + 1) + 1 I's, neither of which is a multiple of 3.
- If it's “delete UU” or “append U,” the number of I's is unchanged.
- If it's “delete III,” then we either go from 3k + 1 to 3k + 1 – 3 = 3(k – 1) + 1 or from
3k + 2 to 3k + 2 – 3 = 3(k – 1) + 2 I's, neither of which is a multiple of 3.
Thus any sequence of n + 1 legal operations starting with MI ends with the number
of I's not a multiple of three, so P(n + 1) holds. ■
Lemma: After beginning with MI and applying any legal sequence of the specified
rules, the number of I's never becomes a multiple of three.
Proof: By induction. Let P(n) be “After making n legal moves after starting with MI,
the number of I's is not a multiple of 3.” We prove that P(n) holds for all natural
numbers n.
As a base case, to prove that P(0) is true, we need to show that after making no
moves the number of I's is not a multiple of 3. MI has one I in it, which is not a
multiple of 3.
For the inductive step, assume that P(n) holds and that after any sequence of n
operations, the number of I's is not a multiple of 3. To prove that P(n + 1) holds (that
after n + 1 operations the number of I's is not a multiple of 3), we note by the
inductive hypothesis that after the first n operations, the number of I's is not a
multiple of 3. Since it is not a multiple of 3, it must either have the form 3k + 1 or
3k + 2 for some k. Consider the (n + 1)st operation:
- If it's “double the string after the M,” then we either end up with 2(3k + 1) = 6k + 2 =
3(2k) + 2 or 2(3k + 2) = 6k + 4 = 3(2k + 1) + 1 I's, neither of which is a multiple of 3.
- If it's “delete UU” or “append U,” the number of I's is unchanged.
- If it's “delete III,” then we either go from 3k + 1 to 3k + 1 – 3 = 3(k – 1) + 1 or from
3k + 2 to 3k + 2 – 3 = 3(k – 1) + 2 I's, neither of which is a multiple of 3.
Thus any sequence of n + 1 legal operations starting with MI ends with the number
of I's not a multiple of three, so P(n + 1) holds. ■
Theorem: The MU puzzle has no solution.

Proof: By contradiction; assume it has a solution.


By our lemma, the number of I's in the final string
must not be a multiple of 3. However, for the
solution to be valid, the number of I's must be 0,
which is a multiple of 3. We have reached a
contradiction, so our assumption was wrong and
the MU puzzle has no solution. ■
Algorithms and Loop Invariants
● The proof we just made had the form
● “If P is true before we perform an action, it is true after we
perform an action.”
● We could therefore conclude that after any series of
actions of any length, if P was true beforehand, it is true
now.
● In algorithms and program analysis, this is sometimes
called a loop invariant.
● Formal proofs of algorithms often use loop invariants to
establish correctness.
● Take CS161 for more details!
Slimming Down Induction Proofs
Induction in Practice
● Typically, a proof by induction will not explicitly state
P(n).
● Rather, the proof will describe P(n) implicitly and
leave it to the reader to fill in the details.
● Provided that there is sufficient detail to determine
● what P(n) is,
● that P(0) is true, and that
● whenever P(n) is true, P(n + 1) is true,
the proof is usually valid.
n
n(n+1)
Theorem: For any natural number n, ∑ i= 2
i=1
Proof: By induction on n. For our base case, if n = 0, note that
0
0(0+1)
∑ i= 2 =0
i=1
and the theorem is true for 0.

For the inductive step, assume that for some n the theorem is true. Then we
have that
n+1 n
n(n+1) n(n+1)+2(n+1) (n+1)(n+2)
∑ i=∑ i+( n+1)= 2 +n+1= 2
=
2
i=1 i=1
so the theorem is true for n + 1, completing the induction. ■
A Variant of Induction
n versus 2
2 n

● 02 = 0 ● 20 = 1
● 12 = 1 ● 21 = 2
● 22 = 4 ● 22 = 4
● 32 = 9 ● 23 = 8
● 42 = 16 ● 24 = 16
● 52 = 25 ● 25 = 32
● 62 = 36 ● 26 = 64
● 72 = 49 ● 27 = 128
● 82 = 64 ● 28 = 256
● 92 = 81 ● 29 = 512
● 102 = 100 ● 210 = 1024
n versus 2
2 n

● 02 = 0 < ● 20 = 1
● 12 = 1 < ● 21 = 2
● 22 = 4 = ● 22 = 4
● 32 = 9 > ● 23 = 8
● 42 = 16 = ● 24 = 16
● 52 = 25 < ● 25 = 32
● 62 = 36 < ● 26 = 64
● 72 = 49 < ● 27 = 128
● 82 = 64 < ● 28 = 256
● 92 = 81 < ● 29 = 512
● 102 = 100 < ● 210 = 1024
n versus 2
2 n

2n is much
02 = 0 < 20 = 1
bigger here.
● ●

● 12 = 1 < ● 21 = 2
Does the trend
● 22 = 4 = ● 22 = 4
continue?
● 3 =9
2
> ● 2 =8
3

● 42 = 16 = ● 24 = 16
● 52 = 25 < ● 25 = 32
● 62 = 36 < ● 26 = 64
● 72 = 49 < ● 27 = 128
● 82 = 64 < ● 28 = 256
● 92 = 81 < ● 29 = 512
● 102 = 100 < ● 210 = 1024
Theorem: For any natural number n ≥ 5, n2 < 2n.

Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so


the claim holds. For the inductive step, assume that for some n ≥ 5,
n2 < 2n. Then we have that

(n + 1)2 = n2 + 2n + 1

Since n ≥ 5,

(n + 1)2 = n2 + 2n + 1
< n2 + 2n + n (since 1 < 5 ≤ n)
= n2 + 3n
< n2 + n 2 (since 3n < 5n ≤ n2)
= 2n2.

By the inductive hypothesis, n2 < 2n, so

(n + 1)2 < 2n2


< 2(2n)
= 2n + 1

Completing the proof by induction. ■


Theorem: For any natural number n ≥ 5, n2 < 2n.

Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so


the claim holds. For the inductive step, assume that for some n ≥ 5,
n2 < 2n. Then we have that

(n + 1)2 = n2 + 2n + 1

Since n ≥ 5,

(n + 1)2 = n2 + 2n + 1
< n2 + 2n + n (since 1 < 5 ≤ n)
= n2 + 3n
< n2 + n 2 (since 3n < 5n ≤ n2)
= 2n2.

By the inductive hypothesis, n2 < 2n, so

(n + 1)2 < 2n2


< 2(2n)
= 2n + 1

Completing the proof by induction. ■


Theorem: For any natural number n ≥ 5, n2 < 2n.

Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so


the claim holds. For the inductive step, assume that for some n ≥ 5,
n2 < 2n. Then we have that

(n + 1)2 = n2 + 2n + 1

Since n ≥ 5,

(n + 1)2 = n2 + 2n + 1
< n2 + 2n + n (since 1 < 5 ≤ n)
= n2 + 3n
< n2 + n 2 (since 3n < 5n ≤ n2)
= 2n2.

By the inductive hypothesis, n2 < 2n, so

(n + 1)2 < 2n2


< 2(2n)
= 2n + 1

Completing the proof by induction. ■


Theorem: For any natural number n ≥ 5, n2 < 2n.

Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so


the claim holds. For the inductive step, assume that for some n ≥ 5,
n2 < 2n. Then we have that

(n + 1)2 = n2 + 2n + 1

Since n ≥ 5,

(n + 1)2 = n2 + 2n + 1
< n2 + 2n + n (since 1 < 5 ≤ n)
= n2 + 3n
< n2 + n 2 (since 3n < 5n ≤ n2)
= 2n2.

By the inductive hypothesis, n2 < 2n, so

(n + 1)2 < 2n2


< 2(2n)
= 2n + 1

Completing the proof by induction. ■


Theorem: For any natural number n ≥ 5, n2 < 2n.

Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so


the claim holds. For the inductive step, assume that for some n ≥ 5,
n2 < 2n. Then we have that

(n + 1)2 = n2 + 2n + 1

Since n ≥ 5,

(n + 1)2 = n2 + 2n + 1
< n2 + 2n + n (since 1 < 5 ≤ n)
= n2 + 3n
< n2 + n 2 (since 3n < 5n ≤ n2)
= 2n2.

By the inductive hypothesis, n2 < 2n, so

(n + 1)2 < 2n2


< 2(2n)
= 2n + 1

Completing the proof by induction. ■


Theorem: For any natural number n ≥ 5, n2 < 2n.

Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so


the claim holds. For the inductive step, assume that for some n ≥ 5,
n2 < 2n. Then we have that

(n + 1)2 = n2 + 2n + 1

Since n ≥ 5,

(n + 1)2 = n2 + 2n + 1
< n2 + 2n + n (since 1 < 5 ≤ n)
= n2 + 3n
< n2 + n 2 (since 3n < 5n ≤ n2)
= 2n2.

By the inductive hypothesis, n2 < 2n, so

(n + 1)2 < 2n2


< 2(2n)
= 2n + 1

Completing the proof by induction. ■


Theorem: For any natural number n ≥ 5, n2 < 2n.

Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so


the claim holds. For the inductive step, assume that for some n ≥ 5,
n2 < 2n. Then we have that

(n + 1)2 = n2 + 2n + 1

Since n ≥ 5,

(n + 1)2 = n2 + 2n + 1
< n2 + 2n + n (since 1 < 5 ≤ n)
= n2 + 3n
< n2 + n 2 (since 3n < 5n ≤ n2)
= 2n2.

By the inductive hypothesis, n2 < 2n, so

(n + 1)2 < 2n2


< 2(2n)
= 2n + 1

Completing the proof by induction. ■


Theorem: For any natural number n ≥ 5, n2 < 2n.

Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so


the claim holds. For the inductive step, assume that for some n ≥ 5,
n2 < 2n. Then we have that

(n + 1)2 = n2 + 2n + 1

Since n ≥ 5,

(n + 1)2 = n2 + 2n + 1
< n2 + 2n + n (since 1 < 5 ≤ n)
= n2 + 3n
< n2 + n 2 (since 3n < 5n ≤ n2)
= 2n2.

By the inductive hypothesis, n2 < 2n, so

(n + 1)2 < 2n2


< 2(2n)
= 2n + 1

Completing the proof by induction. ■


Theorem: For any natural number n ≥ 5, n2 < 2n.

Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so


the claim holds. For the inductive step, assume that for some n ≥ 5,
n2 < 2n. Then we have that

(n + 1)2 = n2 + 2n + 1

Since n ≥ 5,

(n + 1)2 = n2 + 2n + 1
< n2 + 2n + n (since 1 < 5 ≤ n)
= n2 + 3n
< n2 + n 2 (since 3n < 5n ≤ n2)
= 2n2.

By the inductive hypothesis, n2 < 2n, so

(n + 1)2 < 2n2


< 2(2n)
= 2n + 1

Completing the proof by induction. ■


Theorem: For any natural number n ≥ 5, n2 < 2n.

Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so


the claim holds. For the inductive step, assume that for some n ≥ 5,
n2 < 2n. Then we have that

(n + 1)2 = n2 + 2n + 1

Since n ≥ 5,

(n + 1)2 = n2 + 2n + 1
< n2 + 2n + n (since 1 < 5 ≤ n)
= n2 + 3n
< n2 + n 2 (since 3n < 5n ≤ n2)
= 2n2.

By the inductive hypothesis, n2 < 2n, so

(n + 1)2 < 2n2


< 2(2n)
= 2n + 1

Completing the proof by induction. ■


Theorem: For any natural number n ≥ 5, n2 < 2n.

Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so


the claim holds. For the inductive step, assume that for some n ≥ 5,
n2 < 2n. Then we have that

(n + 1)2 = n2 + 2n + 1

Since n ≥ 5,

(n + 1)2 = n2 + 2n + 1
< n2 + 2n + n (since 1 < 5 ≤ n)
= n2 + 3n
< n2 + n 2 (since 3n < 5n ≤ n2)
= 2n2.

By the inductive hypothesis, n2 < 2n, so

(n + 1)2 < 2n2


< 2(2n)
= 2n + 1

Completing the proof by induction. ■


Theorem: For any natural number n ≥ 5, n2 < 2n.

Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so


the claim holds. For the inductive step, assume that for some n ≥ 5,
n2 < 2n. Then we have that

(n + 1)2 = n2 + 2n + 1

Since n ≥ 5,

(n + 1)2 = n2 + 2n + 1
< n2 + 2n + n (since 1 < 5 ≤ n)
= n2 + 3n
< n2 + n 2 (since 3n < 5n ≤ n2)
= 2n2.

By the inductive hypothesis, n2 < 2n, so

(n + 1)2 < 2n2


< 2(2n)
= 2n + 1

Completing the proof by induction. ■


Theorem: For any natural number n ≥ 5, n2 < 2n.

Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so


the claim holds. For the inductive step, assume that for some n ≥ 5,
n2 < 2n. Then we have that

(n + 1)2 = n2 + 2n + 1

Since n ≥ 5,

(n + 1)2 = n2 + 2n + 1
< n2 + 2n + n (since 1 < 5 ≤ n)
= n2 + 3n
< n2 + n 2 (since 3n < 5n ≤ n2)
= 2n2.

By the inductive hypothesis, n2 < 2n, so

(n + 1)2 < 2n2


< 2(2n)
= 2n + 1

Completing the proof by induction. ■


Theorem: For any natural number n ≥ 5, n2 < 2n.

Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so


the claim holds. For the inductive step, assume that for some n ≥ 5,
n2 < 2n. Then we have that

(n + 1)2 = n2 + 2n + 1

Since n ≥ 5,

(n + 1)2 = n2 + 2n + 1
< n2 + 2n + n (since 1 < 5 ≤ n)
= n2 + 3n
< n2 + n 2 (since 3n < 5n ≤ n2)
= 2n2.

By the inductive hypothesis, n2 < 2n, so

(n + 1)2 < 2n2


< 2(2n)
= 2n + 1

Completing the proof by induction. ■


Theorem: For any natural number n ≥ 5, n2 < 2n.

Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so


the claim holds. For the inductive step, assume that for some n ≥ 5,
n2 < 2n. Then we have that

(n + 1)2 = n2 + 2n + 1

Since n ≥ 5,

(n + 1)2 = n2 + 2n + 1
< n2 + 2n + n (since 1 < 5 ≤ n)
= n2 + 3n
< n2 + n 2 (since 3n < 5n ≤ n2)
= 2n2.

By the inductive hypothesis, n2 < 2n, so

(n + 1)2 < 2n2


< 2(2n)
= 2n + 1

Completing the proof by induction. ■


Theorem: For any natural number n ≥ 5, n2 < 2n.

Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so


the claim holds. For the inductive step, assume that for some n ≥ 5,
n2 < 2n. Then we have that

(n + 1)2 = n2 + 2n + 1

Since n ≥ 5,

(n + 1)2 = n2 + 2n + 1
< n2 + 2n + n (since 1 < 5 ≤ n)
= n2 + 3n
< n2 + n 2 (since 3n < 5n ≤ n2)
= 2n2.

By the inductive hypothesis, n2 < 2n, so

(n + 1)2 < 2n2


< 2(2n)
= 2n + 1

Completing the proof by induction. ■


Theorem: For any natural number n ≥ 5, n2 < 2n.

Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so


the claim holds. For the inductive step, assume that for some n ≥ 5,
n2 < 2n. Then we have that

(n + 1)2 = n2 + 2n + 1

Since n ≥ 5,

(n + 1)2 = n2 + 2n + 1
< n2 + 2n + n (since 1 < 5 ≤ n)
= n2 + 3n
< n2 + n 2 (since 3n < 5n ≤ n2)
= 2n2.

By the inductive hypothesis, n2 < 2n, so

(n + 1)2 < 2n2


< 2(2n)
= 2n + 1

Completing the proof by induction. ■


Theorem: For any natural number n ≥ 5, n2 < 2n.

Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so


the claim holds. For the inductive step, assume that for some n ≥ 5,
n2 < 2n. Then we have that

(n + 1)2 = n2 + 2n + 1

Since n ≥ 5,

(n + 1)2 = n2 + 2n + 1
< n2 + 2n + n (since 1 < 5 ≤ n)
= n2 + 3n
< n2 + n 2 (since 3n < 5n ≤ n2)
= 2n2.

By the inductive hypothesis, n2 < 2n, so

(n + 1)2 < 2n2


< 2(2n)
= 2n + 1

Completing the proof by induction. ■


Theorem: For any natural number n ≥ 5, n2 < 2n.

Proof: By induction on n. As a base case, if n = 5, 52 = 25 < 32 = 25, so


the claim holds. For the inductive step, assume that for some n ≥ 5,
n2 < 2n. Then we have that

(n + 1)2 = n2 + 2n + 1

Since n ≥ 5,

(n + 1)2 = n2 + 2n + 1 Why
Why isis this
this
< n2 + 2n + n allowed?
(since 1 < 5 ≤ n)
allowed?
= n2 + 3n
< n2 + n 2 (since 3n < 5n ≤ n2)
= 2n2.

By the inductive hypothesis, n2 < 2n, so

(n + 1)2 < 2n2


< 2(2n)
= 2n + 1

Completing the proof by induction. ■


Why is this Legal?
● Let P(n) be “Either n < 5 or n2 < 2n.”
● P(0) is trivially true.
● P(1) is trivially true, so P(0) → P(1)
● P(2) is trivially true, so P(1) → P(2)
● P(3) is trivially true, so P(2) → P(3)
● P(4) is trivially true, so P(3) → P(4)
● We explicitly proved P(5), so P(4) → P(5)
● For any n ≥ 5, we explicitly proved that P(n) → P(n + 1).
● Thus P(0) and for any n, P(n) → P(n + 1), so by induction
P(n) is true for all natural numbers n.
Why is this Legal?
● Let P(n) be “Either n < 5 or n2 < 2n.”
● P(0) is trivially true.
● P(1) is trivially true, so P(0) → P(1)
● P(2) is trivially true, so P(1) → P(2)
● P(3) is trivially true, so P(2) → P(3)
● P(4) is trivially true, so P(3) → P(4)
● We explicitly proved P(5), so P(4) → P(5)
● For any n ≥ 5, we explicitly proved that P(n) → P(n + 1).
● Thus P(0) and for any n, P(n) → P(n + 1), so by induction
P(n) is true for all natural numbers n.
Why is this Legal?
● Let P(n) be “Either n < 5 or n2 < 2n.”
● P(0) is trivially true.
● P(1) is trivially true, so P(0) → P(1)
● P(2) is trivially true, so P(1) → P(2)
● P(3) is trivially true, so P(2) → P(3)
● P(4) is trivially true, so P(3) → P(4)
● We explicitly proved P(5), so P(4) → P(5)
● For any n ≥ 5, we explicitly proved that P(n) → P(n + 1).
● Thus P(0) and for any n, P(n) → P(n + 1), so by induction
P(n) is true for all natural numbers n.
Why is this Legal?
● Let P(n) be “Either n < 5 or n2 < 2n.”
● P(0) is trivially true.
● P(1) is trivially true, so P(0) → P(1)
● P(2) is trivially true, so P(1) → P(2)
● P(3) is trivially true, so P(2) → P(3)
● P(4) is trivially true, so P(3) → P(4)
● We explicitly proved P(5), so P(4) → P(5)
● For any n ≥ 5, we explicitly proved that P(n) → P(n + 1).
● Thus P(0) and for any n, P(n) → P(n + 1), so by induction
P(n) is true for all natural numbers n.
Why is this Legal?
● Let P(n) be “Either n < 5 or n2 < 2n.”
● P(0) is trivially true.
● P(1) is trivially true, so P(0) → P(1)
● P(2) is trivially true, so P(1) → P(2)
● P(3) is trivially true, so P(2) → P(3)
Remember: A → B means
● P(4) is trivially true, so P(3) → P(4)
“whenever A is true, B is true.”
● We explicitly proved P(5), so P(4) → P(5)

If5, B
For any n ≥ weisexplicitly
alwaysproved
true,that
A P(n)
→ B→isP(n + 1).

true
Thus P(0) and for any for →
n, P(n) any
P(nA.
+ 1), so by induction
P(n) is true for all natural numbers n.
Why is this Legal?
● Let P(n) be “Either n < 5 or n2 < 2n.”
● P(0) is trivially true.
● P(1) is trivially true, so P(0) → P(1)
● P(2) is trivially true, so P(1) → P(2)
● P(3) is trivially true, so P(2) → P(3)
● P(4) is trivially true, so P(3) → P(4)
● We explicitly proved P(5), so P(4) → P(5)
● For any n ≥ 5, we explicitly proved that P(n) → P(n + 1).
● Thus P(0) and for any n, P(n) → P(n + 1), so by induction
P(n) is true for all natural numbers n.
Why is this Legal?
● Let P(n) be “Either n < 5 or n2 < 2n.”
● P(0) is trivially true.
● P(1) is trivially true, so P(0) → P(1)
● P(2) is trivially true, so P(1) → P(2)
● P(3) is trivially true, so P(2) → P(3)
● P(4) is trivially true, so P(3) → P(4)
● We explicitly proved P(5), so P(4) → P(5)
● For any n ≥ 5, we explicitly proved that P(n) → P(n + 1).
● Thus P(0) and for any n, P(n) → P(n + 1), so by induction
P(n) is true for all natural numbers n.
Why is this Legal?
● Let P(n) be “Either n < 5 or n2 < 2n.”
● P(0) is trivially true.
● P(1) is trivially true, so P(0) → P(1)
● P(2) is trivially true, so P(1) → P(2)
● P(3) is trivially true, so P(2) → P(3)
● P(4) is trivially true, so P(3) → P(4)
● We explicitly proved P(5), so P(4) → P(5)
● For any n ≥ 5, we explicitly proved that P(n) → P(n + 1).
● Thus P(0) and for any n, P(n) → P(n + 1), so by induction
P(n) is true for all natural numbers n.
Why is this Legal?
● Let P(n) be “Either n < 5 or n2 < 2n.”
● P(0) is trivially true.
● P(1) is trivially true, so P(0) → P(1)
● P(2) is trivially true, so P(1) → P(2)
● P(3) is trivially true, so P(2) → P(3)
● P(4) is trivially true, so P(3) → P(4)
● We explicitly proved P(5), so P(4) → P(5)
● For any n ≥ 5, we explicitly proved that P(n) → P(n + 1).
● Thus P(0) and for any n, P(n) → P(n + 1), so by induction
P(n) is true for all natural numbers n.
Why is this Legal?
● Let P(n) be “Either n < 5 or n2 < 2n.”
● P(0) is trivially true.
● P(1) is trivially true, so P(0) → P(1)
● P(2) is trivially true, so P(1) → P(2)
● P(3) is trivially true, so P(2) → P(3)
● P(4) is trivially true, so P(3) → P(4)
● We explicitly proved P(5), so P(4) → P(5)
● For any n ≥ 5, we explicitly proved that P(n) → P(n + 1).
● Thus P(0)
Again, A and
→ B for is
anyautomatically
n, P(n) → P(n +true
1), so by induction
P(n) is true for all natural numbers n.
if B is always true.
Why is this Legal?
● Let P(n) be “Either n < 5 or n2 < 2n.”
● P(0) is trivially true.
● P(1) is trivially true, so P(0) → P(1)
● P(2) is trivially true, so P(1) → P(2)
● P(3) is trivially true, so P(2) → P(3)
● P(4) is trivially true, so P(3) → P(4)
● We explicitly proved P(5), so P(4) → P(5)
● For any n ≥ 5, we explicitly proved that P(n) → P(n + 1).
● Thus P(0) and for any n, P(n) → P(n + 1), so by induction
P(n) is true for all natural numbers n.
Why is this Legal?
● Let P(n) be “Either n < 5 or n2 < 2n.”
● P(0) is trivially true.
● P(1) is trivially true, so P(0) → P(1)
● P(2) is trivially true, so P(1) → P(2)
● P(3) is trivially true, so P(2) → P(3)
● P(4) is trivially true, so P(3) → P(4)
● We explicitly proved P(5), so P(4) → P(5)
● For any n ≥ 5, we explicitly proved that P(n) → P(n + 1).
● Thus P(0) and for any n, P(n) → P(n + 1), so by induction
P(n) is true for all natural numbers n.
Induction Starting at k
● To prove that P(n) is true for all natural numbers
greater than or equal to k:
● Show that P(k) is true.
● Show that for any n ≥ k, that P(n) → P(n + 1).
● Conclude P(k) holds for all natural numbers greater
than or equal to k.
One More Induction...
Rube Goldberg Machines
● Every device eventually trigges.
● Why?
● The first device is triggered manually.
● Every device then triggers the next device.
● (This machine was built by Purdue university
and unveiled last weekend at the 2012 Rube
Goldberg Machine Contest. It won second
place.)
Next Time
● Strong Induction
● Stronger than normal induction!
● … or is it?

Vous aimerez peut-être aussi