Professional Documents
Culture Documents
Equations
Department of Mathematics
University of Ghana
Romeo Joe Amoako (10710167) OGF and Recurrence Equations September 21, 2023. 1 / 33
Introduction
2 / 33
Aim
3 / 33
Ordinary Generating Function (OGF)
A(x) = a0 + a1 x + a2 x 2 + a3 x 3 + a4 x 4 + a5 x 5 + · · ·
= ∑ an x n .
n≥0
4 / 33
Example
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)
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
8 / 33
List of sequences, their generating functions and nth term
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
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
0, 1, 2, 5, 12, 29, . . .
12 / 33
Pell sequence
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
14 / 33
Pell sequence
15 / 33
Fibonacci sequence
0, 1, 1, 2, 3, 5, 8, 21, 34, . . .
16 / 33
Fibonacci sequence
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
1
F (x) = . (2)
1 − x − x2
18 / 33
Fibonacci sequence
β1n − β2n
P(x) = ∑ x n.
n≥0 β1 − β2
19 / 33
Fibonacci sequence
20 / 33
Problem: Lines and maximum number of regions
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.
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
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
26 / 33
Lines and maximum number of regions
∑ 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