Mathematical induction is presented in section 3.2 of Rosen.
We begin today by studying the mechancis of how to do proofs by
mathematical induction. The general setting is that we have a predicate
P(n) and we want to prove that it is true for all numbers (non-negative
integers) n. Always remember that this predicate is a boolean
(true or false) and not a number. Beginners at induction proofs find
themselves saying that "P(n) is equal to some number", which makes no
sense. Often P(n) is a statement about two terms that depends on n, for
example a statement like "S(n)=T(n)" or "S(n) < T(n)". In this case it
is often useful to assign names to S(n) and T(n) so that you can refer to
them correctly rather than make invalid statements about P(n).
A mathematical induction proof has several distinct steps:
Formulate the statement P(n).
Prove the base case P(0).
Begin the induction case, which is to prove "FORALL n: P(n) --> P(n+1)".
Say "let n be arbitrary".
Say "assume P(n)".
Say "we want to prove" and then write P(n+1).
Using P(n), prove P(n+1). You will need to take advantage of similarities
between P(n) and P(n+1), particular an inductive definition that allows
you to convert terms in P(n+1) into analogous terms in P(n).
Say "we have proved P(n) --> P(n+1)"
Say "since n was arbitrary, we have proved "FORALL n: P(n) --> P(n+1)".
Say "since we have completed the induction proof, "FORALL n: P(n)" is
proved.
It is important to distinguish the process of discovering the
statement P(n) with that of proving the fact once it is discovered.
Mathemtcial induction is only a tool for the latter process. Discovering
a rule is often a matter of finding a pattern in the first few cases, but
sometimes the pattern will exist and a proof will still be hard to come by.
One seemingly paradoxical fact is that an induction proof can often be made
easier by strengthening the statement P(n), by adding more conditions
to it. This is because a new condition added to P(n) gives you more to work
with when you are trying to prove P(n+1).
Our first example is to prove that the sum of the first n odd numbers is
n2. We first prove P(0), which says that the sum of the first
zero odd numbers is 0. This is true because if we add together zero numbers,
the result is in fact 0. We then let n be arbitrary and assume that the sum
of the first n odd numbers is n2. Then we try to find the sum of
the first n+1 odd numbers. This sum is the sum of the first n odd numbers,
plus the n+1'st odd number. That number is 2n+1, so the new sum is
n2+2n+1, and this is exactly (n+1)2. Using the
inductive hypothesis (IH) about the sum of the first n, we have proved
a fact about the sum of the first n+1. Since n was arbitrary , we have proved
"FORALL n: P(n) --> P(n+1)", and this completes the induction proof.
Here is another example. Our new P(n) says that "the
number of binary strings of length n is 2n".
P(0) says that the number of binary strings of length 0 is 20=1,
and this is true because there
is exactly one empty string. Now assume that there are exactly 2n
binary strings
of length n -- how many are there of length n+1? We can take any string w of
length n and extend it to length n+1 in exactly two ways, to w0 and w1. So
there are exactly two length-(n+1) strings for every length-n string or
2*2n = 2n+1 in all. This is just what P(n+1) says,
so by assuming P(n) we proved P(n+1).
The discussion has four induction proofs. The first two are in the form
of equalities -- they say that certain summations evaluate to certain
formulas. The recipe for an induction proof takes a special form when the
statement P(n) is of the form "S(n)=T(n)", where S(n) and T(n) are functions
yielding numbers. We first prove that S(0)=T(0), which is usually
straightforward. Then we assume that S(n)=T(n) and try to prove that
S(n+1)=T(n+1). This means that we must write S(n+1) in terms of S(n), and
T(n+1) in terms of T(n), use the inductive hypothesis to replace S(n) by
T(n), and try to show the two sides equal. If S(n) is a sum of terms, then
S(n+1) will be equal to S(n) plus the last term -- this is often useful.
Details of the solutions will be found in the
Discussion #5 solutions.
The third discussion exercise is an inequality between numbers rather than
an equality. We must show that it holds for n=0, then use the inequality
S(n) < T(n) to derive that S(n+1) < T(n+1). Again writing S(n+1) in
terms of S(n), and T(n+1) in terms of T(n), will be important.
The last discussion exercise involves a predicate whose meaning is given
only by a recursive definition. We are told when L(x,0) is true (never),
and when L(x,y+1) is true in terms of when L(x,y) is true. Then we are
asked to prove that the proposition P(n), which says exactly when L(0,n)
is true, is itself true for all n. We can verify P(0) directly and then
use the definition of L to relate the proposition P(0,n+1) to P(0,n).
Again, the full solution is in the Discussion
#5 solutions.