197
Mathematical Induction

Mathematical Induction - Stanford University · 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

  • Upload
    vuthuy

  • View
    234

  • Download
    0

Embed Size (px)

Citation preview

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

and

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

Then

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

If it starts...

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.

If it starts...

and it keeps going...

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.

If it starts...

and it keeps going...

...then it's always 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 = 00 + 1 = 10 + 1 + 2 = 30 + 1 + 2 + 3 = 60 + 1 + 2 + 3 + 4 = 100 + 1 + 2 + 3 + 4 + 5 = 15

1 + 2 + … + (n – 1) + n

n

n + 1

= n(n+1) / 2

Some Sums

0 = 00 + 1 = 10 + 1 + 2 = 30 + 1 + 2 + 3 = 60 + 1 + 2 + 3 + 4 = 100 + 1 + 2 + 3 + 4 + 5 = 15

Some Sums

0 = 0 = 0(0 + 1) / 20 + 1 = 1 = 1(1 + 1) / 20 + 1 + 2 = 3 = 2(2 + 1) / 20 + 1 + 2 + 3 = 6 = 3(3 + 1) / 20 + 1 + 2 + 3 + 4 = 10 = 4(4 + 1) / 20 + 1 + 2 + 3 + 4 + 5 = 15 = 5(5 + 1) / 2

Our First Proof By InductionTheorem: 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 InductionTheorem: 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 InductionTheorem: 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. ■

Always mention that you're planning on doing the proof by induction, just as you would by contradiction or

contrapositive.

Our First Proof By InductionTheorem: 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 InductionTheorem: 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 InductionTheorem: 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. ■

Explicitly state what property you're trying to show for all

the natural numbers.

Our First Proof By InductionTheorem: 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 InductionTheorem: 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. ■

State what you're trying to prove for P(0), then go and prove it. You can use any

proof technique you'd like.

Our First Proof By InductionTheorem: 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 InductionTheorem: 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 InductionTheorem: 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. ■

In this step, we need to prove“For any natural number n, P(n) P(n + 1)”→

To prove this, we choose an arbitrary n, then assume P(n).

Our First Proof By InductionTheorem: 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 InductionTheorem: 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. ■

State what P(n + 1) means, then try to prove it.

Our First Proof By InductionTheorem: 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 InductionTheorem: 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 InductionTheorem: 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. ■

1+...+n+n+1=n(n+1)

2+n+1=

n(n+1)+2(n+1)

2=

(n+1)(n+2)

2

Our First Proof By InductionTheorem: 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. ■

1+...+n+n+1=n(n+1)

2+n+1=

n(n+1)+2(n+1)

2=

(n+1)(n+2)

2The inductive hypothesis is that P(n) is

true. It's why we can use the result for n to simplify this sum.

Our First Proof By InductionTheorem: 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. ■

1+...+n+n+1=n(n+1)

2+n+1=

n(n+1)+2(n+1)

2=

(n+1)(n+2)

2

Our First Proof By InductionTheorem: 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. ■

1+...+n+n+1=n(n+1)

2+n+1=

n(n+1)+2(n+1)

2=

(n+1)(n+2)

2

Our First Proof By InductionTheorem: 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. ■

1+...+n+n+1=n(n+1)

2+n+1=

n(n+1)+2(n+1)

2=

(n+1)(n+2)

2

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

n

i

Notation: Summations

● Instead of writing 1 + 2 + 3 + … + n, we write

∑i=0

n

iSum from i = 0

Notation: Summations

● Instead of writing 1 + 2 + 3 + … + n, we write

∑i=0

n

iSum from i = 0 to n

Notation: Summations

● Instead of writing 1 + 2 + 3 + … + n, we write

∑i=0

n

iSum from i = 0 to n

of i

Summation Examples

∑i=1

5

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

∑i=1

3

i2=12+22

+32=1+4+9=14

∑i=0

2

(i2−i)=(02−0)+(12

−1)+(22−2)=2

The Empty Sum

● A sum of no numbers is defined to be zero.● Examples:

∑i=1

0

2i=0 ∑i=0

−1

i=0∑i=137

42

i i=0

Theorem: For any natural number n, Proof: By induction. Let P(n) be

P(n) ≡

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

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

We need to show that P(n + 1) holds, meaning that

To see this, note that

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

∑i=1

n+1

i=∑i=1

