Lec 08
Lec 08
Lec 08
?
Nitin Saxena
IIT Kanpur
We got the second equality by putting c1 = √1 α and c2 = − √15 β. The final expression gives us an explicit
5
formula for the Fibonacci sequence,
1
Fn = √ (αn+1 − β n+1 ) .
5
This is actually a very strong method and can be used for solving linear recurrences of the kind, Sn =
a1 Sn−1 + · · · + ak Sn−k . Here k, a1 , a2 , · · · , ak are constants. Suppose φ(t) is the recurrence for Sn , then by
the above method,
b1 + b2 t + · · · + bk tk−1 c1 ck
φ(t) = = + ··· + .
1 − a1 t − a2 t2 − · · · − ak tk 1 − α1 t 1 − αk t
Where α1 , · · · , αk are the roots (assumed distinct) of polynomial xk − a1 xk−1 − · · · − ak = 0 (replace t
by x1 ). This is known as the characteristic polynomial of the recurrence.
Note 1. For a linear recurrence if Fn and Gn are solutions then their linear combinations aFn + bGn are
also solutions. For a k term recurrence, the possible solutions are α1n , · · · , αkn and their linear combinations
(where α1 , · · · , αk are roots of the characteristic polynomial). The coefficients of the linear combination are
fixed by the initial conditions.
Exercise 4. What happens when the characteristic polynomial has repeated roots?
Use the power series for (1 − αt)−d .
?
Edited from Rajat Mittal’s notes.
2 Exponential generating function
What do we do when the recurrence is non-linear ? We will now see some related methods.
A permutation is called an involution if all cycles1 in the permutation are of length 1 or 2. We are
interested in counting the total number of involutions of {1, 2, · · · , n}, call that I(n). Eg. I(0) = I(1) = 1,
I(2) = 2.
There can be two cases.
1. The number n maps to itself. This case will give rise to I(n − 1) involutions.
2. The number n maps to another number i. There are n − 1 choices of i and then we can pick an involution
for remaining n − 2 numbers in I(n − 2) ways.
By this argument, we get a simple recurrence,
In the case of involutions, the regular generating function will not be of much help. We define exponential
generating function for the sequence I(n) to be,
X I(k)tk
θ(t) := .
k!
k≥0
d X I(k)tk−1
θ(t) = (formal differentiation) (1)
dt (k − 1)!
k≥1
X I(k − 1)tk−1 X (k − 1) · I(k − 2) · tk−1
= + (recurrence relation) (2)
(k − 1)! (k − 1)!
k≥1 k≥1
X I(k − 2)tk−2
= θ(t) + t (second term’s first entry is zero) (3)
(k − 2)!
k≥2
2
This transforms into the differential equation,
d
log θ(t) = 1 + t .
dt
We can solve this, as,
t2
θ(t) = et+ 2 +c .
Comparing the constant coefficient, we get c = 0 (since I(0) = 1). Thus,
t2
θ(t) = et+ 2 .
Note 3. Again we should notice that the power series we are considering are not shown to be well behaved
(convergence etc.). But there is a justification for being able to differentiate and do other formal operations
on them; the details are outside the scope of this course.
References
1. P. J. Cameron. Combinatorics: Topics, Techniques and Algorithms. Cambridge University Press, 1994.
2. K. H. Rosen. Discrete Mathematics and Its Applications. McGraw-Hill, 1999.