taocp

This site has no text of the book. Keep your own copy of TAOCP next to it. See what is checked.

Exercise · Volume 1 · 1.2.1-1

Exercise 1.2.1-1

proved in Lean solution written

Rating05
KindK1, prove: show that a stated fact is true from the written solution
SectionSection 1.2.1 of Volume 1. Companion chapter: Mathematical induction

The task

Say how proof by induction changes when the statement P(n)P(n) is to be shown for n=0,1,2,…n = 0, 1, 2, \ldots and not for n=1,2,3,…n = 1, 2, 3, \ldots.

The exact wording is in your copy of the book.

Hints

Open one hint at a time. Try the exercise again after each.

Hint 1

Compare with the two steps (a) and (b) of the text: a first value, and a step to the next value.

Hint 2

Rename the index so that the first value becomes 11.

Solution

Show the solution

Two steps prove P(n)P(n) for all n≥0n \ge 0:

(a) Prove P(0)P(0).

(b) For each n≥0n \ge 0, prove that P(0),P(1),…,P(n)P(0), P(1), \ldots, P(n) together imply P(n+1)P(n+1). (The weaker form, in which P(n)P(n) alone implies P(n+1)P(n+1), is also enough.)

Why this is valid: let Q(k)Q(k) be the statement P(k−1)P(k-1) for k≥1k \ge 1. Step (a) says that Q(1)Q(1) is true. Step (b) says that for each k≥1k \ge 1 the statements Q(1),…,Q(k)Q(1), \ldots, Q(k) imply Q(k+1)Q(k+1). These are the two steps of the usual principle, so Q(k)Q(k) holds for all k≥1k \ge 1. This means that P(n)P(n) holds for all n≥0n \ge 0. □\square

Check

Take P(n)P(n) to be 2n≥n+12^n \ge n + 1. Step (a): 20=1≥12^0 = 1 \ge 1. Step (b): 2n+1=2⋅2n≥2n+2≥n+22^{n+1} = 2 \cdot 2^n \ge 2n + 2 \ge n + 2 for n≥0n \ge 0. So the claim holds for n=0,1,2,…n = 0, 1, 2, \ldots, for example 25=32≥62^5 = 32 \ge 6.

Remarks

The same shift works for any starting value n0n_0. The C1 chapter of Section 1.2.1 has the principle in the form of Algorithm 1.2.1I. Exercise 1.2.1-15 gives a version for any well-ordered set.

This solution is checked, and a person has not reviewed it yet. The source.

In Lean

proved The statement and its proof are in Lean. The kernel accepts the proof, and it uses the standard axioms only.

The status is computed from the Lean build. The node of the map.

Something is wrong? Report it.