n

i+(n+1)=n(n+1)

2+n+1=

n(n+1)+2(n+1)

2=

(n+1)(n+2)

2

∑i=1

n

i=n(n+1)

2

∑i=1

n

i=n(n+1)

2

∑i=1

0

i=0=0(0+1)

2

∑i=1

n

i=n(n+1)

2

∑i=1

n+1

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

2

Theorem: For any natural number n, Proof: By induction. Let P(n) be

P(n) ≡

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

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

We need to show that P(n + 1) holds, meaning that

To see this, note that

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

∑i=1

n+1

i=∑i=1

n

i+(n+1)=n(n+1)

2+n+1=

n(n+1)+2(n+1)

2=

(n+1)(n+2)

2

∑i=1

n

i=n(n+1)

2

∑i=1

n

i=n(n+1)

2

∑i=1

0

i=0=0(0+1)

2

∑i=1

n

i=n(n+1)

2

∑i=1

n+1

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

2

Theorem: For any natural number n, Proof: By induction. Let P(n) be

P(n) ≡

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

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

We need to show that P(n + 1) holds, meaning that

To see this, note that

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

∑i=1

n+1

i=∑i=1

n

i+(n+1)=n(n+1)

2+n+1=

n(n+1)+2(n+1)

2=

(n+1)(n+2)

2

∑i=1

n

i=n(n+1)

2

∑i=1

n

i=n(n+1)

2

∑i=1

0

i=0(0+1)

2

∑i=1

n

i=n(n+1)

2

∑i=1

n+1

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

2

Theorem: For any natural number n, Proof: By induction. Let P(n) be

P(n) ≡

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

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

We need to show that P(n + 1) holds, meaning that

To see this, note that

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

∑i=1

n+1

i=∑i=1

n

i+(n+1)=n(n+1)

2+n+1=

n(n+1)+2(n+1)

2=

(n+1)(n+2)

2

∑i=1

n

i=n(n+1)

2

∑i=1

n

i=n(n+1)

2

∑i=1

0

i=0(0+1)

2

∑i=1

n

i=n(n+1)

2

∑i=1

n+1

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

2

Theorem: For any natural number n, Proof: By induction. Let P(n) be

P(n) ≡

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

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

We need to show that P(n + 1) holds, meaning that

To see this, note that

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

∑i=1

n+1

i=∑i=1

n

i+(n+1)=n(n+1)

2+n+1=

n(n+1)+2(n+1)

2=

(n+1)(n+2)

2

∑i=1

n

i=n(n+1)

2

∑i=1

n

i=n(n+1)

2

∑i=1

0

i=0(0+1)

2

∑i=1

n

i=n(n+1)

2

∑i=1

n+1

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

2

Theorem: For any natural number n, Proof: By induction. Let P(n) be

P(n) ≡

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

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

We need to show that P(n + 1) holds, meaning that

To see this, note that

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

∑i=1

n+1

i=∑i=1

n

i+(n+1)=n(n+1)

2+n+1=

n(n+1)+2(n+1)

2=

(n+1)(n+2)

2

∑i=1

n

i=n(n+1)

2

∑i=1

n

i=n(n+1)

2

∑i=1

0

i=0(0+1)

2

∑i=1

n

i=n(n+1)

2

∑i=1

n+1

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

2

Theorem: For any natural number n, Proof: By induction. Let P(n) be

P(n) ≡

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

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

We need to show that P(n + 1) holds, meaning that

To see this, note that

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

∑i=1

n+1

i=∑i=1

n

i+(n+1)=n(n+1)

2+n+1=

n(n+1)+2(n+1)

2=

(n+1)(n+2)

2

∑i=1

n

i=n(n+1)

2

∑i=1

n

i=n(n+1)

2

∑i=1

0

i=0(0+1)

2

∑i=1

n

i=n(n+1)

2

∑i=1

n+1

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

2

Pro tip – When proving properties of sums with

induction, it often helps to “peel off” the last few terms.

Theorem: For any natural number n, Proof: By induction. Let P(n) be

P(n) ≡

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

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

We need to show that P(n + 1) holds, meaning that

To see this, note that

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

∑i=1

n+1

i=∑i=1

n

i+(n+1)=n(n+1)

2+n+1=

n(n+1)+2(n+1)

2=

(n+1)(n+2)

2

∑i=1

n

