0% found this document useful (0 votes)
4 views4 pages

MATH3U03 Lecture20

The document contains lecture notes on power series representations and generating functions in mathematics. It includes examples of finding power series, applying them to combinatorial problems, and using generating functions to solve counting problems such as making change and forming words under specific conditions. The notes emphasize the utility of computers in performing complex calculations related to these topics.

Uploaded by

suxinyan20010722
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views4 pages

MATH3U03 Lecture20

The document contains lecture notes on power series representations and generating functions in mathematics. It includes examples of finding power series, applying them to combinatorial problems, and using generating functions to solve counting problems such as making change and forming words under specific conditions. The notes emphasize the utility of computers in performing complex calculations related to these topics.

Uploaded by

suxinyan20010722
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Alexandre Zotine MATH3U03 Course Notes

Lecture 20 (Wednesday, October 30)


(§5.2, 5.3 in book)

Example 1. Find a power series representation for


4
.
15x2 − 8x + 1

Solution. The denominator factors as (1 − 3x)(1 − 5x). Hence there is a partial fraction
decomposition

4 A B A(1 − 5x) + B(1 − 3x)


= + = .
15x2 − 8x + 1 1 − 3x 1 − 5x 15x2 − 8x + 1
Plugging in x = 1/5, we get that 2B/5 = 4, and hence B = 10. Plugging in x = 1/3, we get
that −2A/3 = 4, so A = −6. This gives us
4 −6 10
= +
15x2 − 8x + 1 1 − 3x 1 − 5x
X
= (10 · 5n − 6 · 3n )xn .
n≥0

We can also obtain new power series using algebra and composition.

Proposition 2. For power series f (x) = n≥0 fn xn and g(x) = n≥0 fn xn we have
P P

n
!
X X
f (x)g(x) = fk gn−k xn .
n≥0 k=0

Example 3. Let f (x) = n≥0 fn xn with f0 ∈ R>0 . Find the first three coefficients of the
P
p
power series for f (x).
p
Solution. Let f (x) = n≥0 gn xn . Using the proposition, we have that
P

n
!
p p X X
f (x) f (x) = gk gn−k xn .
n≥0 k=0

Now we can compare coefficients. The coefficient of x0 is


p
[x0 ]( f (x))2 = g02 = f0 = [x0 ]f (x),

so g0 = f0 . The coefficient of x1 is
p
[x1 ]( f (x))2 = g0 g1 + g1 g0 = f1 = [x1 ]f (x),

1
Alexandre Zotine MATH3U03 Course Notes

f1 f1
so g1 = 2g0
= √
2 f0
. Finally, the coefficient of x2 is
p
[x2 ]( f (x))2 = g0 g2 + g12 + g2 g0 = f2 = [x2 ]f (x),

so we get
f2 − g12 f2 f12
g2 = = √ − . △
2g0 2 f0 4f03/2

This example is general. It now tells us for any power series, the coefficients of the square
1
root are given in this way. This means we can construct the power series for √1−x . The first
few coefficients are
1 3 5 35 63
1, , , , , ,··· .
2 8 16 128 256

Application to Counting Problems


As mentioned earlier, generating functions help us to solve combinatorial problems.

Example 4. How many ways are there to make change for a dollar using nickels, dimes,
and quarters?
Solution. We could just count this directly using the Addition principle to break into cases.
Zero quarters, one quarter, etc.... But it gets tedious rather quickly. What we want to do
instead is encode this problem into a generating function. Let cn be thePnumber of ways to
make change for n cents using nickels, dimes, and quarters. If c(x) = n≥0 cn xn , then can
we find a generating function for this? The idea is simple, we take products of geometric
series. The claim is that

c(x) = (1 + x5 + x10 + x15 + x20 + · · · ) (1 + x10 + x20 + · · · ) (1 + x25 + x50 + · · · ),


| {z }| {z }| {z }
nickels dimes quarters

