Solutions

Math 3012 H: Applied Combinatorics, Spring 2015
Solutions to Homework 4
Problem 1. Let m and n be positive integers and n > 10m. Using the inclusionexclusion principle, find a formula for the number of distributions of n identical
(unlabeled) balls into m distinguishable (labeled) bins with the property that none
of the bins has exactly 10 balls in it (i.e. any non-negative number of balls other
than 10 is allowed in each bin). Write your final answer in the form of a single sum
ranging from 0 to m.
Solution. Label the bins as 1, 2, . . . , m. Let X denote the set of all distributions
of n identical balls into the bins 1, 2, . . . , m. For i ∈ {1, 2, . . . , m}, let Ai denote
the set of such distributions in which exactly 10 balls go to the bin with label i.
The task is to compute the number of distributions such that none of the bins gets
exactly 10 balls, that is, to compute the size of X − (A1 ∪ A2 ∪ · · · ∪ Am ). By the
inclusion-exclusion formula, we have
\ m
[
X
|I| X −
Ai =
(−1) Ai ,
i=1
where, by convention,
T
i∈∅ Ai
I⊆{1,2,...,m}
i∈I
= X.
T
Let I ⊆ {1, 2, . . . , m} and k = |I|. What is i∈I Ai ? It is the set of distributions
such that for every i ∈ I, the bin with label i gets exactly 10 balls. The number of
such distributions is equal to the number of distributions of the remaining n − 10k
balls into the remaining m − k bins, which is
n − 10k + m − k − 1
n − 10k + m − k − 1
=
.
m−k−1
n − 10k
We will be using the binomial coefficient
on the right, because for the special case
that k = m, the left side gives n−10k−1
and it is not clear what it means, whereas
−1
the binomial coefficient on the right is always well defined when n > 10m. Hence
\ n
−
10k
+
m
−
k
−
1
n
+
m
−
11k
−
1
Ai =
=
,
n − 10k
n − 10k
i∈I
where k = |I|. There are m
k sets I ⊆ {1, 2, . . . , m} such that |I| = k, so the
inclusion-exclusion formula above gives
X
m
m [
m
k n + m − 11k − 1
X −
(−1)
.
Ai =
k
n − 10k
i=1
k=0
Problem 2. Let m be a positive integer. Prove the formula
∞ X
n+m−1 n
1
=
x
(1 − x)m
m−1
n=0
using induction on m and using the following in the induction step:
1
2
(1) the formulas for multiplication of power series and for summation of binomial
coefficients:
X
X
X
∞ X
n
∞
n ∞
X
k+m−1
n+m
bn xn =
ak bn−k xn ,
=
;
an xn
m−1
m
n=0
n=0
n=0
k=0
k=0
(2) the formula for the derivative of a power series:
X
∞
0 X
∞
0
fn (x) =
fn (x) .
n=0
n=0
That is, you are asked to write two proofs, one using (1) and the other using (2) for
the inductive step.
Solution. The base case for both (1) and (2) is when m = 1:
∞
X
1
=
xn ,
1−x
n=0
which follows from the fact that
X
∞
∞
∞
∞
∞
X
X
X
X
n
x (1 − x) =
xn −
xn+1 =
xn −
xn = 1.
n=0
n=0
n=0
n=0
n=1
For the induction step, we assume that m > 2 and
∞ X
n+m−2 n
1
x ,
=
m−2
(1 − x)m−1
n=0
and we are to prove that
∞ X
1
n+m−1 n
=
x .
(1 − x)m
m−1
n=0
For the induction step in subproblem (1), we write
X
X
∞ ∞
1
1
1
n+m−2 n
n
=
·
=
x
x
(1 − x)m
(1 − x)m−1 1 − x
m−2
n=0
n=0
∞ X
n ∞ X
X
k+m−2
n+m−1 n
n
=
x =
x ,
m−2
m−1
n=0
k=0
n=0
where the first equality is obvious, the second follows from the induction hypothesis
and the base case, the third follows from the formula for multiplication of power
series, and the last follows from the formula for summation of binomial coefficients
given in the problem statement.
3
For the induction step in subproblem (2), we write
0
X
∞ 1
1
n+m−2 n 0
1
1
x
=
=
(1 − x)m
m − 1 (1 − x)m−1
m−1
m−2
n=0
∞ ∞ X
X
n+m−2
n+m−2
n
1
(xn )0 =
=
xn−1
m−1
m−2
m−2
m−1
n=0
n=1
∞ ∞ X
X
n + m − 2 n−1
n+m−1 n
=
x
=
x ,
m−1
m−1
n=1
n=0
where the first equality follows from the fact that
((1 − x)−m+1 )0 = −(−m + 1)(1 − x)−m ,
the second from the induction hypothesis, the third from the formula for the derivative of a power series, the forth from the fact that (x0 )0 = 0 and (xn )0 = nxn−1 for
n > 1 (note that the index of the sum starts from 1), the fifth from the fact that
(n + m − 2)!
n
(n + m − 2)!
n+m−2
n+m−2
n
=
·
=
=
,
m−1
(m − 2)!n! m − 1
(m − 1)!(n − 1)!
m−1
m−2
and the last follows by the shift of the index of summation.
Problem 3. Let n and t be positive integers. Prove that the number of partitions
of n into parts each repeating at most t times is equal to the number of partitions
of n into parts that are not divisible by t + 1.
Solution. We will prove that the generating function for the number of partitions
of n into parts each repeating at most t times (that is, the generating function for
the sequence (an )∞
n=0 such that an is the number of such partitions) is equal to the
generating function for the number of partitions of n into parts that are not divisible
by t + 1. This is enough to show that the two counts are equal. Consider the infinite
linear equation
1t1 + 2t2 + · · · + ktk + · · · = n.
The partitions of n correspond to non-negative integer solutions (t1 , t2 , . . . , tk , . . .)
to this equation so that tk represents the number of times k occurs in the partition.
The two conditions on the partitions from the problem statement correspond to the
following two restrictions on (t1 , t2 , . . . , tk , . . .), respectively:
(1) 0 6 tk 6 t for every k,
(2) tk = 0 when k is divisible by t + 1 and tk > 0 (which means no restriction)
otherwise.
We construct the generating function for the number of solutions (t1 , t2 , . . . , tk , . . .)
satisfying some specific restrictions as follows. For every k, we consider all possible
values that ktk according to our restrictions on tk . They are, respectively,
(1) 0, k, 2k, . . . , tk,
(2) 0 when k is divisible by t + 1 and 0, k, 2k, . . . (all multiples of k) otherwise.
For each of these values, call it m, we set the coefficient of xm to 1, and we set all
other coefficients to 0. This way we obtain the following generating functions for
the term ktk considered, respectively:
4
(1) 1 + xk + x2k + · · · + xtk ,
(2) 1 when k is divisible by t + 1 and 1 + xk + x2k + · · · otherwise.
The generating function for the number of solutions (t1 , t2 , . . . , tk , . . .) is the product
of the generating functions that we have obtained for the terms ktk over all k. In
case (1), the generating function is
∞
Y
(1 + xk + x2k + · · · + xtk ) =
k=1
∞
Y
1 − x(t+1)k
.
1 − xk
k=1
In case (2), the generating function is
Y
(1 + xk + x2k + · · · ) =
Y
k mod (t+1)6=0
k mod (t+1)6=0
1
1 − xk
Q∞
∞
(t+1)k )
Y
1 − x(t+1)k
k=1 (1 − x
=
.
= Q
∞
k
1 − xk
k=1 (1 − x )
k=1
We see that the two generating functions are equal, which completes the proof.
Problem 4. Let m be a positive integer. Provide a combinatorial proof (by counting and the inclusion-exclusion principle) or a proof using generating functions for
the following identity:
m
X
2m − k
k m
(−1)
= 1.
k
m−k
k=0
Unlike in problem 2, here you are asked to write just one proof using the method of
your choice. Still, I recommend that you think of both for your own profit.
Solution 1. We count the number of m-element subsets of the set {1, 2, . . . , 2m}
that do not contain any of 1, 2, . . . , m. On the one hand, the only such subset is
{m + 1, m + 2, . . . , 2m}, so the count is 1. This is the right side of the equality. On
the other hand, we count using the inclusion-exclusion formula. Let X denote the
set of all m-element subsets of {1, 2, . . . , 2m}. For i ∈ {1, 2, . . . , m}, let Ai denote
the set of those m-element subsets of {1, 2, . . . , 2m} that contain i. The task is to
compute the size of X − (A1 ∪ A2 ∪ · · · ∪ Am ). By the inclusion-exclusion formula,
m
X
[
\ |I| X −
Ai =
(−1) Ai ,
i=1
where, by convention,
T
i∈∅ Ai
I⊆{1,2,...,m}
i∈I
= X.
T
Let I ⊆ {1, 2, . . . , m} and k = |I|. What is i∈I Ai ? It is the set of m-element
subsets of {1, 2, . . . , 2m} containing I as a subset. The number of such distributions
is equal to the number of choices of the remaining m − k elements from the set
{1, 2, . . . , 2m} − I, which is 2m−k
m−k . Hence
\ Ai = 2m − k ,
m−k
i∈I
5
where k = |I|. There are m
k sets I ⊆ {1, 2, . . . , m} such that |I| = k, so the
inclusion-exclusion formula above gives
m
m [
X
2m
−
k
m
k
X −
,
Ai =
(−1)
m−k
k
i=1
k=0
which is the left side of the equality in the problem statement. We have thus proved
that the left side is equal to the right side, so the identity holds.
Solution 2. We will use the formula for multiplication of generating functions:
X
X
X
∞
∞
∞ X
n
n
n
=
an x
bn x
ak bn−k xn .
n=0
n=0
n=0 k=0
∞
∞
We define the sequencesP(an )n=0 and (bn )n=0 so that the coefficient of xm in
product above, which is m
k=0 ak bm−k , is equal to the left side of the identity in
the
the
problem statement. This is achieved by taking
m+n
m+n
n m
an = (−1)
,
bn =
=
.
n
n
m
Indeed, we then have
m
X
ak bm−k =
k=0
m
X
k=0
m m+m−k
,
(−1)
m−k
k
k
which is the left side of the identity in the problem statement. We have
X
X
∞ X
n
∞
∞ X
m+n−k
m+n n
k m
n
n m
n
(−1)
x =
(−1)
x
x
k
m
n
m
n=0
n=0
k=0
= (1 − x)m ·
1
1
=
=
m+1
(1 − x)
1−x
n=0
∞
X
xn ,
n=0
where the first equality follows from the formula for multiplication of generating
∞
functions for the sequences (an )∞
n=0 and (bn )n=0 defined above, the second follows
from the binomial theorem (the first factor) and the known power series expansion
of a simple fraction (the second factor), the third equality is obvious, and the last
one is again a known power series expansion of a simple fraction. We conclude that
the coefficient of xm in the first power series in the equality above is equal to the
coefficient of xm in the last power series, which is exactly the identity that we were
to prove.
Problem 5. Let r1 , r2 , . . . , rk be real numbers such that r1 < r2 < · · · < rk and
r1 , r2 , . . . , rk 6= 0. Using induction on k, prove that if α1 r1n + α2 r2n + · · · + αk rkn = 0
holds for every integer n, then α1 = α2 = · · · = αk = 0. In other words, prove that
the functions fi (n) = rin for 1 6 i 6 k are linearly independent in the vector space
of all functions f : Z → R.
Solution 1. The proof goes by induction on k. When k = 1, the condition tells us
that α1 r1n = 0 for every n, which directly yields α1 = 0, as r1 6= 0. Now, assume
that k > 2 and for any real numbers s1 , s2 , . . . , sk−1 such that s1 < s2 < · · · < sk−1
and s1 , s2 , . . . , sk−1 6= 0, if β1 sn1 + β2 sn2 + · · · + βk−1 snk−1 = 0 holds for every integer
6
n, then β1 = β2 = · · · = βk−1 = 0. Let r1 , r2 , . . . , rk be as in the problem statement,
and assume that α1 r1n + α2 r2n + · · · + αk rkn = 0 holds for every integer n. We consider
three cases.
Case 1: |r1 | < |rk |. Dividing by rkn , we infer that
n
n
n
r1
r2
rk
α1
+ α2
+ · · · + αk
=0
rk
rk
rk
for every integer n. Since |ri /rk | < 1 for 1 6 i 6 k − 1, we have
n
n
rk
ri
= 0 for 1 6 i 6 k − 1,
lim
= 1,
lim
n→∞ rk
n→∞ rk
n
n
n r1
r2
rk
αk = lim α1
+ α2
+ · · · + αk
= 0.
n→∞
rk
rk
rk
Now, since αk = 0, we have
n
n
α1 r1n + α2 r2n + · · · + αk−1 rk−1
= α1 r1n + α2 r2n + · · · + αk−1 rk−1
+ αk rkn = 0
for every integer n, so we can apply the induction hypothesis to conclude that
α1 = α2 = · · · = αk−1 = 0.
Case 2: |r1 | > |rk |. This case is completely analogous, except that we divide r1n ,
show that α1 = 0, and then use the induction hypothesis to conclude that α2 =
α3 = · · · = αk = 0.
Case 3: |r1 | = |rk |. Since r1 < rk , this implies that r1 = −rk . Again, we divide by
rkn and obtain
n
n
n
r1
r2
rk
α1
+ α2
+ · · · + αk
=0
rk
rk
rk
for every integer n. Since |ri /rk | < 1 for 2 6 i 6 k − 1, we have
n
ri
lim
= 0 for 2 6 i 6 k − 1.
n→∞ rk
We also have
n
r1 n
rk
n
= (−1) ,
=1
rk
rk
for every integer n. Therefore,
n
n n
r2
rk
r1
n
+ α2
+ · · · + αk
= 0.
lim ((−1) α1 + αk ) = lim α1
n→∞
n→∞
rk
rk
rk
It follows that the subsequences of the sequence ((−1)n α1 + αk )∞
n=0 consisting only
of terms with n odd and only of terms with n even tend to 0 as well. But these
subsequences are constant! The former is constantly −α1 + αk , and the latter is
constantly α1 + αk . Therefore, −α1 + αk = 0 and α1 + αk = 0, which implies
α1 = αk = 0. If k = 2, then we are done, and otherwise we have
n
α2 r2n + α3 r3n + · · · + αk−1 rk−1
= α1 r1n + α2 r2n + · · · + αk rkn = 0
for every integer n, so we can apply the induction hypothesis to conclude that
α2 = α3 = · · · = αk−1 = 0.
7
Solution 2. This solution does not use induction and is intended for students that
have a good grasp of linear algebra. The condition from the problem statement
applied to all n ∈ {0, 1, . . . , k − 1} gives
 0 
 0 
 0   
r1
r2
rk
0
 r1 
 r1 
 r1  0
 1 
 2 
 k   
α1  .  + α2  .  + · · · + αk  .  =  .  ,
 .. 
 .. 
 ..   .. 
r1k−1
r2k−1
rkk−1
0
which is a linear equation on vectors in Rk . The matrix whose columns are the k
vectors above is called a Vandermonde matrix, and its determinant is given by
 0
0 
r1
r20 · · · rk−1
1 
 r1
Y
r21 · · · rk−1
 1

det  .
=
(rj − ri ).

.
.
.
..
..
.. 
 ..
r1k−1 r2k−1 · · ·
k−1
rk−1
16i<j6n
See https://proofwiki.org/wiki/Vandermonde_Determinant for a proof. Since
the ri s are distinct, we conclude that the determinant is non-zero, which implies that
the column vectors are linearly independent in Rk . This implies, by the definition
of linear independence, that α1 = α2 = · · · = αk = 0.