In this section, we consider statements which involve some form of “... is true of every integer”. For example,

For every integer \(n \ge 1\text{,}\)\(\ds 1 + 2 + 3 + \dots + n = \frac{n(n+1)}{2}\text{.}\)

\(\log(a^n) = n \log (a)\) for every positive integer \(n\)

These are sequences of statements and we’ll be using a recursive technique to prove them, because we can’t prove that a statement like this is true by showing it’s true for every literal integer (there are infinitely many of them, so that’s impossible). Instead, the principle of mathematical induction tells us we can prove statements like these are true, so long as we do it just right. This section helps us learn how to do just that.

Subsection

Definition4.3.1.Mathematical Induction.

To prove that a statement \(P(n)\) is true for all integers \(n\ge 0\text{,}\) we use the principle of math induction. The process has two core steps:

Basis step: Prove that \(P(0)\) is true.

Inductive step: Assume that \(P(k)\) is true for some value of \(k \ge 0\) and show that \(P(k+1)\) is true.

The common analogy for induction is to imagine an infinite ladder. First, you put your foot on the bottom rung. If you’re able to go from the \(k\)-th rung to the \(k+1\)-st rung, you’ll be able to climb forever.

Example4.3.2.

The model of induction will always follow the following structure:

Proof.

Proof by math induction.

Basis step. [here you prove \(P(0)\) is true]

Inductive step. Assume \(P(k)\) is true for some \(k\ge 0\) [explicitly say what this statement is. This is called the inductive hypothesis]. We will show \(P(k+1)\) is true.

[here you actually prove \(P(k+1)\) is true. You should use the inductive hypothesis. If you didn’t, you’ve made an error somewhere]

Example4.3.3.

Prove that \(\ds 1 + 2 + 3 + \dots + n = \frac{n(n+1)}{2}\text{.}\)

Find a formula for \(\frac{1}{1\cdot 2} + \frac{1}{2\cdot 3} + \frac{1}{3\cdot 4} + \dots + \frac{1}{n(n+1)}\) for \(n\ge 1\) by examining small values of \(n\text{.}\)

What is wrong with the following “proof” that all horses are the same color?

Proof by induction:

Base step: the statement \(P(1)\) is the statement “one horse is the same color as itself”. This is clearly true.

Induction step: Assume that \(P(k)\) is true for some integer \(k\text{.}\) That is, any group of \(k\) horses are all the same color.

Consider a group of \(k+1\) horses. Let’s line them up. If we look at first \(k\) horses, our induction hypothesis tells us they are the same color. Similarly, if we look at the last \(k\) horses, they are also the same color. This shows that all \(k+1\) horses are the same color.

Thus, by math induction, all horses are the same color.

Subsection

The next definition says “strong induction”, and I’m following the convention of nearly every discrete math book ever in defining this with its own name. The two concepts are really not very different, as we’ll see below.

Definition4.3.8.Strong Induction.

The principal of strong math induction is like the so-called weak induction, except instead of proving \(P(k) \to P(k+1)\text{,}\) we assume that \(P(m)\) is true for all values of \(m\) such that \(0 \le m \le k\text{,}\) and we show that the next statement, \(P(k+1)\text{,}\) is true.

Example4.3.9.

Let \(P(n)\) be the statement that “postage of \(n\) cents can be formed using just 4 cent and 7 cent stamps”. Prove \(P(n)\) is true for \(n\ge 18\text{.}\)

Here’s a different approach to the problem. If we can construct \(18, 19, 20, \dots k\) postage using the four and seven cent stamps, then for the \(k+1\) cent postage, We’ll just pretend you asked for four cents less! \(k+1 -4 = k-3\text{.}\) Were’re guaranteed to be able to make the postage by the induction hypothesis. Imagine putting those stamps on the package. Then all we need is to glue on one four cent stamp and we’re good to go!

Here’s one way to approach the problem. Begin by showing we can do the basis, see if we can find a pattern, then make a formal proof:

\(\displaystyle 18 = 7\cdot2 + 4\cdot1\)

\(\displaystyle 19 = 7\cdot1 + 4\cdot3\)

\(\displaystyle 20 = 7\cdot0 + 4\cdot5\)

