### Introduction to Mathematical Induction

Mathematical induction can often be used to prove some property P of all integers greater than or equal to some base case b. The strategy in induction is to prove that P is true for the base case b, and then prove that if P is true for some arbitrary case k (k >= b), then P must also be true for k+1. This is sometimes described as climbing a ladder: proving the base case is like getting onto the ladder, and proving P(k+1) given P(k) is like going from one rung to the next. If you can do both of those things, you can climb the ladder as high as you want!

This kind of argument is supported by the First Principle of Mathematical Induction, which says the following:

```IF
1. P(b) is true for some integer b, and
2. If P(k) is true then P(k+1) is true, for all k >= b
THEN
P(n) true for all n >= b
```

(1) is called the base case, and (2) is called the inductive step. So we need to provide that both a base case and the inductive step are true for our property P to prove that P is true for all integers greater than or equal to the base case.

For example, the property P(n) might be that 1 + 2 + ... + n = n(n+1)/2, and we might want to show that it's true for all n >= 1. We could prove this by induction by proving the two steps above:

1. Base case

Prove that the property is true for the base case b, that is, P(b). For this example the base case is 1, so we simply check P(1),

```  1 = 1*(1+1)/2
```
which is true.

2. Inductive step

Show that IF the property is true for some arbitrary value k, then it must be true for k+1 as well. Note that what we are proving here is the implication P(k) -> P(k+1)(if P(k) then P(k+1)). Said another way, we need to prove P(k+1) given P(k). We aren't concerned with whether or not P(k) is actually true; we just show that if it is true, then P(k+1) must be true as well. P(k) is called the inductive hypothesis. For this example:

```P(k):   1+2+ ... + k       = k(k+1)/2      (inductive hypothesis -- assume true)
P(k+1): 1+2+ ... + k + k+1 = (k+1)(k+2)/2  (need to show this given P(k))
```
How to prove P(k+1) given P(k)? Fortunately, the left side of P(k) is often very similar to the left side of P(k+1); in this case they differ only by k+1. Since we know that P(k) is true, we can add k+1 to both sides of that equation and still have a true statement:
```       1+2+ ... + k + k+1 = k(k+1)/2 + k+1
```
The left side now looks like the left side of P(k+1). The right side looks different, but maybe they're just in different forms. We can transform the right side as follows:
```    k(k+1)/2 + k+1

=   k(k+1)/2 + 2(k+1)/2

=  (k(k+1) + 2(k+1))/2

=  (k+1)(k+2)/2
```
Thus we have shown P(k+1) given P(k), so the proof by induction is complete.

### Another example

Prove that a fence of this type |--|--|--| with n posts, n>=1, has n-1 sections.

Base case (n=1): A fence with a single post (|) has 0 sections.

Inductive step: If a fence with k posts has k-1 sections, then a fence with k+1 posts has k sections.

Proof: A fence with k+1 posts has a fence with k posts embedded in it.

```   |-|-|-| ... |-|-|
\______________/
k posts
```
By the inductive hypothesis, a fence with k posts has k-1 sections. But a fence with k+1 posts has just one additional section (see diagram), so it has k-1+1 = k sections. This completes the proof by induction.

### Yet another example

Use mathematical induction to show that 2n > n for all n>=1.
1. Base case (n=1):

21 > 1, so the base case holds.

2. Inductive step: If 2k > k then 2k+1 > k+1.

Starting with the inductive hypothesis (the k case), we notice that the left side looks like the left side of the k+1 case but is smaller by a factor of 2. So multiply both sides of the inductive hypothesis by 2, which maintains the inequality:

```      2k > k

=>    2k * 2 > k * 2

=>    2k+1 > k * 2
```
But we're trying to show that 2k+1 > k + 1, and we can't turn k*2 into k+1. However, note that for all k>1, k*2 is bigger than k+1, so anything that is bigger than k*2 must be bigger than k+1 as well. We have already shown that 2k+1 > k * 2, so we can conclude that 2k * 2 > k + 1.

