CSCE 222 Lecture 24

From Notes
Jump to navigation Jump to search

« previous | Monday, April 4, 2011 | next »


Generating Functions (cont'd)

For A={1,…,1⏟n+1,0,0,…}, the generating function is truncated form of a geometric series:

∑k=0nxk=1+x+…+xn=1−xn+11−x

Now use what we learned in calculus:

G(x) ak
(1+x)n=∑k=0n(nk)xk=1+(n1)x+(n2)x2+…+xn (nk)
(1+ax)n=∑k=0n(nk)akxk=1+(n1)ax+(n2)a2x2+…+anxn (nk)ak
(1+xr)n=∑k=0n(nk)xrk=1+(n1)xr+(n2)x2r+…+xrn (nkr) if r divides k; 0 otherwise.
1−xn+11−x=∑k=0nxk=1+x+x2+…+xn 1 if k≤n; 0 otherwise
11−x=∑k=0∞xk=1+x+x2+… 1
11−ax=∑k=0∞akxk=1+ax+a2x2+… ak
11−xr=∑k=0∞xrk=1+xr+x2r+… 1 if r divides k; 0 otherwise
1(1−x)2=∑k=0∞(k+1)xk=1+2x+3x2+… k+1
1(1−x)n=∑k=0∞(n+k−1k)xk=1+(n1)x+(n+12)x2+… (n+k−1k)=(n+k−1n−1)
1(1+x)n=∑k=0∞(n+k−1k)(−1)kxk=1−(n1)x+(n+12)x2−… (−1)k(n+k−1k)=(−1)k(n+k−1n−1)
1(1−ax)n=∑k=0∞(n+k−1k)akxk=1+(n1)ax+(n+12)a2x2+… (n+k−1k)ak=(n+k−1n−1)ak
ex=∑k=0∞xkk!=1+x+x22!+x33!+… 1k!
ln⁡(1+x)=∑k=0∞(−1)k+1kxk=x−x22+x33−x44+… (−1)k+1k

Example

A={1,1,12!,13!,…} has a generating function of:

∑k=0∞xkk!=ex


Extended Binomial Coefficient

(−nr)=(−1)r(n+r−1r)

Therefore

  1. (1+x)−n=∑k=0∞(−nk)xk=∑k=0∞(−1)k(n+k−1k)xk
  2. (1−x)−n=∑k=0∞(n+k−1k)xk


Applications of Generating Functions

Used to find the number of r-combinations from a set with n elements where repetitions are allowed.

Example

Let A=(a0,a1,…) be a sequence (repetition allowed) with ar r-combintations.

G(x)=∑k=0∞akxk

Since we can select any number of a particular element of the set when repetitions are allowed. Each element contributes (1+x+x2+…) to the product expansion of G(x):

G(x)=(1+x+x2+…)n=1(1−x)n=(1−x)−n=∑k=0∞(n+k−1k)xk

Example

Proposition. ∑k=0∞(nk)2=(2nn)

Proof. Since (2nn) is the coefficient of xn in (1+x)2n, it must coincide with the coefficient of xn in (1+x)n(1+x)n=[(n0)+(n1)x+…+(nn)xn]2.

(n0)(nn)+(n1)(nn−1)+…+(nn)(n0)

is the coefficient of

xn

in

(1+x)n(1+x)n

, so the proposition must be true since

(nk)=(nn−k)

.

Q.E.D.