\(\displaystyle 21 = 7\cdot3 + 4\cdot0\)

\(\displaystyle 22 = 7\cdot2 + 4\cdot2\)

\(\displaystyle 23 = 7\cdot1 + 4\cdot4\)

\(\displaystyle 24 = 7\cdot0 + 4\cdot6\)

\(\displaystyle 25 = 7\cdot3 + 4\cdot1\)

\(\displaystyle 26 = 7\cdot2 + 4\cdot3\)

\(\displaystyle 27 = 7\cdot1 + 4\cdot5\)

\(\displaystyle 28 = 7\cdot0 + 4\cdot7\)

Do you notice a pattern? Take a couple moments to think about it, then let’s do the proof.

Proof.

Basis step: We can form 18 cent postage using two 7 and one 4 cent stamp.

Inductive step: Assume that one can form postage for all values from 18 cents up to \(k\) cents. Now we’re asked to form \(k+1\) cents. we know that we can form \(k\) cents, so, without loss of generality, let’s assume that it takes \(s\) 7 cent stamps and \(t\) 4 cent stamps. That is:

\begin{equation*}
k = 7s + 4t
\end{equation*}

Now, if \(s \ge 1\text{,}\) then we can do the following, adding one to both sides in two different ways:

Note4.3.11.The difference between ’weak’ and ’strong’ induction.

’Regular’/’weak’ induction follows the pattern:

Basis step.

Inductive hypothesis is \(P(k)\) is true

We show that \(P(k)\) implies that \(P(k+1)\) is true

That is, we use this induction process for claims where it’s convenient to show that the pattern follows sequentially in a convenient way. Straight-forward examples are the addition formulas;

’Strong’ induction follows the pattern:

Basis step(s). [may need more than one basis, just like some recurrence relations]

Inductive hypothesis is that all of \(P(1), P(2), P(3), \dots P(k)\) are true. [this is the ’strong’ part; it’s a larger assumption]

We show that the hypothesis implies the next element in the sequence, \(P(k+1)\text{,}\) is true [like before]

the difference between this and the previous induction process is that it’s sometimes not convenient to prove that \(P(k)\) directly connects to \(P(k+1)\text{.}\) Instead, we still need to show that the next element in the sequence \(P(k+1)\) is true by appealing to a previous element in the sequence.

Relevant examples are those like the binary representation of a number - that \(k\) has a binary representation doesn’t immediately tell us \(k+1\) does, but if we can cut the number in half and use the binary representation of that number to scale-up in order to build a binary representation of \(k+1\text{.}\)

We separate ’weak’ and ’strong’ induction, but they’re really all the same thing. It’s just that when it’s convenient to show \(P(k) \to P(k+1)\text{,}\) we write fewer words for our inductive hypothesis. Because if we don’t need to use the fact that \(P(m)\) is true for all \(1 \le m \le k\text{,}\) then we just omit that. Mathematicians are lazy.

SubsectionComputer Corner

You’ll be using mathematical induction when you’re designing algorithms. Let’s take the example of sorting a dataset. To prove that an algorithm is correct, you need:

There is a valid base case. In our example - it can sort a set of one element)

Assume the algorithm works for \(n\) objects. It can sort a set of \(n\) objects

Show that if you have a larger set of one more object, \(n+1\) objects, your algorithm correctly sorts that new elements with the previous \(n\) elements. It can sort a set with \(n+1\) objects. Therefore, the algorithm is correct.

For example, we proved mathematically in Example 4.3.9 that any postage over 18 cents can be made with 4 and 7 cent stamps. The proof of that gives rise to an algorithm that we know must be correct:

ExercisesExercises

1.

Use induction to prove for all \(n \in \N\) that \(\d 1 + 2 + 2^2 + 2^3 + \dots + 2^n = 2^{n+1} - 1\text{.}\)

