πŸŽ“ Computer Science & Engineering Portal

Master Engineering Disciplines with Structured Notes

Comprehensive academic lecture notes, exam-oriented unit summaries, laboratory manuals, and previous year question papers designed strictly for university students.

πŸ“‘

University Syllabi

AKTU & AICTE aligned semester guidelines.

πŸ“

Exam Question Papers

Previous 5 years solved university papers.

πŸ’‘

Lab Manuals & Viva

Practical codes with outputs & interview Qs.

Core Subjects & Units Hub

Click on any specific unit to immediately view its lecture notes below

Viewing All Lectures

Generating Functions

Generating function is a method to solve the recurrence relations.

Let us consider, the sequence a0, a1, a2....ar of real numbers. For some interval of real numbers containing zero values at t is given, the function G(t) is defined by the series
            G(t)= a0, a1t+a2 t2+β‹―+ar tr+............equation (i)

This function G(t) is called the generating function of the sequence ar.

Now, for the constant sequence 1, 1, 1, 1.....the generating function is

Generating Functions

It can be expressed as

            G(t) =(1-t)-1=1+t+t2 +t3+t4+β‹―[By binomial expansion]

Comparing, this with equation (i), we get

            a0=1,a1=1,a2=1 and so on.

For, the constant sequence 1,2,3,4,5,..the generating function is
            G(t) = Generating Functionsbecause it can be expressed as
            G(t) =(1-t)-2=1+2t+3t2 +4t3+β‹―+(r+1) tr

Comparing, this with equation (i), we get
a0=1,a1=2,a2=3,a3=4 and so on.

The generating function of Zr,(Z≠0 and Z is a constant)is given by
            G(t)= 1+Zt+Z2 t2+Z3 t3+β‹―+Zr tr
            G(t)=Generating Functions       [Assume |Zt|<1]
So,       G(t)=Generating Functions generates Zr,Zβ‰ 0

Also,If a(1)r has the generating function G1(t) and a(2)r has the generating function G2(t), then Ξ»1 a(1)r+Ξ»2 a(2)r has the generating function Ξ»1 G1(t)+ Ξ»2 G2(t). Here Ξ»1 and Ξ»2 are constants.

Application Areas:

Generating functions can be used for the following purposes -

  • For solving recurrence relations
  • For proving some of the combinatorial identities
  • For finding asymptotic formulae for terms of sequences

Example: Solve the recurrence relation ar+2-3ar+1+2ar=0

By the method of generating functions with the initial conditions a0=2 and a1=3.

Solution: Let us assume that

Generating Functions

Multiply equation (i) by tr and summing from r = 0 to ∞, we have

Generating Functions

(a2+a3 t+a4 t2+β‹―)-3(a1+a2 t+a3 t2+β‹―)+2(a0+a1 t+a2 t2+β‹―)=0
     [∴ G(t)=a0+a1 t+a2 t2+β‹―]

Generating Functions +2G(t)=0............equation (ii)

Now, put a0=2 and a1=3 in equation (ii) and solving, we get

Generating Functions

Put t=1 on both sides of equation (iii) to find A. Hence
            -1=- A       ∴ A = 1

Put t=Generating Functions on both sides of equation (iii) to find B. Hence
            Generating Functions=Generating Functions B       ∴ B = 1

Thus G (t) = Generating Functions.Hence,ar=1+2r.

Labels: ,

Discussion & Queries (<$I18NNumComments$>):

<$CommentPager$>
<$I18NAtCommentTimeWithPermalink$>, <$I18NCommentAuthorSaid$>

<$BlogCommentBody$>

<$BlogCommentDeleteIcon$>
<$CommentPager$>