i=n(n+1)

2

∑i=1

n

i=n(n+1)

2

∑i=1

0

i=0(0+1)

2

∑i=1

n

i=n(n+1)

2

∑i=1

n+1

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

2

Theorem: For any natural number n, Proof: By induction. Let P(n) be

P(n) ≡

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

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

We need to show that P(n + 1) holds, meaning that

To see this, note that

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

∑i=1

n+1

i=∑i=1

n

i+(n+1)=n(n+1)

2+n+1=

n(n+1)+2(n+1)

2=

(n+1)(n+2)

2

∑i=1

n

i=n(n+1)

2

∑i=1

n

i=n(n+1)

2

∑i=1

0

i=0(0+1)

2

∑i=1

n

i=n(n+1)

2

∑i=1

n+1

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

2

Theorem: For any natural number n, Proof: By induction. Let P(n) be

P(n) ≡

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

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

We need to show that P(n + 1) holds, meaning that

To see this, note that

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

∑i=1

n+1

i=∑i=1

n

i+(n+1)=n(n+1)

2+n+1=

n(n+1)+2(n+1)

2=

(n+1)(n+2)

2

∑i=1

n

i=n(n+1)

2

∑i=1

n

i=n(n+1)

2

∑i=1

0

i=0(0+1)

2

∑i=1

n

i=n(n+1)

2

∑i=1

n+1

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

2

An Incorrect ProofTheorem: For any natural number n,

Proof: Let P(n) be P(n) ≡

Now, assume that for some n, P(n) holds, so

We want to show that P(n + 1) is true, which means that we want to show

To see this, note that

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

∑i=1

n

i=12(n+

12)

2

∑i=1

n

i=12(n+

12)

2

∑i=1

n+1

i=∑i=1

n

i+n+1=12(n+

12)

2

+n+1=(n+

12)

2

2+

2(n+1)

2=

(n+12)

2

+2(n+1)

2

∑i=1

n

i=12(n+

12)

2

∑i=1

n+1

i=12(n+1+

12)

2

=12(n+

32)

2

=

n2+n+

14+2n+2

2=

n2+3n+

94

2=

(n+3/2)2

2

An Incorrect ProofTheorem: For any natural number n,

Proof: Let P(n) be P(n) ≡

Now, assume that for some n, P(n) holds, so

We want to show that P(n + 1) is true, which means that we want to show

To see this, note that

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

∑i=1

n

i=12(n+

12)

2

∑i=1

n

i=12(n+

12)

2

∑i=1

n+1

i=∑i=1

n

i+n+1=12(n+

12)

2

+n+1=(n+

12)

2

2+

2(n+1)

2=

(n+12)

2

+2(n+1)

2

∑i=1

n

i=12(n+

12)

2

∑i=1

n+1

i=12(n+1+

12)

2

=12(n+

32)

2

=

n2+n+

14+2n+2

2=

n2+3n+

94

2=

(n+3/2)2

2

An Incorrect ProofTheorem: For any natural number n,

Proof: Let P(n) be P(n) ≡

Now, assume that for some n, P(n) holds, so

We want to show that P(n + 1) is true, which means that we want to show

To see this, note that

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

∑i=1

n

i=12(n+

12)

2

∑i=1

n

i=12(n+

12)

2

∑i=1

n+1

i=∑i=1

n

i+n+1=12(n+

12)

2

+n+1=(n+

12)

2

2+

2(n+1)

2=

(n+12)

2

+2(n+1)

2

∑i=1

n

i=12(n+

12)

2

∑i=1

n+1

i=12(n+1+

12)

2

=12(n+

32)

2

=

n2+n+

14+2n+2

2=

n2+3n+

94

2=

(n+3/2)2

2

An Incorrect ProofTheorem: For any natural number n,

Proof: Let P(n) be P(n) ≡

Now, assume that for some n, P(n) holds, so

We want to show that P(n + 1) is true, which means that we want to show

To see this, note that

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

∑i=1

n

i=12(n+

12)

2

∑i=1

n

i=12(n+

12)

2

∑i=1

n+1

i=∑i=1

n

i+n+1=12(n+

12)

2

+n+1=(n+

12)

2

2+

2(n+1)

2=

(n+12)

2

+2(n+1)

2

∑i=1

n

i=12(n+

12)

2

∑i=1

n+1

i=12(n+1+

12)

2

