Generatingqqeetwbaxahsksfsxshsjsdsgs.pptx

asta9578 6 views 9 slides Jun 21, 2024
Slide 1
Slide 1 of 9
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9

About This Presentation

It is about tshsjakavksgslafah chhinno zubair subimal nikaal kahini d ball karunanidhi jelly jannat sivak kanjusi jainal kushal jaijayakar duck kaumudi s musi jannatul jainal jainal jannatul


Slide Content

recurrence relation using generating function M CHARAN RAJU 22911A0529 CSE-A

GENERATING FUNCTIONS A generating function for a sequence {an} is a formal power series of the form f(x) = a0 + a1x + a2x^2 + a3x^3 + ... . anx^n It encodes the entire sequence into a single function, allowing us to perform algebraic operations on it. Different types of generating functions, such as ordinary generating functions and exponential generating functions, can be used depending on the problem.

Example: What sequence is represented by the generating series 3+8x^2+x^3+x^5/7+100x^6+⋯?  We just read off the coefficients of each x^n term. So a0=3 since the coefficient of x^0 is 3 (x0=1 so this is the constant term).  What is a1?  It is NOT 8, since 8 is the coefficient of x^2, so 8 is the term a2 of the sequence.  To find a1 we need to look for the coefficient of x^1 which in this case is 0. So a1=0. Continuing, we have a0=3,a1=0,a2=8, a3=1, a4=0, a5=1/7,a6=100  So we have the sequence3,0,8,1,1/7,100,-

T h e fol l o w ing table r e p r esents some sequ ences and their generating functions. 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

SOL U TION OF RECURR E N C E RE LATI O NS USING GENER A T I N G FUNCTIONS Once we have the generating function, we can solve the recurrence relation by manipulating the function. We can perform operations such as differentiation, integration, and substitution to simplify the generating function. By finding the coefficients of the resulting power series, we can obtain the closed-form solution for the sequence.

Procedure for solving recurrence relation using generating function Step 1: Rewrite the recurrence relation as an equation with on RHS Step2: Multiply the equation obtained in step 1 by 𝑥 𝑛 and summing it from 1 to ∞ (or to ∞ ) or (2 to ∞ ) Step 3: Put 𝐺 ( 𝑥 ) = 𝐺 ( 𝑠, 𝑥 ) = ∑ ∞ 𝑎 𝑛 𝑥 𝑛 and write 𝐺 ( 𝑥 ) as a function of 𝑥 𝑛=0 Step 4: Decompose 𝐺 ( 𝑥 ) into partial fraction Step 5: Express 𝐺 ( 𝑥 ) as a sum of familiar series Step 6: Express 𝑎 𝑛 as the coefficient of 𝑥 𝑛 in 𝐺 ( 𝑥 )

Example G(x) = ∑ ∞ 𝑎 𝑛 𝑥 𝑛 𝑛 = Be t h e g en e rat i n g func t ion of the sequ en c e { 𝑎 𝑛 } Given recurrence relation can be written as 𝑎 𝑛 -3 a 𝑎 𝑛 − 1 = Multiplying the above equation by 𝑥 𝑛 and summing from 1 to ∞ , we get 𝑛 = 1 𝑎 𝑛 𝑥 𝑛 3𝑎 𝑛−1 ⟹ ∑ ∞ – ∑ ∞ 𝑛 = 1 𝑥 𝑛 = Using generating function, solve the recurrence relation 𝑎 𝑛 = 3𝑎 𝑛−1 for 𝑛 ≥ 1 with 𝑎 =2. Solution: Let

𝑛 𝑥 𝑛 − 3 𝑥 ⟹ ∑ ∞ 𝑎 𝑛 = 1 ∑ ∞ 𝑎 𝑛−1 𝑥 𝑛 −1 =0 𝑛 = 1 ⟹ (G(x)- 𝑎 )-3x G(x) =0 ⟹ G(x) (1-3x) = 𝑎 G(x) (1-3x) =2 [ ∴ Given 𝑎 =2] G(x) ⟹ 2 1 − 3 𝑥 = 2 1 − 3𝑥 −1 ⟹ 2(1+3x + (3 𝑥 ) 2 + . . . . . . ..) G(x) ⟹ 2 ∑ ∞ 𝑛 = 3 𝑛 𝑥 𝑛 Consequen t l y , 𝑎 𝑛 = 2 . 𝑐 𝑜 𝑒 𝑓𝑓 𝑖 𝑐 𝑖𝑒 𝑛 𝑡 𝑜 𝑓 𝑥 𝑛 in G ( x) 𝑎 𝑛 = 2. 3 𝑛

Recurrence relations can be solved using generating functions, which allow us to manipulate sequences algebraically. Generating functions provide a powerful tool for solving complex recurrence relations. By finding the generating function, we can obtain closed-form solutions for sequences and gain insights into their behavior. Conclusion