Prerequisite – Generating Functions-Introduction and Prerequisites

In Set 1 we came to know basics about Generating Functions. Now we will discuss more details on Generating Functions and its applications.

**Exponential Generating Functions –**

Let e a sequence. Then its exponential generating function, denoted by is given by,

Example 1:- Let {1, 1, 1…….} be a sequence . The generating function of the sequence is

( Here =1 for all n )

Example 2:- Let be number of k permutation in an n- element set. Then the exponential generating function for the sequence is

Exponential Generating Function is used to determine number of n-permutation of a set containing repeatative elements. We will see examples later on.

**Using Generating Functions to Solve Recurrence Relations –**

Linear homogeneous recurrence relations can be solved using generating function .We will take an example here to illustrate .

Example :- Solve the linear homogeneous recurrence equation .

Given =1 and .

We use generating function to solve this problem. Let g(x) be the generating function of the sequence .

Hence g(x)=

So we get the following equations.

g(x)=

-5xg(x)=

=

Adding these 3 quantities we obtain

Now =0 for all n>1. So,

Or g(x)=

Now =(1-2x)(1-3x)

So, g(x)=

It is easy to see that

Now

And

So g(x)=

Since this is the generating function for the sequence We observe that

Thus we can solve recurrence equations using generating functions.

**Proving Identities via Generating Functions –**

Various identities also can also be proved using generating functions.Here we illustrate one of them.

**Example:** Prove that :

Here we use the generating function of the sequence i.e .

Now,

For LHS the term containing is .For RHS the term containing is . So (proved)

Links of Various examples are given below regarding generating functions.

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.

## Recommended Posts:

- Mathematics | Unimodal functions and Bimodal functions
- Discrete Maths | Generating Functions-Introduction and Prerequisites
- Mathematics | Classes (Injective, surjective, Bijective) of Functions
- Mathematics | Total number of possible functions
- Inverse functions and composition of functions
- Total Recursive Functions and Partial Recursive Functions in Automata
- Fruitful Functions and Void Functions in Julia
- Generating regular expression from Finite Automata
- Generating subarrays using recursion
- Dynamically generating a QR code using PHP
- Generating Random Numbers in Golang
- Linear Congruence method for generating Pseudo Random Numbers
- Multiplicative Congruence method for generating Pseudo Random Numbers
- Additive Congruence method for generating Pseudo Random Numbers
- Mathematics | Set Operations (Set theory)
- Mathematics | Introduction to Propositional Logic | Set 1
- Mathematics | Predicates and Quantifiers | Set 1
- Mathematics | Introduction of Set theory
- Mathematics | Predicates and Quantifiers | Set 2
- Mathematics | Introduction to Propositional Logic | Set 2

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.