Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
13 views11 pages

Maths

Uploaded by

arunadevy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views11 pages

Maths

Uploaded by

arunadevy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

ROHINI COLLEGE OF ENGINEERING AND TECHNOLOGY

2.5 Generating Function:

The generating function for the sequence “s” with terms 𝑎0 , 𝑎1 , . . . , 𝑎𝑛 of real

numbers is the infinite sum.

𝐺 (𝑥 ) = 𝐺 (𝑠, 𝑥 ) = 𝑎0 + 𝑎1 𝑥 + 𝑎2 𝑥 2 + . . . + 𝑎𝑛 𝑥 𝑛 +. ..

= ∑∞
𝑛=0 𝑎𝑛 𝑥
𝑛

For example, (i) The generating function for the sequence “𝑠” with the terms

1, 1, 1, . . . is given by


1
𝐺 (𝑥 ) = 𝐺 (𝑠, 𝑥 ) = ∑ 𝑥 𝑛 =
1−𝑥
𝑛=0

(ii) The generating function for the sequence “𝑠” with terms 1, 2, 3, 4, . . . is

given by

𝐺 (𝑥 ) = 𝐺 (𝑠, 𝑥 ) = ∑ (𝑛 + 1)𝑥 𝑛
𝑛=0

= 1 + 2𝑥 + 3𝑥 2 + . ..

= (1 − 𝑥 )−2

1
= (1−𝑥)2

Problems:

MA8351 DISCRETE MATHEMATICS


ROHINI COLLEGE OF ENGINEERING AND TECHNOLOGY

1. Write the generating function for the sequence 𝟏, 𝒂, 𝒂𝟐 , 𝒂𝟑 , 𝒂𝟒 , . ..

Solution:

Generating function 𝐺 (𝑥 ) = 1 + 𝑎 + 𝑎2 + 𝑎3 + 𝑎4 +. ..

1
= for |𝑎𝑥| < 1
1−𝑎𝑥

Solution for Recurrence Relations using Generating Functions:

Procedure for solving Recurrence Relation using Generating Function:

Step: 1 Rewrite the recurrence relation as an equation on RHS

Step: 2 Multiply the equation in step: 1 by 𝑥 𝑛 and summing it from 1 to ∞ or

(0 to ∞) or (2 to ∞)

Step: 3 Put 𝐺 (𝑥 ) = ∑∞ 𝑛
𝑛=0 𝑎𝑛 𝑥 and write 𝐺(𝑥) as a function of 𝑥.

Step: 4 Decompose 𝐺(𝑥) into partial fraction.

Step: 5 Express 𝐺(𝑥) as a sum of familiar series.

Step: 6 Express 𝑎𝑛 as the coefficient of 𝑥 𝑛 in 𝐺(𝑥).

The following table represents some sequences and their generating functions.

MA8351 DISCRETE MATHEMATICS


ROHINI COLLEGE OF ENGINEERING AND TECHNOLOGY

S. no Sequence Generating Function

1 1 1
1−𝑧

2 (−1)𝑛 1
1+𝑧

3 𝑎𝑛 1
1 − 𝑎𝑧

4 (−𝑎)𝑛 1
1 + 𝑎𝑧

5 𝑛+1 1
1 − (𝑧)2

6 𝑛 1
(1 − 𝑧)2

7 𝑛2 𝑧 (1 + 2)
(1 − 𝑧)3

8 𝑛𝑎𝑛 𝑎𝑧
(1 − 𝑧𝑎)2

1. Using generating function solve the recurrence relation 𝒂𝒏 = 𝟑𝒂𝒏−𝟏 for 𝒏 ≥

𝟏 with 𝒂𝟎 = 𝟐

Solution:

Let 𝐺 (𝑥 ) = ∑∞
𝑛=0 𝑎𝑛 𝑥
𝑛

Given 𝑎𝑛 − 3𝑎𝑛−1 = 0

MA8351 DISCRETE MATHEMATICS


ROHINI COLLEGE OF ENGINEERING AND TECHNOLOGY

Multiply the above equation by 𝑥 𝑛 and summing from 1 to ∞, we get

∞ ∞

⇒ ∑ 𝑎𝑛 𝑥 − ∑ 3𝑎𝑛−1 𝑥 𝑛 = 0
𝑛