### The Second Principle of Mathematical Induction

There is another form of mathematical induction, called the Second Principle of Mathematical Induction, that is often useful. It says the following:

```IF
1. P(b) true (for some integer b)
2. P(r), b<=r<=k, true -> P(k+1) (k >= b)
THEN
P(n) is true for all n >= b
```

The Second Principle is different in the second rule, which assumes not only that P is true for k, but that P is true for all values from b to k. This sounds like a stronger condition, but it turns out that the First and Second principles are actually equivalent. Depending on the problem, it just may be more convenient to use one form over another.

### More Fences

Use the Second Principle of Mathematical Induction to prove that a fence with n posts has n-1 sections. (This is a problem that is easily proved using either the first or second principle.)

Base case: A fence with a single post (|) has 0 sections.

Inductive step: If a fence with r posts, 1<=r<=k, has r-1 sections, then a fence with k+1 posts has k sections.

Proof: A fence with k+1 posts can be divided into two parts, each of which has at least one post (since k>=1). If we say that the left part has x posts, then the right part must have the rest of the posts, that is, (k+1)-x posts.

```       |-|...|-|...|-|       (k+1) posts total
\______/ \_____/
x posts  (k+1)-x posts
```
Since each part has at least one and not more than k posts, the inductive hypothesis applies to each part. So by the inductive hypothesis, the left part has x-1 sections and the right part has k+1-x-1 sections. The whole fence, which has k+1 posts, has the sections in the left plus the sections in the right plus the section that joins them together:
```   x-1  +  k+1-x-1  +  1 = k sections.
|         |        |      |
left      right    join    total
```
This completes the proof.

### Another example

Prove that any amount of postage greater than or equal to 8 cents can be built using only 3-cent and 5-cent stamps.

Base cases (n=8, n=9, n=10): 8=3+5; 9=3+3+3; 10=5+5.

Inductive step (second principle): If any amount of postage r, 8<=r<=k, can be built using only 3-cent and 5-cent stamps, then postage k+1 can be built using only 3-cent and 5-cent stamps.

Proof: Cases k=8, k=9, and k=10 were proved in the base case, so here we can assume that k+1 >= 11. By the inductive hypothesis, we know that the postage for k-2 can be formed using 3-cent and 5-cent stamps since (k+1)>=11 => (k-2)>=8. Now take the postage for k-2 and add a 3-cent stamp; this gives the postage for k+1, completing the proof.
{"ft_lang_label":"__label__en","ft_lang_prob":0.93920654,"math_prob":0.9975213,"size":5230,"snap":"2019-13-2019-22","text_gpt3_token_len":1567,"char_repetition_ratio":0.14734022,"word_repetition_ratio":0.09486166,"special_character_ratio":0.32600382,"punctuation_ratio":0.11816019,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99973947,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-05-20T06:12:17Z\",\"WARC-Record-ID\":\"<urn:uuid:29c8cea8-ed4a-4123-8653-64290d4abb1f>\",\"Content-Length\":\"7731\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:360fab75-8170-418c-9b65-de83f993bfb0>\",\"WARC-Concurrent-To\":\"<urn:uuid:61231bf1-2621-4564-9ee0-c9f343a3ed7f>\",\"WARC-IP-Address\":\"199.111.151.8\",\"WARC-Target-URI\":\"http://cs.roanoke.edu/Fall2007/CPSC220A/induction.html\",\"WARC-Payload-Digest\":\"sha1:JATRTFFPOE5YHUYPQEKZNK2KZKD6CPXJ\",\"WARC-Block-Digest\":\"sha1:MTI5IFFLNPHGQNFNXPDQGMWZDBXTPYIG\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-22/CC-MAIN-2019-22_segments_1558232255562.23_warc_CC-MAIN-20190520041753-20190520063753-00047.warc.gz\"}"}