• Keine Ergebnisse gefunden

Fibonacci numbers I

Im Dokument Mathematical Problem Solving (Seite 21-28)

The Fibonacci sequence, with its recursive definition and multiple properties, is a veritable induction playground. But it is also an object of serious research; a whole book about it has been written [Vorobi02], and the Fibonacci Association publishes theFibonacci Quarterlysince 1963 and organizes the two-yearlyFibonacci Conference.

Arguably these are only partly concerned with the Fibonacci sequence, but its role in them is substantial if not leading.

Let us recall the definition of this venerable sequence and show a few of its properties; we’ll see more of it at times later on.

Definition 2.2.1. The Fibonacci sequence is the sequence (f0, f1, f2, . . .) of integers which is defined recursively by

f0 =0, f1 =1, and fn = fn1+ fn2 for all n≥2.

The entries of this sequence are called theFibonacci numbers.

The first Fibonacci numbers are

f0=0, f1 =1, f2 =1, f3=2, f4=3, f5 =5, f6=8, f7 =13, f8 =21, f9 =34, f10 =55,

f11 =89, f12 =144, f13 =233.

Some authors17 prefer to start the sequence at f1 rather than f0; of course, the recursive definition then needs to be modified to require f2 =1 instead of f0 =0.

The first property of Fibonacci numbers that we prove is the following:

Exercise 2.2.1. Let (f0, f1, f2, . . .)be the Fibonacci sequence. Prove that each inte-gern ≥0 satisfies

f1+f2+· · ·+ fn = fn+2−1. (10)

17such as Vorobiev in his book [Vorobi02]

Solution to Exercise 2.2.1. We prove (10) by induction on n:

Induction base: We have f1+ f2+· · ·+ f0 = (empty sum) = 0 = f2−1 (since f2 =1). In other words, (10) holds for n=0. This completes the induction base.18

Induction step: Let m ≥ 0. Assume (as the induction hypothesis) that (10) holds forn =m. We must show that (10) holds forn =m+1.

Our assumption says that (10) holds for n = m; in other words, f1+ f2+· · ·+ fm = fm+2−1.

Now, our goal is to prove that (10) holds forn=m+1; in other words, our goal is to prove that f1+ f2+· · ·+ fm+1 = fm+3−1 (since this is what (10) says for n=m+1). But this follows by comparing

f1+ f2+· · ·+ fm+1 = (f1+ f2+· · ·+ fm)

| {z }

=fm+21

+fm+1 = fm+2−1+ fm+1

with

fm+3

| {z }

=fm+2+fm+1 (by the recursive definition

of the Fibonacci sequence)

−1= fm+2+fm+1−1 = fm+2−1+fm+1.

So we have shown that (10) holds forn=m+1. This completes the induction step, and thus proves (10). Hence, Exercise 2.2.1 is solved.

Let us briefly discuss two notational aspects of induction. So far, we have always been using the letter m for the integer that is introduced in the induction step, because it was called min the statement of Theorem 2.1.1. Clearly, we can use any other letter (for example, k) instead, as long as that letter does not already have a different meaning. It is also perfectly fine to use k−1 for it – i.e., instead of assuming that the claim holds for n = m and proving that it holds for n = m+1, we can just as well assume that the claim holds for n = k−1 and prove that it holds forn =k. (Of course, if we do this, then we need to assumek >ginstead of k ≥ g.) This just boils down to substituting k−1 for m in Theorem 2.1.1. Here is how Theorem 2.1.1 looks like after this substitution:

Theorem 2.2.2. Let g ∈ Z. For each integer n ≥ g, let A(n) be a logical state-ment. Assume the following:

• Assumption 1: The statementA(g) holds.

• Assumption 2: If k is an integer such that k > g and such that A(k−1) holds, then A(k) also holds.

Then, A(n) holds for all integersn ≥g.

18We will no longer write this sentence at the end of an induction base, since the “Induction step:”

that follows it should make it clear enough that the induction base ends here.

As an example for an induction proof written in this way, let us prove another property of the Fibonacci sequence (the so-calledCassini identity):

Exercise 2.2.2. Let (f0, f1, f2, . . .) be the Fibonacci sequence. Prove that fn+1fn1− fn2= (−1)n

for any positive integer n.

Solution to Exercise 2.2.2. We induct on n(using Theorem 2.2.2):

Induction base: We have f0 =0, f1 =1 and f2 =1. Thus, f2f0−f12 =1·0−12 =

