Mathematics for Computer Science

(avery) #1

15.2. Counting with Generating Functions 631


xnin the productA.x/B.x/is the sum of all the coefficients of the terms on this
diagonal, namely, (15.7). The sequence of coefficients of the productA.x/B.x/
is called theconvolutionof the sequences.a 0 ;a 1 ;a 2 ;:::/and.b 0 ;b 1 ;b 2 ;:::/. In
addition to their algebraic role, convolutions of sequences play a prominent role in
signal processing and control theory.
This Product Rule provides the algebraic justification for the fact that a geometric
series equals1=.1x/regardless of convergence. Specifically, the constant 1
describes the generating function


1 D 1 C0xC0x^2 CC0xnC:

Likewise, the expression 1 xdescribes the generating function


1 xD 1 C.1/xC0x^2 CC0xnC:

So for the seriesG.x/whose coefficients are all equal to 1, the Product Rule implies
in a purely formal way that


.1x/G.x/D 1 C0xC0x^2 CC0xnCD1:

In other words, under the Product Rule, the geometric seriesG.x/is the multiplica-
tive inverse,1=.1x/, of 1 x.
Similar reasoning justifies multiplying a generating function by a constant term
by term. That is, a special case of the Product Rule is the


Rule(Constant Factor).For any constant,c, and generating function,F.x/,


Œxnç.cF.x//DcŒxnçF.x/: (15.9)

15.2.3 The Convolution Rule


We can summarize the discussion above with the


Rule(Convolution).LetA.x/be the generating function for selecting items from
a setA, and letB.x/be the generating function for selecting items from a setB
disjoint fromA. The generating function for selecting items from the unionA[B
is the productA.x/B.x/.


The Rule depends on a precise definition of what “selecting items from the union
A[B” means. Informally, the idea is that the restrictions on the selection of items
from setsAandBcarry over to selecting items fromA[B.^1


(^1) Formally, the Convolution Rule applies when there is a bijection betweenn-element selections
fromA[Band ordered pairs of selections from the setsAandBcontaining a total ofnelements.
We think the informal statement is clear enough.

Free download pdf