High School Mathematics Extensions/Counting and Generating Functions/Solutions

From testwiki
Jump to navigation Jump to search

Template:High School Mathematics Extensions/TOC

[[../|Counting and Generating Functions]]

Template:High School Mathematics Extensions/Solutions/TOC

These solutions were not written by the author of the rest of the book. They are simply the answers I thought were correct while doing the exercises. I hope these answers are useful for someone and that people will correct my work if I made some mistakes.

Generating functions exercises

1.

(a)S=1z+z2z3+z4z5+...
zS=zz2+z3z4+z5...
(1+z)S=1
S=11+z
(b)S=1+2z+4z2+8z3+16z4+32z5+...
2zS=2z+4z2+8z3+16z4+32z5+...
(12z)S=1
S=112z
(c)S=z+z2+z3+z4+z5+...
zS=z2+z3+z4+z5+...
(1z)S=z
S=z1z
(d)S=34z+4z24z3+4z44z5+...
z(S+1)=4z4z2+4z34z4+4z5...
S+z(S+1)=3
S+zS+z=3
(1+z)S=3z
S=3z1+z

2.

(a)S=11+z
S=11z
S=1x+x2x3+x4x5+...
f(n)=(1)n
(b)S=z31z2
(1z2)S=z3
S=z3+z5+z7+z9+...
f(n)=1;for n2 and even
f(n)=0;for n is odd

2c only contains the exercise and not the answer for the moment

(c)z211+3z3

Linear Recurrence Relations exercises

This section only contains the incomplete answers because I couldn't figure out where to go from here.

1.

xn=2xn11; for n1x0=1

Let G(z) be the generating function of the sequence described above.

G(z)=x0+x1z+x2z2+...
(12z)G(z)=x0+(x12x0)z+(x22x1)z2+...
(12z)G(z)=1zz2z3z4...
(12z)G(z)=1z(1+z+z2+...)
(12z)G(z)=1z1z
(12z)G(z)=12z1z
G(z)=11z
xn=1

2.

3xn=4xn1+xn2; for n2x0=1x1=1

Let G(z) be the generating function of the sequence described above.

G(z)=x0+x1z+x2z2+...
(3+4zz2)G(z)=3x0+(3x1+4x0)z+(3x2+4x1x0)z2+(3x3+4x2x1)z3+...
(3+4zz2)G(z)=3x0+(3x1+4x0)z
(3+4zz2)G(z)=3+7z
G(z)=3+7zz2+4z+3

3. Let G(z) be the generating function of the sequence described above.

G(z)=x0+x1z+x2z2+...
(1zz2)G(z)=x0+(x1x0)z+(x2x1x0)z2+(x3x2x1)z2+...
(1zz2)G(z)=1
G(z)=11zz2
G(z)=1z2+z1
We want to factorize f(z)=z2+z1 into (zα)(zβ) , by the converse of factor theorem, if (z - p) is a factor of f(z), f(p)=0.
Hence α and β are the roots of the quadratic equation z2+z1=0
Using the quadratic formula to find the roots:
α=512,β=5+12
In fact, these two numbers are the famous golden ratio and to make things simple, we use the greek symbols for golden ratio from now on.
Note:512 is denoted ϕ and 5+12 is denoted Φ
G(z)=1(zϕ)(z+Φ)
By the method of partial fraction:
G(z)=15(z+Φ)15(zϕ)
G(z)=1Φ5(zΦ+1)1ϕ5(zϕ1)
G(z)=1Φ5(1ϕz)+1ϕ5(1Φz)
xn=ϕ5×(ϕ)n+Φ5×Φn
xn=Φn+1(ϕ)n+15

Further Counting exercises

1. We know that

T(z)=1(1z)2=i=0(i+1i)zi=i=0(i+1)zi

therefore

T(z)=1(1+z)2=i=0(i+1)(1)izi
Thus
Tk=(1)k(k+1)

2. a+b+c=m

T(z)=1(1z)3=i=0(i+2i)zi
Thus
Tk=(i+2i)

*Differentiate from first principle* exercises

1.

f(z)=limh01(1(z+h))21(1z)2=
limh01h(1z)2(1(z+h))2(1zh)2(1z)2=
limh01hz22z+1(z+h)2+2(z+h)1(1zh)2(1z)2=
limh01hz22z+1z2h22zh+2z+2h1(1zh)2(1z)2=
limh01hh22zh+2h(1zh)2(1z)2=
limh0h2z+2(1zh)2(1z)2=
2z+2(1z)4=
2(1z)3