You are on page 1of 33

Ordinary Generating Functions and Recurrence

Equations

Student: Romeo Joe Amoako (10710167)

Supervisor: Dr. Kenneth Dadedzi (PhD)

Department of Mathematics
University of Ghana

September 21, 2023.

Romeo Joe Amoako (10710167) OGF and Recurrence Equations September 21, 2023. 1 / 33
Introduction

Generating function in mathematics is a formal power series in one


indeterminate, whose coefficients represent information about a sequence
of numbers {an }n≥0 . Generating functions were first introduced by
Abraham de Moivre in 1730 to aid in solving general linear recurrence
equations. The types of generating functions include Ordinary generating
functions, Exponential generating functions, Lambert series, Pell series and
Dirichlet series.

2 / 33
Aim

We will focus on Ordinary Generating Functions (OGF) in this presentation


and their role in finding closed formula of a recurrence equation.

3 / 33
Ordinary Generating Function (OGF)

Definition (Ordinary Generating Function) Let {an }n≥0 be a sequence of


real numbers. The ordinary generating function A(x) of the sequence is a
formal power series,

A(x) = a0 + a1 x + a2 x 2 + a3 x 3 + a4 x 4 + a5 x 5 + · · ·
= ∑ an x n .
n≥0

Note that an is the nth term of the sequence.

4 / 33
Example

Consider the sequence of real numbers 1, 1, 1, 1, 1, . . . and let A(x) be the


generating function for the sequence. Then, we have that;

A(x) = 1 + x + x 2 + x 3 + x 4 + · · ·
1
=
1−x
= ∑ x n.
n≥0

5 / 33
Uses for Ordinary Generating Functions (OGF)

Ordinary Generating Functions is used as/in


a counting tool in Graph theory (Combinatorics) of some
mathematical objects.
Proving some identities.
Solving recurrence equations.
Extracting the nth term formula from a generating function.

6 / 33
Operations on Ordinary Generating Functions (OGF)

Theorem: If {an }n≥0 and {bn }n≥0 are sequences of real numbers with
associated ordinary generating functions A(x) and B(x) respectively, then
the following hold.
the sequence {cn }n≥0 = {an ± bn } has generating function
C (x) = A(x) ± B(x).
the sequence {cn }n≥0 = {∑nk=0 ak bn−k }n≥0 has generating function
C (x) = A(x)B(x).
the sequence {cn }n≥0 = {µan }n≥0 has generating function
C (x) = µA(x).

7 / 33
Cont’d

the sequence {cn }n≥0 with