We must prove that \(1 + 2 + 2^2 + 2^3 + \cdots +2^n = 2^{n+1} - 1\) for all \(n \in \N\text{.}\) Thus let \(P(n)\) be the statement \(1 + 2 + 2^2 + \cdots + 2^n = 2^{n+1} - 1\text{.}\) We will prove that \(P(n)\) is true for all \(n \in \N\text{.}\) First we establish the base case, \(P(0)\text{,}\) which claims that \(1 = 2^{0+1} -1\text{.}\) Since \(2^1 - 1 = 2 - 1 = 1\text{,}\) we see that \(P(0)\) is true. Now for the inductive case. Assume that \(P(k)\) is true for an arbitrary \(k \in \N\text{.}\) That is, \(1 + 2 + 2^2 + \cdots + 2^k = 2^{k+1} - 1\text{.}\) We must show that \(P(k+1)\) is true (i.e., that \(1 + 2 + 2^2 + \cdots + 2^{k+1} = 2^{k+2} - 1\)). To do this, we start with the left-hand side of \(P(k+1)\) and work to the right-hand side:

Let \(P(n)\) be the statement \(1+3 +5 + \cdots + (2n-1) = n^2\text{.}\) We will prove that \(P(n)\) is true for all \(n \ge 1\text{.}\) First the base case, \(P(1)\text{.}\) We have \(1 = 1^2\) which is true, so \(P(1)\) is established. Now the inductive case. Assume that \(P(k)\) is true for some fixed arbitrary \(k \ge 1\text{.}\) That is, \(1 + 3 + 5 + \cdots + (2k-1) = k^2\text{.}\) We will now prove that \(P(k+1)\) is also true (i.e., that \(1 + 3 + 5 + \cdots + (2k+1) = (k+1)^2\)). We start with the left-hand side of \(P(k+1)\) and work to the right-hand side:

Let \(P(n)\) be the statement \(2^n \lt n!\text{.}\) We will show \(P(n)\) is true for all \(n \ge 4\text{.}\) First, we check the base case and see that yes, \(2^4 \lt 4!\) (as \(16 \lt 24\)) so \(P(4)\) is true. Now for the inductive case. Assume \(P(k)\) is true for an arbitrary \(k \ge 4\text{.}\) That is, \(2^k \lt k!\text{.}\) Now consider \(P(k+1)\text{:}\)\(2^{k+1} \lt (k+1)!\text{.}\) To prove this, we start with the left side and work to the right side.

Therefore \(2^{k+1} \lt (k+1)!\) so we have established \(P(k+1)\text{.}\) Thus by the principle of mathematical induction \(P(n)\) is true for all \(n \ge 4\text{.}\)

4.

Prove that the sum of \(n\) squares can be found as follows

which is exactly what we needed to show. Thus, by the principle of mathematical induction, the original statement \(1^2 +2^2 +3^2+...+n^2 = \frac{n(n+1)(2n+1)}{6}\) is true for all integers \(n\ge 1\text{.}\)

5.

What is wrong with the following “proof” of the “fact” that \(n+3 = n+7\) for all values of \(n\) (besides of course that the thing it is claiming to prove is false)?

Proof.

Let \(P(n)\) be the statement that \(n + 3 = n + 7\text{.}\) We will prove that \(P(n)\) is true for all \(n \in \N\text{.}\) Assume, for induction that \(P(k)\) is true. That is, \(k+3 = k+7\text{.}\) We must show that \(P(k+1)\) is true. Now since \(k + 3 = k + 7\text{,}\) add 1 to both sides. This gives \(k + 3 + 1 = k + 7 + 1\text{.}\) Regrouping \((k+1) + 3 = (k+1) + 7\text{.}\) But this is simply \(P(k+1)\text{.}\) Thus by the principle of mathematical induction \(P(n)\) is true for all \(n \in \N\text{.}\)

The only problem is that we never established the base case. Of course, when \(n = 0\text{,}\)\(0+3 \ne 0+7\text{.}\)

6.

The proof in the previous problem does not work. But if we modify the “fact,” we can get a working proof. Prove that \(n + 3 \lt n + 7\) for all values of \(n \in \N\text{.}\) You can do this proof with algebra (without induction), but the goal of this exercise is to write out a valid induction proof.