because in order to obtain the coefficient for, say x20 , we need to choose monomials out
of these factors whose exponents sum to 20. Each such choice determines a method of
making change. For instance, picking x10 from the first and second factor is saying to
use two nickels and one dime. Picking x20 from the first factor is four nickels, etc.. So
c(x) = (1−x5 )(1−x110 )(1−x25 ) .
Okay, so this rephrased the problem. Now we want to know how to obtain the coefficient
of x100 in c(x) = (1−x5 )(1−x110 )(1−x25 ) . So either we can multiply these out, or, we can use
Taylor’s theorem to get that

c(100) (0)
[x100 ]c(x) = .
100!
Which... Seems kind of difficult to compute. And it is, by hand! But computers are great
at this kind of thing. In particular, we can use mathematical software like Wolfram Alpha,
Maple, Matlab, Macaulay2, SageMath, Magma to compute this (recommend SageMath,
Wolfram Alpha, Maple, in that order [the first two are free]). By inputting the command in
to Wolfram Alpha (you can literally copy-paste this)

2
Alexandre Zotine MATH3U03 Course Notes

series for \frac{1}{(1-x^5)(1-x^{10})(1-x^{25})} to order 100 at x = 0

we get

1 + x5 + 2x10 + 2x15 + 3x20 + 4x25 + 5x30 + 6x35 + 7x40 + 8x45 + 10x50 + 11x55
+ 13x60 + 14x65 + 16x70 + 18x75 + 20x80 + 22x85 + 24x90 + 26x95 + 29x100 + · · · .

In particular, we have that there are 29 ways to make change for a dollar. △

Obviously on exams you won’t have access to a computer, but it’s worth pointing out
how valuable this is as a technique. Computers are wicked fast when it comes to these
computations. Here we phrased a combinatorial problem in terms of generating functions
and the computer is able to do the computation without us having to think about the
various different cases. Implicitly, it somehow is taking those cases into account, but this
is an automated procedure. It’s a general purpose method that applies for many problems,
which is kind of nuts!

Remark 5. This problem in particular is actually secretly counting the number of integer
partitions of n having parts equal to 5, 10, or 25. What if we wanted p(n)? In fact, the
generating function for p(n) is
X
p(n)xn = (1 + x + x2 + x3 + · · · )(1 + x2 + x4 + x6 + · · · )(1 + x3 + x6 + x9 + · · · ) · · ·
n≥0

Y 1
= .
k=1
1 − xk

I mentioned earlier that there is no closed form formula for p(n). This perhaps motivates
why, although it also nevertheless gives us a means to compute the number. We can truncate
this infinite product and drop it into a computer, and it will spit out the numbers for us.
This is actually how it’s done in practice!

Here’s a twist on the problem above.

Example 6. A clothing store sells socks for $5, shirts for $10, and jackets for $25. How
many ways can one spend at most $50 at the store?
Solution. Just like before, the generating function gives us the number of ways to spend
exactly n dollars. So, we just need to sum the coefficients from n = 0 to n = 50. Luckily,
the power series makes this easy! We truncate our polynomial, and then plug in x = 1. This
gives us 49 total ways. △

We can take some complicated instructions and use them to translate into a generating
function.

Example 7. Find the number of unordered ten letter words from the alphabet {a, b, c, d}
that satisfy the following:

(i) If a is used, then it is used four times,

3
Alexandre Zotine MATH3U03 Course Notes

(ii) b appears an even number of times,

(iii) c appears at least three times,

(iv) d appears no more than five times.

Solution. We just need to translate these each into a generating function, and take the
product.

(i) (1 + x4 ) since we either don’t use as, or use four.

(ii) (1 + x2 + x4 + x6 + · · · ), since we use an even number of bs.

(iii) (x3 + x4 + x5 + x6 + · · · ), since there are at least three cs.

(iv) (1 + x + x2 + x3 + x4 + x5 ), since there are at most five ds.

Hence the generating function is

1 x3
(1 + x4 ) (1 + x + x2 + x3 + x4 + x5 ).
1 − x2 1 − x
We can plug into a computer algebra system to solve for the x10 coefficient which turns out
to be 24. △

You might also like