(
an−m , n ≥ m,
cn =
0, otherwise,

has generating function C (x) = x m A(x) which shifts the sequence


either to the left or right.
the sequence {cn }n≥0 = {nan }n≥0 has generating function
d
C (x) = x dx A(x).

8 / 33
List of sequences, their generating functions and nth term

Sequence Ordinary generating function nth terms

1
1, 1, 1, 1, 1, . . . 1−x n

x
1, 2, 3, 4, 5, . . . (1−x)2
n+1

2x
2, 4, 6, 8, 10, . . . (1−x)2
2n

1+x
1, 3, 5, 7, 9, . . . (1−x)2
2n + 1

9 / 33
Cont’d

Sequence Ordinary generating function nth terms

x n(n+1)
1, 3, 6, 10, 15, . . . (1−x)3 2

2x
2, 6, 12, 20, 30, . . . (1−x)3
n(n + 1)

1+x
1, 4, 9, 16, 25, . . . (1−x)3
(n + 1)2

10 / 33
Special Sequences

In this section, we take a look at two special sequences (Pell and Fibonacci
sequences), their definitions, recurrence equations, ordinary generating
functions and closed formula.
The presentation continuous in the following order;
Pell sequence
Fibonacci sequence

11 / 33
Pell sequence

The Pell sequence was studied by an English mathematician named John


Pell in the 17th century. The following are few terms of the Pell sequence:

0, 1, 2, 5, 12, 29, . . .

12 / 33
Pell sequence

Definition: The Pell sequence is defined by the recurrence relation



p0 = 0,

p1 = 1,

pn+1 = 2pn + pn−1 .

with n ≥ 1.

13 / 33
Pell sequence

Let P(x) be the ordinary generating function for the Pell sequence such
that

P(x) = p0 + p1 x + p2 x 2 + p3 x 3 + · · ·
= ∑ pn x n .
n≥0

Applying the method of ordinary generating functions to the recurrence


equation above yields
x
P(x) = . (1)
1 − 2x − x 2

14 / 33
Pell sequence

Applying partial fractions to (1) and solving it, we arrive at


√ √
(1 + 2)n − (1 − 2)n n
P(x) = ∑ √ x .
n≥0 2 2
Extracting the coefficient of x n , we have that the nth term of the Pell
sequence is √ √
(1 + 2)n − (1 − 2)n
pn = √ , n ≥ 0.
2 2
pn is popularly known as the silver ratio.

15 / 33
Fibonacci sequence

The Fibonacci sequence is named after an Italian mathematician Leornado


Pisano of Pisa (popularly known as Fibonacci). He introduced this
sequence to the Western European mathematics in his book Liber Abaci
in 1202.
The following are the first few terms of the Fibonacci sequence;

0, 1, 1, 2, 3, 5, 8, 21, 34, . . .

16 / 33
Fibonacci sequence

Definition: The Fibonacci sequence fn is defined by the recurrence relation,



f0 = 0,

f1 = 1,

fn = fn−1 + fn−2 .

with n ≥ 1.

17 / 33
Fibonacci sequence

Let F (x) be the ordinary generating function for the Fibonacci sequence
such that

F (x) = f0 + f1 x + f2 x 2 + f3 x 3 + · · ·
= ∑ fn x n .
n≥0

Applying the method of ordinary generating functions to the recurrence


equation above yields

1
F (x) = . (2)
1 − x − x2

18 / 33
Fibonacci sequence

Applying partial fractions to (2) and solving it, we arrive at

β1n − β2n
 
P(x) = ∑ x n.
n≥0 β1 − β2

Where β1 and β2 are the roots of the polynomial 1 − x − x 2 .

19 / 33
Fibonacci sequence

Substituting the values for β1 and β2 and extracting the coefficient of x n ,


we have that the nth term of the Fibonacci sequence is
" √ !n √ !n #
1 1+ 5 1− 5
fn = √ − , n ≥ 0.
5 2 2

fn is what is popularly known as the golden ratio.

20 / 33
Problem: Lines and maximum number of regions

Now we take a problem of determining the number of sub-regions from


dividing a given plane by n lines. To ascertain the maximum number of
sub-regions from dividing the given plane by n lines, we look at two
conditions:

1 Lines must not be parallel

2 More than two lines should not pass through the same point

21 / 33
Lines and maximum number of regions

Let
n = number of lines,
r = number of maximum sub-regions.
For n = 0, there are no sub-regions.
For n = 1, r = 2 and
when n = 2, r = 4.

This is shown below

22 / 33
Lines and maximum number of regions

when n = 1, r = 2

23 / 33
Lines and maximum number of regions

2
4

when n = 2, r = 4

24 / 33
Lines and maximum number of regions

number of lines maximum number of


sub-regions
1 2
2 4
3 7
4 11
.. ..
. .
n Rn
25 / 33
Lines and maximum number of regions

From the table above, we deduce that the recurrence equation for the
sequence (maximum number of sub-regions) is

Rn = Rn−1 + n, R0 = 1. (3)
Let

R(x) = ∑ Rn x n
n≥0

be the ordinary generation function for the sequence.

26 / 33
Lines and maximum number of regions

Then we have that

∑ Rn x n = ∑ Rn−1 x n + ∑ nx n
n≥0 n≥1 n≥0
n n
∑ Rn x = 1+x ∑ Rn x + ∑ nx n
n≥0 n≥0 n≥0
x
R(x) = 1 + xR(x) +
(1 − x)2
x
R(x)[1 − x] = 1 +
(1 − x)2
1 x
R(x) = + .
1 − x (1 − x)3

27 / 33
Lines and maximum number of regions
Applying partial fractions to
x
,
(1 − x)3
We have that

x A B C
3
= + 2
+
(1 − x) 1 − x (1 − x) (1 − x)3

0 = A+B +C (4)
A=0 (5)
1 = −2A − B
=⇒ B = −1 (6)
Then substituting (5) and (6) into (4), we get C = 1.
28 / 33
Lines and maximum number of regions

Therefore,

1 1 1
R(x) = − 2
+ . (7)
1 − x (1 − x) (1 − x)3
Now using the identities

1
= ∑ x n.
1 − x n≥0
and
 
1 n+m n
=∑ x .
(1 − x)m+1 n≥0 n

29 / 33
Lines and maximum number of regions

We have that
 
1 n+1 n
=∑ x = ∑ (n + 1)x n .
(1 − x)1+1 n≥0 n n≥0

and
 
1 n+2 n (n + 2)(n + 1) n
2+1
=∑ x =∑ x .
(1 − x) n≥0 n n≥0 2

30 / 33
Lines and maximum number of regions

Thus
(n + 2)(n + 1) n
R(x) = ∑ x n − ∑ (n + 1)x n + ∑ 2
x
n≥0 n≥0 n≥0
 
(n + 2)(n + 1)
R(x) = ∑ 1 + − (n + 1) x n
n≥0 2
 
n(n + 1) n
R(x) = ∑ 1 + x .
n≥0 2

Hence the closed formula for the nth term of the sequence is

n(n + 1)
Rn = 1 + , n ≥ 0.
2

31 / 33
Thank You

32 / 33
References

[1] S. Wagner
Combinatorics
(2017), 20-30.
[2] P. Flajolet and R. Sedgewick
An introduction to Analysis of Algorithms
Addison-Wesley Professional: 90-95, 2013.

33 / 33

You might also like