Let \(P(n)\) be the statement that \(n + 3 \lt n + 7\text{.}\) We will prove that \(P(n)\) is true for all \(n \in \N\text{.}\) First, note that the base case holds: \(0+3 \lt 0+7\text{.}\) Now assume for induction that \(P(k)\) is true. That is, \(k+3 \lt k+7\text{.}\) We must show that \(P(k+1)\) is true. Now since \(k + 3 \lt k + 7\text{,}\) add 1 to both sides. This gives \(k + 3 + 1 \lt k + 7 + 1\text{.}\) Regrouping \((k+1) + 3 \lt (k+1) + 7\text{.}\) But this is simply \(P(k+1)\text{.}\) Thus by the principle of mathematical induction \(P(n)\) is true for all \(n \in \N\text{.}\)

7.

Find the flaw in the following “proof” of the “fact” that \(n \lt 100\) for every \(n \in \N\text{.}\)

Proof.

Let \(P(n)\) be the statement \(n \lt 100\text{.}\) We will prove \(P(n)\) is true for all \(n \in \N\text{.}\) First we establish the base case: when \(n = 0\text{,}\)\(P(n)\) is true, because \(0 \lt 100\text{.}\) Now for the inductive step, assume \(P(k)\) is true. That is, \(k \lt 100\text{.}\) Now if \(k \lt 100\text{,}\) then \(k\) is some number, like 80. Of course \(80+1 = 81\) which is still less than 100. So \(k +1 \lt 100\) as well. But this is what \(P(k+1)\) claims, so we have shown that \(P(k) \imp P(k+1)\text{.}\) Thus by the principle of mathematical induction, \(P(n)\) is true for all \(n \in \N\text{.}\)

The problem here is that while \(P(0)\) is true, and while \(P(k) \imp P(k+1)\) for some values of \(k\text{,}\) there is at least one value of \(k\) (namely \(k = 99\)) when that implication fails. For a valid proof by induction, \(P(k) \imp P(k+1)\) must be true for all values of \(k\) greater than or equal to the base case.

8.

What is wrong with the following “proof” of the “fact” that for all \(n \in \N\text{,}\) the number \(n^2 + n\) is odd?

Proof.

Let \(P(n)\) be the statement “\(n^2 + n\) is odd.” We will prove that \(P(n)\) is true for all \(n \in \N\text{.}\) Suppose for induction that \(P(k)\) is true, that is, that \(k^2 + k\) is odd. Now consider the statement \(P(k+1)\text{.}\) Now \((k+1)^2 + (k+1) = k^2 + 2k + 1 + k + 1 = k^2 + k + 2k + 2\text{.}\) By the inductive hypothesis, \(k^2 + k\) is odd, and of course \(2k + 2\) is even. An odd plus an even is always odd, so therefore \((k+1)^2 + (k+1)\) is odd. Therefore by the principle of mathematical induction, \(P(n)\) is true for all \(n \in \N\text{.}\)

Rather than give a solution, here’s just a hint. What happens if \(n\) is even?

9.

Now give a valid proof (by induction, even though you might be able to do so without using induction) of the statement, “for all \(n \in \N\text{,}\) the number \(n^2 + n\) is even.”

Let \(P(n)\) be the statement “when \(n\) people shake hands with each other, there are a total of \(\frac{n(n-1)}{2}\) handshakes.”

Base case: When \(n=2\text{,}\) there will be one handshake, and \(\frac{2(2-1)}{2} = 1\text{.}\) Thus \(P(2)\) is true.

