Download presentation
Presentation is loading. Please wait.
1
Generating Functions II
Great Theoretical Ideas In Computer Science S. Rudich V. Adamchik CS Spring 2006 Lecture 14 Mar 02, 2006 Carnegie Mellon University Generating Functions II
2
What is a closed form the Fibonacci power series?
F0=0, F1=1, Fn=Fn-1+Fn-2 for n2 What is a closed form the Fibonacci power series?
3
T0=1, T1=1, Tn = T0 Tn-1 + T1 Tn-2+…+Tn-1 T0 Counting binary trees
4
Solving with Generating Functions
ak = ak-1 + ak-2 , kr2 a0=0, a1=1 We assume that f(x) is a generating function
5
ak = ak-1 + ak-2 , kr2 What are the generating functions for sequences ak, ak-1, ak-2 when k = 2, 3, 4,… ?
6
What is the generating function for ak , k = 2,3, … ?
7
What is the generating function for ak-1, k = 2,3, … ?
8
What is the generating function for ak-2, k = 0, 1, 2, … ?
9
Solving with Generating Functions
ak = ak-1 + ak-2 , k>1 a0=0, a1=1 In terms of generating functions
10
ak = ak-1 + ak-2
12
Simple Transformations
If f(x) is a generating function for ak, then ak-1 -> x f(x) ak-2 -> x2 f(x)
13
Find a GF for a0=2, a1=4,a2=31 an=4an-1+3an-2-18an-3
14
T0=1, T1=1, Tn = T0 Tn-1 + T1 Tn-2+…+Tn-1 T0 Counting binary trees
15
T0=1, T1=1, Tn = T0 Tn-1 + T1 Tn-2+…+Tn-1 T0
Let f(x) be a generating function Then summing-up the above recurrence, yields
16
Power series multiplication
Let us multiply formal power series p(x) = a0 + a1 x + a2 x2 + … q(x) = b0 + b1x + b2 x2 + … p(x)q(x) = a0b0 + (a0b1+a1b0) x + (a0b2+a1b1+a2b0) x2 +…
17
Power series multiplication
If then
18
T0=1, T1=1, Tn = T0 Tn-1 + T1 Tn-2+…+Tn-1 T0
19
T0=1, T1=1, Tn = T0 Tn-1 + T1 Tn-2+…+Tn-1 T0
20
Counting Binary Trees
21
Applying some calculus…
Catalan Numbers
22
Newton’s Binomial Theorem
24
Newton’s Binomial Theorem
25
Use generating functions to show that
Proving Identities Use generating functions to show that
26
Consider the right hand side
27
Use the binomial theorem to obtain
What is the coefficient by xn?
28
Study Bee Solving recurrences via GFs Power series manipulations
Proving identities via GFs Study Bee
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.