#### [SOLVED] Are we properly using mathematical induction?

I recently had a lecture in a Computer Science course involving the use of induction. The main discrepancy lies in that a few students and I think our proof should suffice, but our instructor argues that there are gaps in our logic. We really just want to get a full understanding of why there may be gaps in our logic.

Problem: Prove that for $$K\geq8$$, the value $$K$$ can be made up of the sum of two different types of coins with value $$3$$ and $$5$$.

Our Proof: We show that this is true for $$K=8,9,10$$.

Let $$m$$ denote a $$3$$ coin and $$n$$ denote a $$5$$ coin.

$$K=8=3+5=m+n$$

$$K=9=3+3+3=3m$$

$$K=10=5+5=2n$$

So we have established that this holds for $$K=8,9,10$$. Let $$N>10$$. Assume that our hypothesis hold for $$8\leq K\leq N$$. We wish to show this implies it holds for $$K=N+1$$.

So, $$K=N+1=(N-2)+3$$, and by our inductive hypothesis, $$N-2$$ can be made up of 3-coins and 5-coins, (since $$N>10$$), and clearly $$3$$ is simply one 3-coin., thus $$K=N+1$$ can be made up of 3-coins and 5-coins.

We have established our base case ($$K=8,9,10$$) and shown that assuming $$K=N$$ holds for $$N\geq10$$, this implies that $$K=N+1$$ holds, and thus by the principle of mathematical induction, any value $$K\geq8$$ can be made up of 3-coins and 5-coins.

Is our argument unsound? Our professor's disagreement was that in order to prove it in this way, we actually must prove for 3 different sequences, that is, 3 separate sequences in which our $$K$$ value is $$8,11,14,...$$, and $$9,12,15,...$$, and $$10,13,16,...$$ respectively. He states this is because induction must rely solely on the immediately prior term, i.e. $$A_N$$ implies $$A_{N+1}$$ implies $$A_{N+2}$$ ... but that our proof only relates $$A_{N+1}$$ to $$A_{N-2}$$. Is this really how induction works?

We think this is maybe because of how induction and sequences are defined in our course, but based on our prior math courses, we think this should suffice.

#### @Maurice C. 2019-02-05 23:19:09

Forget about induction for a second.

Let us say $$P(K)$$ holds iff there exist $$c,d \geq 0$$ such that $$K=3c+5d$$. Your goal is to prove that $$P(K)$$ holds for all $$K \geq 8$$.

If you would only want to prove $$P(8)$$ (for example) then you could just write a proof for that ($$8=3+5$$). However, you can't write a proof for $$P(K)$$ for all $$K \geq 8$$ because there simply is not enough time to do that. What you can do instead is to write a computer program (algorithm) which gets $$K \geq 8$$ as input and outputs a proof for $$P(K)$$. More specifically, on input $$K$$ it outputs two numbers $$c,d$$ such that $$K=3c+5d$$. Indeed, your question already contains such a program $$A$$:

• if $$K = 8$$ then output $$(1,1)$$
• if $$K = 9$$ then output $$(3,0)$$
• if $$K = 10$$ then output $$(0,2)$$
• if $$K > 10$$ then compute $$(c,d) = A(K-3)$$ and output $$(c + 1, d)$$

Now, we need to argue that $$A$$ works correctly. For the three base cases this is obvious. For the recursive case we argue as follows. Let $$K > 10$$ and let $$(c,d) = A(K-3)$$. The algorithm $$A$$ is correct for input $$K$$ if $$K = 3(c+1) + 5d$$

As you have already observed: if $$A(K-3)$$ is correct, i.e. $$K-3 = 3c+5d$$, then the above holds as well. Therefore we have reduced proving that $$A(K)$$ is correct to proving that $$A(K-3)$$ is correct. Observe that $$K-3 > 7$$ because otherwise it would contradict our assumption $$K > 10$$. If $$K-3 \leq 10$$ then correctness follows from the base cases. Otherwise ($$K-3>10$$), we can apply the same argument to see that: $$A(K-3)$$ is correct if $$A(K-6)$$ is correct. If $$K-6$$ is still larger than 10 we can apply the same argument and check whether $$A(K-9)$$ is correct and so on... it is not difficult to argue that eventually a base case is reached. Therefore $$A$$ works correctly.

My point is that the principle of induction is not some mysterious proof technique but naturally follows from the previous algorithmic perspective. Essentially, a proof by induction is a compact representation of a recursive algorithm which generates the proofs and a proof of correctness of that algorithm. The take-away message is: if you do a proof by induction and you are not certain whether it is sound, try to articulate the recursive algorithm which produces the proofs, try the algorithm out for some cases and then prove its correctness (don't forget to argue that a base case is always reached eventually).

#### @Daniel Schepler 2019-02-06 00:25:54

See also the Curry-Howard correspondence: under this correspondence, a proof by induction becomes precisely a special case of a recursive function.

#### @ComFreek 2019-02-06 07:12:19

And then you generalize to transfinite induction and program extraction fails, I suppose :)