−1= (−1)1. In other words, Exercise 2.2.2 holds forn =1.

Induction step: Let k be an integer such that k > 1. Assume (as the induction hypothesis) that Exercise 2.2.2 holds for n = k−1. We must show that Exercise 2.2.2 holds forn =k. In other words, we must show that fk+1fk1− fk2= (−1)k.

Our induction hypothesis says that Exercise 2.2.2 holds for n = k−1. In other words, it says that fkfk2− fk21 = (−1)k1. But the recursive definition of the Fibonacci sequence yields fk+1 = fk+ fk1 (sincek >1). Hence,

fk+1

|{z}

=fk+fk−1

fk1 = (fk+ fk1) fk1 = fkfk1+ fk21

|{z}

=fkfk−2−(−1)k−1 (since fkfk−2fk−12 =(−1)k−1)

= fkfk1+ fkfk2−(−1)k1= fk (fk1+fk2)

| {z }

=fk

(since the recursive definition of the Fibonacci sequence

yieldsfk=fk−1+fk−2)

−(−1)k1

| {z }

=−(−1)k

= fkfk−(−1)k= fk2+ (−1)k,

so that fk+1fk1fk2 = (−1)k. This is exactly what we wanted to prove. This completes the induction step, and with it the solution to Exercise 2.2.2.

Some writers shorten their induction proofs even further by reusing the letter n itself (instead ofmor kas we did above) in the induction step. That is, instead of fixing ak > g and assuming that the claim holds for n= k−1 and proving that it holds for n= k, they fix ann> g and assume that the claim holds “forn−1 instead ofn” (i.e., the claim holds ifn is replaced byn−1 in it) and prove that it holds forn as well. This saves a letter and a bit of writing, at the cost of being potentially more confusing and slippery (as it requires you to check that you have properly replacednbyn−1 in the induction hypothesis); thus I do not recommend it. But you should be aware that it is a commonly used “figure of speech”.19

The next exercise (a particular case of [Grinbe15, Theorem 2.26(a)]) illustrates a point about choosing the right claim when doing induction.

19For example, here is how the above solution to Exercise 2.2.2 could be rewritten using this

con-Exercise 2.2.3. Let (f0, f1, f2, . . .) be the Fibonacci sequence. Prove that

fn+m+1 = fnfm+ fn+1fm+1 (11) for any nonnegative integers nand m.

We have two nonnegative integer variables here (n and m), so we can try to do induction on either. As to the other, it appears reasonable to just fix it beforehand.

So we try the following:

First attempt at solving Exercise 2.2.3. Let us fix m and induct on n (using Theorem 2.1.1).

Induction base: The equality (11) holds forn =0. Indeed, for n =0, this equality boils down to f0+m+1 = f0fm + f1fm+1, which follows easily from f0 = 0 and

f1 =1.

Induction step: Let k be a nonnegative integer.20 Assume (as the induction hy-pothesis) that (11) holds for n = k. We must show that (11) holds for n = k+1.

In other words, we must show that f(k+1)+m+1 = fk+1fm + f(k+1)+1fm+1. In other words, we must show that fk+m+2 = fk+1fm+ fk+2fm+1.

Our induction hypothesis says that (11) holds forn=k, that is, we have fk+m+1 = fkfm+fk+1fm+1.

The recursive definition of the Fibonacci sequence yields fk+m+2= fk+m+1+ fk+m.

vention:

We induct onn(using Theorem 2.2.2):

Induction base: We have f0=0, f1=1 and f2=1. Thus, f2f0f12=1·012=1= (−1)1. In other words, Exercise 2.2.2 holds forn=1.

Induction step: Letnbe an integer such thatn>1. Assume (as the induction hypothesis) that Exercise 2.2.2 holds forn1 instead ofn. We must show that Exercise 2.2.2 holds forn. In other words, we must show that fn+1fn−1 fn2= (−1)n.

Our induction hypothesis says that Exercise 2.2.2 holds forn1 instead ofn. In other words, it says that fnfn−2fn−12 = (−1)n−1. But the recursive definition of the Fibonacci sequence yields fn+1= fn+fn−1(sincen>1). Hence,

fn+1

| {z }

=fn+fn1

fn−1= (fn+fn−1)fn−1= fnfn−1+ fn−12

| {z }

=fnfn2−(−1)n1 (sincefnfn2fn21=(−1)n1)

