Review Problems - Solutions: Math 3152 - December 15, 2017
Review Problems - Solutions: Math 3152 - December 15, 2017
Review Problems - Solutions: Math 3152 - December 15, 2017
1. Use the binomial theorem to prove that, for all n ≥ 1 and k satisfying 0 ≤
k ≤ n,
n (
X n i 1 if k = n;
(−1)i−k =
i k 0 otherwise.
i=k
Then
hn = 2 · 3n − 2 + (−1)n .
3. (a) In how many ways can seven shifts be assigned to ten nurses, if each
nurse can take at most three shifts, and the shifts are all different?
Solution: We assume that a shift is taken by exactly one nurse. So, without the
condition that a nurse can take at most three shifts, we could choose the nurse
for each shift independently, in 107 ways total.
The actual answer is smaller. Let E be the set of assignments of a nurse to a
shift with no condition, and Ai the set of assignments for which nurse i works 4
or more shifts, for 1 ≤ i ≤ 10. We want to know the value of
10
[
|E| − Ai ,
i=1
5.
6. (a) Find the permutation of {1, 2, . . . , 6} with inversion sequence (4, 3, 2, 1, 0, 0).
Solution: 543216.
(b) Write the ordinary generating function for the number of permutations
of [6] with length n.
Solution: Same as the number of solutions to a1 + a2 + a3 + a4 + a5 + a6 = n,
where 0 ≤ ai ≤ 6 − i. So that’s
6
Y 1 − xi
(1+x+x2 +· · ·+x5 )(1+x+x2 +· · ·+x4 )(1+x+x2 +x3 )(1+x+x2 )(1+x) = .
i=1
1−x
7. Find the ordinary generating function for the number of ways to make n cents
using at most four pennies and an unlimited supply of nickels and dimes. Use
this to decide the number of ways to make 1 dollar.
Solution: Since a product of ordinary generating functions counts combinations, we
just need to multiply generating functions for the pennies, nickels, and dimes. The
generating function for at most four pennies is
1 − t5
1 + t + t2 + t3 + t4 = ,
1−t
while the generating function for the nickels (counted by value) is 1/(1 − t5 ), and
similarly 1/(1 − t10 ) for the dimes.
Multiplying, we get
1 − t5 1 1 1
= .
1 − t 1 − t5 1 − t10 (1 − t)(1 − t10 )
The number of ways to make one dollar is the coefficient of t100 . One way to find this
is just to multiply:
X X
(1 − t)−1 (1 − t10 )−1 = ( tn )( t10n ).
n≥0 n≥0
Look at the contribution from the right-hand factor. For each choice of n, 0 ≤ n ≤ 10,
there is exactly one way to choose a term from the left factor to get a t100 . Otherwise
there are none. So the number of ways to make 100 cents is 11.
8. Show that the number of partitions of size n with no repeated parts is equal
to the number of partitions with all parts of odd size. [Hint: compare o.g.f.’s]
Solution: The generating function for the number of partitions with no repeated parts
is Y
F (t) = (1 + tn ),
n≥1
by the product principle for ordinary generating functions. The generating function
for partitions with only odd parts is
Y
G(t) = (1 − t2n−1 )−1 ,
n≥1
by the same argument as we had to count all the partitions. We want to show that
F (t) = G(t). So multiply:
Y Y
F (t)G(t)−1 = (1 + tn ) (1 − t2n−1 )
n≥1 n≥1
Y 1 − t2n Y
= (1 − t2n−1 )
1 − tn
n≥1 n≥1
Y
2n
Y 1 1 Y
= 1−t · (1 − t2n−1 )
1 − t2n 1 − t2n−1
n≥1 n≥1 n≥1
= 1, since all terms cancel.
(The third line is obtained by splitting up the denominator into terms with even and
odd powers of t.) So F (t) = G(t), as required.
9. Let fn be the number of ways to make a n-letter word from the letters X, Y, Z,
with the condition that every Y is followed immediately by a Z. Find an
expression for fn in terms of n. For practice, do this two ways: find an
ordinary generating function and compute. Check your work by finding a
recurrence relation satisfied by the fn ’s and solving it.
Solution: Since the expansion of 1/(1 − S) is the formal sum of permutations of the
multiset S, we can compute the ordinary generating function
X
F (t) = fn tn
n≥0
10. Let gn be the number of ways to select a breakfast consisting of an odd number
of eggs, at most four pieces of toast, and at least one slice of bacon. Find an
ordinary generating function for the sequence {gn } and use it to compute gn
in terms of n.
Solution: A breakfast is completely determined by integers a1 , a2 , and a3 , where
0 < a1 is odd, 0 ≤ a2 ≤ 4, and a3 ≥ 1. By the product principle for ordinary
generating functions,
X
gn tn = (t + t3 + t5 + · · · )(1 + t + t2 + t3 + t4 )(t + t2 + t3 + · · · )
n≥0
t 1 − t5 t
=
1 − t2 1 − t 1 − t
t2 (t + t2 + t3 + t4 + t5 )
=
(1 − t)2 (1 + t)
9t2 + 2t − 6
= 6 + 4t + 2t2 + t3 + by long division
(1 − t)2 (1 + t)
5 1 35 1 1 1
= 6 + 4t + 2t2 + t3 + · − · + ·
2 (1 − t)2 4 1−t 4 1+t
X∞
= 6 + 4t + 2t2 + t3 + 5/2(n + 1) − 35/4 + 1/4(−1)n )tn ,
n=0
11. Show that the Stirling numbers satisfy, for each k ≥ 1, the generating function
identity
X tk
S(n, k)tn = .
(1 − t)(1 − 2t) · · · (1 − kt)
n≥0
12. How many different ways are there to label each face of a cube with an arrow
↑ , taking rotational symmetry into account? [Use Burnside’s Lemma.]
Solution: Let X be the set of labellings, without regard to symmetry, and let G be
the symmetries of the cube, permuting the elements of X. We need to compute the
number of labellings fixed by each symmetry in G.
• g = 1: every labelling is fixed by the identity permutation, of course. Each face
can be labelled in four ways, and there are six faces, so F1 = X and |X| = 46 .
• g a 90◦ rotation around a face axis: the arrow on a face that contains the axis
of symmetry can’t be sent to itself. So Fg = ∅. The same argument applies to
the 180◦ rotations around a face axis.
• If g is a vertex-rotation, recall g has two 3-cycles of faces that share a vertex.
If we choose an arrow for one of those faces, there is only one way to chose the
other two so that the arrows are sent to each other by the 120◦ rotation. There
are 2 three-cycles, so for each such g, we have |Fg | = 4 · 4.
• if g is an edge-rotation, the faces fall into three two-cycles. For each, choosing
an arrow on one face determines the arrow for the other face. [Picture?] So
|Fg | = 43 .
distinct labellings.
13. Show that the exponential generating function for the number of derange-
ments,
∞
X
Dn tn /n!,
n=0
equals
e−t
,
1−t
if we agree D0 = 1. [For maximum nutritional value, try using the product
principle, or the recurrence relation Dn = (n − 1)(Dn−1 + Dn−2 ).]
n
P
Solution: The fastest way is remember that 1/(1 − t) = n≥0 n!t /n! is the ex-
ponential generating function for the number of permutations of length n. Let
d(t) = n≥0 Dn tn /n!.
P
Let’s count the permutations by noticing that every permutation has some subset
S of fixed points, and the restriction of the permutation to the remaining elements
[n] − S is a derangement. The number of ways to let a set S be the fixed points of a
permutation is just 1, for all k = |S| ≥ 0. The e.g.f. for the sequence (1, 1, 1, . . .) is
et .
By the product principle for exponential generating functions, every permutation
is obtained by putting a derangement on a subset and making the complementary
elements fixed points, so
1
et d(t) = .
1−t
That is, d(t) = e−t /(1 − t), as required.