Table Of ContentTitu Andreescu
Zuming Feng
A Path to Combinatorics
for Undergraduates
Counting Strategies
Springer Science+Business Media, LLC
Titu Andreescu Zurning Feng
American Mathematics Competitions Phillips Exeter Academy
University of Nebraska Department of Mathematics
Lincoln, NE 68588 Exeter, NH 03833
U.S.A. U.S.A.
Library of Congress Cataloging-in-Publication Data
Andreescu, Titu, 1956-
A path to combinatorics for undergraduates : counting strategies I Titu Andreescu,
Zuming Feng.
p. em.
Includes bibliographical references and index.
ISBN 978-0-8176-4288-4
1. Combinatorial analysis. 2. Combinatorial number theory. I. Feng, Zuming. II. Title.
QA164.A58 2003
511'.6-dc22 2003057761
CIP
ISBN 978-0-8176-4288-4 ISBN 978-0-8176-8154-8 (eBook)
DOI 10.1007/978-0-8176-8154-8
AMS Subject Classifications: 0501, 05Al5, 05Al0, 05A05, 05Al9, 60C05, 03020
Printed on acid-free paper.
a»~~>
©2004 Springer Science+Business Media New York Birkhiiuser ley)
Originally published by Birkhiiuser Boston in 2004
All rights reserved. This work may not be translated or copied in whole or in part without the
written permission oft he publisher (Springer Science+Business Media, LLC),
except for brief excerpts in connection with reviews
or scholarly analysis. Use in connection with any form of information storage and retrieval,
electronic adaptation, computer software, or by similar or dissimilar methodology now known or
hereafter developed is forbidden.
The use of general descriptive names, trade names, trademarks, etc., in this publication, even if
the former are not especially identified, is not to be taken as a sign that such names, as understood
by the Trade Marks and Merchandise Marks Act, may accordingly be used freely by anyone.
SPIN 10864464
Cover design by Joseph Sherman.
9 8 7 6 5 4 3 2 I
Contents
• Preface ................................................ vii
• Introduction ........................................... ix
• Acknowledgements ................... ................. xv
• Abbreviations and Notation .......................... xvii
• 1. Addition or Multiplication? .......................... 1
• 2. Combinations ....................................... 25
• 3. Properties of Binomial Coefficients .................. 43
• 4. Bijections .......................................... 69
• 5. Recursions .......................................... 91
• 6. Inclusion and Exclusion ........................... 117
• 7. Calculating in Two Ways: Fubini's Principle ....... 143
• 8. Generating Functions .............................. 165
• 9. Review Exercises ................................ .. 195
• Glossary ............................................. 213
• Index ................................................ 217
• Further Reading ...................................... 221
• Afterword ............................................ 227
v
Preface
The main goal of the two authors is to help undergraduate students
understand the concepts and ideas of combinatorics, an important
realm of mathematics, and to enable them to ultimately achieve
excellence in this field. This goal is accomplished by familiariz
ing students with typical examples illustrating central mathematical
facts, and by challenging students with a number of carefully selected
problems. It is essential that the student works through the exercises
in order to build a bridge between ordinary high school permutation
and combination exercises and more sophisticated, intricate, and
abstract concepts and problems in undergraduate combinatorics. The
extensive discussions of the solutions are a key part of the learning
process.
The concepts are not stacked at the beginning of each section in
a blue box, as in many undergraduate textbooks. Instead, the key
mathematical ideas are carefully worked into organized, challenging,
and instructive examples. The authors are proud of their strength,
their collection of beautiful problems, which they have accumulated
through years of work preparing students for the International Math
ematics Olympiads and other competitions.
A good foundation in combinatorics is provided in the first six
chapters of this book. While most of the problems in the first six
chapters are real counting problems, it is in chapters seven and eight
where readers are introduced to essay-type proofs. This is the place
to develop significant problem-solving experience, and to learn when
and how to use available skills to complete the proofs.
VII
Introduction
Combinatorics is a classical branch of mathematics. Although com
binatorics represents a special case among other branches of math
ematics, mostly because there is no axiomatic theory for it, some
of the greatest mathematicians studied combinatorial problems. By
axiomatic classification we might think of combinatorics to be a
chapter of the theory of numbers, but clearly, combinatorics deals
with totally different kinds of problems. Combinatorics interacts with
other mathematical theories, from which it takes problem-solving
strategies and to which it provides results. Combinatorics deals
with concrete problems, easy to understand and often presented in a
form suitable for publication in a regular newspaper, as opposed to
high-end abstract mathematics journals. This characteristic makes it
attractive to both beginners and professional mathematicians. These
kinds of problems are particularly useful when one learns or teaches
mathematics. Here is one example:
Example 0.1. A town is rectangularly shaped, and its street
network consists of x + 1 parallel lines headed north-south and y + 1
parallel lines headed east-west. (You may think of Manhattan as an
example.) In how many ways can a car reach the northeast corner
if it starts in the southwest comer and travels only in the east and
north directions?
Solution: Let A and B represent the southwest and northeast
corners, respectively. In the following figure we show such a grid for
x = 5 andy= 4.
ix
X Counting Strategies
C B(x,y)
(O,y)
D
A(O, 0) (x, 0)
Figure 0.1.
We denote by v0, v1, ... , Vx the vertical (north-south) streets. Let
us call a block the interval between two neighboring horizontal streets.
(Note that under this definition, a block can be only a part of a
vertical street.) With a bit of thought, we see that a path that
connects the points A and B is completely determined by the number
of blocks along the path in each of the vertical streets vo, v1, ... , Vx.
For 0 :::; i :::; x, let Yi be the number of such blocks for street Vi. Then
Yi are nonnegative integers and
Yo+ Y1 + Y2 + · · · + Yx = Y·
Hence, the number of paths connecting the points A and B is equal
to the number of ordered (x+ I)-tuples (y0, Yb ... , Yx) of nonnegative
integers satisfying the equation ( *). (Indeed, Figure 0.1 corresponds
to the solution (yo, y1, Y2, y3, y4, Ys) = (1, 0, 0, 1, 0, 2) for the equation
Yo +Y1 + · · · +Ys = 4.) Thus, we rediscover the problem of de Moivre (a
classic problem in arithmetic): In how many ways can a nonnegative
integer y be written as a sum of x + 1 nonnegative integers?
For an algebraist, this problem is equivalent to the following: What
is the number of unitary monomials zgo Zf1 ••• z;,x in X+ 1 variables,
of degree d, contained in the ring of polynomials lR[Zo, Z1, ... , ZxJ?
It is useful to know this number, since it is equal to the dimension of
the vector space of homogeneous polynomials (homogeneous forms)
of degree y.
We now have two different characterizations of the desired number,
but we still do not know its value. Let us try something else!
Let Nx,y be the number we want to find. One can see that N1,y =
y + 1. Putting the grid into a coordinate plane with A = (0, 0) and
B = (x, y), we see that No,1 = N1,0 = 1, No,2 = 1, N1,1, = 2,
N2,0 = 1, and so on. More generally, since every path from A to
B = (x, y) passes through C = (x - 1, y) or D = (x, y - 1), one can
Introduction xi
obtain the recursive relation
Nx,y = Nx,y-l + Nx-l,y·
Again, for an algebraist, the same relation can be obtained by noticing
that every monomial of degree y in Z1, ... , Zx either is a monomial of
degree yin Z0, Z1, ... , Zx-1 or is obtained by multiplying a monomial
of degree y- 1 in Zo, Z1, ... , Zx-1 by Zx.
This recursive approach is promising. It clearly resembles the
famous Pascal's triangle. By induction, we obtain
(X+ y) (X+ y) +
Nx = = (x y)!.
,y x y x! · y!
(It also common to write Nx,y =cx+y) Cx =cx+y) Cy = C(x + y, x) =
C(x+y, y).) We thus obtain the following result: The number of paths
connecting the points A and B is equal to the number of ordered
sequences of x + 1 nonnegative integers that add up to y, and is
+
also equal to the number of unitary monomials of degree y in x 1
variables, and, finally, is equal to (x~y). •
Thinking back to the way we obtained this result, we observe the
following principle:
In order to count the elements of a certain set, we might
replace the original set with another set that has the same
number of elements and whose elements can be more easily
counted.
With the above principle in mind, we present two new ways of
solving the above problem.
First, we notice that it takes exactly x + y moves to get from
A to B. Among those moves, x of them have to be going right,
and y of them have to be going up. There is a bijective mapping
between the set of paths connecting the points A and B and the set of
distinct arrangements of x R's and y U's. For example, the sequence
U RRRUR RUU corresponds to the path in Figure 0.1. Hence, Nx,y =
(x~y) = (xty).
Second, we can consider x + y identical white balls lined up in
a row. We pick x balls and color them red. Label the red balls
r1, r2, ... , r x from left to right in that order. For 0 ::; i ::; x, let
Yi denote the number of white balls in between red balls ri and
ri+l· (Here Yo and Yx denote the numbers of balls to the left of
ball r1 and to the right of ball rx, respectively.) There is a bijective
xii Counting Strategies
mapping between the set of all such colorings and the set of (x +I)
tuples of nonnegative integer solutions to equation ( *). For example,
for x = 5 and y = 4, the coloring in Figure 0.2 corresponds to
(yo, Y1, Y2, Y3, Y4, Ys) = (1, 0, 0, 1, 0, 2) for Yo+ Y1 + .. · + Ys = 4 .
• • • • •
0 0 0 0
Figure 0.2.
Indeed, the red balls become separators for the remaining y white
balls. The number of consecutive white balls between two red balls
maps to a unique solution of ( *) and vice versa. It is clear that there
are (x!y) = (xty) such colorings. •
Example 0.2. [Balkan 1997] Let m and n be integers greater than
1. Let S be a set with n elements, and let A1, A2, ... , Am be subsets
of S. Assume that for any two elements x andy inS, there is a set
Ai such that either x is in Ai and y is not in Ai or x is not in Ai
and y is in Ai. Prove that n :::;; 2m.
Solution: Let us associate with each element x in S a sequence of
m binary digits a(x) = (x1, x2, ... , Xm) such that Xi = 1 if xis in Ai
and Xi = 0 if x is not in Ai· We obtain a function
f: 8 ---+ T={(xl, ... ,xm)lxi E {O,l}},
and the hypothesis now states that if xi=- y, then f(x) i=- f(y). (Such
a function is called an injective function.) Thus, the set T must have
at least as many elements as the set S has. It is not difficult to see
that T has 2m elements, because each component Xi of (x1, ... , xm)
can take exactly two possible values, namely, 0 and 1. It follows that
•
This problem also illustrates a solving strategy: In order to
obtain a requested inequality, we might be able to transform
the hypothesis about the family of subsets (Aih<i<m by com
paring the set S and the set of binary sequences of length
m.
Example 0.3. An even number of persons are seated around a