= fnfn−1+fnfn−2(−1)n−1

= fn (fn−1+fn−2)

| {z }

=fn

(since the recursive definition of the Fibonacci sequence

yieldsfn=fn1+fn2)

(−1)n−1

| {z }

=−(−1)n

= fnfn− −(−1)n= fn2+ (−1)n,

so that fn+1fn−1fn2 = (−1)n. This is exactly what we wanted to prove. This completes the induction step, and with it the solution to Exercise 2.2.2.

20Thiskwill play the role of the min Theorem 2.1.1, since we cannot use the letter mfor it here (becausemis already a fixed number).

Now, our induction hypothesis lets us decompose the fk+m+1on the right hand side as fkfm+ fk+1fm+1; but how do we decompose the fk+m? The induction hypothesis does not help us here, and we are stuck.

This suggests that we need a better induction hypothesis. The easiest way to get one is tonotfix mbefore starting the induction. The result is that we have to carry a “for all nonnegative integers m” through our induction; but this extra weight turns out to be useful:

Second attempt at solving Exercise 2.2.3. Let us induct on n.

Induction base: The equality (11) holds for n = 0 and every nonnegative integer m. Indeed, for n = 0, this equality boils down to f0+m+1 = f0fm+ f1fm+1, which follows easily from f0 =0 and f1 =1.

Induction step: Let k be a nonnegative integer. Assume (as the induction hypoth-esis) that (11) holds forn=kand every nonnegative integerm. We must show that (11) holds forn=k+1 and every nonnegative integer m. In other words, we must show that f(k+1)+m+1 = fk+1fm+ f(k+1)+1fm+1 for every nonnegative integer m. In other words, we must show that fk+m+2 = fk+1fm+fk+2fm+1for every nonnegative integerm.

Our induction hypothesis says that (11) holds for n = k and every nonnegative integerm. In other words, we have

fk+m+1 = fkfm+ fk+1fm+1 (12) for every nonnegative integerm.

Now, let m be a nonnegative integer. The recursive definition of the Fibonacci sequence yields

fk+m+2= fk+m+1+ fk+m. (13) Once again, we can use our induction hypothesis (12) to rewrite the fk+m+1 on the right hand side as fkfm+ fk+1fm+1. But this time, we can also apply (12) to m−1 instead of m (since the m in (12) was an arbitrary nonnegative integer, not related to the m we have currently fixed), and thus obtain fk+(m1)+1 = fkfm1+ fk+1f(m1)+1. To be fully honest, we can only do this when m−1 is a nonnegative integer, which means that we cannot do this when m = 0; but the m = 0 case is easy and left to the reader. So we WLOG assume thatm 6=0; therefore,m≥1, and thus m−1 is a nonnegative integer. Hence, (12) (applied to m−1 instead of m) yields fk+(m1)+1 = fkfm1+ fk+1f(m1)+1. Since(m−1) +1=m, this rewrites as fk+m = fkfm1+ fk+1fm. (14)

Now, (13) becomes

fk+m+2 = fk+m+1

| {z }

=fkfm+fk+1fm+1 (by (12))

+ fk+m

| {z }

=fkfm−1+fk+1fm

(by (14))

= fkfm+fk+1fm+1+fkfm1+fk+1fm

= fk+1fm+fk (fm+ fm1)

| {z }

=fm+1

(since the recursive definition of the Fibonacci sequence

yields fm+1=fm+fm−1)

+fk+1fm+1

= fk+1fm+fkfm+1+fk+1fm+1

= fk+1fm+ (fk+fk+1)

| {z }

=fk+2

(since the recursive definition of the Fibonacci sequence yieldsfk+2=fk+1+fk=fk+fk+1)

fm+1 = fk+1fm+ fk+2fm+1.

But this is exactly what we wanted to show. Thus, the induction step is complete, and Exercise 2.2.3 is solved.

The solution we just gave is not the simplest possible; there is a different one, which avoids having to special-case them =0 case (as we did above). The trick is to rewrite fk+m+2 not as fk+m+1+fk+m, but rather as follows:

fk+m+2 = fk+(m+1)+1 = fkfm+1+ fk+1fm+2

(by (12), applied tom+1 instead of m). It is a nice exercise for the reader to finish this argument (see [Grinbe15, proof of Theorem 2.26(a)] for the answer).