#### @David C. Ullrich 2019-02-06 14:52:49

I'm curious what the professor's approved solution by "weak induction" is. Because the obvious proof is wrong:

N=8: 8=3+5.

Induction step: Assume that $$N=3a + 5b$$. Then $$N+1 = 3(a+2) + 5(b-1)$$.

Since the statement ask for a "sum" of 3's and 5's it seems clear we're supposed to show $$N=3a + 5b$$ for some $$a\ge0$$ and $$b\ge0$$. If so then the simple argument above is wrong; if $$N=3a + 5b$$ with $$b=0$$ then $$b-1<0$$.

A correct version is a little more complicated:

Induction step: Assume $$N=3a+5b$$. If $$b>0$$ then $$N+1=3(a+2)+5(b-1)$$.

If $$b=0$$: Since $$N\ge8$$ we must have $$a\ge3$$. So we can write $$N+1=3(a-2)+5$$.

#### @Bram28 2019-02-05 17:52:02

Note that $$P(N)$$ does not imply $$P(N+1)$$ in any immediate way (e.g. it is not immediately clear why $$17$$ should have the property just because $$16$$ has the property ... though see the inductive proof I give a little later in this post).

So, if you have to use weak induction, the obvious thing to do is what your professor does, and do $$3$$ separate weak inductive proofs:

1. Show that $$P(8)$$, and show that for all $$n$$: $$P(8+3n)\Rightarrow P(8+3(n+1))$$

2. Show that $$P(9)$$, and show that for all $$n$$: $$P(9+3n)\Rightarrow P(9+3(n+1))$$

3. Show that $$P(10)$$, and show that for all $$n$$: $$P(10+3n)\Rightarrow P(10+3(n+1))$$

Combined together, these proofs show that for all $$n \ge 8$$: $$P(n)$$

Another possible weak inductive proof is this:

Show that $$P(8)$$, $$P(9)$$, and $$P(10)$$ hold. Now suppose $$P(N)$$ holds with $$N \ge 10$$. Because $$N \ge 10$$, we know that to form $$N$$, we need to either use at least one $$5$$, or (if we don't use any $$5$$'s at all), at least three $$3$$'s. But if $$P(N)$$ is formed using at least one $$5$$, then we can form $$P(N+1)$$ by taking away one $$5$$ and adding two $$3$$'s. And if we use at least three $$3$$ to form $$P(N)$$, then we can form $$P(N+1)$$ by taking away three $$3$$'s and adding two $$5$$'s. So, either way, we can form $$P(N+1)$$

Your method uses strong induction, and is of course a perfectly good mathematical proof as well ... but maybe your professor had insisted on you using weak induction?

#### @Damian Vu 2019-02-05 18:01:20

Thanks! I just got an email back from him. He agrees now it is fine, but not a "conventional" way of doing the proof in his words. The main point of discrepancy was that, during lecture, he said "it cannot be done in that way, even under strong induction" which was the confusing part for us. We understood that it would take multiple proofs to do it under weak induction, but that was the main point of confusion. As a matter of fact, the way he did it in class was through a lot more reasoning instead of 3 separate weak inductive proofs, which is what led us to ask if this would work instead

#### @Bram28 2019-02-05 18:04:01

@DamianVu Cool! Did he do it using the other weak inductive proof I just added to my Answer?

#### @Damian Vu 2019-02-05 18:06:29

ah yes I didn't see that. That is exactly how he did it in class.

#### @Bram28 2019-02-05 18:08:20

@DamianVu OK. But that is a different proof than what you described in your post. :)

#### @Damian Vu 2019-02-05 18:18:29

Ah yes, I didn't think it was too relevant to the discussion, so I left it out. His refutal of our claim was that to do it in a way like we did, that you would need three separate proofs, even under strong induction. Which I felt was the main point of contention for us

#### @Bram28 2019-02-05 22:36:06

@DamianVu Oh! No, the professor was definitely wrong about that.

#### @Yves Daoust 2019-02-05 17:41:35

If the property is true for all $$k$$ such that $$8\le k\le n,$$ where $$10\le n$$, then it is true for $$n-2$$ and is true for $$n+1$$, and for all $$k$$ such that

$$8\le k\le n+1.$$

#### @famesyasd 2019-02-05 17:27:04