=12(n+

32)

2

=

n2+n+

14+2n+2

2=

n2+3n+

94

2=

(n+3/2)2

2

An Incorrect ProofTheorem: For any natural number n,

Proof: Let P(n) be P(n) ≡

Now, assume that for some n, P(n) holds, so

We want to show that P(n + 1) is true, which means that we want to show

To see this, note that

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

∑i=1

n

i=12(n+

12)

2

∑i=1

n

i=12(n+

12)

2

∑i=1

n+1

i=∑i=1

n

i+n+1=12(n+

12)

2

+n+1=(n+

12)

2

2+

2(n+1)

2=

(n+12)

2

+2(n+1)

2

∑i=1

n

i=12(n+

12)

2

∑i=1

n+1

i=12(n+1+

12)

2

=12(n+

32)

2

=

n2+n+

14+2n+2

2=

n2+3n+

94

2=

(n+3/2)2

2

An Incorrect ProofTheorem: For any natural number n,

Proof: Let P(n) be P(n) ≡

Now, assume that for some n, P(n) holds, so

We want to show that P(n + 1) is true, which means that we want to show

To see this, note that

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

∑i=1

n

i=12(n+

12)

2

∑i=1

n

i=12(n+

12)

2

∑i=1

n+1

i=∑i=1

n

i+n+1=12(n+

12)

2

+n+1=(n+

12)

2

2+

2(n+1)

2=

(n+12)

2

+2(n+1)

2

∑i=1

n

i=12(n+

12)

2

∑i=1

n+1

i=12(n+1+

12)

2

=12(n+

32)

2

=

n2+n+14+2n+2

2=

n2+3n+94

2=

(n+32)

2

2

An Incorrect ProofTheorem: For any natural number n,

Proof: Let P(n) be P(n) ≡

Now, assume that for some n, P(n) holds, so

We want to show that P(n + 1) is true, which means that we want to show

To see this, note that

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

∑i=1

n

i=12(n+

12)

2

∑i=1

n

i=12(n+

12)

2

∑i=1

n+1

i=∑i=1

n

i+n+1=12(n+

12)

2

+n+1=(n+

12)

2

2+

2(n+1)

2=

(n+12)

2

+2(n+1)

2

∑i=1

n

i=12(n+

12)

2

∑i=1

n+1

i=12(n+1+

12)

2

=12(n+

32)

2

=

n2+n+14+2n+2

2=

n2+3n+94

2=

(n+32)

2

2

An Incorrect ProofTheorem: For any natural number n,

Proof: Let P(n) be P(n) ≡

Now, assume that for some n, P(n) holds, so

We want to show that P(n + 1) is true, which means that we want to show

To see this, note that

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

∑i=1

n

i=12(n+

12)

2

∑i=1

n

i=12(n+

12)

2

∑i=1

n+1

i=∑i=1

n

i+n+1=12(n+

12)

2

+n+1=(n+

12)

2

2+

2(n+1)

2=

(n+12)

2

+2(n+1)

2

∑i=1

n

i=12(n+

12)

2

∑i=1

n+1

i=12(n+1+

12)

2

=12(n+

32)

2

=

n2+n+14+2n+2

2=

n2+3n+94

2=

(n+32)

2

2

An Incorrect ProofTheorem: For any natural number n,

Proof: Let P(n) be P(n) ≡

Now, assume that for some n, P(n) holds, so

We want to show that P(n + 1) is true, which means that we want to show

To see this, note that

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

∑i=1

n

i=12(n+

12)

2

∑i=1

n

i=12(n+

12)

2

∑i=1

n+1

i=∑i=1

n

i+n+1=12(n+

12)

2

+n+1=(n+

12)

2

2+

2(n+1)

2=

(n+12)

2

+2(n+1)

2

∑i=1

n

i=12(n+

12)

2

∑i=1

n+1

i=12(n+1+

12)

2

=12(n+

32)

2

Where did we prove the base case?

=

n2+n+14+2n+2

2=

n2+3n+94

2=

(n+32)

2

2

Where did we prove the base case?

An Incorrect ProofTheorem: For any natural number n,

Proof: Let P(n) be P(n) ≡ .

Now, assume that for some n, P(n) holds, so

We want to show that P(n + 1) is true, which means that we want to show

To see this, note that

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

∑i=1

n

i=12(n+

12)

2