𝑛=1 𝑛=1

∞ ∞

⇒ ∑ 𝑎𝑛 𝑥 𝑛 − 3𝑥 ∑ 3𝑎𝑛−1 𝑥 𝑛−1 = 0
𝑛=1 𝑛=1

⇒ (𝐺 (𝑥 ) − 𝑎0 ) − 3𝑥𝐺 (𝑥 ) = 0

⇒ 𝐺 (𝑥 )(1 − 3𝑥 ) = 𝑎0

⇒ 𝐺 (𝑥 )(1 − 3𝑥 ) = 2

2
⇒ 𝐺 (𝑥 ) = (1−3𝑥) = 2(1 − 3𝑥 )−1

= 2(1 + 3𝑥 + (3𝑥 )2+ . . . )

= 2 ∑∞ 𝑛 𝑛
𝑛=0 3 𝑥

Consequently, 𝑎𝑛 = 2. coefficient of 𝑥 𝑛 in 𝐺(𝑥)

𝑎𝑛 = 2 ∙ 3𝑛

2. Solve the recurrence relation 𝒂𝒏 − 𝟕𝒂𝒏−𝟏 + 𝟏𝟎𝒂𝒏−𝟐 = 𝟎 for 𝒏 ≥ 𝟐 given

that 𝒂𝟎 = 𝟏𝟎, 𝒂𝟏 = 𝟒𝟏 using generating function.

Solution:

MA8351 DISCRETE MATHEMATICS


ROHINI COLLEGE OF ENGINEERING AND TECHNOLOGY

The given recurrence relation is 𝑎𝑛 − 7𝑎𝑛−1 + 10𝑎𝑛−2 = 0

Multiply the above equation by 𝑥 𝑛 and summing from 2 to ∞, we get

∞ ∞ ∞

⇒ ∑ 𝑎𝑛 𝑥 𝑛 − 7 ∑ 𝑎𝑛−1𝑥 𝑛 + 10 ∑ 𝑎𝑛−2𝑥 𝑛 = 0
𝑛=2 𝑛=2 𝑛=2

∞ ∞ ∞

⇒ ∑ 𝑎𝑛 𝑥 𝑛 − 7𝑥 ∑ 𝑎𝑛−1 𝑥 𝑛−1 + 10𝑥 2 ∑ 𝑎𝑛−2 𝑥 𝑛−2 = 0


𝑛=2 𝑛=2 𝑛=2

⇒ [𝐺 (𝑥 ) − 𝑎0 − 𝑎1 𝑥 ] − 7𝑥 [𝐺 (𝑥 ) − 𝑎0 ] + 10𝑥 2 𝐺 (𝑥 ) = 0

⇒ 𝐺 (𝑥 ) − 10 − 41𝑥 − 7𝑥 [𝐺 (𝑥 ) − 10] + 10𝑥 2 𝐺 (𝑥 ) = 0

⇒ 𝐺 (𝑥 )(1 − 7𝑥 + 10𝑥 2 ) + 29𝑥 − 10 = 0

10−29𝑥
⇒ 𝐺 (𝑥 ) =
10𝑥 2 −7𝑥+1

10−29𝑥
⇒ 𝐺 (𝑥 ) = (1−2𝑥)(1−5𝑥)

𝐴 𝐵
⇒ 𝐺 (𝑥 ) = (1−2𝑥) + (1−5𝑥)

= 𝐴(1 − 2𝑥 )−1 + 𝐵 (1 − 5𝑥 )−1

= 𝐴[1 + 2𝑥 + (2𝑥 )2 + . . . ] + 𝐵 [1 + 5𝑥 + (5𝑥 )2+ . . . ]

= 𝐴 ∑∞ 𝑛 𝑛 ∞ 𝑛 𝑛
𝑛=2 2 𝑥 + 𝐵 ∑𝑛=2 5 𝑥

𝑎𝑛 = coefficient of 𝑥 𝑛 in 𝐺 (𝑥 )

MA8351 DISCRETE MATHEMATICS


ROHINI COLLEGE OF ENGINEERING AND TECHNOLOGY

𝑎𝑛 = 𝐴2𝑛 + 𝐵5𝑛 , 𝑛 ≥ 2 . . . (A)

Given 𝑎0 = 10, Put 𝑛 = 0 in (A), we get