Inductive case: Assume \(P(k)\) is true for arbitrary \(k\ge 2\) (that the number of handshakes among \(k\) people is \(\frac{k(k-1)}{2}\text{.}\) What happens if a \(k+1\)st person shows up? How many new handshakes take place? The new person must shake hands with everyone there, which is \(k\) new handshakes. So the total is now \(\frac{k(k-1)}{2} + k = \frac{(k+1)k}{2}\text{,}\) as needed.

Therefore, by the principle of mathematical induction, \(P(n)\) is true for all \(n \ge 2\text{.}\)

11.

Use the product rule for logarithms (\(\log(ab) = \log(a) + \log(b)\)) to prove, by induction on \(n\text{,}\) that \(\log(a^n) = n \log(a)\text{,}\) for all natural numbers \(n \ge 2\text{.}\)

The idea here is that if we take the logarithm of \(a^n\text{,}\) we can increase \(n\) by 1 if we multiply by another \(a\) (inside the logarithm). This results in adding 1 more \(\log(a)\) to the total.

Proof.

Let \(P(n)\) be the statement \(\log(a^n) = n \log(a)\text{.}\) The base case, \(P(2)\) is true, because \(\log(a^2) = \log(a\cdot a) = \log(a) + \log(a) = 2\log(a)\text{,}\) by the product rule for logarithms. Now assume, for induction, that \(P(k)\) is true. That is, \(\log(a^k) = k\log(a)\text{.}\) Consider \(\log(a^{k+1})\text{.}\) We have

with the last equality due to the inductive hypothesis. But this simplifies to \((k+1) \log(a)\text{,}\) establishing \(P(k+1)\text{.}\) Therefore by the principle of mathematical induction, \(P(n)\) is true for all \(n \ge 2\text{.}\)

12.

Let \(f_1, f_2,\ldots, f_n\) be differentiable functions. Prove, using induction, that

You may assume \((f+g)' = f' + g'\) for any differentiable functions \(f\) and \(g\text{.}\) (You don’t actually need to know calculus to be able to do this).

You are allowed to assume the base case. For the inductive case, group all but the last function together as one sum of functions, then apply the usual sum of derivatives rule, and then the inductive hypothesis.

13.

Recall that \(F_n\) is the \(n\)th Fibonacci number defined in Example 4.1.5.

Prove, by mathematical induction, that \(F_0 + F_1 + F_2 + \cdots + F_{n} = F_{n+2} - 1\text{.}\)

Let \(P(n)\) be the statement “\(F_0 + F_1 + F_2 + \cdots + F_{n} = F_{n+2} - 1\text{.}\)”

Basis step: if \(n = 0\) then \(F_0 = 0\) while \(F_{n+2} - 1 = 1 - 1 = 0\) so the basis step is true.

Inductive step: Assume that \(P(k)\) is true for some integer \(k \ge 0\text{.}\) That is, \(F_0 + F_1 + F_2 + \cdots + F_{k} = F_{k+2} - 1\text{.}\) Now consider

Let \(P(n)\) be the statement \(F_0 + F_2 + F_4 + \cdots + F_{2n} = F_{2n+1} - 1\text{.}\) We will show that \(P(n)\) is true for all \(n \ge 0\text{.}\) First the base case is easy because \(F_0 = 0\) and \(F_1 = 1\) so \(F_0 = F_1 - 1\text{.}\) Now consider the inductive case. Assume \(P(k)\) is true, that is, assume \(F_0 + F_2 + F_4 + \cdots + F_{2k} = F_{2k+1} - 1\text{.}\) To establish \(P(k+1)\) we work from left to right:

Therefore \(F_0 + F_2 + F_4 + \cdots + F_{2k+2} = F_{2k+3} - 1\text{,}\) which is to say \(P(k+1)\) holds. Therefore by the principle of mathematical induction, \(P(n)\) is true for all \(n \ge 0\text{.}\)

15.

Prove, using strong induction, that every natural number is either a Fibonacci number or can be written as the sum of distinct Fibonacci numbers.

Let \(P(n)\) be the statement that \(n\) is either a Fibonacci number of the sum of distinct Fibonacci numbers

Basis step: For \(n=0\text{,}\) we have that \(0 = F_0\) is a Fibonacci number.

Inductive step: Assume that there is an integer \(k \ge 0\) such that \(P(m)\) is true for all \(0\le m \le k\text{.}\) That is, \(m\) is either a Fibonacci number or the sum of distinct Fibonacci numbers. Now let’s consider the next number, \(k+1\text{:}\)

Case 1: If \(k+1\) is a Fibonacci number, then we’re done.

Case 2: If \(k+1\) is not a Fibonacci number, then let \(F_m\) be the largest Fibonacci number less than \(k+1\text{.}\) Since \(k+1 - F_m \le k\) then we have that \(k+1 - F_m\) is the sum of distinct Fibonacci numbers, by inductive hypothesis.

Adding \(F_m\) to this sum gives us \(k+1 - F_m + F_m = k+1\) which then itself a sum of distinct Fibonacci numbers.

Thus, by induction, every natural number is either a Fibonacci number of the sum of distinct Fibonacci numbers.

16.

Prove, by mathematical induction, that \(F_1 + F_3 + F_5 + \dots + F_{2n -1} = F_{2n}\text{,}\) where \(F_n\) is the \(n\)th Fibonacci number.

Let \(P(n)\) be the statement “\(F_1 + F_3 + F_5 + \dots + F_{2n -1} = F_{2n}\)”

Basis step: If \(n =1\) then \(F_1 =1\) and \(F_{2\cdot 1} = 1\) so that \(P(1)\) is true.

Inductive step: Assume that \(P(k)\) is true for some integer \(k\ge 1\text{.}\) That is, \(F_1 + F_3 + F_5 + \dots + F_{2k -1} = F_{2k}\) and consider:

Therefore, by math induction, \(F_1 + F_3 + F_5 + \dots + F_{2n -1} = F_{2n}\) for all integers \(n\ge 1\text{.}\)

17.

Prove, by mathematical induction, that \(F_1^2 + F_2^2 + F_3^2 + \dots + F_n^2 = F_n \cdot F_{n+1}\text{,}\) where \(F_n\) is the \(n\)th Fibonacci number.

Prove that there is a strictly increasing sequence \(a_1, a_2, a_3, \ldots\) of numbers (not necessarily integers) such that \(a_n \lt 100\) for all \(n \in \N\text{.}\) (By strictly increasing we mean \(a_n \lt a_{n+1}\) for all \(n\text{.}\) So each term must be larger than the last.)

Let \(P(n)\) be the statement “there is a strictly increasing sequence \(a_1, a_2, \ldots, a_n\) with \(a_n \lt 100\text{.}\)” We will prove \(P(n)\) is true for all \(n \ge 1\text{.}\) First we establish the base case: \(P(1)\) says there is a single number \(a_1\) with \(a_1 \lt 100\text{.}\) This is true – take \(a_1 = 0\text{.}\) Now for the inductive step, assume \(P(k)\) is true. That is there exists a strictly increasing sequence \(a_1, a_2, a_3, \ldots, a_k\) with \(a_k \lt 100\text{.}\) Now consider this sequence, plus one more term, \(a_{k+1}\) which is greater than \(a_k\) but less than \(100\text{.}\) Such a number exists, for example, the average between \(a_k\) and 100. So then \(P(k+1)\) is true, so we have shown that \(P(k) \imp P(k+1)\text{.}\) Thus by the principle of mathematical induction, \(P(n)\) is true for all \(n \in \N\text{.}\)

19.

Prove that 6 divides \(7^n - 1\) for all \(n \in \N\text{.}\)

(Alternative idea to the below proof) In the inductive step add and subtract \(7^k\text{.}\) That is, you’ll have \(7\cdot 7^{k} - 1 - 7^k + 7^k\text{.}\) Now algebra.

Let \(P(n)\) be the statement “6 divides \(7^n - 1\text{.}\)” We will show \(P(n)\) is true for all \(n \in \N\text{.}\) First we establish the base case, \(P(0)\text{.}\) Since \(7^0 - 1 = 0\text{,}\) and \(0\) is a multiple of 6, \(P(0)\) is true. Now for the inductive case. Assume \(P(k)\) holds for an arbitrary \(k \in \N\text{.}\) That is, 6 divides \(7^k - 1\text{,}\) or in other words, \(7^k - 1 = 6j\) for some integer \(j\text{.}\) Now consider \(7^{k+1} - 1\text{:}\)

\begin{align*}
7^{k+1} - 1 ~ \amp = 7^{k+1} - 7 + 6 \amp \text{by cleverness:} -1 = -7 + 6\\
\amp = 7(7^k - 1) + 6 \amp \text{factor out a 7 from the first two terms}\\
\amp = 7(6j) + 6 \amp \text{by the inductive hypothesis}\\
\amp = 6(7j + 1) \amp \text{factor out a 6}
\end{align*}

Therefore 6 divides \(7^{k+1} - 1\text{,}\) or in other words, \(P(k+1)\) is true. Therefore by the principle of mathematical induction, \(P(n)\) is true for all \(n \in \N\text{.}\)