First we have this principle: take any (mathematically well-formed) property $$P(n)$$, depending on $$n$$ if you can prove that

$$P(0)$$

$$\forall n \in \mathbb{N}\, P(n) \implies P(n+1)$$

from this you may conclude $$\forall n \in \mathbb{N}\, P(n)$$

From this induction principle you can derive many other induction principles: finite induction, backwards induction etc but we only need two of the following:

You may start from any other natural number other than $$0$$:

$$P(k)$$

$$\forall n \in \mathbb{N_{\ge{k}}}\, P(n) \implies P(n+1)$$

$$\forall n \in \mathbb{N_{\ge{k}}}\, P(n)$$

and a principle of strong induction:

Suppose you prove

$$\forall n \in \mathbb{N_{\ge{k}}}\,\Bigl(\forall k \in \mathbb{N_{\ge{k}}}\, [k < n \implies P(k)]\Bigr) \implies P(n)$$

then you may conclude

$$\forall n \in \mathbb{N_{\ge{k}}} P(n)$$

In words, the first principle of mathematical induction works like this: You prove the base case (it is absolutely necessary to do this!) and after that you prove that the property holds for some number $$n$$ by knowing only that it holds for the previous number $$n-1$$! And if you work with the principle of strong induction not only that you don't need to prove the base case - you can also consider that the property holds for all of the previous numbers! How cool is that? And this is exactly what you did in your proof by strong induction:

Let's suppose that $$P(n)$$ means than $$n$$ can be rewritten as sum of $$2$$'s and $$3$$'s.

So you take any number $$n \ge 8$$. You assume that forall $$8 \le k < n$$ that property holds and then you prove that it also holds for $$n$$. You do this by cases:

if $$n = 8$$ then $$P(n)$$

if $$n = 9$$ then $$P(n)$$

if $$n = 10$$ then $$P(n)$$

if $$n > 10$$ then $$8 \le n - 3 < n$$ and thus by assumption $$P(n-3)$$ from this follows $$P(n)$$ since it only has one more $$3$$.

So you see that $$P(n)$$ holds in all cases thus by principle of strong induction you may conclude $$\forall n \in \mathbb{N_{\ge{8}}}\, P(n)$$

Now let's see how you could proceed by using first (ordinary) induction:

The idea is to use ordinary induction 3 times to prove that the property holds for 3 different sequences of natural numbers, that is for $$8 + 3n$$, $$9+3n$$, $$10+3n$$ $$n \ge 8$$ from this you will be able to conclude that it in facts hold for any natural number greater than $$8$$, since it'll definitely be in one of those sequences.

I'll show how to do that for the first one, the other two are proved verbatim.

We prove $$\forall n \in \mathbb{N} \mbox{ we have } P(8+3n)$$

$$n = 0, \mbox{ we certainly have } P(8)$$

Now assume we have $$P(8+3k)$$ for some $$k \in \mathbb{N}$$ then we need to prove that $$P[8 + 3(k+1)]$$.

But $$8+3(k+1) = (8 + 3k) + 3$$ and since $$8 + 3k$$ could be rewritten as a sum of $$3$$'s and $$2$$'s then $$(8+3k)+3$$ can be also rewritten this way since it is the same but has one more 3. Thus, we have $$P[8 + 3(k+1)]$$ and thus by the ordinary induction you may conclude $$\forall n \in \mathbb{N}\, P(8+3n)$$

#### @Damian Vu 2019-02-05 17:57:37

Thanks for this! I think that clears up the idea of strong induction for me, which I was a little bit shaky with

#### @Daniel Schepler 2019-02-06 00:28:54

Another way to organize the proof: show by "weak induction" that for all $k \ge 8$, we have $P(k) \wedge P(k+1) \wedge P(k+2)$. Call this conjunction $Q(k)$; then you have shown all the elements of $Q(8) = P(8) \wedge P(9) \wedge P(10)$. For $Q(k) \rightarrow Q(k+1)$, if $P(k) \wedge P(k+1) \wedge P(k+2)$, then you already know $P(k+1)$ and $P(k+2)$ are true; and also, since $P(k)$ is true and you have shown $P(k) \rightarrow P(k+3)$, you also know $P(k+3)$. Therefore, $P(k+1) \wedge P(k+2) \wedge P(k+3)$, in other words, $Q(k+1)$.

### [SOLVED] Mathematical Induction: $3^n +1$ is even for all values of positive integers

• 2017-02-17 13:42:56
• Smit
• 207 View
• 6 Score
• Tags:   induction

### [SOLVED] Proving mathematical induction with arbitrary base using (weak) induction

• 2012-04-05 01:38:56
• russell11
• 325 View
• 3 Score
• Tags:   induction