∑i=1

n

i=12(n+

12)

2

∑i=1

n+1

i=∑i=1

n

i+n+1=12(n+

12)

2

+n+1=(n+

12)

2

2+

2(n+1)

2=

(n+12)

2

+2(n+1)

2

∑i=1

n

i=12(n+

12)

2

∑i=1

n+1

i=12(n+1+

12)

2

=12(n+

32)

2

=

n2+n+

14+2n+2

2=

n2+3n+

94

2=

(n+3/2)2

2

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 3P(n) → P(n + 1)is not enough!

Sums of Powers of Two

20 = 1 = 120 + 21 = 1 + 2 = 3 20 + 21 + 22 = 1 + 2 + 4 = 7 20 + 21 + 22 + 23 = 1 + 2 + 4 + 8 = 15

Sums of Powers of Two

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

Sums of Powers of Two

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

∑i=0

n

2i=2n+1−1

Theorem: For any natural number n, Proof: By induction. Let P(n) be

P(n) ≡

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

Since 20 = 1 = 21 – 1, this is true.

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

We need to show that P(n + 1) holds, meaning that

To see this, note that

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

∑i=0

n+1

i=∑i=0

n

i+2n+1=2n+1

−1+2n+1=2(2n+1

)−1=2n+2−1

∑i=0

n

2i=2n+1−1

∑i=0

n

2i=2n+1−1

∑i=0

0

2i=21−1

∑i=0

n

2i=2n+1−1

∑i=0

n+1

2i=2n+2−1

Theorem: For any natural number n, Proof: By induction. Let P(n) be

P(n) ≡

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

Since 20 = 1 = 21 – 1, this is true.

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

We need to show that P(n + 1) holds, meaning that

To see this, note that

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

∑i=0

n+1

i=∑i=0

n

i+2n+1=2n+1

−1+2n+1=2(2n+1

)−1=2n+2−1

∑i=0

n

2i=2n+1−1

∑i=0

n

2i=2n+1−1

∑i=0

0

2i=21−1

∑i=0

n

2i=2n+1−1

∑i=0

n+1

2i=2n+2−1

Theorem: For any natural number n, Proof: By induction. Let P(n) be

P(n) ≡

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

Since 20 = 1 = 21 – 1, this is true.

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

We need to show that P(n + 1) holds, meaning that

To see this, note that

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

∑i=0

n+1

i=∑i=0

n

i+2n+1=2n+1

−1+2n+1=2(2n+1

)−1=2n+2−1

∑i=0

n

2i=2n+1−1

∑i=0

n

2i=2n+1−1

∑i=0

0

2i=21−1

∑i=0

n

2i=2n+1−1

∑i=0

n+1

2i=2n+2−1

Theorem: For any natural number n, Proof: By induction. Let P(n) be

P(n) ≡

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

Since 20 = 1 = 21 – 1, this is true.

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

We need to show that P(n + 1) holds, meaning that

To see this, note that

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

∑i=0

n+1

i=∑i=0

n

i+2n+1=2n+1

−1+2n+1=2(2n+1

)−1=2n+2−1

∑i=0

n

2i=2n+1−1

∑i=0

n

2i=2n+1−1

∑i=0

0

2i=21−1

∑i=0

n

2i=2n+1−1

∑i=0

n+1

2i=2n+2−1

Theorem: For any natural number n, Proof: By induction. Let P(n) be

P(n) ≡

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

Since 20 = 1 = 21 – 1, this is true.

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

We need to show that P(n + 1) holds, meaning that

To see this, note that

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

∑i=0

n+1

i=∑i=0

n

i+2n+1=2n+1

−1+2n+1=2(2n+1

)−1=2n+2−1

∑i=0

n

2i=2n+1−1

∑i=0

n

2i=2n+1−1

∑i=0

0

2i=21−1

∑i=0

n

2i=2n+1−1

∑i=0

n+1

2i=2n+2−1

Theorem: For any natural number n, Proof: By induction. Let P(n) be

P(n) ≡

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

Since 20 = 1 = 21 – 1, this is true.

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

We need to show that P(n + 1) holds, meaning that

To see this, note that

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

∑i=0

n+1

2i=∑i=0

n

2i+2n+1=2n+1

−1+2n+1=2(2n+1

)−1=2n+2−1

∑i=0

n

2i=2n+1−1

∑i=0

