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,,1n+1,0,0,}, the generating function is truncated form of a geometric series:

k=0nxk=1+x++xn=1xn+11x

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.
1xn+11x=k=0nxk=1+x+x2++xn 1 if kn; 0 otherwise
11x=k=0xk=1+x+x2+ 1
11ax=k=0akxk=1+ax+a2x2+ ak
11xr=k=0xrk=1+xr+x2r+ 1 if r divides k; 0 otherwise
1(1x)2=k=0(k+1)xk=1+2x+3x2+ k+1
1(1x)n=k=0(n+k1k)xk=1+(n1)x+(n+12)x2+ (n+k1k)=(n+k1n1)
1(1+x)n=k=0(n+k1k)(1)kxk=1(n1)x+(n+12)x2 (1)k(n+k1k)=(1)k(n+k1n1)
1(1ax)n=k=0(n+k1k)akxk=1+(n1)ax+(n+12)a2x2+ (n+k1k)ak=(n+k1n1)ak
ex=k=0xkk!=1+x+x22!+x33!+ 1k!
ln(1+x)=k=0(1)k+1kxk=xx22+x33x44+ (1)k+1k

Example

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

k=0xkk!=ex


Extended Binomial Coefficient

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

Therefore

  1. (1+x)n=k=0(nk)xk=k=0(1)k(n+k1k)xk
  2. (1x)n=k=0(n+k1k)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=0akxk

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(1x)n=(1x)n=k=0(n+k1k)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)(nn1)++(nn)(n0)

is the coefficient of

xn

in

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

, so the proposition must be true since

(nk)=(nnk)

.

Q.E.D.