Before going to start the exact discussion on generating functions let us begin our tour from the origin of generating functions. Assume a series a0 + a1 + a2 + …….. + an in which, from and after a certain term is equal to the sum of a fixed number of preceding terms multiplied respectively by certain constant is called recurring series. For example in the series 1 + 2z + 3z2 + 4z3 + 5z4 + …. , where each term after the second is equal to the sum of the two preceding terms multiplied respectively by the constants 2z and – z2. These quantities being constants because they are remain same for all values of n. Thus,
5z4 = (2z). 4z3 + (– z2). 3z2 Therefore we assume that
a4 = 2z. a3 – z2. a2
In general when n is greater then 1, each term is represented by its two immediately preceded terms through the equation,
an = 2z. an–1 – z2. an–2
or an – 2z. an–1 + z2. an–2 = 0 (2.1)
Equation 2.1 is called scale of relation in which coefficients an, an–1, and an–2 are taken with their proper signs. Thus the series 1 + 2z + 3z2 + 4z3 + 5z4 + …… has scale of relation 1 – 2z + z2. Consequently, if the scale of relation of a recurring series is given, then we could find any term of the series, from sufficient number of known preceding terms.
For example, let 1 – pz – qz2 – wz3 (2.2)
is the scale of relation of the series a0 + a1 z + a2 z2 + …….. + an zn (2.3) Then we have, an zn ≥ pz. an–1 zn–1 + qz2. an–2 zn–2 + wz3. an–3 zn–3;
or an = p. an–1 + q. an–2 + w. an–3; (2.4)
Thus, any coefficient can be found when coefficients of the three preceding terms are known.
Let us take a series shown in (2.3) and extended up to infinite terms, i.e.,
a0 + a1 z + a2 z2 + …….. + an zn + ………… (2.5)
and assume the scale of relation is 1 – pz – qz2. So we have an – p an–1 – q an–2 = 0
Assume, A(z) = a0 + a1 z + a2 z2 + …….. …….. + an–1 zn–1
– pz.A(z) = – pa0 z – pa1 z2 – ……….. – pan–2 zn–1 – p an–1 zn – qz2.A(z) = – qa0 z2 – ……….. – qan–3 zn–1 – q an–2 zn – qan–1 zn+1 (1 – pz – qz2) A(z) = a0 + (a1 – pa0) z + …………. – (pan–1 + qan–2) zn – qan–1.zn+1 For the coefficient of every other power of z is zero in consequence of the relation
an – p an–1 – q an–2 = 0 i.e., A(z) = [a0 + (a1 – pa0) z]/(1 – pz – qz2)
– [(pan–1 + qan–2) zn – qan–1 zn+1]/(1 – pz – qz2) (2.6) For large value of n series (2.5) is infinite and so second fraction of the equation (2.6) decreases indefinitely. Thus we have the sum
A(z) = [a0 + (a1 – pa0) z]/(1 – pz – qz2) (2.7) If we develop this fraction in ascending powers of z, we shall obtain as many terms of the original series as we please. Therefore, the expression (2.7) is called generating function of the infinite series (2.5).
As we mention in the previous section that for a numeric function an we uses a0, a1, a2,
…, an, …..to denote its values at 0, 1, 2, ……, n, …… Here we introduce an alternative way to represent numeric functions, such as for a numeric function (a0, a1, a2, …, an, …..) we define an infinite series,
a0 + a1 z + a2 z2 + …….. + an zn + …………
Here z is a formal variable and powers of z is used as generator in the infinite series such that the coefficient of zn returns the value of the numeric function at n. For a numeric function an we write A(z) to denote its generating function and so the above infinite series can be written in closed form as shown in equation (2.7), i.e.,
A(z) = [a0 + (a1 – pa0)z]/(1 – pz – qz2) (where (1 – pz – qz2) is the scale of relation)
For example, the numeric function (50, 51, 52, …, 5n, …..) we define an infinite series, 50 + 51 z + 52 z2 + …….. + 5n zn + …………
Therefore we obtain the summation of infinite series A(z) = 1/(1 – 5z). A(z) is the gener-ating function that represent the numeric function in a compact way. Hence for a numeric function we can easily obtain its generating function and vise - versa. In fact an alternate way to representing numeric function leads to efficiency and easiness in some context that we wish to carry out.
Consider a numeric function an = 1 for n ≥ 0, then its generating function A(z) = 1/(1 – z). Similarly the generating function of the numeric function bn = kn for n ≥ 0 will be B(z) = 1/(1 – kz). It is quite often that generating function can be expressed as a group of equivalent partial fractions and the general term of series may be easily found where the coefficient of zn represent the corresponding numeric function. Thus, suppose generating function can be decomposed into partial fractions,
P/(1 – αz) + Q/(1 + βz) + R/(1 – γz) Then coefficient of the zn in the general term is
{P. αn + (– 1)n B. βn + (n + 1) R. γn} for n ≥ 0 that will be equivalent to numeric function.
Example 2.27 Find the numeric function for the generating function A(z) = (1 – 8z)/(1 – z – 6z2)
Sol. Since A(z) can be expressed in partial fraction i.e., A(z) = 2/(1 + 2z) – 1/(1 – 3z)
Then obtain the coefficient of zn in the general term and it will come out to be (– 1)n 2n+1 – 3n for n ≥ 0
That is the required numeric function of A(z). Alternatively, we say an = (– 1)n 2n+1 – 3n for n ≥ 0.
Example 2.28 Find the generating function and the numeric function for the series 1 + 6 + 24 + 84 + …………..
Sol. The given series is transformed into another infinite series by introducing a formal pa-rameter z and using power of z as generator in it, i.e.
1 + 6z + 24z2 + 84z3 + ………….. (2.8)
The scale of relation of the above series is (1 – 5z + 6z2). To explain the method of determining the scale of relation, let’s assume (1 – pz – qz2) is the scale of relation for the series (2.8). Therefore to obtain p and q we have the equations,
24 – 6 p – q = 0 and 84 – 24 p – 6q = 0 whence, p = 5, and q = – 6, So the scale of relation is (1 – 5z + 6z2).
Hence, using equation (2.7) we obtain the generating function A(z) = (1 + z)/(1 – 5z + 6z2).
Since A(z) can be written as,
A(z) = 4/(1 – 3z) – 3/(1 – 2z)
Now obtain the coefficient of zn in the general term of A(z) that will return the numeric function an i.e.
an = 4.3n – 3.2n for n ≥ 0 Example 2.29 Find numeric function for generating function
A(z) = 2/(1 – 4z2) Sol. Since A(z) can be written as
A(z) = 1/(1 – 2z) + 1/(1 + 2z) Thus we obtain the numeric function an as,
an = 2n + (– 1)n . 2n for n ≥ 0
Now we shall discuss the common features of generating function corresponding to the features of numeric functions. Let an, bn, and cn are numeric function and A(z), B(z), and C(z) are their corresponding generating functions then,
• If cn = an + bn then corresponding generating function C(z) = A(z) + B(z). For example, Let an = 2n and bn = 3n for n ≥ 0 then cn = 2n + 3n for n ≥ 0. So C(z) = 1/(1 – 2z) + 1/(1 – 3z) = (2 + 3z – 6z2)/(1 – 2z).
• If bn = kan, where k is any arbitrary constant then corresponding generating func-tion is B(z) = kA(z). For example let an = 5.2n for n ≥ 0 then A(z) = 5/(1 – 2z) is the numeric function.
• If bn = knan, where k is any arbitrary constant then corresponding generating func-tion is B(z) = A(kz) = 1/(1 – kz). Since numeric funcfunc-tion bn is expressed in infinite series as
a0 + k.a1z + k2 a2z2 + ………. + kn anzn + ……
= a0 + a1(kz) + a2(kz)2 + ………. + an (kz)n + ……
Therefore, generating function B(z) = A(kz) = 1/(1 – kz).
• Since A(z) is the generating function of function an so generating function of SI an will be zI A(z), for any positive integer I. For example, let generating function B(z) = z8/(1 – 3z) then it can be written as,
B(z) = z8. 1/(1 – 3z) ≡ zI A(z)
Then its corresponding numeric function will be S8 an where an is the numeric func-tion for the funcfunc-tion 1/(1 – 3z) that is equal to 3n.
Therefore, we obtain numeric function S8 3n, i.e.,
S for 0
• Likewise, generating function for the numeric function S–I an for any integer I, will be
z–I [A(z) – a0 – a1z – a2z2 – …….. – aI–1 zI–1]
Since A(z) = a0 + a1z + a2z2 + …….. + aI–1 zI–1 + aI zI ……. + an zn + ….
or, A(z) – a0 – a1z – a2z2 – …….. – aI–1 zI–1 = aI zI + aI+1 zI+1 + ….. + an zn + ….
Multiplied both side by z–I, hence we obtain
z–I [A(z) – a0 – a1z – a2z2 – …….. – aI–1 zI–1] = aI + aI+1 z + ….. + an zn–I + ….
= an+I zn for n ≥ 0 That is equivalent to S–I an.
For example, let an = 3n+5 for n ≥ 0 which is equivalent to numeric function S–5.3n and its corresponding generating function can be computed by using the expression,
A(z) = z–I [A(z) – a0 – a1z – a2z2 – …….. – aI–1 zI–1] i.e., A(z) = z–5 [1/(1 – 3z) – 30 – 31z – 32z2 – 33 z3 – 34 z4]
= z–5 [35.z5/(1 – 3z)] = 35/(1 – 3z).
Example 2.30 Find the generating function for the numeric function an such that
a
Sol. Let A(z) is the generating function for an where,
A(z) = a0 + a1z + a2z2 + …….. + an zn + ….
Since values of a0 to a5 and a10 onwards are equal to zero. So A(z) = a6 z6 + a7 z7 + a8 z8 + a9 z9 + a10 z10 = 1.z6 + 2.z7 + 3.z8 + 4.z9 + 0.z10 = z6.(1 + 2z + 3z2 + 4z3)
Note that Generating function to the convolution of numeric functions i.e. cn = an*bn will be A(z) . B(z). Since
cn = an*bn = a0bn + a1bn–1 + ……… + an–1b1 + anb0 which is the coefficient of zn in the product of series
(a0 + a1z + a2z2 + …… + an zn + ….) . (b0 + b1z + b2z2 + ….+ an zn + ….) And it’s generating function is equal to the product of the generating functions of both A(z) and B(z), i.e.
C(z) = A(z) . B(z)
Example 2.31 Let an = 3n and bn = 5n for n ≥ 0, then determine the generating function for the convolution of numeric functions an and bn.
Sol. Since generating function corresponding to numeric function an and bn are A(z) = 1/(1 – 3z) and 1/(1 – 5z) respectively. Let cn = an*bn then its generating function is given by C(z) = A(z) . B(z). Therefore
C(z) = 1/(1 – 3z) . 1/(1 – 5z)
Alternatively, C(z) can be written as using partial fraction C(z) = – 3/2(1 – 3z) + 5/2(1 – 5z) Therefore its numeric function will be,
cn = – 3/2. 3n + 5/2 . 5n or cn = (– 1/2). 3n+1 + (1/2) .5n+1 for n ≥ 0
• If cn = Σ
I=0
n aI then its generating is C(z) = A(z) . 1/(1 – z) where A(z) is the generating function for function aI for I = 0 to n. To prove this fact we recall that if the convolu-tion of numeric funcconvolu-tion an and bn is cn, then
cn = I=0Σn aI . bn–I
And its generating function is given as C(z) = A(z) . B(z) Assume bn–I = 1 then
cn = I=0Σn aI . 1
Since generating function for function bn–I = 1 for n ≥ 0 or (1, 1, 1, …….. 1, ….) is B(z) = 1/(1 – z). Therefore,
C(z) = A(z) . 1/(1 – z)
where A(z) is the generating function of the numeric function Σ
I=0 n aI
Example 2.32 Determine the generating function for the numeric function (1, 2, 3, ……., n,
….).
Sol. Since 1/(1 – z) = 1 + z + z2 + z3 …………. + zn + zn+1 + ….
Differentiate both side w.r.t.z, i.e.,
1/(1 – z)2 = 1 + 2z + 3z2 + …………. + nzn–1 + (n + 1)zn + ….
Thus, we obtain the generating function 1/(1 – z)2 for the numeric function (1, 2, 3, ….., n, …).
Conversely, for generating function 1/(1 – z)2, the coefficient of zn (general term) will be,
= (– 1)n (– 2) (– 2 – 1) …….. (– 2 – n + 1)/n!
= 2 .3 ……. (n + 1)/n!
= (n + 1)
Therefore we obtain the numeric function an = n + 1 for n ≥ 0 for it values (1, 2, …, n ,..) Example 2.33 Determine the generating function for the numeric function (02,12, 22, ……., n2,
….).
Sol. Since 1/(1 – z) = 1 + z + z2 + z3 …………. + zn + ….
Differentiate both sides w.r.t.z, i.e.,
1/(1 – z)2 = 1 + 2z + 3z2 + …………. + nzn–1 + ….
Multiply both sides by z so we obtain
z.1/(1 – z)2 = 1.z + 2z2 + 3z3 + …………. + nzn + ….
Differentiate again w.r.t.z and multiply both sides with z, i.e.,
z. (1 + z)/(1 – z)3 = 02 + 12.z + 22.z2 + 32.z3 + ………….+ n2.zn + ….
Thus, we obtain the generating function z. (1 + z)/(1 – z)3 for the numeric function (02,12, 22, ……., n2, ….).
Conversely, the coefficient of zn in z. (1 + z)/(1 – z)3 is n2†, therefore an = n2 for n ≥ 0.
Example 2.34 Find generating functions of the following discrete numeric functions (i) 1, 2/3, 3/9, 4/27, ……..(n + 1)/3n, ……
(ii) 0.50, 1.51, 2.52, …….., n.5n, ………..
Sol. (i) Let A(z) is the generating function of the series (1, 2/3, 3/9, 4/27, …….. (n + 1)/3n, ……), i.e.,
A(z) = 1 + z.2/3 + z2.3/9 + z3.4/27 + …….. + zn.(n + 1)/3n + ………
or A(z) = 1 + 2.(z/3) + 3.(z/3)2 + 4.(z/3)3 + ……..+ (n + 1).(z/3)n +…...
Since, 1/(1 – z)2 = 1 + 2z + 3z2 + …………. + (n + 1)zn + ….
Replace z by z/3 so above equation becomes
1/(1 – z/3)2 = 1 + 2.(z/3) + 3.(z/3)2 + …………. + (n + 1).(z/3)n + ….
Therefore, 1/(1 – z/3) is the required generating function.
(ii) Let B(z) is the generating function of the series (0.50, 1.51, 2.52, …….., n.5n, ………..), i.e.,
B(z) = 0.50 + 1.51 z + 2.52 z2 + …….. + n.5n zn + ………..
Since, 1/(1 – z) = 1 + z + z2 + z3 …………. + zn + ………….
Replace z by 5z thus we obtain the equation
1/(1 – 5z) = 1 + 5z + (5z)2 + (5z)3 …………. + (5z)n + ………….
† Since general term of 1/(1 – z)3, is given as
= (– 1)n. zn .(– 3). (– 4). ………(– 3 – n + 1)/n!
Thus, the coefficient of zn in 1/(1 – z)3 is
= (3). (4). ……… (2 + n)/n!
= (n + 2) (n + 1)/1. 2
Therefore the coefficient of zn in the expansion of z.(1 + z)1/(1 – z)3 is
= n .(n + 1)/2 + (n – 1) .n/2
= n .2n/2
= n2
Differentiate w.r.t z
1.5/(1 – 5z)2 = 0 + 5.1 + 2.52z + 3.53z2 + ………. + n.5n zn–1 + …………...
or 5/(1 – 5z)2 = 0.50 + 1.51 + 2.52z + 3.53z2 + ………. + n.5n zn–1 + ………….
Multiply both sides with z, so we have
5z/(1 – 5z)2 = 0.50 z + 1.5z + 2.52z2 + 3.53z3 + ………. + n.5n zn + …...
or 5z/(1 – 5z)2 = 0.50 + 1.5z + 2.52z2 + 3.53z3 + ……….+ n.5n zn + …………....
Therefore, 5z/(1 – 5z)2 is the generating function for (0.50, 1.51, 2.52, …….., n.5n, ………….).
Example 2.35 Determine generating function and discrete numeric function of series – 3/2 + 2 + 0 + 8 + ……..
Sol. Let scale of relation of the given series be 1 – pz – qz2. Obtain p and q from the equations, 0 – 2p + 3/2q = 0 and 8 – 0 – 2q = 0 Since A(z) can be written as (using partial fraction)
= (8/5)/(1 + z) – (31/10)/(1 – 4z)
So numeric function will be the coefficient of zn that will be, an = (8/5).(– 1)n.1 – (31/10).4n
or an = (– 1)n .(8/5) – (31/10).4n for n ≥ 0.