n

2i=2n+1−1

∑i=0

0

2i=21−1

∑i=0

n

2i=2n+1−1

∑i=0

n+1

2i=2n+2−1

Theorem: For any natural number n, Proof: By induction. Let P(n) be

P(n) ≡

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

Since 20 = 1 = 21 – 1, this is true.

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

We need to show that P(n + 1) holds, meaning that

To see this, note that

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

∑i=0

n+1

2i=∑i=0

n

2i+2n+1=2n+1

−1+2n+1=2(2n+1

)−1=2n+2−1

∑i=0

n

2i=2n+1−1

∑i=0

n

2i=2n+1−1

∑i=0

0

2i=21−1

∑i=0

n

2i=2n+1−1

∑i=0

n+1

2i=2n+2−1

Seem familiar?

Theorem: For any natural number n, Proof: By induction. Let P(n) be

P(n) ≡

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

Since 20 = 1 = 21 – 1, this is true.

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

We need to show that P(n + 1) holds, meaning that

To see this, note that

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

∑i=0

n+1

2i=∑i=0

n

2i+2n+1=2n+1

−1+2n+1=2(2n+1

)−1=2n+2−1

∑i=0

n

2i=2n+1−1

∑i=0

n

2i=2n+1−1

∑i=0

0

2i=21−1

∑i=0

n

2i=2n+1−1

∑i=0

n+1

2i=2n+2−1

Theorem: For any natural number n, Proof: By induction. Let P(n) be

P(n) ≡

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

Since 20 = 1 = 21 – 1, this is true.

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

We need to show that P(n + 1) holds, meaning that

To see this, note that

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

∑i=0

n

2i=2n+1−1

∑i=0

n

2i=2n+1−1

∑i=0

n+1

2i=∑i=0

n

2i+2n+1=2n+1

−1+2n+1=2(2n+1

)−1=2n+2−1

∑i=0

0

2i=21−1

∑i=0

n

2i=2n+1−1

∑i=0

n+1

2i=2n+2−1

Theorem: For any natural number n, Proof: By induction. Let P(n) be

P(n) ≡

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

Since 20 = 1 = 21 – 1, this is true.

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

We need to show that P(n + 1) holds, meaning that

To see this, note that

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

∑i=0

n

2i=2n+1−1

∑i=0

n

2i=2n+1−1

∑i=0

n+1

2i=∑i=0

n

2i+2n+1=2n+1

−1+2n+1=2(2n+1

)−1=2n+2−1

∑i=0

0

2i=21−1

∑i=0

n

2i=2n+1−1

∑i=0

n+1

2i=2n+2−1

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

11

22

33

Finding the Counterfeit Coin

11 22

33

Finding the Counterfeit Coin

11

22

33

Finding the Counterfeit Coin

11

22

33

Finding the Counterfeit Coin

11

33

22

Finding the Counterfeit Coin

11

33

22

Finding the Counterfeit Coin

11 22

33

Finding the Counterfeit Coin

11 22

3333

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

11

44

77

22

55

88

33

66

99

Finding the Counterfeit Coin

11 44

77

22 55

88

33 66

99

Finding the Counterfeit Coin

11

44

77

22

55

88

33

66

99

Finding the Counterfeit Coin

11

44

77

22

55

88

33

66

99

Finding the Counterfeit Coin

11

44

77

22

55

88

33

66

99

Now we have one weighing to find the counterfeit out of these three

Finding the Counterfeit Coin

11

44

77

22

5588

33

6699

Finding the Counterfeit Coin

11

44

77

22

5588

33

6699

Finding the Counterfeit Coin

11

44

77

22

5588

33

6699

Now we have one weighing to find the counterfeit out of these three

Finding the Counterfeit Coin

11 44

77

22 55

88

33 66

99

Finding the Counterfeit Coin

11 44

77

22 55

88

33 66

99

Finding the Counterfeit Coin

11 44

77

22 55

88

33 66

99

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 3n 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 3n; 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 3n 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 3n 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 3n; 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 3n 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 3n 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 3n; 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 3n 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 3n 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 3n; 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 3n 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 3n 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 3n; 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 3n 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 3n 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 3n; 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 3n 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 3n 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 3n; 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 3n 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 3n 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 3n; 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 3n 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 3n 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 3n; 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 3n 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 3n 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 3n; 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 3n 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 3n 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 3n; 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 3n 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 3n 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 3n; 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 3n 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 3n 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 3n; 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 3n 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 3n 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 3n; 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 3n 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 3n 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 3n; 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 3n 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 3n 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 3n; 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 3n 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

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.

