这是台湾清华赵启超教授离散数学14A14B课程的笔记。
Generating Functions
Def
Given a sequence a0,a1,a2,…,an,…, the generating function for this sequence is defined by
A(x)=a0+a1x+a2x2+…+anxn+…=n≥0∑anxn
Remark:
- A(x)=∑n≥0anxn is a "formal" power series.
- We ignore the convergence issuses of A(x).
- A(z)=∑n≥0anz−n is usually called the z transform of {an}
Example 1
Find the generating function for an=(mn),n=0,1,…,m. A(x)=∑n=0manxn=∑n=0m(mn)xn=(1+x)m
DEF
The formal derivative of A(x)=∑n≥0anxn is defined as A′(x)=∑n≥1nanxn−1
Remark: The usual rules for derivatives still hold for formal derivatives.
Example 2
an=nλn,n≥0 Find the corresponding generating function.
A(x)=0+λx+2λ2x2+3λ3x3+…
consider B(x)=1+λx+λ2x2+λ3x3+…
so B′(x)=λ+2λ2x+3λ3x2+…
therefore A(x)=xB′(x)
since B(x)=1−λx1,B′(x)=(1−λx)2λ
∴A(x)=(1−λx)2λx