⇒ 𝑎0 = 𝐴20 + 𝐵50

⇒ 10 = 𝐴 + 𝐵 . . . (1)

Given 𝑎1 = 41, Put 𝑛 = 1 in (A), we get

⇒ 𝑎1 = 𝐴21 + 𝐵51

⇒ 41 = 2𝐴 + 5𝐵 . . . (2)

Solving (1) and (2) we get 𝐴 = 3, 𝐵 = 7

Hence 𝑎𝑛 = 3 ∙ 2𝑛 + 7 ∙ 5𝑛

3. Using generating function solve the recurrence relation corresponding to

the Fibonacci sequence 𝒂𝒏 = 𝒂𝒏−𝟏 + 𝒂𝒏−𝟐 , 𝒏 ≥ 𝟐 with 𝒂𝟎 = 𝟏, 𝒂𝟏 = 𝟏

Solution:

Given recurrence relation 𝑎𝑛 − 𝑎𝑛−1 − 𝑎𝑛−2 = 0

Multiply the above recurrence relation by 𝑥 𝑛 and summing from 2 to ∞, we get

∞ ∞ ∞

⇒ ∑ 𝑎𝑛 𝑥 𝑛 − ∑ 𝑎𝑛−1𝑥 𝑛 − ∑ 𝑎𝑛−2𝑥 𝑛 = 0
𝑛=2 𝑛=2 𝑛=2

MA8351 DISCRETE MATHEMATICS


ROHINI COLLEGE OF ENGINEERING AND TECHNOLOGY

∞ ∞ ∞

⇒ ∑ 𝑎𝑛 𝑥 𝑛 − 𝑥 ∑ 𝑎𝑛−1 𝑥 𝑛−1 − 𝑥 2 ∑ 𝑎𝑛−2𝑥 𝑛−2 = 0


𝑛=2 𝑛=2 𝑛=2

⇒ [𝐺 (𝑥 ) − 𝑎0 − 𝑎1 𝑥 ] − 𝑥 [𝐺 (𝑥 ) − 𝑎0 ] − 𝑥 2 𝐺 (𝑥 ) = 0

⇒ 𝐺 (𝑥 ) − 10 − 41𝑥 − 7𝑥 [𝐺 (𝑥 ) − 10] + 10𝑥 2 𝐺 (𝑥 ) = 0

⇒ 𝐺 (𝑥 )(1 − 𝑥 − 𝑥 2 ) = 𝑎0 − 𝑎0 𝑥 + 𝑎1 𝑥

1
⇒ 𝐺 (𝑥 ) =
1−𝑥−𝑥 2

1
= 1+√5 1−√5
(1− 𝑥)(1− 2 𝑥)
2

𝐴 𝐵
= 1+√5
+ 1−√5
(1− 𝑥) (1− 𝑥)
2 2

1 𝐴 𝐵
Now = + . . . (1)
1−𝑥−𝑥 2 (1−
1+√5
𝑥) (1−
1−√5
𝑥)
2 2

1−√5 1+√5
1 = 𝐴 (1 − 𝑥) + 𝐵 (1 − 𝑥) . . . (2)
2 2

Put 𝑥 = 0 in (2)

(2) ⇒ 𝐴 + 𝐵 = 1 . . . (3)

2
Put 𝑥 = in (2)
1−√5

1+√5
(2) ⇒ 1 = 𝐵 (1 − )
1−√5

MA8351 DISCRETE MATHEMATICS


ROHINI COLLEGE OF ENGINEERING AND TECHNOLOGY

1−√5−1−√5
⇒ 1 = 𝐵( )
1−√5

−2√5
⇒ 1 = 𝐵( ) (Using B value in (3))
1−√5

1−√5
⇒𝐵=
−2√5

1
(3) ⇒ 𝐴 = (1 + √5)
2√5

Sub A and B in (1), we get

−1 −1
11 + √5 1 + √5 1 1 − √5 1 − √5
𝐺 (𝑥 ) = ( ) (1 − ( ) 𝑥) − ( ) (1 − ( ) 𝑥)
√5 2 2 √5 2 2

2
11 + √5 1 + √5 1 + √5
= ( ) [1 + 𝑥+( ) + ...]
√5 2 2 2

