


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



Ordinary Generating Functions
The ordinary generating function (OGF) for a series ¡a¿ of complex numbers is the formal power series
n=0 anxn.^ When^ an^ counts the objects in a universe^ A for which an index parameter X has value n, we say that the generating function is indexed by X.
n=0 2 nxn, which is indexed by length of binary lists.
∑n k=
(n k
xk, is indexed by size of subsets of [n]. Given two formal power series
n=0 anxn^ and^
n=0 bnxn, the sum and product (or convolution) is defined as follows, respectively:
sum :
n=
(an + bn)xn, product :
n=
( ∑n j=
aj bn−j
xn.
Define A(x)−^1 to be B(x) such that A(x)B(x) = 1 = 1x^0 + 0x^1 + 0x^2 +.. .. Then we may show that A(x) has a multiplication inverse if [x^0 ]A(x) 6 = 0. Examples: (1) Multisets from two types of objects. the OGF is ∑^ ∞
k=
(k + 1)xk^ = (
k=
xk)^2.
(2) Multisets (selections with repetition. let dk be the number of multisets of size k from n types of objects. Then the OGF is ∑
k≥ 0
dkxk^ = (
k≥ 0
xk)n^ =
k≥ 0
k + n − 1 n − 1
xk.
(3) Multisets with restricted multiplicities. When S is the set of multiplicities al- lowed for a type of objects, the generating function for that factor is
k∈S x k.
k≥ 0 x k (^) = (1 − x)− (^1).
1
In how many ways can one pick 20 coins that are pennies, nickels, or dimes, with at least three nickels and at most four dimes.
Solution: the number is [x^20 ](1 − x)−^1 (x^3 + x^4 +.. .)(1 + x + x^2 + x^3 + x^4 ).
We may operate on the OGFs and on the expansions without losing equality. This may allow us to use OGF to prove something pleasantly. Some basic propositions: (1) shifting the index. ∑
k≥ 0
k r
xk^ =
k≥r
xk^ =
k≥ 0
k + r r
xk+r^ = xr (1 − x)r+^
Let A, B, C be are the OGFs for < a >, < b >, < c >, respectively, then (2) cn = an + bn for all n if and only if C(x) = A(x) + B(x). (3) cn = ∑n i=0 aibn−i^ for all^ n^ iff^ C(x) =^ A(x)B(x).
(4) bn =
an−k, for n ≥ k 0 , for n < k
if and only if B(x) = xkA(x).
(5) cn =
∑n i=0 ai^ for all^ i^ if and only if^ C(x) =^
A(x) 1 −x.
(6) bn =
an for n even 0 for n odd
if and only if B(x) = 0.5(A(x) + A(−x)).
(7) bn =
0 , for n even an, for n odd
if and only if B(x) = 0.5(A(x) − A(−x)).
(8) bn =
ak, for n = mk 0 , otherwise
if and only if B(x) = A(xm).
(9) bn = nan if and only if B(x) = xA′(x).
Examples:
k
(n k
= n 2 n−^1. The sum is the value at x = 1 after differentiating
∑ (n k
xk.
∑ (n 2 i
The sum is the value at x = 1 of
∑ (n 2 i
x^2 i.
k≥ 0 k m. Consider
k≥ 0 k mxk.
∑r k=
(m k
)( (^) n r−k
The convolution of ak =
(m k
and bk =
(n k
n≥ 1
anxn^ =
n≥ 1
an− 1 xn^ +
n≥ 1
nxn.
Let A(x) =
n≥ 0 anx n, then ∑ n≥ 1 anx n (^) = A(x) − 1 and ∑ n≥ 1 an−^1 x n (^) = xA(x). Note that
n≥ 1 nx n (^) = x ∑ n≥ 1 nx n− (^1) = x d dx (
n≥ 0 x n) = x d dx ((1−x)
Therefore A(x) − 1 = xA(x) + x(1 − x)−^2 , and A(x) = (1 − x)−^1 + x(1 − x)−^3. We get an = [xn]A(x).
k=
k + n − 1 n − 1
xk.
Q(x) = 1 − c 1 x − c 2 x^2 −... − ckxk^ =
∏^ r
i=
(1 − αix)di^.
Then the following are equivalent for a sequence < a >. (1) < a > satisfies the recurrence an = c 1 an− 1 +... + ckan−k for n ≥ k. (2) < a > has generating function P (x)/Q(x) for some polynomial P of degree less than k. (3) < a > has generating function
∑r i=1 Fi(x)(1^ −^ αix) −di (^) , where each Fi is a polynomial of degree less than di. (4) an for n ≥ 0 is given by the formula an =
∑r i=1 Pi(n)α n i , where each^ Pi^ is a polynomial of degree less than di.
(2) Solve an = 5an− 1 − 6 an− 2 + 2n^2 − n + 2n^ for n ≥ 2, with a 0 = a 1 = 1.
(3) Solve an =
∑n k=1 ak−^1 an−k^ for^ n^ ≥^ 1, with^ a^0 = 1.