Another version of induction is tailored to proving theorems about integers n in a finite interval21 rather than about all integers n ≥ g. Instead of relying on Theorem 2.1.1, it relies on the following theorem ([Grinbe15, Theorem 2.74]):

Theorem 2.2.3. Let g ∈ Zand h∈ Z. For eachn ∈ {g,g+1, . . . ,h}, let A(n)be a logical statement.

Assume the following:

Assumption 1: If g≤h, then the statement A(g) holds.22

Assumption 2: If m ∈ {g,g+1, . . . ,h−1} is such that A(m) holds, then A(m+1) also holds.

Then, A(n) holds for eachn ∈ {g,g+1, . . . ,h}.

21Here, the word “interval” means a set of the form

{g,g+1, . . . ,h}={all integers betweengandh(inclusive)}

for two fixed integers g and h. Thus, unlike in analysis, our intervals here consist entirely of integers.

Theorem 2.2.3 can easily be derived from Theorem 2.1.1, by applying the latter to the statement “if n ≤ h, then A(n)” instead of A(n). (See [Grinbe15, proof of Theorem 2.74] for the details of this derivation.) It is clear how to perform induction using Theorem 2.2.3: It differs from standard induction only in that we assume g≤m ≤h−1 (instead of only assuming m≥g) in the induction step.

Here is an example of an induction proof using Theorem 2.2.3:

Proposition 2.2.4. Let g and hbe integers such that g≤h. Letbg,bg+1, . . . ,bh be any h−g+1 nonzero integers. Assume that bg≥0. Assume further that

|bi+1bi| ≤ 1 for everyi∈ {g,g+1, . . . ,h−1}. (15) Then, bn >0 for each n∈ {g,g+1, . . . ,h}.

Proposition 2.2.4 is often called the “discrete intermediate value theorem” or the

“discrete continuity principle”. Its intuitive meaning is that if a finite list of nonzero integers starts with a nonnegative integer, and every further entry of this list differs from its preceding entry by at most 1 (you can think of this as a discrete version of continuity), then all entries of this list must be positive.23 Intuitively, this is obvious: It just says that it isn’t possible to go from a nonnegative integer to a negative integer by steps of 1 without ever stepping at 0. The following proof is just a rigorous restatement of this intuitive argument:

Proof of Proposition 2.2.4 (sketched). (See [Grinbe15, proof of Proposition 2.75] for de-tails.) We induct on nusing Theorem 2.2.3 (that is, we apply Theorem 2.2.3 to the statementA(n) = (“bn >0”)):

Induction base: We must prove that if g ≤h, then the statementbg > 0 holds. So let us assume thatg≤h. (Actually, we have already assumed so in the statement of the proposition.) Recall that bg,bg+1, . . . ,bhare nonzero; thus, in particular, bg 6=0.

But we also have bg ≥ 0. Combining these, we find bg > 0. This completes the induction base.

Induction step: Let m ∈ {g,g+1, . . . ,h−1} be such that bm >0 holds. We must show thatbm+1 >0 also holds.

Applying (15) toi =m, we find |bm+1−bm| ≤ 1. But it is well-known (and easy to see) that every integer x satisfies −x ≤ |x|. Applying this to x = bm+1−bm, we obtain−(bm+1bm) ≤ |bm+1bm| ≤1. In other words, 1 ≥ −(bm+1bm) = bm−bm+1. In other words, 1+bm+1 ≥ bm. Hence, 1+bm+1 ≥ bm > 0, so that 1+bm+1 ≥ 1 (since 1+bm+1 is an integer). In other words, bm+1 ≥ 0. However, bm+1 6= 0 (since bg,bg+1, . . . ,bh are nonzero). Combining this with bm+10, we obtain bm+1 > 0. This completes the induction step. Hence, Proposition 2.2.4 is proved.

22The “If g h” in this assumption is a bit silly: If we don’t have g h, then the claim we are proving is vacuous to begin with (because the set {g,g+1, . . . ,h}is empty in this case). But sometimes it is good to have vacuous cases covered, too.

23An example of such a list is(2, 3, 3, 2, 3, 4, 4, 3, 2, 3, 2, 3, 2, 1).

In the future, we will no longer say “We induct on n using Theorem 2.2.3”, but instead just say “We induct on n”. Indeed, it is clear that we must be using Theorem 2.2.3 if we are inducting on a variable that is bound to an interval (like then in Proposition 2.2.4).

Im Dokument Mathematical Problem Solving (Seite 21-28)