2
11 − √5 1 − √5 1 − √5
− ( ) [1 + 𝑥 + {( ) 𝑥} + . . . ]
√5 2 2 2

𝑎𝑛 = coefficient of 𝑥 𝑛 in 𝐺 (𝑥 )

Solving, we get

𝑛+1 𝑛+1
1 1+√5 1 1−√5
𝑎𝑛 = ( ) − ( )
√5 2 √5 2

𝟓+𝟐𝒙
4. Identify the sequence having the expression as a generating function.
𝟏−𝟒𝒙𝟐

Solution:

MA8351 DISCRETE MATHEMATICS


ROHINI COLLEGE OF ENGINEERING AND TECHNOLOGY

5+2𝑥
Given 𝐺 (𝑥 ) = . . . (1)
1−4𝑥 2

5+2𝑥
= (1+2𝑥)(1−2𝑥)

5+2𝑥 𝐴 𝐵
Now, (1+2𝑥)(1−2𝑥) = (1+2𝑥) + (1−2𝑥) . . . (2)

1
Put 𝑥 =
2

⇒ 5 + 1 = 2𝐵

⇒𝐵=3

1
Put 𝑥 = −
2

⇒ 5 − 1 = 2𝐴

⇒𝐴=2

5+2𝑥 2 3
(2) ⇒ (1+2𝑥)(1−2𝑥) = (1+2𝑥) + (1−2𝑥)

= 2(1 − 2𝑥 )−1 + 3(1 − 2𝑥 )−1

= 𝐴[1 − 2𝑥 − (2𝑥 )2+ . . . ] + 𝐵 [1 + 2𝑥 + (2𝑥 )2+ . . . ]

= 2 ∑∞ 𝑛 𝑛 𝑛 ∞ 𝑛 𝑛
𝑛=2(−1) 2 𝑥 + 3 ∑𝑛=2 2 𝑥

= 2 ∑∞ 𝑛 𝑛 ∞ 𝑛 𝑛
𝑛=2(−2) 𝑥 + 3 ∑𝑛=2 2 𝑥

The required sequence is the coefficient of 𝑥 𝑛 in 𝐺 (𝑥 )

MA8351 DISCRETE MATHEMATICS


ROHINI COLLEGE OF ENGINEERING AND TECHNOLOGY

Hence 𝑆(𝑛) = 2(−2)𝑛 + 3(2)𝑛

𝟑−𝟓𝒙
5. Identify the sequence having the expression as a generating
𝟏−𝟐𝒙−𝟑𝒙𝟐

function.

Solution:

𝟑−𝟓𝒙
Given 𝐺 (𝑥 ) = . . . (1)
𝟏−𝟐𝒙−𝟑𝒙𝟐

3−5𝑥
= (1−3𝑥)(1+𝑥)

3−5𝑥 𝐴 𝐵
Now, (1+2𝑥)(1−2𝑥) = (1−3𝑥) + (1+𝑥) . . . (2)

3 − 5𝑥 = 𝐴(1 + 𝑥 ) + 𝐵(1 − 3𝑥 )

Put 𝑥 = −1

⇒ 3 + 5 = 4𝐵

⇒𝐵=2

1
Put 𝑥 =
3

5 1
⇒ 3 − = 𝐴 (1 + )
3 3

4 4
⇒ = 𝐴
3 3

⇒𝐴=1

MA8351 DISCRETE MATHEMATICS


ROHINI COLLEGE OF ENGINEERING AND TECHNOLOGY

3−5𝑥 1 2
(2) ⇒ (1+2𝑥)(1−2𝑥) = (1−3𝑥) + (1+𝑥)

= (1 − 3𝑥 )−1 + 2(1 + 𝑥 )−1

= 𝐴[1 + 3𝑥 + (3𝑥 )2+ . . . ] + 𝐵 [1 − 𝑥 + (𝑥 )2 + . . . ]

= ∑∞ 𝑛 𝑛 ∞ 𝑛 𝑛
𝑛=2 3 𝑥 + 3 ∑𝑛=2(−1) 𝑥

The required sequence is the coefficient of 𝑥 𝑛 in 𝐺 (𝑥 )

Hence 𝑆(𝑛) = 3𝑛 + 2(−1)𝑛

MA8351 DISCRETE MATHEMATICS

You might also like