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.8-15

Exercise 1.2.8-15

not stated yet in Lean solution written

RatingM22
MarkersM (mathematical)
KindK3, find a value: compute a number, a set or a closed form from the written solution
SectionSection 1.2.8 of Volume 1. Companion chapter: Fibonacci numbers

The task

Let ana_n, bnb_n and cnc_n satisfy the Fibonacci rule with forcing terms f(n)f(n), g(n)g(n) and xf(n)+yg(n)xf(n) + yg(n), with the same start values 0,10, 1. Express cnc_n by ana_n, bnb_n, FnF_n, xx and yy.

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

Subtract FnF_n from each sequence to remove the start values. What rule does an−Fna_n - F_n follow?

Hint 2

Linearity: the sequence with forcing term xf+ygxf + yg and start 0,00, 0 is xx times the sequence for ff plus yy times the one for gg.

Solution

Show the solution

Let αn=an−Fn\alpha_n = a_n - F_n, βn=bn−Fn\beta_n = b_n - F_n and γn=cn−Fn\gamma_n = c_n - F_n. Since Fn+2=Fn+1+FnF_{n+2} = F_{n+1} + F_n, these sequences follow

αn+2=αn+1+αn+f(n),βn+2=βn+1+βn+g(n),γn+2=γn+1+γn+xf(n)+yg(n),\alpha_{n+2} = \alpha_{n+1} + \alpha_n + f(n), \quad \beta_{n+2} = \beta_{n+1} + \beta_n + g(n), \quad \gamma_{n+2} = \gamma_{n+1} + \gamma_n + xf(n) + yg(n),

and all three have the start values 0,00, 0. Let dn=xαn+yβnd_n = x\alpha_n + y\beta_n. Then d0=d1=0d_0 = d_1 = 0 and

dn+2=dn+1+dn+xf(n)+yg(n).d_{n+2} = d_{n+1} + d_n + xf(n) + yg(n).

So dnd_n and γn\gamma_n follow the same rule with the same start, and they are equal. Therefore cn−Fn=x(an−Fn)+y(bn−Fn)c_n - F_n = x(a_n - F_n) + y(b_n - F_n), that is,

cn=xan+ybn+(1−x−y)Fn.c_n = x a_n + y b_n + (1 - x - y)F_n.

Check

Take f(n)=1f(n) = 1, g(n)=ng(n) = n, x=2x = 2, y=3y = 3. The rule gives an=0,1,2,4,7,12a_n = 0, 1, 2, 4, 7, 12 and bn=0,1,1,3,6,12b_n = 0, 1, 1, 3, 6, 12 for n=0,…,5n = 0, \ldots, 5. The sequence with forcing term 2+3n2 + 3n is cn=0,1,3,9,20,40c_n = 0, 1, 3, 9, 20, 40. The formula gives for n=5n = 5: 2⋅12+3⋅12+(1−5)⋅5=24+36−20=402 \cdot 12 + 3 \cdot 12 + (1 - 5) \cdot 5 = 24 + 36 - 20 = 40, and for n=4n = 4: 2⋅7+3⋅6−4⋅3=202 \cdot 7 + 3 \cdot 6 - 4 \cdot 3 = 20.

Remarks

This is linearity of the solution in the forcing term. With it, Exercise 1.2.8-14 gives the solution for every polynomial forcing term, because nkn^k is a combination of the binomials (ni)\binom ni with i≤ki \le k.

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

In Lean

not stated yet The exercise is not stated in Lean yet.

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

Something is wrong? Report it.