Discussion and Examples
Induction is a means of proving a theorem by showing that if the theorem or assertion is true of any particular case, it is true of the next case in a series, and then showing it is indeed true in any particular case. Our text applies that definition to mathematics by saying mathematical induction is a technique for proving propositions over the positive integers. Mathematical induction reduces to a finite number of steps the proof that all positive integers belong to a specific truth set. The number of steps to complete the proof is the same, regardless of the size of the set or the number of positive integers involved. This is crucial to our discussion of discrete mathematics since it allows us to consider large volumes of evidence while deciding whether to accept or reject an assertion. As we develop automated systems or simply consider what we are hearing on the evening news, we find ourselves having to do exactly that.
3.4 Mathematical Induction
The structure of the natural numbers – 0, 1, 2, 3, and on to infinity – makes possible a powerful proof technique known as induction or mathematical induction. Although the idea behind induction is simple, students often struggle with it. Take your time and study this material thoroughly! You will have the opportunity to practice in the labs after we discuss induction in the lectures.
Let P be a one-place predicate whose domain of discourse includes the natural numbers. Suppose that we can prove that P(0) is true. Suppose that we can also prove the statements P(0) → P(1), P(1) → P(2), P(2) → P(3), and so on. The principle of mathematical induction is the observation that we can then conclude that P(n) is true for all natural numbers n. This should be clear. It's like a line of dominos, lined up and ready to fall, one after the next. Since P(0) and P(0) → P(1) are true, we can apply the rule of modus ponens to conclude that P(1) is true. Then, since P(1) and P(1) → P(2) are true, we can conclude by modus ponens that P(2) is true. From P(2) and P(2) → P(3), we conclude that P(3) is true. For any given n in the set ℕ, we can continue this chain of deduction for n steps to prove that P(n) is true.
When applying induction, we don't actually prove each of the implications P(0) → P(1), P(1) → P(2), and so on, individually. That would require an infinite amount of work. The whole point of induction is to avoid any infinitely long process. Instead, we prove ∀k (P(k) → P(k + 1)) (where the domain of discourse for the predicate P is ℕ. The statement ∀k(P(k) → P(k + 1)) summarizes all the infinitely many implications in a single statement. Stated formally, the principle of mathematical induction says that if we can prove the statement P(0) ∧ (∀k(P(k) → P(k + 1)), then we can deduce that ∀nP(n) (again, with ℕ as the domain of discourse).
3.4.1 How to write a proof by induction
It should be intuitively clear that the principle of induction is valid. It follows from the fact that the list 0, 1, 2, 3, …, if extended long enough, will eventually include any given natural number. If we start from P(0) and take enough steps of the form P(k) → P(k + 1), we can get P(n) for any given natural number n. However, whenever we deal with infinity, we are courting the possibility of paradox. We will prove the principle of induction rigorously in the next chapter (see Theorem 4.3), but for now we just state it as a theorem:
Theorem 3.4. Let P be a one-place predicate whose domain of discourse includes the natural numbers. Suppose that P(0) ∧ (∀k ∈ ℕ (P(k) → P(k + 1))).^{4}Then P(n) is true for all natural numbers n. (That is, the statement ∀n P(n) is true, where the domain of discourse for P is the set of natural numbers.)
Mathematical induction can be applied in many situations: you can prove things about strings of characters by doing induction on the length of the string, things about graphs by doing induction on the number of nodes in the graph, things about grammars by doing induction on the number of productions in the grammar, and so on. We'll be looking at applications of induction for the rest of this chapter, and treat a form called structural induction in the next chapter.
Although proofs by induction can be very different from one another, they all follow just a few basic structures. A proof based on the preceding theorem always has two parts. First, P(0) is proved. This is called the base case of the induction. Then the statement ∀k (P(k) → P(k + 1)) is proved. This statement can be proved by letting k be an arbitrary element of ℕ and proving P(k) → P(k + 1). This in turn can be proved by assuming that P(k) is true and proving that the truth of P(k + 1) follows from that assumption. This case is called the inductive case, and P(k) is called the inductive hypothesis or the induction hypothesis. Note that the base case is just as important as the inductive case. By itself, the truth of the statement ∀k (P(k) → P(k + 1)) says nothing at all about the truth of any of the individual statements P(n). The chain of implications P(0) → P(1), P(1) → P(2), …, P(n − 1) → P(n) says nothing about P(n) unless the chain is anchored at the other end by the truth of P(0).
3.4.2 Examples
Let's look at a few examples.
Theorem 3.5. The number 2^{2}^{n }− 1 is divisible by 3 for all natural numbers n.
Proof. Here, P(n) is the statement that 2^{2}^{n }− 1 is divisible by 3.
Base case: When n = 0, 2^{2}^{n }− 1 = 2^{0 }− 1 = 1 − 1 = 0 and 0 is divisible by 3 (since 0 = 3 · 0.) Therefore the statement holds when n = 0.
Inductive case: We want to show that if the statement is true for n = k (where k is an arbitrary natural number), then it is true for n = k + 1 also. That is, we must prove the implication P(k) → P(k + 1). So we assume P(k), that is, we assume that 2^{2}^{k }is divisible by 3. This means that 2^{2}^{k }− 1 = 3m for some integer m. We want to prove P(k + 1), that is, that 2^{2(}^{k }^{+ 1)} − 1 is also divisible by 3:
and from the last line we see that 2^{2}^{k }^{+ 1} is in fact divisible by 3. (The third step – subtracting and adding 4 – was done to enable us to use our inductive hypothesis.)
Altogether, we have proved that P(0) holds and that, for all k, P(k) → P(k + 1) is true. Therefore, by the principle of induction, P(n) is true for all n in ℕ, i.e. 2 ^{2}^{n}− 1 is divisible by 3 for all n in ℕ.
The principle of mathematical induction gives a method for proving P(n) for all n in the set ℕ. It should be clear that if M is any natural number, a similar method can be used to show that P(n) is true for all natural numbers n that satisfy n ≥ M. Just start the induction with a base case of n = M instead of with a base case of n = 0. I leave the proof of this extension of the principle of induction as an exercise. We can use the extended principle of induction to prove a result that was first mentioned in Section 2.1.
Theorem 3.6. Suppose that a compound proposition contains exactly n propositional variables, where n ≥ 1. Then there are exactly 2^{n }different ways of assigning truth values to the n variables.
Proof. Let P(n) be the statement "There are exactly 2^{n }different ways of assigning truth values to n propositional variables". We will use induction to prove the P(n) is true for all n ≥ 1.
Base case: First, we prove the statement P(1). If there is exactly one variable, then there are exactly two ways of assigning a truth value to that variable. Namely, the variable can be either true or false. Since 2 = 2^{1}, P(1) is true.
Inductive case: Suppose that P(k) is already known to be true. We want to prove that, under this assumption, P(k + 1) is also true. Suppose that p_{1}, p_{2}, …, p_{k }_{+ 1} are k + 1 propositional variables. Since we are assuming that P(k) is true, we know that there are 2^{k }ways of assigning truth values to p_{1}, p_{2}, …, p_{k}. But each assignment of truth values to p_{1}, p_{2} , …, p_{k }can be extended to the complete list p_{1}, p_{2}, …, p_{k}, p_{k }_{+ 1} in two ways. Namely, p_{k }_{+ 1} can be assigned the value true or the value false. It follows that there are 2 · 2^{k }ways of assigning truth values to p_{1}, p_{2}, …, p_{k }_{+ 1}. Since 2 · 2^{k }= 2^{k }^{+ 1}, this finishes the proof.
3.4.3 More examples
The sum of an arbitrary number of terms is written using the symbol ∑. (This symbol is the Greek letter sigma, which is equivalent to the Latin letter S and stands for 'sum'.) Thus, we have
This notation for a sum, using the ∑ operator, is called summation notation. A similar notation for products uses the symbol ∏. (This is the Greek letter pi, which is equivalent to the Latin letter P and stands for 'product'.) For example,
Induction can be used to prove many formulas that use these notations. Here are two examples:
Theorem 3.7. fo r any integer n greater than zero.
We'll prove this theorem. Can you do it yourself?
The summation of Theorem 3.7 is often attributed to mathematician and physicist Carl Friedrich Gauss (1777–1855). Gauss has been exceptionally influential in a variety of fields; he is called "the greatest mathematician since antiquity". For example, you might have heard of the Gaussian probability distribution, or perhaps of the Gauss unit for magnetic flux (although we now commonly use the Tesla for that, with 1 Tesla equalling 10^{5} Gauss). His brilliance was already apparent in primary school when he allegedly used the 'Gauss sum' from Theorem 3.7 to solve the maths homework the teacher had set the class – to great astonishment of the teacher. You will see this summation again in the course Algorithms & Data Structures when analysing the runtime of algorithms containing loops.
Theorem 3.8. for any natural number n > 0.
Proof. Let P(n) be the statement . We use induction to show that P(n ) is true for all n > 0
Base case: Consider the case n = 1. P(1) is the statement that . Since each side of this equation is equal to one, this is true.
Inductive case: Let k > 1 be arbitrary, and assume that P(k) is true. We want to show that P(k + 1) is true. P(k + 1) is the statement . But, we can compute that
which is what we wanted to show. This completes the induction.
For example, these theorems show that and that 1 · 2^{0} + 2 · 2^{1} + 3 · 2^{2} + 4 · 2^{3} + 5 · 2^{4} = (5 − 1)2^{5} + 1 = 129, as well as infinitely many other such sums.
3.7 Mathematical Induction
3.7.1 Introduction, First Example
In this section, we will examine mathematical induction, a technique for proving propositions over the positive integers. Mathematical induction reduces the proof that all of the positive integers belong to a truth set to a finite number of steps.
Example 3.7.1: Formula for Triangular Numbers. Consider the following proposition over the positive integers, which we will label p(n): The sum of the positive integers from 1 to n is . This is a well-known formula that is quite simple to verify for a given value of n. For example, p(5) is: The sum of the positive integers from 1 to 5 is . Indeed, 1 + 2 + 3 + 4 + 5 = 15 = . However, this doesn't serve as a proof that p(n) is a tautology. All that we've established is that 5 is in the truth set of p. Since the positive integers are infinite, we certainly can't use this approach to prove the formula.
An Analogy: A proof by mathematical induction is similar to knocking over a row of closely spaced dominos that are standing on end. To knock over the dominos in Figure 3.7.2, all you need to do is push the first domino over. To be assured that they all will be knocked over, some work must be done ahead of time. The dominos must be positioned so that if any domino is pushed is knocked over, it will push the next domino in the line.
Figure 3.7.2 An analogy for Mathematical Induction, Creative Commons photo by Ranveig Thattai
Returning to Example 3.7.1 imagine the propositions p(1), p(2), p(3), . . . to be an infinite line of dominos. Let's see if these propositions are in the same formation as the dominos were. First, we will focus on one specific point of the line: p(99) and p(100). We are not going to prove that either of these propositions is true, just that the truth of p(99) implies the truth of p(100). In terms of our analogy, if p(99) is knocked over, it will knock over p(100).
In proving p(99) ⇒ p(100), we will use p(99) as our premise. We must prove: The sum of the positive integers from 1 to 100 is . We start by observing that the sum of the positive integers from 1 to 100 is (1 + 2 + · · · + 99) + 100. That is, the sum of the positive integers from 1 to 100 equals the sum of the first ninety-nine plus the final number, 100. We can now apply our premise, p(99), to the sum 1 + 2 + · · · + 99. After rearranging our numbers, we obtain the desired expression for 1 + 2 + · · · + 100:
What we've just done is analogous to checking two dominos in a line and finding that they are properly positioned. Since we are dealing with an infinite line, we must check all pairs at once. This is accomplished by proving that p(n) ⇒ p( n + 1) for all n ≥ 1:
They are all lined up! Now look at p(1): The sum of the positive integers from 1 to 1 is 1· (1+1) . Clearly, p(1) is true. This sets off a chain reaction. Since p(1) ⇒ p(2), p(2) is true. Since p(2) ⇒ p(3), p(3) is true; and so on.
Theorem 3.7.3: The Principle of Mathematical Induction. Let p(n) be a proposition over the positive integers. If
- p(1) is true, and
- for all n ≥ 1, p(n) ⇒ p(n + 1),
then p(n) is a tautology.
Note: The truth of p(1) is called the basis for the induction proof. The premise that p(n) is true in the second part is called the induction hypothesis. The proof that p(n) implies p(n + 1) is called the induction step of the proof. Despite our analogy, the basis is usually done first in an induction proof. However, order doesn't really matter.
3.7.2 More Examples
Example 3.7.4: Generalized Detachment.Consider the implication over the positive integers.
p(n) : q_{0 }→ q_{1}, q_{1 }→ q_{2}, . . . , q_{n }_{− }_{1} → q_{n}, q_{0 }⇒ q_{n}
A proof that p(n) is a tautology follows. Basis: p(1) is q_{0 }→ q_{1}, q_{0} ⇒ q_{1}. This is the logical law of detachment which we know is true. If you haven't done so yet, write out the truth table of ((q_{0}→ q_{1} ) ∧ q_{0} ) → q_{1} to verify this step.
Induction: Assume that p(n) is true for some n ≥1. We want to prove that p(n + 1) must be true. That is:
q_{0}→ q_{1}, q_{1 }→ q_{2}, . . . , q_{n }_{− }_{1} → q_{n}, q_{n }→ q_{n }_{+ 1}, q_{0} ⇒ q_{n }_{+ 1}
Here is a direct proof of p(n + 1):
Table 3.7.5
Step |
Proposition |
Justification |
1 − (n + 1) |
q_{0 }→ q_{1}, q_{1 }→ q_{2}, . . . , q_{n }_{− }_{1 }→ q_{n}, q_{0} |
Premises |
n + 2 |
q_{n} |
(1) − (n + 1), p(n) |
n + 3 |
q_{n}→ q_{n }_{+ 1} |
Premise |
n + 4 |
q_{n}_{+1} |
(n + 2), (n + 3), detachment |
Example 3.7.6: An example from Number Theory. For all n ≥ 1, n^{3} + 2n is a multiple of 3. An inductive proof follows:
Basis: 1^{3} + 2(1) = 3 is a multiple of 3. The basis is almost always this easy!
Induction: Assume that n ≥ 1 and n^{3} + 2n is a multiple of 3. Consider (n + 1)^{3} + 2(n + 1). Is it a multiple of 3?
Yes, (n + 1)^{3} + 2(n + 1) is the sum of two multiples of 3; therefore, it is also a multiple of 3.
Now we will discuss some of the variations of the principle of mathematical induction. The first simply allows for universes that are similar to P such as {−2, −1, 0, 1, . . .} or {5, 6, 7, 8, . . .}.
Theorem 3.7.7: Principle of Mathematical Induction (Generalized).
If p(n) is a proposition over {k_{0} , k_{0} + 1, k_{0} + 2, . . .}, where k_{0 }is any integer, then p(n) is a tautology if
- p(k_{0}) is true, and
- for all n ≥ k_{0}, p(n) ⇒ p(n + 1).
Example 3.7.8: A proof of the permutations formula. In Chapter 2, we stated that the number of different permutations of k elements taken from an n element set, P (n; k), can be computed with the formula n!. (n-k)! We can prove this statement by induction on n. For n ≥0, let q(n) be the proposition
Basis: q(0) states that P (0; 0) if is the number of ways that 0 elements can be selected from the empty set and arranged in order, then . This is true. A general law in combinatorics is that there is exactly one way of doing nothing.
Induction: Assume that q(n) is true for some natural number n. It is left for us to prove that this assumption implies that q(n + 1) is true. Suppose that we have a set of cardinality n + 1 and want to select and arrange k of its elements. There are two cases to consider, the first of which is easy. If k = 0, then there is one way of selecting zero elements from the set; hence
and the formula works in this case.
The more challenging case is to verify the formula when k is positive and less than or equal to n + 1. Here we count the value of P (n + 1; k) by counting the number of ways that the first element in the arrangement can be filled and then counting the number of ways that the remaining k − 1 elements can be filled in using the induction hypothesis.
There are n + 1 possible choices for the first element. Since that leaves n elements to fill in the remaining k − 1 positions, there are P (n; k − 1) ways of completing the arrangement. By the rule of products,
Source: Al Doerr and Ken Levasseur, http://faculty.uml.edu/klevasseur/ads-latex/ads.pdf
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License.