A

MI

MII

MIIIIA) 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.

A

A

MI

MII

MIIIIA) 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.

MIIIIU

A

A

D

MI

MII

MIIIIA) 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.

MIIIIU

MUIU

A

A

D

B

MI

MII

MIIIIA) 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.

MIIIIU

MUIU

MUIUUIU

A

A

D

B

A

MI

MII

MIIIIA) 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.

MIIIIU

MUIU

MUIUUIU

MUIIU

A

A

D

B

A

C

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.

Try It!

Starting with MI, apply these operations to make MU:

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

MI

MII

MIIII

MIIIIU

MIIIIUIIIIU

MIIIIUUIU

MIIIIUUIUIIIIUUIU

MUIUUIUIIIIUUIU

Counting I's

7

MI

MII

MIIII

MIIIIU

MIIIIUIIIIU

MIIIIUUIU

MIIIIUUIUIIIIUUIU

1

2

4

4

8

5

10

MUIUUIUIIIIUUIU

Counting I's

7

MI

MII

MIIII

MIIIIU

MIIIIUIIIIU

MIIIIUUIU

MIIIIUUIUIIIIUUIU

1

2

4

4

8

5

10

None of these are

multiples of three...

MUIUUIUIIIIUUIU

Counting I's

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.

Theorem: For any natural number n, Proof: By induction on n. For our base case, if n = 0, note that

and the theorem is true for 0.

For the inductive step, assume that for some n the theorem is true. Then we have that

so the theorem is true for n + 1, completing the induction. ■

∑i=1

n+1

i=∑i=1

n

i+(n+1)=n(n+1)

2+n+1=

n(n+1)+2(n+1)

2=

(n+1)(n+2)

2

∑i=1

n

i=n(n+1)

2

∑i=1

0

i=0(0+1)

2=0

A Variant of Induction

n2 versus 2n

● 02 = 0

● 12 = 1

● 22 = 4

● 32 = 9

● 42 = 16

● 52 = 25

● 62 = 36

● 72 = 49

● 82 = 64

● 92 = 81

● 102 = 100

● 20 = 1

● 21 = 2

● 22 = 4

● 23 = 8

● 24 = 16

● 25 = 32

● 26 = 64

● 27 = 128

● 28 = 256

● 29 = 512

● 210 = 1024

n2 versus 2n

● 02 = 0

● 12 = 1

● 22 = 4

● 32 = 9

● 42 = 16

● 52 = 25

● 62 = 36

● 72 = 49

● 82 = 64

● 92 = 81

● 102 = 100

● 20 = 1

● 21 = 2

● 22 = 4

● 23 = 8

● 24 = 16

● 25 = 32

● 26 = 64

● 27 = 128

● 28 = 256

● 29 = 512

● 210 = 1024

<

<

=

>

=

<

<

<

<

<

<

n2 versus 2n

● 02 = 0

● 12 = 1

● 22 = 4

● 32 = 9

● 42 = 16

● 52 = 25

● 62 = 36

● 72 = 49

● 82 = 64

● 92 = 81

● 102 = 100

● 20 = 1

● 21 = 2

● 22 = 4

● 23 = 8

● 24 = 16

● 25 = 32

● 26 = 64

● 27 = 128

● 28 = 256

● 29 = 512

● 210 = 1024

<

<

=

>

=

<

<

<

<

<

<

2n is much bigger here. Does the trend

continue?

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 + n2 (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 + n2 (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 + n2 (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 + n2 (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 + n2 (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 + n2 (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 + n2 (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 + n2 (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 + n2 (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 + n2 (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 + n2 (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 + n2 (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 + n2 (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 + n2 (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 + n2 (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 + n2 (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 + n2 (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 + n2 (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 + n2 (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 allowed?

Why is this allowed?

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) and for any n, P(n) → P(n + 1), so by induction

P(n) is true for all natural numbers n.

Remember: A B means →

“whenever A is true, B is true.” If B is always true, A B is →

true for any A.

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) and for any n, P(n) → P(n + 1), so by induction

P(n) is true for all natural numbers n.Again, A B is automatically true →

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?