Sunteți pe pagina 1din 213

MATHEMATICS OF CHOICE

OR
HOW- TO COUNT
WITHOUT COUNTING
by
Ivan Niven
University of Oregon
15
RANDOM HOUSE
THE L. W. SINGER COMPANY
Illustrated by George Buehler
Copyright, 1965, by Yale University
All rights reserved under International and Pan-American Copyright
Conventions. Published in New York by Random House, Inc., and
simultaneously in Toronto, Canada, by Random House of Canada, Limited.
School Edition Published by The L. W. Singer Company.
Library of Congress Catalog Card Number; 65-17470
Manufactured in the United StateB of A.merica
Second Printing
Note to the Reader
T
his book is one of a series written by professional mathematicians
in order to make some important mathematical ideas interesting
and understandable to a large audience of high school students and
laymen. Most of the volumes in the New Mathematical Library cover
topics not usually included in the high school curriculum; they vary
in diffioulty, and, even within a single book, some parts require a
greater degree of concentration than others. Thus, while the reader
needs little technical knowledge to understand most of these books,
he will have to make an intellectual effort.
If the reader has so far encountered mathematics only in classroom
work, he should keep in mind that a book on mathematics cannot be
read quickly. Nor must he expect to understand all parts of the book
on first reading. He should feel free to skip complicated parts and
return to them later; often an argument will be clarified by a subse-
quent remark. On the other hand, sections containing thoroughly
familiar material may be read very quickly.
The best way to learn mathematics is to dQ mathematics, and each
book includes problems, some of which may require considerable
thought. The reader is urged to acquire the habit of reading with
paper and pencil in hand; in this way mathematics will become in-
creasingly meaningful to him.
For the authqrs and editors this is a new venture. They wish to
acknowledge the generous help given them by the many high school
teachers and students who assisted in the preparation of these mono-
graphs. The editors are interested in reactions to the books in tbis
series and hope that readers will write to: Editorial Committee of the
NML series, NEW YORK UNIVERSITY, THE COURANT INSTITUTE OF
MATHEMATICAL SCIENCES, 251 Mercer Street, New York, N. Y.l0012.
The Editors
v
NEW MATHEMATICAL LIBRARY
Other titles will be announced as ready
1. NUMBERS: RATIONAL AND IRRATIONAL by Ivan Niven
2. WHAT IS CALCULUS ABOUT? by W. W. Sawyer
3. INTRODUCTION TO INEQUALITIES by E. Beckenbach
and R. Bellman
4. GEOMETRIC INEQUALITIES by N. D. Kazannoff
5. THE CONTEST PROBLEM BOOK, Problems from the Annual
High School Contests of the Mathematical Association of
America, compiled and with solutions by Charles T. Salkind
6. THE LORE OF LARGE NUMBERS by P. J. Davis
7. USES OF INFINITY by Leo Zippin
8. GEOMETRIC TRANSFORMATIONS by I. M. Yaglom, trans-
lated from the Russian by Allen Shields
9. CONTINUED FRACTIONS by C. D. Olds
10. GRAPHS AND THEIR USES by Oystein Ore
11. HUNGARIAN PROBLEM BOOK I, based on the Eotvos
Competitions, 1894-1905
12. HUNGARIAN PROBLEM BOOK II, based on the Eotvos
Competitions, 1906-1928
13. EPISODES FROM THE EARLY HISTORY OF MATHE-
MATICS by Asger Aaboe
14. GROUPS AND THEIR GRAPHS by I. Grossman and
W. Magnus
15. MATHEMATICS OF CHOICE by Ivan Niven
vi
Contents
Preface xi
Chapter 1 Introductory Questions 1
Chapter 2 Permutations and Combinations 7
2.1 The Multiplication Principle 8
2.2 Factorials 10
2.3 Permutations 12
2.4 Zero Factorial 16
2.5 Combinations 18
2.6 Permutations of Things in a Circle 23
2.7 Summary 25
Chapter 3 Combinations and Binomial Coefficients 27
3.1 A Path Problem 27
3.2 Permutations of Things Not All Alike 28
3.3 Pascal's Formula for C(n, r) 31
3.4 The Binomial Expansion 34
3.5 The Multinomial Expansion 38
3.6 Pascal's Triangle 41
3.7 The Number of Subsets of a Set 42
3.8 Sums of Powers of Natural Numbers 44
3.9 Summary 48
Chapter 4 Some Special Distributions 50
4.1 Fibonacci Numbers 50
4.2 Linear Equations with Unit Coefficients 54
4.3 Combinations with Repetitions 59
4.4 Equations with Restricted Solutions 60
4.5 Summary 65
Chapter 5 The Inclusion-Exclusion Principle; Probability 67
5.1 A General Result 67
vii
5.2 Applications to Equations and to Combinations
with Repetitions 72
5.3 Derangemen ts 78
5.4 Combinatorial Probability 82
5.5 Summary 88
Chapter 6 Partitions of an Integer 91
6.1 Graphs of Partitions 92
6.2 The Number of Partitions 96
6.3 Summary 99
Chapter 7 Generating Polynomials 100
7.1 Partitions and Products of Polynomials 102
7.2 Change for a Dollar Bill 106
7.3 Summary 108
Chapter 8 Distribution of Objects Not All Alike 109
8.1 Objects Different, Boxes Different 110
8.2 Objects Different, Boxes Alike (Partitions of a
Set) 112
8.3 Objects Mixed, Boxes Different 114
8.4 Summary 118
Chapter 9 Configuration Problems 120
9.1 The Pigeonhole Principle 120
9.2 Chromatic Triangles 122
9.3 Separations of the Plane 124
9.4 Summary 128
Chapter 10 Mathematical Induction 129
10.1 The Principle of Mathematical Induction 130
10.2 Notation for Sums and Products 133
10.3 Summary 139
Chapter 11 Interpretations of aNon-Associative Product 140
11.1 A Recursion Relation 141
11.2 The Development of an Explicit Formula 143
11.3 Proof of the Conjecture 148
11.4 A Formula for F(n) 150
11.5 Summary 152
Miscellaneous Problems 153
Answers and Solutions 160
Bibliography 199
Index 201
viii
MATHEMATICS OF CHOICE
OR
HOW TO COUNT
WITHOUT COUNTING
Preface
The subject of this book is often called "combinatorial analysis"
or "combinatorics". The questions discussed are of the sort" In how
many ways is it possible to . . . ?", or variations on that theme.
Permutations and combinations form a part of combinatorial analysis,
a part with which the reader may be already acquainted. If so, he
may be familiar with some of the material in the first three chapters.
The book is self-contained with the rudiments of algebra the only
prerequisite. Summaries including all formulas are given at the ends
of the chapters. Throughout the book there are many problems for
the reader. In fact the entire monograph is in large measure a problem
book with enough background information furnished for attacking
the questions. A list of miscellaneous problems follows the final
chapter. Solutions, or at least sketches of solutions, are given in the
back of the book for questions of any depth, and numerical answers
are given for the simpler problems.
Helpful suggestions were given by the members of the S. M. S. G.
Monograph Panel, and also by Herbert S. Zuckerman. Max: Bell
used some of the material with his students, and forwarded their
comments to me. The witty subtitle of the book was suggested by
Mark Kac. For all this help I express my appreciation.
xi
CHAPTER ONE
Introductory Questions
The purpose of this chapter is to present a few sample problems to
illustrate the theme of the whole volume. A systematic developmen t
of the subject is started in the next chapter. While some of the sample
questions introduced here can be solved with no theoretical back-
ground, the solution of others must be postponed until the necessary
theory is developed.
The idea of this book is to examine certain aspects of the question
"how many?". Such questions may be very simple; for example,
"How many pages are there from page 14 to page 59, inclusive?" In
some cases, the answer may be nothing more than a matter of com-
mon knowledge, as for example the number of days in October, or
the number of yards in a mile. In other cases, the answer may require
technical information, such as the number of chemical elements
known at the present time, or the number of cubic centimeters of
displacement in the engine of a certain automobile. But our concern
is with questions that involve thought. They may also require some
prior knowledge, which will be supplied if it is not common informa-
tion. Some mathematical formulas are helpful, and these will be
developed in due course. However, many problems require nothing
more than a little ingenuity. We begin with such a question.
PROBLEM 1.lt In any calendar year how many Friday the
thirteenths can there be? What is the smallest number possible?
t This occurs as Problem E1541 on p. 919 of the American Mathematical Monthly,
November, 1962.
2 MATHEMATICS OF CHOICE
Like many other questions in this book, this problem is solved in
the Answers and Solutions section at. the end. Of course the reader is
urged to try the question himself before turning to the solution pro-
vided. Problem 1.1 can be done by simply consulting a ca1endar, or
rather a set of annual calendars giving an possible arrangements of
the days of the year. The challenge is to solve the problem in an even
simpler way by devising a system. It might be noted for example
that years having 365 days can be separated into seven different
types, one beginning on a Monday, one on a Tuesday, etc. Similarly
there are seven differen t types of leap years, and so there are in all
fourteen types of years for the purposes of this problem. Next a
system can be devised for studying the number of Friday the thir-
teenths in anyone of these types of years. However, we drop the
analysis here, and leave the rest to the reader.
PROBLEM 1.2 A manufacturer makes blocks for children, each
block being a two inch cube whose faces are painted one of two
colors, blue and red. Some blocks are all blue, some an red, and some
have a mixture of blue and red faces. How many different kinds of
blocks can the manufacturer make?
It is necessary to define what is meant by" different" blocks before
the question has a precise meaning. We shall say that two blocks are
the same if they can be put into matching positions so that corre-
sponding faces have iden tica1 colors, that is, so that the bottom
faces have the same color, the top faces the same color, the front
faces the same color, etc. If two blocks are not the same in this sense,
we say that they are different. For example, any two blocks with five
blue faces and one red face are the same. But consider as another
example two blocks with four red faces and two blue faces. Two such
blocks mayor may not be the same. If the two blue faces are adjacent
on each block, then the blocks are the same. Or if the two blue faces
are opposite on each block, they are the same. But if on one block
the two blue faces are adjacent, whereas on the other block the two
blue faces are opposite, then the blocks are different. See Figure 1.1.
This problem is also solved in the Answers and Solutions section,
but again the reader is urged to solve it for himself, using the solution
at the back of the book as a check against his work.
INTRODUCTION
B: blue
Adjacent blue faces
Figure 1.1
B
Opposite blue faces
( to p and bottom)
3
We turn now to three problems which are so much more difficult
that the solutions are postponed until the needed theory is worked out.
PROBLEM 1.3 A Path Problem. A man works in a building lo-
cated seven blocks east and eight blocks north of his home. (See
Figure 1.2.) Thus in walking to work each day he goes fifteen blocks.
All the streets in the rectangular pattern are available to him for
walking. In how many different ways can he go from home to work,
walking only fifteen blocks?
8 blocks
7 blocks
Figure 1.2
One obvious approach to this problem would be to draw diagrams
of all possible paths, and then to count them. But there happen to
be 6435 different paths, and so the direct approach is somewhat im-
practical. This problem is not very difficult if we look at it in the
right way. The solution is given in Chapter 3.
4 MATHEMATICS OF CHOICE
We turn now to another problem whose solution must await some
theoretical analysis.
PROBLEM 1.4 The governor of a state attended the centennial
celebration of a famous publishing house. To express his appreciation,
the publisher offered to present to the governor any selection of ten
books chosen from the twenty best-sellers of the company. The
governor was permitted to select ten different books from the twenty,
or ten all alike (ten copies of one book), or any other combination
he might prefer, provided only that the total was ten. (a) In how
many ways could the governor make his selection? (b) If the gov-
ernor had been requested to choose ten distinct books, in how many
ways could he have made his selection?
Question (b) is easier than question (a), because (b) is a straight-
forward matter of choosing ten things from twenty. The number of
different selections of ten things from twenty is denoted by the
symbol C (20, 10), and is easily evaluated as we shall see in the
next chapter. The solution to part (a) of the question is given on
page 59.
PROBLEM 1.5 In how many ways is it possible to change a dollar
bill into coins? (Presume that the coins are in denominations 1,5,10,
25, and 50 cents, also known as cents, nickels, dimes, quarters and
half dollars.)
This problem, like many others in this book, can be solved by
simply enumerating all cases and counting them A more systematic
scheme for solving it is given in Chapter 7.
We conclude this chapter by stating a basic principle about count-
ing. It arises in such a simple question as finding the number of pages
from page 14 to page 59 inclusive. The answer is 46, one more than
the difference between the two integersf 14 and 59. In general, the
number of integers from k to n inclusive is n - k + 1, where n is
presumed larger than k, i.e. n > k
t Integers, sometimes called "whole numbers", are of three types: the positive
integers or natural numbers I, 2, 3, 4, """, where the three dots" " "" stand for" and
so on"; the negative integers -I, -2, -3, -4, " .. ; and 0 which is neither positive
nor negative. The non-negative integers are 0, 1,2,3,4, ."".
INTRODUCTION
5
Problem Set 1
1. How many integers are there from 25 to 79 inclusive?
2. What is the 53rd integer in the sequence 86, 87, 88, ?
3. The largest of 123 consecutive integers is 307. What is the smallest?
4. The smallest of ,. consecutive integers is n. What is the largest?
5. The largest of r consecutive integers is k. What is the smallest?
6. How many integers are there in the sequence n, n + 1, n + 2,
n+h?
7. How many integers x satisfy the inequalities 12 < Vx < 15,
that is Vx exceeds 12, but Vx is less than 15?
8. How many integers are there in the sequences
(a) 60, 70, 80, "', 540; (b) 15, 18,21, "', 144;
(c) 17,23,29,35,.", 221?
9. How many integers between 1 and 2000 (a) are multiples of 11;
(b) are mUltiples of 11 but not mUltiples of 3; (c) are multiples
of 6 but not multiples of 4?
10. What is the smallest number of coins needed to pay in exact change
any charge less than one dollar? (Coins are in the denominations
1, 5, 10,25 and 50 cents.)
11. A man has 47 cents in change coming. Assuming that the cash
register contains an adequately large supply of 1, 5, 10 and 25 cent
coins, with how many different combinations of coins can the clerk
give the man his change?
12. A man has six pairs of cuff links scrambled in a box. No two pairs
are alike. How many cuff links does he have to draw out all at once
(in the dark) in order to be certain to get a pair that match?
6 MATHEMATICS OF CHOICE
13. A man has twelve blue socks and twelve black socks scrambled in a
drawer. How many socks does he have to draw out all at once (in
the dark) to be certain to get a matching pair? (Any two blue socks,
or any two black socks, constitute a pair.)
14. The measure in degrees of an angle of a regular polygon is an integer.
How many sides can such a polygon have?
15. A man has a large supply of wooden regular tetrahedra, all the same
size. (A regular tetrahedron is a solid figure bounded by four con-
gruent equilateral triangles; see Figure 1.3.) H he paints each tri-
Figure 1.3
angular face in one of four colors, how many different painted
tetrahedra can he make, allowing all possible combinations of colors?
(Say that two blocks are different if they cannot be put into matching
positions with identical colors on corresponding faces.)
16. How many paths are there from one comer of a cube to the opposite
comer, each possible path being along three of the twelve edges of
the cube?
17. At formal conferences of the United States Supreme Court each of
the nine justices shakes hands with each of the others at the beginning
of the session. How many handshakes initiate such a session?
CHAPTER TWO
Perm.utations and Com.binations
This chapter and the next introduce some of the fundamental
ideas of the subject of this book. The reader may recognize a number
of these concepts from previous study. However, at several places in
Chapters 2 and 3 the topics are discussed in more detail than is usually
the case in elementary books on algebra. It will smooth the way for
the reader in subsequent chapters if he fully understands these funda-
mental ideas. If he is able to answer the questions in the problem
sets, he can be sure of his understanding of the subject. Much of the
basic notation of combinatorics is set forth in these two chapters.
Out of the variety of notation used throughout mathematical litera-
ture, we outline several of the standard forms, but subsequently stick
to only one.
To introduce the subject we consider the following simple problem.
A clothing store for men and boys has belts in five styles, and there
are seven sizes available in each style. How many different kinds of
belts does the store have?
The answer, 35, can be obtained by mUltiplying 5 by 7 because
there are 7 belts in style number 1, 7 belts in style number 2, . , 7
belts in style number 5, and so we have
7 + 7 + 7 + 7 + 7 = 57 35.
This easy question illustrates a basic principle.
8 MATHEMATICS OF CHOICE
2.1 The Multiplication Principle
If a collection of things can be separated into m different types, and
if each of these types can be separated into k different subtypes, then
there are mk different types in all.
This principle can be extended beyond a classification according
to two properties, such as styles and sizes of belts, to classifications
according to three properties, four properties, and more. As an ex-
ample consider the following question. A drugstore stocks toothpaste
from seven different manufacturers. Each manufacturer puts out
three sizes, each available in fluoridated form and plain. How many
different kinds of toothpaste tubes does the store have? The answer,
on the basis of the multiplication principle, is 7 32 or 42, because
of 7 manufacturers, 3 sizes, and 2 types as regards fluoridation.
The multiplication principle is applicable to many problems besides
that of c1assifying objects. As an example, consider a man who
decides to go to Europe by plane and to return by ship. If there are
eight different airlines available to him, and nine different shipping
companies, then he can make the round trip in 89 or 72 different
ways.
Here is another simple example. At a big picnic the snack lunch
consists of a sandwich (choice of four kinds), a beverage (choice of
coffee, tea or milk) and an ice cream cup (choice of three flavors).
In how many ways can a person make his selection? By the multipJica-
tion principle we see that the answer is 433 or 36 ways.
Because of the various applications of the multiplication principle
it is often formulated in terms of events: If one event can occur in m
ways, and a second event can occur independently of the first in k ways,
then the two events can occur in mk ways.
The word "independently" is essential here because the principle
is not necessarily valid in situations where the second event is de-
pendent on, or restricted by, the first. For example, a girl with seven
skirts and five blouses might not have 35 skirt-blouse combinations
because some of the colors or patterns might clash aesthetically; a
certain red skirt might not go well with a certain orange blouse. How-
ever, the following example illustrates a standard kind of dependency
of events wherein the principle can still be used.
PERMUTATIONS, COMBINATIONS 9
PROBLEM 2.1
A, B, C, D
arrangemen t?
In how many different orders can the four letters
be written, no letter being repeated in anyone
This question can be answered by simply writing out all possible
orders of the letters: ABCD, ACBD, ABDC, etc. But it is simpler,
and in more complicated problems necessary, to devise a system to
solve the problem. Consider the first letter in any arrangement.
There are four choices for the letter in this position. For any given
selection of the first letter, there are three possible choices for the
second letter. If, for example, the first letter is B, then the second
letter must be chosen from A, C or D. Similarly, after the first
two letters of the foursome have been selected, the third letter can
be chosen in two ways. And when we get to the fourth letter it
can be chosen in only one way; that is, there is only one letter that can
be used in the fourth place. Thus the multiplication principle gives
the answer
4321 = 24.
The reader should verify this by listing all 24 cases. Here are those
that begin with the letter A:
ABCD, ABDC, ACBD, ACDB, ADBC, ADCB.
PROBLEM 2.2 In a certain (mythical) country the automobile
license plates have letters, not numbers, as distinguishing marks.
Precisely three letters are used, for example, BQJ, CCT and
DWD. If the alphabet has 26 letters, how many different license
plates can be made?
As the examples show, repetition of letters is allowed on a license
plate. There being 26 choices for each of the three letters, the answer is
262626 = 17576.
PROBLEM 2.3 What would be the answer to Problem 2.2 if the
repetition of letters on a license plate were not allowed?
An argument similar to that used in the solution of Problem 2.1
can be made. There are 26 choices for the first letter, but only 25
for the second, and only 24 for the third. Thus the answer is
262524 = 15600.
10 MATHEMATICS OF CHOICE
Problem Set 2
1. Of the arrangements in Problem 2.2, how many begin with the letter
Q ?
2. Of the arrangements in Problem 2.3, how many begin with the letter
Q ? How many end with the letter Q ?
3. Of the arrangements in Problem 2.2, how many end with a vowel
(A, E, 1,0, U)?
4. Of the arrangements in Problem 2.3, how many end with a vowel?
5. A room has six doors. In how many ways is it possible to enter by one
door and leave by another?
6. A tire store carries eight different sizes of tires, each in both tube and
tubeless variety, each with either nylon or rayon cord, and each with
white sidewalls or plain black. How many different kinds of tires does
the store have?
7. A mail order company offers 23 styles of ladies' slippers. If each style
w.ere available in twelve lengths, three widths and six colors, how
many different kinds of ladies' slippers would the warehouse have to
keep in stock?
8. How many of the integers (whole numbers) between 10,000 and
100,000 have no digits other than 6, 7, or 8 ? How many have no
digits other than 6, 7, 8 or 0 ?
2.2 Factorials
In many situations it is useful to have a simple notation for products
such as
432-1, 65-4-3-21, 7 654321,
each of which is the product of a sequence of consecutive integers
all the way down to one. Such products are called factorials. The
PERMUTATIONS, COMBINATIONS 11
standard mathematical notation uses what is ordinarily an exclama-
tion point; thus
4! 4321 = 24
6! 654321 = 720
7! 7654321 = 5040.
We read 4! as "four factorial", 6! as "six factorial", and 7! as
"seven factorial". In general, for any positive integer n we define
n! (read this as Un factorial") as
n! = n(n - 1) (n - 2)(n - 3) 1.
This is the product of all integers from n down to 1. Note that 1!
is equaJ to 1.
Problem Set 3
1. Formulate as a product and then evaluatet each of 31, 5! and 8!.
2. Evaluate the following: 12l/10!; 2
1
., 41+31; (4 + 3)1.
3. Evaluate (n + 1)! in case n = 4.
4. Evaluate n! + 1 in case n = 4.
5. Evaluate (n - 1)! in case n = 4.
6. Evaluate (n - 1')! in case n = 10 and l' = 8.
7. Compute (n - 1')! in case 1t = 12 and l' = 6.
8. Compute
(n - 1')1
n!
in case n 12 and l' 4; also in the case
n = 10 and l' = 6.
t Whereas the reader is asked to evaluate or compute such numbers as 51 and 8!, he
would not be expected to compute (say) 201. If such a number were the answer to a
question in this book, it would be left in precisely that form. Computational techniques
are very important, but they are not stressed in this volume.
12 MATHEMATICS OF CHOICE
n!
9. Compute in case n = 10 and r = 6.
r!(n - r)!
10. Which of the following are -true and which false?
(a) 8! = 8-7! (b) 10!/9! = 9 (c) 4! + 4! 81
(d) 2! - 1! = 1! (e) ,,! = n(n - 1)!
(f) n! = (n
2
- n) (" - 2)!
2.3 Permutations
Permutations are ordered arrangements of objects. As examples of
permutations, consider again Problems 2.1 and 2.3 from Section 2.1.
PROBLEM 2.1 In how many different orders can the four letters
A, B, C, D be written, no letter being repeated in anyone
arrangement?
This is the same as asking how many permutations there are on
four letters, taken four at a time. The number of such permutations
is denoted by the symbol P(4, 4).
PROBLEM 2.3 How many different license plates can be made if
each plate has three letters and repetition of letters on a license plate
is not allowed?
This is the same as asking how many permutations there are on
twenty-six letters, taken three at a time. The number of such permuta-
tions is denoted by P(26, 3). We have solved these problems in
Section 2.1 and may now write the answers, in our new notation, as
P(4, 4) = 432-1 = 24 and P(26, 3) = 26-2524 = 15600.
Each of these P(26, 3) = 15600 permutations of 26 objects
taken 3 at a time is called a 3-permutation. In general, an r-permuta-
tion is an ordered arrangement of r objects, and pen, r) denotes
the number of r-permutations of a set of n distinct objects. This is
the same as saying that pen, r) is the number of permutations of n
PER M UTA T ION S, COM BIN A T ION S 13
things taken r at a time. Of course, it is presumed that r does not
exceed n, that is r -< n. Note that the n things or objects must be
distinct, i.e. we must be able to tell them apart.
To derive a formu]a for P(n, r) we conceive of r distinct boxes
into which the n objects can be put:
D D D D
1st box 2nd box 3rd box 7th box
Then pen, r) can be thought of as the number of ways of putting
n distinct objects in the r boxes, one object in each box.
First consider the special case where the number of objects is the
same as the number of boxes. For the first box we can select any
one of the n objects. That done, there remain n - 1 objects from
which to choose for the second box. Similady, there remain n - 2
objects from which to choose for the third box. Continuing in this
way we see that when we get to the last box there is only one object
left, so we choose one out of one. By the multipHcation principle
we have
pen, n) = net' - 1) (n - 2) 1 or
For example,
P(7, 7)
P(28,28)
7654321 = 7!
28 2726 .. 321
pen, n) = n! .
28! .
The argument just used to evaluate Pen, n) can be applied just
as well to Pen, r). For instance, we note that
P(28,5) = 2827262524.
We observe that in this product of 5 consecutive integers the differ-
ence between the largest and the smallest, that is, between 28 and
24, is 4. In general, Pen, r) is the product of the r integers n,
n - 1, n - 2, "', n - r + 1:
pen, r) = n(n - 1) (n - 2) . (n - r + 1).
14 MATHEMATICS OF CHOICE
To see that this is the product of r consecutive integers we recall
that the number of integers from k to n inclusive is n - k + 1
(see p. 4), so the number of integers from n - r + 1 to n inclusive is
n - (tJ - r + 1) + 1 = r.
Note that, if r = n, this formula for pen, r) is in harmony with
the earlier formula
P(tJ, n) = n(n - 1) (tJ - 2) 1 .
We now proceed to another formula for P(tJ, r). As an example
consider
P(1O,4) = 10.987,
which can be written as a fraction involving factorials thus:
10987654321 10!
P(10,4) = 10987 =
654321 6!
The same procedure works in the general case pen, r):
pen, r) = n(n - 1) (n - 2) (n - r + 1)
n(tJ - 1) (n - 2) (n - r + 1)(n - r)(tJ - r - 1) 1
(n - r)(n - r - 1) 1
n!
(2.1) pen, r)
(tJ - r)!
Example. How many integers between 100 and 999 inclusive con-
sist of distinct odd digits?
Solution. The odd digits are 1, 3, 5, 7, 9; the even digits are 0, 2,
4, 6, 8. An integer such as 723 is not to be counted because it con-
tains the even digit 2; and an integer such as 373 is not to be counted
because it does not have distinct digits. The question amounts to
asking for the number of permutations of the five distinct digits 1,
3, 5, 7, 9, taken three at a time. The answer is
PER M UTA T ION S, COM BIN A T ION S 15
5! 5!
P(5 3) = = - = 54-3 = 60.
, (5 - 3)! 2!
Fonnula (2.1) for Pen, r) cannot be used to solve ~ l l problems
about pennutations, because not all such problems admit as solu-
tions all ordered arrangements of n distinct objects, r at a time.
A problem can sometimes be solved by direct use of the multiplica-
tion principle, as the following examples illustrate.
Example. How many integers between 100 and 999 have distinct
digits?
Solution. This is not simply P(lO, 3), the number of pennutations
of all ten digits taken three at a time, because 086, for example, is
not a number between 100 and 999. The digit 0 can be used in the
units' place (as in 860), or in the tens' place (as in 806), but not in
the hundreds' place. Consider three boxes to be filled by the digits
of any of the integers under consideration:
D
hundreds'
place
D
tens'
place
D
units'
place
There are nine choices for the digit in the hundreds' place, because 0
cannot be used. There are then nine choices for the digit in the tens'
place, namely 0 together with the eight non-zero digits not used
already. Similarly there are eight choices for the digit used in the
units' place. Hence the answer is 99-8 or 648.
Example. Of the 648 integers in the preceding problem, how many
are odd numbers?
Solution. A number is odd if its units digit is odd, Le. if the digit
in the units' place is one of 1, 3, 5,7,9. So it is best to begin the argu-
ment by asking how many choices there are for the digit in the units'
place; the answer is five. Next, turn to the hundreds' place; there are
eight digits from which a selection can be made, namely all the non-
zero digits except the one already used in the units' place. Finally
there are eight choices for the digit in the tens' place, so the answer
is 58-8 or 320.
16 MATHEMATICS OF CHOICE
Some problems can be solved most readily by considering separate
cases.
Example. How many of the first 1000 positive integers have dis-
tinct digits?
Solution. Setting aside the integer 1000, whose digits are not dis-
tinct, the others can be separated into three types:
Integers with one digit: 1,2, 3, ",,9;
Integers with two digits: 10, 11, 12, ",,99;
Integers with three digits: 100, 101, 102, "', 999.
The number of three-digit integers with distinct digits is 648, as
shown in a previous example. A similar argument shows that there
are 81 two-digit integers and, of course, 9 one-digit integers that meet
the specification of distinct digits. Hence the answer is
648 + 81 + 9 = 738.
The idea used here is called the addition principle: If the things
to be counted are separated into cases, the total number is the sum
of the numbers in the various cases.
2.4 Zero Factorial
An interesting phenomenon turns up if we use formula (2.1) for
Pen, r) in a case such as
7!
P(7, 7)
(7 - 7)!
7!
O!
The notation O!, in words, "zero factorial", has so far not been
defined. In mathematics we can define the meaning of the symbols
in any way we please, provided of course that there is consistency.
In the presen t case, since we had determined earlier that P (7, 7) = 7! ,
consistency requires that
P(7,7) 7!
7!
O!
PER M UTA T ION S, COM BIN A T ION S 17
Thus we should and do define zero factorial to be one:
O! = 1.
This may look strange but it is a useful definition. It is related to
other combinatorial notation, not just to P(n, r).
Problem Set 4
1. Evaluate P(7,3), P(8,4) and P(20, 2).
2. Verify that P(7, 3) = P(15, 2) and that P(6, 3) = P(5, 5).
3. Prove that P(n, 1) + P(m, 1) = P(n + m, 1) for all positive
integers m and n.
4. Prove that P(n, n) P(n, n - 1) for aU positive integers n.
5. How many fraternity names consisting of three different Greek
letters can be formed? (There are twenty-four letters in the Greek
alphabet.)
6. What would be the answer to the preceding question if repetitions
of letters were allowed? What would it be if repetitions of letters
were allowed and two-letter names were also included in the count?
7. How many integers between 1000 and 9999 inclusive have distinct
digits? Of these how many are odd numbers?
8. From the digits 1, 2, 3, 4, 5, how many four-digit numbers with
distinct digits can be constructed? How many of these are odd
numbers?
9. From the digits 0, 1, 2, 3, 4, 5, 6, how many four-digit numbers
with distinct digits can be constructed? How many of these are
even numbers?
10. How many integers greater than 53000 have the following two
properties: (a) the digits of the integer are distinct; (b) the
digits 0 and 9 do not occur in the number?
18 MATHEMATICS OF CHOICE
11. In the preceding problem what would the answer be if condition (b)
were changed to "the digits 8 and 9 do not occur in the integer"?
2.5 Combinations
Whereas a permutation is an ordered arrangement of objects, a
combination is a selection made without regard to order. The notation
C(n, r) is used for the number of combinations of a certain special
type, in parallel with the notation Pen, r) for permutations. Thus
C(n, r) denotes the number of combinations, r at a time, that can
be selected out of a total of n distinct objects.
Consider C(S, 3) for example. Let the five objects be A, B, C,
D, E. Then it can be observed that C(S, 3) = 10, because there
are ten combinations of the objects taken three at a time:
(2.2)
A,B,C
A,D,E
A,B,D
B,C,D
A,B,E
B,C,E
A,C,D
B,D,E
A,C,E
C,D,E.
Notice that each of these ten triples is simply a collection in which
order does not matter. The triple C, D, E for example could have
been written D, E, C or E, C, D, or in any other order; it counts
as just one triple.
Given n distinct objects, C(n, r) is the number of ways of
choosing r objects from the total collection. Of course it is presumed
that r does not exceed n, that is r < n. The meaning of C(n, r)
can also be stated in terms of a set of n elements. C(n, r) is the
number of subsets containing exactly r elements. For example, the
listing (2.2) above gives all subsets of three elements selected from
theset A,B, C,D, E.
Before deriving a general formula for C(n, r), we compute the
value of C(26, 3) to illustrate the argument. C(26, 3) can be
thought of as the number of ways of choosing three letters out of a
26 letter alphabet. One such choice, for example, is the triple D, Q, X,
taken without regard to order. This one combination D, Q, X cor-
responds to the six distinct permutations
DQX DXQ QDX QXD XDQ XQD.
PER M UTA T ION S, COM BIN A T ION S 19
In fact, each of the C(26,3) combinations corresponds to P(3,3) or
3! = 6 permutations. Hence there are six times as many permutations
as there are combinations:
P(26,3) = 6C(26, 3).
But we have already computed the value
P(26,3) = 262524 = 15600
in Problem 2.3. Hence we get
6C(26,3) = 15600, so that C(26, 3) = 2600.
We now generalize this argument to get a relationship between
C(n, 1') and Pen, 1') and then evaluate C(n, r) by use of the
formula (2.1) for Pen, 1'). With n distinct objects, C(n,1') counts
the number of ways of choosing r of them without regard to order.
Anyone of these choices is simply a collection of r objects. Such a
collection can be ordered in r! different ways. Since to each combina-
tion there correspond r! permutations, there are rl times as many
permutations as there are combinations:
P(n,1') = r!C(n, r) or C(n, 1')
Pen, r)
r!
But we know by formula (2.1) that Pen, r) equals nl/(n - r)!,
and hence we get the basic formula for C(n, r),
(2.3)
n!
C(n, r) = .
1'1(n - 1')!
This is perhaps the most widely used formula in combinatorial
analysis. The number C(n, r) is often represented in other ways,
for exampJe
nCr, "Cr, C:,
and C).
The last of these is very common; it is to be read H n over r" or
20 MATHEMATICS OF CHOICE
"the binomial coefficient n over r". Binomial coefficients occur in the
expansion of a power of a sum of two terms, such as (x + y)8; this
is one of the topics of the next chapter.
There is one simple property of C(n, r) that is almost obvious,
namely
(2.4) C(n, r) = C(n, n - r).
Let us take n = 5 and r = 3 as an illustration. Then the equation
(2.4) becomes C(S, 3) = C(S, 2) and can be verified as follows.
Taking the five objects to be A, B, C, D, E, we have seen that
C(S, 3) = 10, the ten triples having been written out in full detail
in (2.2). Now when a triple, such as A, C, D, is selected, there is a
pair (in this case B, E) left un selected. So corresponding to each
selected triple in (2.2) we can write a corresponding unselected pair
(in parentheses):
A, B, C(D, E)
A, C, D(B, E)
B, C, D(A, E)
C, D, E(A, B)
A, B, D(C, E)
A, C, E(B, D)
B, C, E(A, D)
A, B, E(C, D)
A, D, E(B, C)
B, D, E(A, C)
It follows that the number of ways of choosing three objects out of
five is the same as the number of ways of choosing two objects out
of five, so C(S, 3) = C(S, 2) = 10.
In general, corresponding to every selection of r things out of n
there is a set of n - r un selected things, the ones not in the selection.
Hence the number of ways of choosing r things must be the same
as the number of ways of choosing n - r things, and so formula
(2.4) is established.
Hin formula (2.4) we replace r by 0 weget C(n,O) = C(n,n).
Now C(n, n) means the number of ways of choosing n things out
of n, so C(n, n) = 1. But C(n, 0) seems to have no meaning:
" the number of ways of choosing no things out of n ". It is convenient
to define C(n,O) to be 1. Notice that this harmonizes with formula
(2.3) which gives, for r = 0,
n! n!
C(n, 0)
O!n!
1
Olen - O)!
PERMUTATIONS, COMBINATIONS 21
because O! = 1. We also define C(O,O) = 1.
It is convenient to extend the definition of C(n, r) to all integers
nand r, even negative integers, for then various formulas can be
written without qualification or added explanation. If n is negative,
if r is negative, or if r > n, C(n, r) is defined to be zero. For ex-
ample, C(-1O,8), C(S, -8), and C(10, 12) are zero by definition.
In other words
C(n, r) = 0 in case one or more of n, r, n - r is negative,
n!
in all other cases. C(n, r)
r!(n - r)!
Problem Set 5
1. Evaluate C(6,2), C(7,4) and C(9,3).
2. Show that C(6,2) = C(6, 4) by pairing off the 2-subsets and the
4-subsets of the set A, B, C, D, E, F.
3. An examination consists of ten questions, of which a student is to
answer eight and omit two. (a) In how many ways can a student
make his selection? (b) If a student should answer two questions
and omit eight, in how many ways can he make his selection?
4. A college has 720 students. In how many ways can a delegation of ten
be chosen to represent the college? (Leave the answer in factorial
form.)
5. Verify that C(n, r) = C(n, n - r) by use of fonnula (2.3).
6. Twenty points Jie in a plane, no three collinear, i.e. no three on a
straight line. How many straight lines can be formed by joining
pairs of points? How many triangles can be formed by joining triples
of points?
7. In how many ways can ten persons be seated in a row so that a
certain two of them are not next to each other?
8. Prove that the product of five consecutive positive integers is di-
visible by 5!, and more generally, that the product of r consecutive
22 MATHEMATICS OF CHOICE
integers is divisible by,.!. Suggestion: Examine the formula for
C(n, ,.).
9. There are nine different books on a she1f; four are red and five are
green. In how many different orders is it possible to arrange the
books on the shelf if
(a) there are no restrictions;
(b) the red books must be together and the green books together;
(c) the red books must be together whereas the green books may
be, but need not be, together;
(d) the colors must alternate, i.e. no two books of the same color
may be adjacent?
10. A certain men's club has sixty members; thirty are business men and
thirty are professors. In how many ways can a committee of eight
be selected (a) if at least three must be business men and at least
three professors; (b) the only condition is that at least one of the
eight must be a business man? (Leave the answers in Cen,,.)
symbols.)
11. In how many ways can a ballot be validly marked if a citizen is to
choose one of three candidates for mayor, one of four for city council-
man, and one of three for district attorney. A citizen is not required
to vote for all three positions, but he is expected to vote for at least
one.
12. If 20! were multiplied out, how many consecutive zeros would occur
on the right hand end?
13. If 52! were mUltiplied out, how many consecutive zeros would occur
on the right hand end?
14. Signals are made by running five colored flags up a mast. How
many different signals can be made if there is an unlimited supply
of flags of seven different colors?
15. In the preceding question what would be the answer if (a) adjacent
flags in a signal must not be of the same color; (b) all five flags in a
signal must 'be of different colors?
16. From the 26 letters of the alphabet, how many subsets of three
letters are there such that no two of the three are consecutive letters
of the alphabet?
PERMUTATIONS, COMBINATIONS 23
17. In how many ways can all of n distinct objects be put in k distinct
boxes, not more than one in each box, if there are more boxes than
things?
2.6 Permutations of Things in a Circle
The permutations that we have considered so far are called linear
permutations because they are permutations of things in a line or in
a row. Permutations of things in a circle, or circular permutations,
occur in such a problem as: In how many ways can five persons be
seated at a round table?
First solution. If we label the persons A, B, C, D, E, we see that
the five linear permutations
ABCDE, BCDEA, CDEAB, DEABC, EABCD
are identical when thought of as circular permutations. This is so
because two arrangements of people at a round table are considered
to form the same circular permutation if one can be obtained from
the other by rotating everybody around the circle by the same
amount and in the same direction. This is the case, for example, if
everybody moves one place to his right. Hence we can get at the
number of circular permutations by relating them to the linear per-
mutations: each circular permutation corresponds to five linear permu-
tations, so there are only! as many circular permutations as there
are linear permutations. But there are 51 linear permutations of five
objects, and hence the answer to the question is
H5!) = H54321) = 4321 = 4!.
Second solution. Since a circular arrangement is unchanged if
every object (or every person) is moved uniformly one place to the
right, or uniformly two places to the right, etc., we can fix the place
of one person and arrange the others with reference to him around
the table. Putting A in a fixed place, we see that anyone of four
persons can be immediately to A's right, then anyone of three
remaining persons in the next place to the right, anyone of two in
the next place, and the remaining person in the final place; see Figure
2.1. Using the multiplication principle we get the answer 4321.
24 MATHEMATICS OF CHOICE
Figure 2.1
In general there are (n - 1)! circular permutations of n distinct
objects. To show this, we can argue as we did in the solutions just
given for the special case n = 5. In particular, let us follow the
second solution. We think of n persons, say A, B, C, D, "', being
seated at a round table. Since a uniform rotation of the persons does
not alter an arrangement, we might as well put person A in one
fixed place and then consider the number of ways of arranging all
the others. In the chair to the right of A we can put any of the
other n - 1 people. That done, we move to the next chair to the
right into which we can place anyone of the remaining n - 2 per-
sons. Continuing in this counterclockwise fashion around the circle,
we see that the multiplication principJe gives the answer
(n - 1) (n - 2) (n - 3) ... 1 = (n - 1)!.
Problem Set 6
1. In how many ways is it possible to seat eight persons at a round table?
2. In the preceding question, what would be the answer if a certain two
of the eight persons must not sit in adjacent seats?
3. In how many ways can four men and four ladies be seated at a round
table, if no two men are to be in adjacent seats?
PERMUTATIONS, COMBINATIONS 25
4. In the preceding question, suppose the persons are four married
couples. What would he the answer to the question if no husband and
wife, as well as no two men, are to he in adjacent seats?
5. How many different firing orders are theoretically possihle in a six
cylinder engine? (If the cylinders are numhered from 1 to 6, a firing
order is a list, such as 1, 4, 2, 5, 3, 6, giving the rotational order in
which the fuel is ignited in the cylinders.)
6. How many differently colored hlocks of a fixed cuhical shape can he
made if six colors are available, and a hlock is to have a different color
on each of its six faces? The definition of differently colored hlocks is
the same as in Prohlem 1.2 in Chapter 1.
7. How many different cuhes with the six faces numhered from 1 to 6
can he made, if the sum of the numhers on each pair of opposite
faces is 7?
2.7 Summary
The multiplication principle: If one event can occur in m ways,
and a second event can occur independently of the first in k ways,
then the two events can occur in mk ways.
Formula for n factorial:
n! n(n - 1) (n -2) 1 for positive integers n ,
O! 1.
The number of permutations (Le. ordered arrangements) of n
distinct objects, taken r at a time, is
n!
P(n, r)
(n - r)!
The number of combinations (i.e. selections, without regard to
order) of n distinct objects, taken r at a time, is
n!
C(n, r)
r!(n - r)!
26 MATHEMATICS OF CHOICE
C(n, r) can also be interpreted as the number of r-subsets (subsets
containing r elements) of a set of n objects. A frequently used
alternative notation for C(n, r) is C) . A basic property of
C(n, r) is
C(n, r) = C(n, n - r).
The symbol C(n, r) was given a numerical value for all pairs of
integers n and r, as follows:
C(n, r) = 0 in case one or more of n, r, n - r is negative;
n!
C (n, r) = in all other cases.
r!(n-r)!
The number of circular permutations (Le. arrangements in a circle)
of n distinct objects is (n - 1)!'
The formulas for P(n, r) and C(n, r) apply only to special
situations of ordered arrangements and unordered selections where
the n objects are distinct and repetitions in the r-sets are not allowed.
They are not universal formulas for permutations and combinations.
However, in later chapters many problems are reduced to these
special cases.
CHAPTER THREE
Com.binations and Binom.ial
Coefficients
There are other ways, besides those in the preceding chapter, of
looking at C(n, r), the number of combinations of' n different
things taken r at a time. Several of these possibilities are studied in
this chapter. We begin by pointing out that we can easily solve the
path problem which was listed as Problem 1.3 in Chapter 1. For con-
venience, we repeat the statement of the question.
3.1 A Path Problem
A man works in a building located seven blocks east and eight
blocks north of his home. Thus in walking to work each day he goes
fifteen blocks. All the streets in the rectangular pattern are available
to him for walking. In how many different paths can he go from home
to work, walking only fifteen blocks?
Let us denote by E the act of walking a block east, and by N
the act of walking a block north, and let us interpret a string of E's
and N's such as
EENNNENN
28 MATHEMATICS OF CHOICE
as meaning (reading from left to right) that a man walks two blocks
east, then three blocks north, then one block east, and finally two
blocks north. Then any path from home to work can be identified
with an appropriate pattern of seven E's and eight N's in a row.
For example, the path beginning with three blocks east, then two
north, then four east, and finaUy six north is
EEENN EEEENNNNNN.
Thus to each path there corresponds a string of seven E's and eight
N's properly interspersed in a row; and conversely, to any such string
of E's and N's there corresponds exactly one path. We can therefore
rephrase the problem as follows: In how many ways can seven E's
and eight N's be written in a row?
DDDDDDDDDDDDDDD
If we think of fifteen boxes to be filled with seven E's and eight
N's, we see that the answer to this question is just the number of
ways we can choose seven boxes out of fifteen to fill with E's, and
this number is
C(15, 7)
15!
7!8!
1514131211109
76543-2
= 6435.
It is also the same as the number of ways we can choose eight boxes
out of fifteen to fill with N's, that is C(15, 8). In Chapter 2 we saw
that
C(n, r) C(n, n - r), and so C(15, 7) C(15, 8) 6435.
3.2 Permutations of Things Not All Alike
We have just seen that C(15,7) can be interpreted as the number
of permutations of fifteen things of which seven are alike and the
other eight are alike. In general C(n, r) can be interpreted as the
number of permutations of n things of which r are alike and the
other n - r are alike. This idea can also be generalized from two
batches of things, like E's and N's, to more batches. We begin
with an example.
BINOMIAL COEFFICIENTS 29
PROBLEM 3.1 How many different permutations are there of the
letters of the word Mississippi, taken all at a time? In other words,
in how many difTeren t orders is it possible to write the letters of the
word MississiPPi?
SOLUTION. There are eleven letters of which four are alike (the i's),
another four alike (the s's) , and another two alike (the P's). Consider
eleven boxes for insertion of letters to give the various permutations.
Choose four of these for the i's; there are C(11, 4) ways of doing
this. Then choose four of the remaining seven boxes for the s's; there
are C(7,4) ways of doing this. Then from the remaining three choose
two boxes for the p's; there are C(3, 2) ways of doing this. The
letter M will fill the remaining box. By the multiplication principle
we get the answer
COl, 4) C(7, 4) C(3, 2)
11! 7! 3!
4!7! 4!3! 2!t!
11!
4!4!2!1!
Of course, if we choose the letters for the boxes in some other order,
the calculation looks a little different, but the final answer is the
same. For example, suppose we begin by choosing one box out of the
eleven for the letter M, then four boxes for the s's, then two boxes
for the p's, with the remaining four boxes for the i's; then the total
number of different arrangements of the letters is
11 1 1O! 61 It!
C(11, 1) C(lO, 4) C(6, 2)
1 !1O! 4161 2!4!
the same as before.
SECOND SOLUTION. An alternative argument of quite a different
kind goes like this: Let x denote the number of permutations in our
answer. If we were to replace the four i's by four letters different
from each other and from the remaining letters of Mississippi, such
as i,j, k, and l, we would obtain x4! permutations from the original
x because each of the original permutations would give rise to 41.
Similarly if the four s's were replaced by four distinct letters, again
we would have 41 times as many permutations. And if the two p's
were replaced by unlike letters, we would have 2! times as many
permutations as before. But now we would have eleven letters, all
30 MATHEMATICS OF CHOICE
different, and so 11! permutations. This gives the equation
x4!4!2! = 11!, so that x
11!
4!4!2!
More generally, if there are n things of which a are alike, another
b are alike, another c are alike, and finally the remaining dare
alike, we can find the number of permutations of the n = a + b + c + d
things taken all at a time by a similar argument: If x denotes the
number of different permutations,
xalblc!dl = n!, so that x
n!
a!b!cld!
There need not be just four batches of like things. In general, if there
are n things of which a are alike, another b are alike, another c
are alike, etc., then the number of permutations of the n things
taken all at a time is
n!
(3.1)
albIc!
where n = a + b + c + ....
Here the dots in the denominator stand for" and so on", that is, for
as many additional factorial terms as may be necessary.
Problem Set 7
1. How many permutations are there of the letters, taken an at a time,
of the words (a) assesses, (b) humuhumunukunukuapuaa (Ha-
waiian word for a species of fish).
2. Derive formula (3.1) in the case of four batches, n = a + b + c + d,
by paralleling the first argument given for Problem 3.1.
3. In the path problem in Section 3.1, denote the north-south streets by
A, B, C, , H and the east-west streets by 1st, 2nd, "', 9th. Pre-
sume that the man lives at the corner of 1st and A, and works at the
corner of 9th and H. Given the information that aU streets are avail-
able for walking with one exception, namely that E street from 5th
BINOMIAL COEFFICIENTS 31
to 6th is not cut through, in how many different paths can the man
walk from home to work, walking only fifteen blocks?
4. As a generalization of the path problem to three dimensions, consider
a three-dimensional steel framework; how many different paths of
length fifteen units are there from one intersection point in the frame-
work to another that is located four units to the right, five units back,
and six units up?
5. In how many different orders can the following 17 letters be written?
xxxxyyyyyzzzzzzww
3.3 Pascal's Formula for C(n, r)
Consider the r-subsets, i.e. subsets consisting of r elements, of a
set of n objects. The number of r-subsets is C(n, r). Of the set of
n objects, let us single out one and label it T. The r-subsets can be
separated into two types:
(a) those that contain the object T;
(b) those not containing the object T.
Those that contain the object T are in number C(n - 1, r - 1),
because along with T in any r-subset there are r - 1 other objects
selected from n - 1 objects. Those that do not contain the object
T are in number C(n - 1, r), because these r-subsets are selected
from n - 1 objects, T being out. We have separated the entire
collection of r-subsets into two types and then determined the number
of each type, thus establishing Pascal's formula
(3.2) C(n, r) = C(n - 1, r) + C(n - 1, r - 1).
There is a simple device that extends the use of such formulas. We
observe that the reasoning leading to relation (3.2) does not depend
on the precise number of objects n or r. The argument would have
made equally good sense if we had begun with m objects from which
k were to be selected to form k-subsets, and would have led to the
equally meaningful formula
C(m, k) = C(m - 1, k) + C(m - 1, k - 1).
32 MATHEMATICS OF CHOICE
Similarly, had we begun with n + 1 objects and selected I' of these,
we would have derived the formula
(3.3) C(n + 1,1') = C(n,r) + C(n, I' - 1).
There is really no need to rethink the whole process to get formula
(3.3); it can be obtained from (3.2) by replacing n by n + 1; thus
Cen,r) becomes C(n + 1,1');
C(n - 1, r) becomes C(n + 1 - 1,1') or C(n, 1');
C(n - 1, I' - 1) becomes C(n + 1 - 1, I' - 1) or C(n, I' - 1);
and formula (3.2) becomes formula (3.3).
We can replace n by n + 1 in formula (3.2) and wind up with
a valid formula because formula (3.2) holds for any positive integers
n and 1', provided only that n >- r. So we can replace the symbols n
and I' by any other symbols subject only to the conditions that (i)
the new symbols denote positive integers and (ii) the symbol re-
placing n stands for an integer at least as large as the integer de-
noted by the symbol replacing r. For example, in formula (3.2) we
can replace n by n + 1, or n + 2, or n + 3. [We cannot replace
n by (n + 1) /2, because of (i), nor by I' - 3, because of condition
(ii) .J
In one sense such replacements give no new information. For ex-
ample, formula (3.2) with n = 20 and r = 6 gives the information
C(20, 6) = C(19,6) + C(19, 5).
Exactly the same equation comes from (3.3) with n = 19 and
I' = 6. However, if we add equations (3.2) and (3.3) we get
C(n,r) + C(n + 1,1')
=C(n,r) + C(n, I' - 1) + C(n - 1, r) + C(n - 1, I' - 1);
and, by subtracting C(n, 1') from both sides, we obtain the new
formula
(3.4) C(n+1,r) C(n,r-1) + C(n-1, 1') + C(n-1, 1'-1).
BINOMIAL COEFFICIENTS 33
This illustrates the fact that we can get new formulas from simpler
ones like (3.2) without making any arguments about the meaning of
the symbols themselves, but just by the manipulation of the notation.
Problem Set 8
1. Calculate C(6,2), C(5,2) and C(5,1) and verify that the first of
these is the sum of the other two.
2. Write C(9,4) + C(9, 3) as a single combination form C(n, r).
3. Write C(50, 10) - C(49,9) as a single combination form C(n, r).
4. What is the resulting equation if (a) we replace n by n - 1 in
formula (3.2); (b) we replace n by n - 1 and r by _r - 1 in
(3.2) ?
5. What are the resulting formulas, if, in
C(n, r)
(a) we replace n by n - 1;
by r - I?
nl
rl(n - r)!'
(b) we replace n by n - 1 and r
6. Using the results of the preceding question give a proof of formula
(3.2) different from the one given in the text, by an argument in-
volving factorials.
7. The proof in the text of formula (3.2) involved consideration of a
special one, T, of the n things. Consider now two special ones, say
Sand T. The combinations can be divided into four classes: those
that contain both Sand T; those that contain S but not T;
those that contain T but not S; those that contain neither S nor
T. What formula results if we write C(n, r) as a sum of the numbers
of members of these four classes? Derive the formula thus obtained
in another way, by using formula (3.2).
8. Apart from one exception, Pascal's formula (3.2) holds for all pairs
of integers nand r, positive, negative or zero. What is this one
exception?
34 MATHEMATICS OF CHOICE
3.4 The Binomial Expansion
Any sum of two unlike symbols, such as x + y, is called a binomial.
The binomial expansion, or binomial theorem, is a formula for the
powers of a binomial. If we compute the first few powers of x + y,
we obtain
(3.5)
(x + y)l
(x + y)2
(x + y)3
(x + y)4
(x + y)i
x+y
x
2
+2xy+y2
xl + 3x2y + 3xy2 + y3.
x4 + 4x1y + 6x2y2 + 4xy + y4,
xi + 5x4y + 10x3y2 + lOx2yB + 5xy4 + yi.
Using equation (3.5) as a basis for discussion, we note that the right
member has six terms: xi, 5x4y, 10x3y2, 1 OX2yB , 5xy4 and y6. What
we want to do is explain the coefficients of these terms, I, 5, 10, 10,
5, I, by means of the theory of combinations.
First let us examine the results of multiplying several binomials.
For example, to multiply (a + b) by (e + d) we apply the dis-
tributive law and obtain
(a + b)(e + d) = (a + b)e + (a + b)d = ac + be + ad + bd.
Each of the terms in this sum is a product of two symbols, one taken
from the first parenthesis of our original product and the other from
the second. Notice that there are precisely 22 = 4 different ways
of selecting one symbol from the first binomial and one symbol from
the second.
We now examine the product of three binomials
(a + b) (e + d) (e + f)
= ace + acf + ade + adf + bee + bef + bde + bdf
and observe that it consists of eight terms, each a product of three
symbols selected, respectively, from the three binomials. Again we
observe that 8 = 222 is precisely the number of different ways
that three symbols can be selected, one from each binomial. Similar
results hold for the expanded product of four or more binomials. Let
us consider the product
(a + b) (e + d) (e + f) (p + q) (r + s).
BINOMIAL COEFFICIENTS 35
Its expansion which we will not write out in full, is a sum of 2
6
= 32
terms. As sample terms we cite
adeqs and beeps.
Each term is a product of five symbols, one selected from each of the
five original binomials.
Now in the light of these observations let us look at (x + y)6 as
the product
(x + y) (x + y) (x + y) (x + y) (x + y).
There are 32 ways of selecting five symbols, one from each paren thesis,
but the resulting 32 expressions are not all distinct. For example,
multiplication of the particular x's and y's shown here
~ ~ ~ ~ ~
(x + y)(x + y)(x + y)(x + y)(x + y)
with arrows directed at them results in the product
But x"y also arises if we select x's from the first three parentheses
and y's from the remaining two. In fact, the expression x"y2 arises
in the expansion of (x + y)6 in exactly as many ways as three x's
and two y's can be written in different orders:
xyyxx, xxxyy, yxxxy, etc.
By the theory of Section 3.2 there are
5!
C(5,2) = 2!3! = 10
different arrangements of these symbols. This analysis explains the
coefficient 10 of x"y2 in equation (3.5), the expansion of (x + y)6.
The other coefficients can be obtained in a similar way, so we have
(x + y)6 = C(5, 0)x6 + C(5, 1)x4y + C(5, 2)x"y
+ C(5, 3)X2ya + C(5, 4)xy4 + C(5, 5)y6.
36 MATHEMATICS OF CHOICE
This is not as concise as formula (3.5), but it suggests a general
pattern. It suggests that the coefficient of xByB in the expansion of
(x + y)6 is C(6, 3), the number of ways of writing three x's and
three y's in a row; and that the coefficient of X2y4 in the same ex-
pansion is C (6, 4), the number of ways of writing two x's and four
y's in a row. (Of course C(6, 4) is the same as C(6, 2), but we shall
make the combination symbol follow the number of y's rather
than the number of x's. It could be done the other way around.)
Now let n be any positive integer. The expression (x + y)n is
defined as
(x + y) (x + y) (x + y) (x + y)
(n factors).
In the expansion of this product xn-iyi arises in as many ways as a
batch of n - j x's and a batch of j y's can be written in a row.
Hence the coefficient of xn-iyi is C(n, j). Thus the binomial ex-
pansion can be written as
(x + y)n = C(n, O)x
n
+ C(n, 1)x
n
-
1
y + C(n, 2)xn-2y2
+ C(n, 3)x
n
-
3
yB + ... + C(n,j)xn-iyi
+ + C(n, n)yn.
As was remarked in Chapter 2, the notation (:) is often used in
place of C(n,j), particularly in the binomial expansion. So in many
books it looks like this:
( ~ ) xn + (:) xn-ly + (;) xn-2y2 + (;) x
n
-
3
yB
+ ... + (:) xn-iyi + ... + C) yn.
The first and last terms can be written more simply as xn and yn,
and this suggests yet another form in which the binomial expansion
is often given:
(x + y)n
BINOMIAL COEFFICIENTS 37
n(n - 1) n(n - 1) (n - 2)
+ 2 1 X .. -
2
y2 + x
n
-
a
y3
321
+
n(n - 1) (n - 2) (n - 3)
----'----'-------'--'-----'- x
n
-4.. .. + + y"
4.3.2.1 f
Problem Set 9
1. How many terms are therein the expansion of (X+y)6? of (x+y)n?
2. Write out the expansion of (x + y)6 with the coefficients in the
C(n, r) form. Substitute 1 for x and 1 for y and so evaluate the sum
C(6,0) + C(6, 1) + C(6, 2) + C(6, 3) + C(6, 4) + C(6, 5) + C(6, 6).
3. Substitute 1 for x and -1 for y in the expansion of (x + y)6 and
so evaluate the sum
C(6,0) - C(6, 1) + C(6, 2) - C(6,3) + C(6, 4) - C(6, 5) + C(6, 6).
4. What is the coefficient of u3v
7
in (u + v)1, expressed as a natural
number?
5. Write out the full expansion of (u + v}7 with the coefficients written
as natural numbers.
6. Verify that the expansion of (x + y)8 can be expressed in this way:
the sum of all terms of the form
where a and b range over all pairs of non-negative integers a and
b such that a + b = 8.
38 MATHEMATICS OF CHOICE
7. Verify that (x + Y)" is the sum of an terms of the form
n!
alb! ~ y " ,
where a and b range over all possible pairs of non-negative integers
such that a + b = n.
8. Without expanding the product
(a + b + c)(d + e + f)(P + q + r + s)(x + Y + u + v + w)
answer the following questions: How many terms will there be? Which
of the following are actual terms in the expansion? oops, bdsw, bfpu,
bfxw.
3.5 The Multinomial Expansion
The idea of the preceding section carries over from binomials to
sums of more than two elements. As an example consider the
expression
(x + Y + z + W)17;
this, by definition, is a product of seventeen identical factors
x + Y + z + w:
(x + Y + z + w) (x + y + z + w) (x + Y + z + w).
The expansion of this has a term, for example, of the form x'yz6.zv2,
because the sum of the exponents is 4 + 5 + 6 + 2 = 17. This
particular term occurs in the expansion as often as x can be chosen
from four of the seventeen factors, y from five of the remaining
thirteen factors, z from six of the remaining eight factors, and w
then taken automatically from the other two factors. Paralleling the
argument made in the case of the binomial expansion, we see that
this is simply
C(17, 4) C(13, 5) C(8, 6)1
17! 13! 8!
--.-.--
13!4! 8!5! 6!2!
171
4!5!6!2!
BINOMIAL COEFFICIENTS 39
The expansion of (x + y + z + w)l7 has been shown to contain the
tenu
17!
--x4y5z6w2
4!5!6!2! .
This coefficient is very much like the numbers obtained in Section
3.2; and this is not surprising since aU we are calculating here is
the number of ways of ordering the following seventeen letters:
x x x x y y y y y z z z z z z w w.
More generally, we can say that the expansion of (x + y + z + w) 17
is the sum of all tenus of the form
17!
--X"",bzc.zu1
a!b!c!d! ;y. ,
where a, b, c, d range over all possible sets of non-negative integers
satisfying a + b + c + d = 17. As a simple case we note the solu-
tion a = 17, b = 0, c = 0, d = 0, belonging to the tenu
17!
---- X17yG2fJuP
17!0!0!0!
or more simply XU in the expansion. Other solutions of
a+b+c+d=17
are, for example, a = 4, b = 5, c = 6, d = 2 and a = 4, b = 5,
c = 2, d = 6 and belong to the tenus
respectively.
17! 17!
---x4y5z6w2 and ---x4y5Z2w6
4!5!6!2! 4!5!2!6!'
Further generalization is apparent. For any positive integer n
(in place of the special number 17) we see that the expansion of
(x + y + z + w)n is the sum of all terms of the form
n!
--X"",bzc.zu1
a!b!c!d!;Y ,
40 MATHEMATICS OF CHOICE
where a, b, c, d range over all solutions of a + b + c + d = n
in non-negative in tegers.
There is no reason to restrict attention to a sum of four elements
x, y, Z, w. For any positive integer n, the multinomial expansion of
(x + y + z + w + ... ) ..
is the sum of all terms of the form
n!
----- xaybzc'W" ,
a!b!c!d!
where a, b, c, d, .. range over all solutions of
in non-negative integers.
Problem Set 10
1. Write out the trinomial expansion of (x + y + Z)4 in full.
2. What is the coefficient of x2y2z2.uru
2
in the expansion of
(x + y + z + w + U)lO?
3. What is the coefficient of xyzwuv in the expansion of
(x + y + z + w + u + V)6?
4. What is the sum of all the coefficients in the expansion of (x + y + Z)8?
of (x + y + z + W)l'l?
5. What is the sum of all numbers of the form
121
alblcl'
where a, b, c range over all non-negative integers satisfying
a + b + c = 12?
BINOMIAL COEFFICIENTS 41
3.6 Pascal's Triangle
The binomial coefficients in the expansion of (x + y) .. form an
interesting pattern if listed with increasing va1ues of n. We begin
with (x + y)O = 1 to give symmetry to the table:
from (x + y)O
1 1 from (x + y)l
2 1 from (x + y)2
3 3 from (x + y)3
1 4 6 4 etc.
1 5 10 10 5
1 6 15 20 15 6
1
7@>@35
21 7
1
8 28 70
56 28 8 1
This array, listed here as far as n = 8, is called Pascal's triangle.
The recursion relation C(n, r) = C(n - 1, r) + C(n - 1, r - 1)
of Section 3.3 reveals how this table can be made and extended with-
out difficulty. For example, the three numbers 21, 35 and 56 that
have been circled are the same as C(7, 2), C(7, 3) and C(8, 3),
the last of which is the sum of the first two by the recursion relation.
Thus, any number C(n, r) in Pascal's triangle is the sum of the
number directly above, C(n - 1, r), and the one to the left of that,
C(n - 1, r - 1). For example, if we wanted to extend the above
table to the next row, namely the tenth row, we would write
1, 1 + 8, 8 + 28, 28 + 56, 56 + 70, 70 + 56,
56 + 28, 28 + 8, 8 + 1, 1
or
1, 9, 36, 84, 126, 126, 84, 36, 9, 1.
These numbers are the coefficients in the expansion of (x + y)9,
and if we substitute x = 1 and y = 1 we get (1 + 1)9 or 29.
42 MATHEMATICS OF CHOICE
Hence the sum of the elements in the tenth row of Pascal's triangle,
1 + 9 + 36 + 84 + "', is 29. In general, if we substitute x = 1
and y = 1 in (x + y)n we get 2
n
, and so we can conclude that the
sum of the elements in the (n + 1)st row of Pascal's triangle is
(3.6) C(n,O) + C(n, 1) + C(n, 2) + ... + C(n, n) = 2n.
On the other hand, if we substitute x = 1 and y = -1 in (x + y)n
we get On or 0, and so we can conclude that
(3.7) C(n,O) - C(n, 1) + C(n, 2) - C(n, 3)
+ ... + (- 1) nC (n, n) O.
Problem Set 11
1. Extend Pascal's triangle to include n = 9, 10, 11, 12, 13.
2. Prove that the sum of the elements in the ninth row equals the sum
of the elements of all previous rows, with 1 added.
3. Prove that in any row of Pascal's triangle the sum of the first, third,
fifth, elements equals the sum of the second, fourth, Sixth,
elements.
3.7 The Number of Subsets of a Set
A man says to his son, "In cleaning up the attic I came across
seven issues of an old magazine named Colliers. Look them over and
take any you want. Whatever you don't want I will throwaway."
How many different selections are possible? Another way of stating
this problem is: How many subsets are there of a set of seven things?
One way to solve the problem is to say that the son may select all
seven, C(7,7), or six out of seven, C(7,6), or five out of seven,
C(7,5), and so on. This gives the answer
C(7,7) + C(7, 6) + C(7, 5) + C(7, 4) + C(7, 3)
+ C(7, 2) + C(7, 1) + C(7, 0).
BINOMIAL COEFFICIENTS 43
By formula (3.6) on page 42 this is the same as 27.
Another way to solve the problem is to concentrate on the in-
dividual copies of the magazine rather than on sets of them. Let us
denote the seven issues of the magazine by A, B, C, D, E, F, G.
Then A may be taken or rejected (two possibilities); B may be
taken or rejected (two possibilities); . ; G may be taken or
rejected (two possibilities). Using the mUltiplication principle we
have the answer
Thus a set of seven different things has 27 subsets, including the
whole set of all seven, and the empty set or null set with no elements.
If we disregard the whole set, the others are called proper subsets,
and so a set of seven different things has 27 - 1 proper subsets. In
general, a set of n different things has 2
n
subsets of which 2n - 1
are proper subsets. Among these subsets there are exactly C(n, r)
having r members.
Problem Set 12
1. How many different sums of money can be made up using one or
more coins selected from a cent, a nickel, a dime, a quarter, a half
dollar, and a silver dollar?
2. The members of a club are to vote "yes" or "no" on each of eight
issues. In marking his ballot, a member has the option of abstaining
on as many as seven of the issues, but he should not abstain in all
eight cases. In how many ways can a ballot be marked?
3. A travel agency has ten different kinds of free folders. The agent
tells a boy to take any he wants, but not more than one of a kind.
Assuming that the boy takes at least one folder, how many selections
are possible?
4. A biologist is studying patterns of male (M) and female (F) children
in families. A family type is deSIgnated by a code; for example, FMM
denotes a family of three children of which the oldest is a female and
the other two males. Note that FMM, MFM, and MMF are
different types. How many family types are there among families
with at least one but not more than seven children?
44 MATHEMATICS OF CHOICE
3.8 Sums of Powers of Natural Numbers
As a by-product of the theory of combinations we can get formulas
for the sum
of positive integers (natural numbers) from 1 to n, for the sum of
their squares,
12 + 22 + 3
2
+ 42 + ... + n2,
for the sum of their cubes, and so on. The idea is to use the recursion
relation (3.2) for C(n, r), which we rewrite in the form
(3.8) C(n - 1, r - 1) = C(n, r) - C(n - 1, r).
As an example to illustrate the method, let us write formula (3.8)
in succession with n = 9, n = 8, n = 7, "', n = 3, but with
r = 2 in all cases:
C(8, 1) C(9,2) - C(8,2)
C(7, 1) C(8,2) - C(7, 2)
C(6, 1) C(7,2) - C(6, 2)
(3.9) C(5, 1) C(6,2) - C(5,2)
C(4, 1) C(5,2) - C(4, 2)
C(3, 1) C(4,2) - C(3,2)
C(2, 1) C(3, 2) - C(2, 2).
If we add these equations there is much cancellation on the right,
with the result
C(2, 1) + C(3, 1) + C(4, 1) + C(5, 1)
+ C(6, 1) + C(7, 1) + C(8, 1) = C(9, 2) - C(2, 2),
2 + 3 + 4 + 5 + 6 + 7 + 8 = !9 8 - 1.
After adding 1 to both sides of this identity, we see that we have
found the sum of the natural numbers from 1 to 8 by an indirect
method, and this sum is ! (72) or 36.
BINOMIAL COEFFICIENTS 45
To do this in general, replace n in formula (3.8) successively by
m + 1, m, m - 1, .. , 4,3, keeping r fixed as before, r = 2.
This gives a chain of equations
(3.10)
C(m,l)
C(m - 1,1)
C(m - 2, 1)
C(3, 1)
C(2, 1)
C(m + 1, 2) - C(m, 2)
C(m,2) - C(m - 1, 2)
C(m - 1,2) - C(m - 2,2)
C(4,2) - C(3, 2)
C(3, 2) - C(2, 2).
Adding these equations we note that again there is considerable
cancellation on the right side, and the result is
C(2, 1) + C(3, 1) + ... + C(m-2, 1)
+ C(m-l, 1) + C(m, 1) = C(m+l, 2) - C(2, 2),
or
2 + 3 + ... + (m - 2) + (m - 1) + m = Hm + l)m - 1,
so that
(3.11) 1 + 2 + 3 + ... + (m-2) + (m-l) + m = !m(m+1).
It should be understood that if for example m = 2, the left side is
to be interpreted simply as 1 + 2.
To get a formula for the sum of the squares of the natural numbers,
we write the analogues of (3.10) with all values of nand r raised
by 1; that is, we write equation (3.8) with r = 3 and n replaced
successively by m + 2, m + 1, m, "', 5, 4 to get
C(m + 1,2) C(m + 2, 3) - C(m + 1,3)
C(m, 2) C(m + 1,3) - C(m, 3)
(3.12) C(m - 1,2) C(m, 3) - C(m - 1, 3)
. . . . .
C(4, 2) C(5, 3) - C(4, 3)
C(3,2) C(4,3) - C(3, 3).
46 MATHEMATICS OF CHOICE
Adding these, and then substituting the values for the combination
symbols, we have
C(3,2) + C(4, 2) + .. , + C(m - 1,2) + C(m, 2)
+ C(m + 1,2) = C(m + 2,3) - C(3, 3),
!32 + !43 + ... + !m(m - 1)
+Hm + l)m = Hm + 2) (m + 1)m - 1.
By adding 1 to both sides, then multiplying both sides by 2, we bring
this in to the form
12 + 23 + 34 + ... + (m - l)m
+ m(m + 1) = !m(m + l)(m + 2).
The products on the left side of this equation can be rewritten as
12 1(1 + 1) 12 + 1,
23 2(2 + 1) 22 + 2,
34 3(3 + 1) 3
2
+ 3,
. . . . .
(m-2) (m-l) (m-2)[(m-2) + IJ (m-2)2 + (m-2),
(m-1)m (m-1)[(m-l) + IJ (m-1)2 + (m-1),
m(m + 1) m
2
+m.
Substituting these we obtain
12 + 1 + 22 + 2 + 3
2
+ 3 + ...
+ (m - 1)2 + (m - 1) + m
2
+ m = im(m + 1) (m + 2)
or
[12 + 22 + ... + (m - 1)2 + m
2
J
+ [1 + 2 + ... + (m - 1) + mJ = lm(m + l)(m + 2).
We recognize the second expression in brackets as the sum of the
first m natural numbers calculated in formula (3.11). Using formula
(3.11) we see that
BINOMIAL COEFFICIENTS 47
[12 + 22 +
+ (m - 1) 2 + m2]
+ !m(m + 1) !m(m + 1) (m + 2).
This can be rewritten as
[12 + 22 + ... + (m - 1)2 + m2]
= {m(m + 1) (m + 2) - !m(m + 1).
The right member of this equation reduces to lm(m + 1) (2m + 1),
as can be readily calculated by simple algebra. Hence we have de-
rived the formula for the sum of the squares of the first m natural
numbers:
12 + 22 + 3
2
+ ... + m
2
lm(m + 1) (2m + 1).
Problem Set 13
1. Find the sum of the integers from 1 to 100 inclusive.
2. Do the preceding problem again by writing the sum of the numbers
both forwards and backwards:t
123 4
100 99 98 97
97 98 99 100
432 1
Note that the addition of each pair of numbers in this array (i.e.,
1 + 100, 2 + 99, 3 + 98, 4 + 97, etc.) always gives a total of 101.
Hence the sum of the numbers from 1 to 100, taken twice, is the
same as 101 added to itself 100 times. The rest is left to the reader.
3. Generalize the method outlined in the preceding problem to the
integers from 1 to n inclusive, and thereby derive formula (3.11)
in a different way. (Note that this device will not work on the sum
of the squares of the numbers from 1 to n. )
t This method of adding the integers from 1 to 100 is said to have been used by a
famous nineteenth century mathematician, C. F. Gauss, when he was a schoolboy. A
teacher (so the story goes) assigned the problem to the class, hoping to keep them oc-
cupied for perhaps fifteen or twenty minutes, and was startled when the young Gauss
gave the answer in a much shorter time.
48 MATHEMATICS OF CHOICE
4. Find the sum of the squares of the integers from 1 to 100 inclusive.
5. How many solutions in positive integers x and yare there of the
equation x + y = 100? (In counting solutions in this and subse-
quent problems
t
treat such solutions as x = 10, Y = 90 and x = 90,
Y = 10, as different. In other words, by a solution, we mean an
ordered pair (x, y) that satisfies the equation.) How many solutions
in non-negative integers?
6. How many solutions in positive integers are there of the equation
x + y = n, where n is a fixed positive integer? How many solutions
in non-negative integers?
7. How many ordered triples (x, y, z) of positive integers are solutions
of x + y + z = l00? How many triples of non-negative integers?
8. Generalize Problem 7 to x + y + z = n.
9. How many terms are there in the expansion of (x + y + Z)3? of
(x + y + Z)4? of (x + y + z)"?
10. Extend the procedure used in equations (3.10), (3.11), (3.12) and
so on, to get a formula for 1
3
+ 2
3
+ 3
3
+ 4
3
+ ... + m
3

3.9 Summary
Given n things which are alike in batches: a are alike; another
b are alike; another c are alike, and so on; then the number of per-
mutations of the n things taken all at a time is
n!
albIc!
Pascal's formula for C(n, r) is
C(n, r) = C(n - 1, r) + C(n - 1, r - 1).
The binomial expansion of (x + y)n, for any positive integer n, is
(x + y)n = C(n, O)x
n
+ C(n, 1)x
n
-
1
y + C(n, 2)X
n
-2y2
+ ... + C(n,j)xn-iyi + ... + C(n, n)y".
BINOMIAL COEFFICIENTS
49
An alternative notation for this expansion is
+ ... + ( ~ ) x"-iy" + ... + y".
The multinomial expansion of (x + y + z + w + ... ) n is the
sum of all terms of the form
n!
---- X"y'>zcwd
a!b!c!d! . '
where a, b, c, d, range over all solutions of
a+b+c+d+ . =n
in non-negative integers.
Pascal's triangle is given as far as n = 8 in Section 3.6. Also the
following two relations were proved:
C(n,O) + C(n, 1) + C(n, 2) + C(n, 3) + ... + C(n, n) = 2",
C(n,O) - C(n, 1) + C(n, 2) - C(n,3)++(_l)nC(n,n) =0.
The number of subsets of a set of n different things is 2"; the
number of proper subsets is 2" - 1; the number of subsets having
r elements is C(n, r).
Methods for deriving the sum of kth powers of the first n natural
numbers were sketched. In particular, the sum of the natural num-
bers from 1 to n (Le., k = 1 )and the sum of their squares (i.e.
k = 2 ) were obtained:
1 + 2 + 3 + 4 + ... + n = !n(n + 1),
12 + 22 + 3
2
+ 42 + ... + n
2
= !n(n + 1) (2n + 1).
CHAPTER FOUR
Sotne Special Distributions
Many a problem in combinatorial analysis is solved by first re-
formulating it. This point was illustrated on page 28 where a path
problem was reduced to an equivalent question involving combina-
tions. In this chapter we look at some other problems which, when
viewed from the proper perspective, also reduce to questions involving
combinations.
4.1 Fibonacci Numbers
Consider the question: In how many ways can eight plus signs and
five minus signs be lined up in a row so that no two minus signs are
adjacent? An example of such an arrangement is:
++-+-+++-+-+
The problem is easy to solve if we look at it this way; write the eight
plus signs as an expression (4.1) with m's between, and also m's
at the start and finish:
(4.1) m + m + m + m + m + m + m + m + m.
SPECIAL DISTRIBUTIONS 51
Thus we have eight plus signs and nine m's. Now the five minus
signs can be selected as any of the nine m's, and so the answer to
the question is C(9, 5).
In general, we can say that the number of ways of 'Writing k plus
signs and r minus signs in a row so that no two minus signs are ad-
jacent is C(k + 1, r). The reason for this is exactly the same as in
the special case above where k = 8 and r = 5. In place of (4.1)
we now have
(4.2)
m + m + m + m + ... + m + m,
namely k plus signs separating k + 1 symbols m. We convert r
of the m's into minus signs and let the others disappear. Thus we
select r out of the k + 1 symbols m, turn them into minus signs,
and obtain the answer C(k + 1, r).
If r exceeds k + 1 the notation C(k + 1, r) has value zero.
This is as it should be because, if k = 8 and r = 12 for example,
there is no way to write eight plus signs and twelve minus signs in a
row so that no two minus signs are adjacent.
Next we turn to another question. Consider a series of ten x's in
a row,
x x x x x x x x x x.
Suppose that each x may be a plus sign or a minus sign, so that there
are 2
10
or 1024 cases in all. The question is: How many of the 1024
cases do not have two minus signs in adjacent positions? By consider-
ing successively the types,
10 plus signs,
9 plus signs and 1 minus sign,
8 plus signs and 2 minus signs,
7 plus signs and 3 minus signs, etc.,
and using the result previously developed, we get the answer
C(ll,O) + C(IO, 1) + C(9, 2) + C(8, 3) + C(7, 4) + C(6, 5).
There are other terms, C(5,6), C(4,7), and so on, but each of
52 MATHEMATICS OF CHOICE
these is zero. The calculation is simple:
1 + 10 + 36 + 56 + 35 + 6 = 144.
More generally, let us use n in place of 10. If there were n
symbols x in a row, and if each x could be a plus sign or a minus
sign, there would be 2
n
cases in alL Of these, the number not having
two minus signs in adjacent positions is
(4.3) C(n + 1,0) + C(n, 1) + C(n - 1,2) + C(n - 2,3) +
where the sum continues until symbols of the sort C(u, v) with
u < v are reached; such symbols denote zero by definition. Thus
(4.3) denotes the number of ways of writing n signs in a row, each
being a plus sign or a minus sign, so that no two minus signs are ad-
jacent. This number is a function of n; we write it as F(n), and
then look at the question another way.
First consider those of the F(n) sequences of signs that begin
with a plus. They are F(n - 1) in number, because each of them is
obtained by placing a plus sign in front of each of the F(n - 1)
arrangements of n - 1 signs.
Second consider those of the F(n) sequences of signs that begin
with a minus. The next sign in any such sequence must be plus,
since adjacent minus signs are ruled out. Thus we are considering
sequences of n signs beginning with - +. These are F(n - 2)
in number, because each of them can be obtained by placing the pair
- + in front of each of the F(n - 2) arrangements of n - 2
signs. Thus we conclude that
(4.4) F(n) = F(n - 1) + F(n - 2).
This formula is a recursion relation for the Fibonacci numbers,
as the numbers F(n) are called. It can be used to compute F(n)
whenever F(n - 1) and F(n - 2) are known. For n = 3, for
example, it states that
F(3) F(2) + F(1).
From the definition (4.3) of F(n) we see that F(l) 2 and
SPECIAL DISTRIBUTIONS 53
F(2) = 3, so that F(3) = 5. Similarly, by use of (4.4) we can
compute
F(4) F(3) + F(2)
5+
3 8,
F(5) F(4) + F(3)
8+
5 13,
F(6) F(5) + F(4) 13 + 8 21,
F(7) F(6) + F(5) 21 + 13 34, etc.
The Fibonacci sequencet is usually written with additional terms at
the start, for example 1,2,3,5,8, 13, .. " or 1, 1,2,3,5,8, 13, . ,
or 0, 1, 1, 2, 3, 5, 8, 13, .... We shaH use the first of these three
versions. To do this we define F(O) = 1, and then use our results
F(I) = 2, F(2) = 3, etc., each term being the sum of the preceding
two.
Fibonacci numbers are usually defined by property (4.4) ,
F(n) = F(n - 1) + F(n - 2), whereas we approached them
through a problem in arrangements. This approach gave us not only
formula (4.4), but also the fact that F(n) is expressible in the form
( 4.3), which can be visualized by means of Pascal's triangle:
F(O)
F(1)
1'(2)
F(3)
F(4)
F(5) 6
F(6) 21 7
F(7) 8 28 56 70 56 28 8
The sum of the elements along the diagonals are the values of F(n).
For example, consider F (5). By (4.3) we see that
t For another approach to these sequences see, for example, C. D. Olds, Continued
Fractions, Vol. 9 in this series, p. 80.
54 MATHEMATICS OF CHOICE
F(S) C(6,0) + C(S, 1) + C(4, 2) + C(3, 3)
1 + S + 6 + 1 = 13.
Problem Set 14
1. Evaluate F(ll) by use of (4.4). Check. the answer by use of (4.3).
2. For which integers n is F(n) an even number, for which odd?
3. What does formula (4.4) become if n is replaced by n + I?
4. Prove that F(n + 1) = 2F(n - 1) + F(n - 2).
5. In how many ways can ten A's and six E's be lined up in a row so
that no two E's are adjacent?
6. In how many ways can ten A's, six E's and five C's be lined up in a
row so that no two E's are adjacent?
7. How many permutations are there of the letters of the word M issis-
sippi, taken all at a time, subject to the restriction that no two i's
are adjacent?
4.2 Linear Equations with Unit Coefficients
Consider the solutions of the equation
x+y+z+w = 12 in
positive integers x, y, z, w. (Recall that the positive integers are
1, 2, 3, 4,
.... )
In counting the solutions we shall say that, for
example,
x 9 x x 1 x
=
y y 9
Y Y
z 1 z 1 z
=
9 z
=
w 1 w 1 w 1 w 9
are four different solutions because, as ordered quadruples of integers,
they are distinct. In general, solutions are regarded as the same only
SPECIAL DISTRIBUTIONS 55
if the values of x are equal, of yare equal, of z are equal, and of
ware equal. (The situation where the four solutions just given are
treated as though they were a single solution comes under the heading
of "partitions of the number 12"; such questions will be considered
in Chapter 6.) The number of solutions of the given equation is
easily determined by viewing the problem in this way: If 12 units
(denoted by 12 u's ) separated by 11 spaces (denoted by 11 s's )
are lined up,
(4.5) us u sus us us u sus u sus u sus u ,
and if we choose any 3 of the s's and let the others disappear, for
example,
u usu u u usu u u u usu,
then the remaining s's separate the units into four batches. The
number of units in these batches can be used as the values of x, y, z, w.
In the example the values are x = 2, Y = 4, z = 5, w = 1. Thus
any selection of three of the s's in (4.5) gives a solution of
x + y + z + w = 12 in positive integers, and any solution corre-
sponds to such a selection. It follows that the number of solutions of
this equation in positive integers is the same as the number of ways
of choosing 3 things out of 11, which is
C(11,3) =
11109
3-2-1
= 165.
For a more genera] result let us replace 12 by m and x + y + z + w
by a sum of k variables, and ask for the number of solutions in
positive integers of the equation
(4.6) Xl + X2 + Xa + ... + Xk = m.
In the special case just studied, m = 12 and k = 4, so the equation
could have been written Xl + X2 + Xa + X4 = 12; using Xl, X2, Xa, X4
in place of x, y, z, w makes no difference in the number of solutions,
of course.
The number of solutions of equation (4.6) in positive integers
Xl, XI!, "', Xk is
(4.7) C(m - 1, k - 1).
56 MATHEMATICS OF CHOICE
This can be seen by a direct generalization of the argument used in
the special case m = 12, k = 4. We now have the symbol u re-
peated m times and the symbol s repeated m - 1 times, separating
the u's:
usususus . susu.
We choose k - 1 of the symbols s (and let the others disappear)
in order to separate the u's into k batches. Such a selection will
give a unique solution of (4.6), namely Xl is the number of u's in
the first batch, X2 the number in the second batch, and so on. Hence
the number of solutions of (4.6) in positive integers is the same as
the number of ways of selecting k - 1 of the symbols s out of
m - 1, and that number is given in (4.7).
It may be noted that if k is larger than m, then equation (4.6)
has no solutions in positive integers, and formula (4.7) is still valid
since by our definition (see p. 21) the value of C(m - 1, k - 1)
is zero in this case.
Let us turn to the question of the number of solutions of an equa-
tion in non-negative integers, the difference he!e being that zero
values for the variables are now allowed. To begin with a special
case, we ask for the number of solutions of the equation
X + y + z + w = 12
in non-negative integers. Let us take 12 u's and 3 s's lined up in a
row, for example:
(4.8) usuuuuusuusuuuu
If we look upon the s's as separators of the 12 u's into four batches,
we see that the illustration (4.8) gives batches of 1, 5, 2, 4 corre-
sponding to the solution X = 1, Y = 5, Z = 2, W = 4 of the equa-
tion x + y + z + W = 12 under discussion.
We claim that every arrangement of 12 u's and 3 s's gives a
solution. To find the value of x, we locate the first s and count the
number of u's to its left. If the arrangement begins with an s,
X = 0 because no u's are to its left. To find the value of y, we
count the number of u's between the first and second s. If the first
and second s are adjacent, then y = O. Similarly, the value of z
SPECIAL DISTRIBUTIONS 57
is the number of u's between the second and third s, and the value
of w is the number of u's to the right of the third s.
Conversely, if we start with any solution, such as x
z = 2, w = 9 we can write 12 u's and 3 s's in a row
susuusuuuuuuuuu
corresponding to this solution. The solution x = 9, Y
w = 2 corresponds to the arrangement
uuuuuuuuussusuu.
0, y 1,
0, Z 1,
Thus the number of solutions of x + y + Z + w = 12 in non-
negative integers is the same as the number of ways of writing 12
u's and 3 s's in a row. This number is C(1S, 3) by the theory in
Section 3.2.
We generalize this result to the equation
(4.9)
Xl + X2 + Xa + ... + Xk = m,
in k variables whose sum must always be m, by an argumen t similar
to that given in the special case. The number of solutions of equation
(4.9) in non-negative integers is the same as the number of arrange-
ments in a row of m u's and k - 1 s's, and there are
C(m + k - 1, k - 1)
such arrangements.
Let m and k be fixed positive integers. The number of solutions of
equation (4.9) in non-negative integers is
(4.10) C(m + k - 1, k - 1) or C(m + k - 1, m)
The second part of (4.10) follows from the first by virtue of the basic
property C(n, r) = C(n, n - r).
58 MATHEMATICS OF CHOICE
Problem Set 1St
1. How many solutions are there of x + y + z + w
tive integers? (b) in non-negative integers?
50 (a) in posi-
2. Prove that the number of solutions of Xl + X2 + X3 + x,
positive integers is the same as the number of solutions of
in positive integers.
3. Check that the two forms given in (4.10) are equal.
9 in
4. Prove that the number of solutions of equation (4.6) in posItIve
integers equals the number of solutions in positive integers of the
equation in m - k + 1 variables
Xl + X2 + X3 + ... + Xm-k+l = m.
5. Prove that the number of solutions in non-negative integers is the
same for the two equations
Xl + X2 + ... + X6 = 8 and Xl + X2 + ... + Xg = 5.
6. How many integers between 1 and 1,000,000 inclusive have sum of
digits (a) equal to 6; (b) less than 6?
7. How many terms are there in the expansion of
(a) (al + a2 + a3 + a4 + a ~ ) 1 7 ;
(b) (al + a2 + ... + ak)t,
where k and t are positive integers?
tAnswers to these and subsequent problems may be given in the C(n, r) notation.
For example, an answer such as C(37,5) - C(26,4) is acceptable as it stands without
further elaborl\tion or simplification.
SPECIAL DISTRIBUTIONS 59
4.3 Combinations with Repetitions
The symbol C(n, r) denotes the number of combinations of n
different things, taken r at a time. Suppose now that there are
several identical copies of each of the n things, as for example
identical copies of the books in a bookstore. Thus we can ask the
question: Given n distinct categories of things, each category con-
taining an unlimited supply, how many different combinations of r
things are there? (A combination may include several indistinguish-
able objects from the same category.) This question amounts to
asking for the number of solutions of
Xl + X2 + Xa + ... + Xn = r
in non-negative integers, because we can take Xl of the first thing,
X2 of the second thing, .. , Xn of the n-th thing. Thus we can use
formula (4.10) with k and m replaced by nand r to get the
following conclusion.
The number of combinations, r at a time, of n different things each
of which is available in unlimited supply is
(4.11 ) C (n + r - 1, r).
For example, let us ask how many different sets of three coins
can be formed, each coin being a cent, a nickel, a dime or a quarter.
Here we have r = 3 and n = 4, and so the answer, by (4.11), is
C(6,3) or 20. Going back to the analysis that led to (4.11) we note
that the question amounts to asking for the number of solutions in
non-negative integers of Xl + Xz + Xa + X" = 3, where we interpret
Xl as the number of cents, Xz as the number of nickels, Xa as the
number of dimes, and X. as the number of quarters used in forming
a set of 3 coins.
As another example, consider Problem 1.4 of Chapter 1. Briefly,
the problem is this: Consider twenty different books each of which is
available in unlimited supply. How many selections of ten books
can be made, (a) if repetitions are allowed, (b) if repetitions are not
allowed, so that the ten books must all be different? Part (b) is just
a matter of choosing ten things out of twenty, so the answer is
C(20, 10). Part (a) is a question of the number of combinations,
60 MATHEMATICS OF CHOICE
ten at a time, of twenty different things each of which is available in
multiple copies. So the answer to part (a) is given by formula (4.11)
with r = 10 and n = 20, namely
C(29, 10)
29!
10!191
Problem Set 16
1. In the explanation of formula (4.11) in the text it is stated that each
of the things is "available in unlimited supply". Actually the supply
need not be unlimited. How many copies of each of the n things
must there be?
2. How many different collections of six coins can be formed, if each
coin may be a cent, a nickel, a dime, a quarter, a half dollar, or a
silver dollar?
3. Poker chips come in three colors, red, white, and blue. How many
different combinations of ten poker chips are there?
4. A toy store has marbles in five colors, all uniform in size. They are
priced at 10 cents a dozen. How many different color combinations
are available for ten cents?
5. Consider the integers with seven digits, namely the integers from
1,000,000 to 9,999,999 inclusive. Separate these into subsets as follows:
put numbers into the same subset if and only if their digits as a collec-
tion are the same. For example, 8,122,333 and 3,213,283 are in the
same subset. How many subsets are there?
4.4 Equations with Restricted Solutions
In Section 4.2 we considered the question of the number of solutions
of such an equation as x + y + z + w = 12; first the solutions were
restricted to the set of positive integers, then to the set of non-nega-
tive integers. To say that x is a positive integer is the same as saying
that x is an integer satisfying x > 0, or that x is an integer satis-
SPECIAL DISTRIBUTIONS 61
fying X :> 1. To say that x is a non-negative integer is the same as
saying that x is an integer satisfying x :> O.
Now we raise the question: How many solutions in integers greater
than 5 are there of the equation
(4.12) x+y+z+w =48?
For example, x = 6, y = 10, z = 12, w = 20 is a solution, and we
want to count the number of such solutions. Since each variable
must be greater than 5, the subtraction of 5 from each gives a new
set of four positive numbers
(4.13) r = x - 5, s = y - 5, z - 5, u w-5
whose sum is 28:
(4.14)
x-5+y-5+z-5+w-5
x + y + z + w - 20 = 28,
r + s + t + u = 28.
Thus equations (4.14) and (4.12) are related by the substitutions,
or transformation, (4.13). For example, the solution x = 6, y = 10,
z = 12, w = 20 of equation (4.12) corresponds to the solution r = 1,
s = 5, t = 7, U = 15 of equation (4.14). Here are other examples:
x 10 r = 5
y 11 s = 6
corresponds to
z = 13 8
w 14 U
9 .
,
x 25 r
=
20
y 9 s 4
corresponds to
z = 8 3
w 6 U 1.
62 MATHEMATICS OF CHOICE
Now since each of x, y, Z, w must be greater than 5, each of r, s, t, U
must be greater than 0, that is to say, each of r, s, t, U must be a
positive integer. Thus corresponding to each solution of equation
(4.12) in integers greater than 5 there is a solution of equation (4.14)
in positive integers, and to each solution of equation (4.14) in posi-
tive integers there corresponds a solution of equation (4.12) in inte-
gers greater than 5. For example, if we start with the solution
r = 15, s = 1, t = 8, U = 4
of equation (4.14), we use the transformation (4.13) to get the
solution
x = 20, y = 6, Z = 13, W = 9
of equation (4.12). This establishes a one-to-one correspondence
between the solutions of equation (4.12) in integers exceeding 5, and
the solutions of equation (4.14) in positive integers.
Hence we see that the number of solutions of equation (4.12) in
integers greater than 5 is the same as the number of solutions of
equation (4.14) in positive integers. Applying formula (4.7) of page
55 to equation (4.14), we see that this number is
C(28 - 1,4 - 1) or C(27, 3).
The idea used here works just as well if each variable is subjected
to a different condition. For example, let us consider the question:
How many solutions are there of the equation x + y + Z + W = 48
in integers satisfying
(4.15) x > 5, y> 6, Z > 7, W > 8?
In this case we would subtract 5 from x, 6 from y, 7 from z, and
8 from W in any solution of the equation to get a new set of numbers
(call them r, s, t, and u) each of which is a positive integer. Thus
the transformation, this time, is
r = x - 5, s = y - 6, t = z - 7, u = W - 8,
or
x
r + 5, y s + 6, z = t + 7, W = u + 8.
SPECIAL DISTRIBUTIONS 63
If we substitute these expressions in the equation x + y + z + w = 48
we obtain the equation
r + 5 + s + 6 + t + 7 + u + 8 48,
or
(4.16)
r + s + t + u = 22.
Any solution of x + y + z + w = 48 in integers subject to the
restrictions (4.15) corresponds to a solution in positive integers of
the equation (4.16). For example, the solution x = 6, y = 10,
z = 12, W = 20 corresponds to the solution r = 1, s = 4, t = 5,
u = 12 of the equation (4.16). There is a one-to-one correspondence
between the solutions, so the number of solutions of
x+Y+Z+W = 48
in integers subject to the restrictions (4.15) equals the number of
solutions of r + s + t + u = 22 in positive integers. By formula
(4.7) of page 55 this number is
C(22-1, 4-1) or C(21, 3) .
Let us now formalize these ideas to get some general formulas.
Let us replace 48 by m, and so consider the equation
x + y + z + W = m.
Furthermore, in place of the conditions (4.15) on x, y, z, and 'If'
suppose we have the restrictions
(4.17)
where C}, C2, Ca, C, are some fixed integers. The transformation is now
r = x - Cl, S=y- C2, t = Z - Ca, u = W - C"
or
x = r + Cl, z = t + Ca, w=u+C,.
64 MATHEMATICS OF CHOICE
If we substitute these in the equation x + y + z + w = m we get
the equation
r + CI + s + C2 + t + C3 + u + c. m ,
or
(4.18)
r + s + t + u = m - CI - C2 - C3 - c .
Thus the number of solutions of the equation x + y + z + w = m
in integers subject to the restrictions (4.17) is the same as the number
of solutions of (4.18) in positive integers r, s, t, u. By formula (4.7)
of page 55 this number is
(4.19)
If we replace x, y, Z, W, by Xl, ~ , Xa, X. respectively, the conclusion
can be stated as follows: The number of solutions in integers Xl, X2,
Xa, X4 of the equation
subject to the restrictions
is given by the formula (4.19).
Suppose now that there are k variables Xl, X2, X3, "', Xk and
k fixed integers CI, C2, Ca, "', Ck. Then an immediate extension of
the above theory gives the result:
The number of solutions of the equation
(4.20) m
in integers satisfying the conditions
(4.21)
is
(4.22) C (m - CI - C2 - Ca - - Ck - 1, k - 1).
SPECIAL DISTRIBUTIONS 65
Note: Although in the examples leading up to this general result
the integers Cl, C2, etc. were taken to be positive, this proposition
holds for any integers Cl, C2, C ~ , "', Ck, positive, negative, or zero.
Problem Set 17
1. Write out in detail a one-to-one correspondence between the solutions
of x + y + z + w = 27 in integers greater than 5, and the solutions
of r + s + t + u = 7 in positive integers.
2. How many solutions are there of x + y + z + w
greater than 7?
100 in integers
3. Find the number of solutions of Xl + X2 + X3 + X. + X6 = 50 in
positive integers (a) wIth X6> 12; (b) with X6> 12 and x. > 7.
4. Find the number of solutions of x + y + z + w = 1 in integers
greater than -4, i.e., in integers selected from -3, - 2, -1, 0, I, 2,
3, 4, 5, ...
5. -Find the number of solutions of x + y + z + w = 20 in positive
integers (a) with x > 6; (b) with x > 6 and y > 6; (c) with
x> 6, y> 6, and z > 6.
6. Find the number of solutions of x + y + z + w = 20 in non-negative
integers (a) with x > 6; (b) with x > 6 and y> 6.
7. Find a formula for the number of solutions of x + y + z + w = m
in non-negative integers satisfying (a) x > Cl; (b) x > Cl and
y> C2'
8. How many integers between 1 and 1,000,000 inclusive have sum of
digits 13?
4.5 Summary
The Fibonacci numbers 1,2,3,5,8,13,21, "', have the property
that each member of the sequence (except the first two) is the sum
66 MATHEMATICS OF CHOICE
of the preceding two numbers. This property is stated in the recursion
formula
F(n) = F(n - 1) + F(n - 2).
Although in many books the Fibonacci numbers are defined in this
way, we approached them by defining F(n) as the number of ways
01 writing n signs, each plus or minus, so that no two minus signs
are adjacent; thus F(1) = 2, F(2) = 3, F(3) = 5, F(5) = 8,
etc. It was established that, defining F(O) to be 1, we get the entire
sequence of Fibonacci numbers from the formula
F(n) = C(n+l, 0) +C(n, 1) +C(n-1, 2) +C(n- 2, 3) + ... ,
where the sum on the right terminates when zero terms (terms of
the form C(u, v) with u < v) begin to appear.
Let m and k be fixed positive integers. The number of solutions of
in positive integers is C(m - 1, k - 1); in non-negative integers is
C(m + k - 1, m). Furthermore, if Cl, C2, C3, "', Ck are fixed inte-
gers, then the number of solutions in integers satisfying the conditions
is
C (m - CI - C2 - C3 - - Ck - 1, k - 1).
Two solutions are said to be the same if and only if the values of Xl
are identical, and the values of X2 are identical, and the values of
X3 are identical, and so on. (Questions about the number of solutions
of the given equation subject to even more restrictions on the solu-
tions, such as for example solutions in integers from 1 to 7, are treated
in the next chapter.)
The number of combinations, r at a time, of n different things
each of which (like coins, books, or stamps) is available in an un-
limited supply is C(n + r - 1, r). Here nand r denote positive
integers, but n may be greater than, equal to, or less than r.
C HAP T E R }' I V E
The Inclusion-Exclusion
Principle; Probability
In this chapter we prove a theorem of a very broad kind and then
apply it to particular problems. The idea of probability is introduced
towards the end of the chapter.
5.1 A General Result
It will be convenient to lead up to the inclusion-exclusion principle
by a sequence of three problems listed in increasing order of difficulty.
The first problem is not very difficult at all.
PROBLEM 5.1 How many integers between 1 and 6300 inclusive
are not divisible by 5? Since precisely every fifth number is divisible
by 5, we see that of the 6300 numbers under consideration, exactly
6300/5 or 1260 are divisible by 5. Hence the answer to the question is
6300 - 1260 = 5040.
68 MATHEMATICS OF CHOICE
PROBLEM 5.2 How many integers between 1 and 6300 inclusive
are divisible by neither 5 nor 3? To answer this we could begin by
paralleling the argument in Problem 5.1 and say that the number of
integers under consideration that are divisible by 5 is 1260, and the
number divisible by 3 is 6300/3 or 2100. But
6300 - 2100 - 1260
is not the correct answer to the problem, because too many integers
have been subtracted from the 6300. Numbers like 15, 30, 45, ...
which are divisible by both 3 and 5 have been removed twice from
the 6300 integers under consideration. So we see that we must add
back the number of integers divisible by both 3 and 5, that is, di-
visiblet by 15. There are 6300/15 or 420 of those. Thus we get the
answer
6300 - 2100 - 1260 + 420 = 3360.
PROBLEM 5.3 How many integers between 1 and 6300 inclusive
are divisible by none of 3, 5, 7? To solve this we can begin with an
analogy to the previous argument and first remove from the 6300
integers those divisible by 3, in number 2100, those divisible by 5,
in number 1260, and those divisible by 7, in number 900. Thus
6300 - 2100 - 1260 - 900
is a start toward the answer. However, numbers divisible by both 3
and 5 have been removed twice; likewise numbers divisible by both
3 and 7; likewise numbers divisible by both 5 and 7. Hence we add
back the number of integers divisible by both 3 and 5, namely 6300/15
or 420, also the number divisible by both 3 and 7, namely 6300/21
or 300, and also the number divisible by both 5 and 7, namely 6300/35
or 180. We now have
6300 - 2100 - 1260 - 900 + 420 + 300 + 180
and are closer to the answer. But one final adjustment must be made
because of integers divisible by 3, by 5, and by 7, e.g., 105, 210, 315
t A fuller discussion of such divisibility properties is given in Chapter 1 of I. Niven's
Numbers: Rational and Irrational in this series.
PROBABILITY 69
and so on. Such integers are counted in the original 6300, are counted
out in the 2100, 1260 and 900, and then counted back in the 420, 300,
and 180. The net effect is that each such integer has been counted in
once, out three times, and then back in three times. Hence the final
adjustment is to count them out again, and so we subtract 6300/105
or 60. Thus the answer to Problem 5.3 is
(5.1) 6300-2100-1260-900+420+300+180-60 = 2880.
There are 2880 integers between 1 and 6300 inclusive that are di-
visible by none of 3, 5, 7.
The three problems just discussed can be answered by appeal to a
general principle. Suppose that we have N objects. Suppose that
some of these objects have property a, and some do not. Let N(a)
denote the number having property a. Similarly, suppose that some
of the objects have property {j, and some do not. Let N ({j) denote
the number having property {j. If there are other properties 'Y, 0,
... , let N ('Y), N (0), denote the number of objects having
property 'Y, the number having property 0, .
In the problems above the objects are the integers from 1 to 6300
inclusive, and so N = 6300. The properties a, {j, are the di-
visibility properties; for example, an integer has the property 'Y if
it is divisible by 7.
Continuing the general analysis, let N(a, M denote the number
of objects having both properties a and {j. Let N(a, (j, 'Y) denote
the number having the three properties a, {j and 'Y. In the same
way N(a, (j, 'Y, 0) denotes the number of objects having the four
properties a, (j, 'Y and o.
Now suppose we ask the question: How many of the N objects
do not have property a? The answer, N - N(a), is obtained by a
simple subtraction. This is analogous to Problem 5.1.
How many objects have neither the property a nor (j? The
answer is
N - N(a) - N({j) + N(a, (j).
This is analogous to Problem 5.2.
How many of the objects have none of the three properties a, {j, 'Y?
70 MATHEMATICS OF CHOICE
The answer is
N - N(Ol) - N(f3) - N('Y)
(5.2)
+ N(Ol, f3) + N(Ol, 'Y) + N({3, 'Y) - N(Ol, (3, 'Y)'
Let us check this result, which is analogous to the answer in Problem
5.3.
First consider an object having none of the properties Ol, {3, 'Y.
Such an object is counted by the term N but by none of the other
terms in (5.2). Hence such an object is counted in once.
Next consider an object that has exactly one of the three properties;
say it has the property (3. Such an object is counted by two terms in
(5.2), namely N and N(f3); but since N({3) is prefaced by a
minus sign, such an object is not counted by (5.2).
Next consider an object that has exactly two of the properties,
say (3 and 'Y. Such an object is counted by the terms N, N({3) ,
N ('Y) and N ({3, 'Y) in (5.2), and by no other terms. Hence, in effect,
such an object is not counted at all by (5.2), because of the arrange-
ment of plus and minus signs in that formula.
Finally consider an object that has all three properties Ol, {3 and
'Y. It is counted by every one of the eight terms in (5.2), but again
this means that in effect it is not counted at all because of the ar-
rangement of signs.
Summing up the argument, we see that formula (5.2) in effect
counts those objects, and only those objects, having none of the
properties Ol, {3, 'Y.
Formula (5.2) can be extended to any number of properties. The
number of objects having none of the properties Ol, (3, 'Y, is
(5.3)
N
-N(Ol) - N({3) - N('Y) -
+N(Ol, f3) + N(Ol, 'Y) + N({3, 'Y) +
-N(Ol, (3, 'Y)
This is the inclusion-exclusion principle which gives the title to this
chapter. To prove it, we shall show that an object having one or
PROBABILITY 71
more of the properties a, (J, 'Y, is, in effect, not counted by
(5.3). This argument will establish that the expression (5.3) counts
precisely those objects having none of the properties, because such
objects are counted by the term N but by no other term in (5.3).
Consider an object, say T, that has exactly j of the properties,
where j is some positive integer. In formula (5.3), T is counted
by the term N. In the second line,
-N(a) - N({J) - N('Y)
the object T is counted j times, or what is the same thing, C(j, 1)
times. In the third line
+N(a, (J) + N(a, 'Y) + N({J, 'Y) + ... ,
the object T is counted C(j,2) times, because this is the number
of terms with two of the j properties of T. Similarly the fourth
line counts T exactly C(j, 3) times, and so on. Because of the
arrangement of plus and minus signs in (5.3), we see that T is
counted in effect
1 - C(j, 1) + C(j, 2) - C(j, 3) + C(j, 4)
times. The value of this expression is zero, by property (3.7) of
Section 3.6. Thus we have established the general theorem.
Problem Set 18
1. Write out formula (5.3) in full for the case of four properties a, {J, 'Y
and ~ .
2. How many terms are there in formula (5.3), presuming that there
are r properties a, {J, 'Y, ?
3. How many integers from 1 to 33,000 inclusive are divisible by none
of 3, 5, 11?
4. How many integers from 1 to 1,000,000 inclusive are neither perfect
squares, perfect cubes, nor perfect fourth powers?
72 MATHEMATICS OF CHOICE
5. Using the same notation as in formula (5.3), with exactly five prop-
erties a, fJ, 'Y, ~ , E under consideration, write a formula for the number
of objects having all three properties a, fJ and 'Y, but having neither
of the properties ~ , E .
6. Presuming a set of objects, and four properties a, fJ, 'Y, ~ under con-
sideration, write a formula for the number of objects having property
fJ but none of the properties a, 'Y, ~ .
5.2 Applications to Equations and to Combinations with Repetitions
PROBLEM 5.4 How many solutions are there of the equation
(5.4) Xl + X2 + Xa + X4 = 20
in positive integers with Xl < 6, X2 < 7, Xa < 8, and X4 < 9 ? In
terms of the notation of the preceding section, let the "objects" be
the solutions in positive integers of equation (5.4). For example,
the set
(5.5)
Xl = 2, Xa = 9,
is one "object". Say that a solution has property a in case Xl > 6,
property fJ in case X2 > 7, property 'Y in case Xa > 8, property ~
in case X4 > 9. We want to find the number of solutions having none
of the properties a, fJ, 'Y, 0, so we can use formula (5.3) of the pre-
ceding section.
From Chapter 4 (Section 4.5) we know that the number of solu-
tions of (5.4) in positive integers is C(19,3). Since this is the total
number N of "objects" under consideration, we set N = C(19, 3).
Next we want to find the value of N (a), the number of solutions of
(5.4) in positive integers with Xl > 6. Again by the results derived
in Chapter 4, we see that
N(a) = C(20-6-1, 4-1) C(13, 3).
By a similar argument we conclude that
N(fJ) = C(12, 3), N('Y) = C(ll, 3), N ( ~ ) C(10, 3).
PROBABILITY 73
Next, N(Ol, (3) denotes the number of solutions of (S.4) in posi-
tive integers satisfying both Xl > 6 and X2 > 7, so
N(Ol, (3) = C(20-6-7 -1, 4-1) = C(6, 3).
Parallel arguments show that
N(Ol,I') = C(S, 3), N(Ol, 0) = C(4, 3), N({3,I') = C(4, 3),
N({3, 0) = C(3, 3), N(I', 0) = C(2, 3) = O.
All further terms in formula (S.3) are zero. For example, consider
N(Ol, (3, 1'). This denotes the number of solutions of equation (S.4)
in positive integers satisfying the conditions Xl > 6, X2 > 7, and
Xa > 8. There are no such solutions since 6 + 7 + 8 = 21. Hence
the solution of Problem 5.4 can be written
C(19,3) - C(13, 3) - C(12,3) - C(ll,3) - C(10,3)
+ C(6, 3) + C(S, 3) + C(4, 3) + C(4, 3) + C(3, 3)
= 969 - 286 - 220 - 16S - 120 + 20 + 10 + 4 + 4 + 1 = 217.
In many applications of the inclusion-exclusion principle (5.3)
there is a symmetry about the properties Ol, (3, 1', . such that the
following conditions hold:
N(Ol) = N({3) = N('Y) = ... ,
N(Ol, (3) = N(Ol,I') = N({3,I')
N(a, (3, 1')
In words, say that the properties Ol, {3, 1', are symmetric if
the number of objects having anyone property equals the number of
objects having any other single property, if the number of objects
having two of the properties is the same no matter which two are
considered, and likewise for three properties, four properties, and
so on. Thus the properties are symmetric if the number of objects
having a certain j properties (j being fixed) equals the number of
objects having any other collection of j properties; furthermore,
74 MATHEMATICS OF CHOICE
this must be true for j = 1, j = 2, j = 3 and so on as far as it
makes sense to go.
Let the total number of properties a, (3, 'Y, be r. If these are
symmetric properties, then the formula (5.3) for the number of
objects having none of the properties is
(5.6) N - C(r, 1)N(a) +C(r, 2)N(a, (3) - C(r, 3)N(a, (3, 'Y) + ....
The reason for this is that the terms of (5.3) can be collected into
batches with equal members, there being C(r, 1) of the sort N(a),
C (r, 2) of the sort N (a, (3), etc.
To illustrate a set of symmetric properties, consider the following
question.
PROBLEM 5.5 How many solutions are there of the equation
(5.7) XI + ~ + Xa + x. = 26
in integers between 1 and 9 inclusive?
Again we can use the theory of the preceding section. The "objects"
under consideration are all solutions in positive integers of the equa-
tion (5.7), so that N = C(25, 3). A solution of the equation has
property a in case Xl > 9, property (3 in case X2 > 9, property
'Y in case X3 > 9, and property 0 in case x. > 9. These four prop-
erties are completely symmetric in the sense that led from formula
(5.3) to formula (5.6). Hence we need only compute
N(a), N(a, (3), N(a, (3, 'Y) and N(a, (3, 'Y, 0).
We find that
N(a) = C(26 - 9 - 1, 4 - 1) = C(16, 3);
N(a, (3) = C(26 - 9 - 9 - 1, 4 - 1) = C(7, 3);
N (a, (3, 'Y) = C(26 - 9 - 9 - 9 - 1, 3) = C( -2,3)
N(a, (3, 'Y, 0) = O.
o ,
PROBABILITY 75
Therefore, by formula (5.6), the answer is
C(25,3) - C(4, 1)C(16, 3) + C(4, 2)C(7, 3)
= 2300 - 2240 + 210 = 270.
Let us now generalize from Problem 5.5 to this question: How
many solutions does the equation
(5.8)
XI+X2+Xa+ +Xk = m
have in integers from 1 to c inclusive, where c is some fixed positive
integer? Again we apply the theory of the preceding section, where
the "objects" under study are now all solutions of (5.8) in positive
integers. We say that a solution has property a if Xl > c, property
{J if ~ > c, property -y if Xa > c, and so on. These properties are
symmetric, and so we can use formula (5.6). By the theory of page 64,
we see that
N = C(m - 1, k - 1)
N(a) = C(m - c - 1, k - 1)
N(a, {J) = C(m - 2c - 1, k - 1)
N(a, {J, -y) = C(m - 3c - 1, k - 1),
etc.
Then formula (5.6) gives us the following result. Let c be any fixed
positive integer. The number of solutions of equation (5.8) in positive
integers not exceeding c is
(5.9)
C(m - 1, k - 1) - C(k, 1)C(m - c - 1, k - 1)
+ C(k, 2) C(m - 2c - 1, k - 1)
- C(k, 3)C(m - 3c - 1, k - 1)
+ C(k, 4)C(m - 4c - 1, k - 1)
where the series continues until zero terms arise.
The special case m > kc is of some interest; for, in this case,
equation (5.8) can have no solutions in integers not exceeding c.
76 MATHEMATICS OF CHOICE
For example, if m = 2S, k = 4 and c = 6, then (5.8) becomes
Xl + X2 + Xa + X4 = 25 and this has no solutions in integers from 1
to 6 because the maximum value of the sum Xl + X2 + Xa + X4,
under our restriction, is 24. In this case, the value of expression (5.9)
is zero, and we obtain the identity
C(24, 3) -C(4, 1)C(18, 3) +C(4, 2)C(12, 3) -C(4, 3)C(6, 3) = O.
As another example of the inclusion-exclusion principle consider
the following question which may be thought of as a problem in
combinations with repetitions:
A bag of coins contains eight cents, seven nickels, four dimes, and
three quarters. Assuming that the coins of anyone denomination
are identical (for example the eight cents are identical), in how many
ways can a collection of six coins be made up from the whole bagful?
In making up a collection of coins, let X be the number of cents,
y the number of nickels, z the number of dimes, and w the number
of quarters. Then the problem amounts to asking for the number of
solutions of the equation
X+y+z+w = 6
in non-negative integers satisfying the conditions
X..;;;: 8, y..;;;: 7, z";;;: 4, w..;;;: 3.
Let N be the count of all solutions in non-negative integers; its
value (see page 57) is
N = C(6 + 4 - 1,4 - 1) = C(9,3).
H we say that a solution has property a in case x > 9, property {J
in case y > 8, property 'Y in case z > S, and property I in case
w > 4, then most of the terms in formula (S.3) on page 70 are zero.
For example N(a) = 0 because there are no solutions of
X + y + z + w = 6 in non-negative integers with X > 9. In fact
the only non-zero terms in this formula are N, N('Y) , and N(1).
Furthermore we can calculate that
N('Y) C(6 + 4 - 5 - 1, 4 - 1) C(4, 3);
N(1) C(6 + 4 - 4 - 1, 4 - 1) C(S, 3);
N - N(-y) - N(1) = C(9, 3) - C(4,3) - C(S,3) = 70.
PROBABILITY 77
Problem Set 19
1. Find the number of solutions of Xl + X2 + X3 + X4 = 14 in integers
from 1 to 6 inclusive.
2. Find the number of solutions of Xl + X2 + X3 + X4 + XI; + X6 = 34
in positive even integers not exceeding 10.
3. Find the number of solutions of XI + X2 + Xa + X4 = 20 in integers
satisfying 1 -< Xl -< 6, 1 -< X2 -< 7, 3 -< Xa -< 9, 4 -< X4 -< 11.
4. Find the number of solutions of Xl + X2 + X3 + X4 = 1 in integers
between -3 and 3 inclusive.
S. A bag of coins contains eight cents, seven nickles, four dimes, and
three quarters. Assuming that coins of anyone denomination are
identical, in how many ways can a collection of ten coins be made up
from the bagful?
6. In the preceding problem, how many of the collections contain no
quarters?
7. The equation Xl + X2 + Xa + X4 = 12 has exactly one solution in
positive integers not exceeding 3, as a moment's reflection will show.
Apply formula (5.9) to get an identity in the C(n, r) symbols.
8. Find the number of solutions of the equation YI + Y2 + Ya + Y4 = 14
in integers between 1 and 9 inclusive.
9. The numerical answer to the preceding problem is the same as in
Problem 5.5. (The problems look somewhat similar, the difference
being that the constants in the equations are 26 in one instance, 14
in the other.) Show that the equation in the preceding question can
be obtained from that in Problem 5.5 by use of the substitution
10. Using the principle sketched in the preceding problem find a specific
integer value for c, other than c = 12, so that the number of solu-
tions of the two equations
Xl + X2 + Xa + X4 + XI; = 12 and Yl + Y2 + Ya + Y4 + YI; = C,
in positive integers from 1 to 6, is the same. Then use (5.9) to get
an identity between two expressions in C(n, r).
78 MATHEMATICS OF CHOICE
11. Let k, m, CI, C2 and C3 be positive integers. Write a formula for the
number of solutions in positive integers of
subject to the restrictions Xl -< Cl, X2 -< C2, X3 -< C3.
12. Find the number of seven-digit positive integers such that the sum
of the digits is 19.
S.3 Derangements
As another application of the general theorem of Section 5.1 we
turn to quite a different question. Consider the permutations of the
numbers 1,2, 3, "', n, taken all at a time. Among these permuta-
tions there are some, called derangements, in which none of the n
integers appears in its natural place, that is, 1 is not in its natural
place (the first place), 2 is not in its natural place, "', and n is
not in its natural place. The number of derangements of n things
will be denoted by D(n).
As illustrations we note: D(l) = 0; D(2) = 1 because there is
one derangement, 2, 1; D(3) = 2 because the derangements are
2, 3, 1 and 3, 1, 2; D(4) = 9 because the derangements are
2,1,4,3
2,3,4,1
2,4,1,3
3,1,4,2
3,4,1,2
3,4,2,1
4,1,2,3
4,3,1,2
4,3,2, 1.
We want to derive a formula for D(n), valid for any positive
integer n. This can be achieved with very little difficulty by use of
the inclusion-exclusion principle. To make the idea concrete, let
us begin by computing D(7). Let N denote the number of permuta-
tions of 1, 2, 3, 4, 5, 6, 7 taken all at a time, so that N = 7! . Say
that a permutation has property ex if 1 is in its natural place, /3 if
2 is in its proper place, 'Y if 3 is in its proper place, 0 if 4 is in its
proper place, E if 5 is in its proper place, t if 6 is in its proper place,
11 if 7 is in its proper place. For example, the permutation
7,2, 6, 1,5,3,4
PROBABILITY 79
has properties tJ and ~ , but no others. A derangement is a permuta-
tion having none of the properties a, tJ, 'Y, 0, ~ , r, 7].
We compute N(a), the number of permutations of 1, 2, 3, 4, 5,
6, 7 such that 1 is in the first place (regardless of whether the others
are in their natural positions or not) by putting 1 in first place and
permuting the others. The result is N(a) = 6! . Similarly, if 2 is
held in the second place and the others permuted, we obtain
N(tJ) = 61. In fact, it does not matter which of the seven numbers
we keep fixed in its natural position; the remaining six can be ar-
ranged in 6! ways. Therefore N(a) = N(tJ) = = N(7]) = 6! .
Next, we compute N(a, tJ) by holding 1 and 2 in the first and
second places while the remaining five numbers are permuted. This
leads to 5! different arrangements. Again, if any two of the numbers
are held in their natural positions while the remaining five are per-
muted, we get 5! permutations so that
N(a, tJ) = N(a, 'Y) = = N(tJ, 'Y) = = N(r, 7]) 5! .
Similarly, holding three of the numbers fixed leads to
N(a, tJ, 'Y) = ... = N ( ~ , r, 7]) = 4!,
holding four fixed leads to N(a, tJ, 'Y, 0) = ... = 3!, holding five
fixed leads to N(a, tJ, 'Y, o , ~ ) = ... = 2!, holding six fixed leads to
N(a, tJ, 'Y, 0, ~ , r ) = 1!, and holding all seven fixed leads to
N(a, tJ, 'Y, 0, ~ , r, 7]) = O! = 1. Clearly, these are the symmetry con-
ditions described in Section 5.2, and so we may use formula (5.6) to
compute
D(7) = 7! - C(7, 1) 6! + C(7, 2) 5! - C(7, 3) 4!
+ C(7, 4) 3! - C(7, 5) 2! + C(7, 6)1! - C(7,7) O! .
We simplify this by expressing each C (n, r) in terms of factorials;
for example,
C(7, 4) 3!
7!
-3!
4!3!
7!
4!
80 MATHEMATICS OF CHOICE
The result can be written
(5.10)
7! 7! 7! 7! 7! 7! 7!
D(7) = 7! - 1i + 2! - 3! + 4! - 51 + 6! - 7!
[
1 1 1 1 1 1 1]
7! 1 - 1i + 2! - 3! + 4! - 51 + 6! - 7! .
This entire argument generalizes directly to D(n), the number of
derangements of n things, and yields the following equations:
D(n) = n! - C(n, 1)(n - 1)! + C(n, 2)(n - 2)!
Thus
(5.11)
+ (-1)nC(n, n)O!
n! n!
n! - 1!(n _ 1)! (n - 1)! + 2!(n _ 2)! (n - 2)!
n! n!
n! - - +--
11 2!
n!
+ (-1)n-.
n!
nl
+ (_1)n - O!
n!O!
[
1 1 1 1J
D(n) = n! 1 - - + - - - + ... + (-1)n - .
I! 2! 3! n!
There is another interpretation of D(n), which we now explain
in terms of the special case D(7). Consider a fixed permutation of
the integers from 1 to 7, for example
Po: 7,2,6, 1, 5, 3, 4.
Say that a permutation of the integers from 1 to 7 is incompatible
with Po if it does not have 7 in the first place, nor 2 in the second
place, nor 6 in the third place, nor 1 in the fourth place, nor 5 in the
fifth place, nor 3 in the sixth place, nor 4 in the seventh place. For
example, 1, 3, 5, 7, 2, 4, 6 is incompatible with Po, whereas 1, 3, 5,
7, 2, 6, 4 is not. The question is: How many permutations are there
that are incompatible with Po?
PROBABILITY 81
If we think about the definition of compatibility for a moment
and compare it with the definition of derangement, we notice that a
derangement is just a permutation incompatible with the "natural"
order 1, 2, 3, 4, 5, 6, 7. Since the number of permutations incom-
patible with some fixed ordering clearly does not depend on which
fixed ordering ("natural" or otherwise) is given, we conclude that
the number of permutations incompatible with Po is D(7), the
number of derangements.
We can also show this directly by applying the argument at the
beginning of this section; we merely interpret
a as the property that a permutation has 7 in first position,
(3 as the property that a permutation has 2 in second position,
'Y as the property that a permutation has 6 in third position,
7] as the property that a permutation has 4 in seventh position,
and rederive formula (5.10).
There is nothing special about the one permutation Po under
discussion. In general, we can say that if we take any fixed permutation
of the integers from 1 to 7, the number of permutations incompatible with
it is D(7). The derangements are simply all the permutations that
are incompatible with the natural arrangement 1, 2, 3, 4, 5, 6, 7.
More generally, the following statements can be made. Say that
two permutations ai, a2, "', an and b
1
, b
2
, "', b
n
of the integers
1, 2, "', n are incompatible if al b
l
, ~ b
2
, "', and an b
n
.
The number of permutations of the integers from 1 to n that are
incompatible with any fixed permutation is D(n), the number of
derangements. Furthermore, derangements are simply permutations
of the integers from 1 to n that are incompatible with the natural
ordering 1, 2, 3, "', n.
Problem Set 20
1. Evaluate D(S) and D(6).
2. List all the permutations of 1, 2, 3, 4 that are incompatible with the
particular permutation 4, 3, 2, 1.
82 MATHEMATICS OF CHOICE
3. Find the number of derangements of the integers from 1 to 10 inclusive,
satisfying the condition that the set of elements in the first five places
is (a) 1,2,3,4, S, in some order; (b) 6,7,8,9, 10, in some order.
4. Find the number of permutations of 1, 2, 3, 4, S, 6, 7 that do not have
1 in the first place, nor 4 in the fourth place, nor 7 in the seventh
place.
S. How many permutations of the integers from 1 to 9 inclusive have
exactly three of the numbers in their natural positions, and the other
six not?
6. A simple code is made by permuting the letters of the alphabet, with
every letter replaced by a different one. How many codes can be
made in this way?
7. Prove that D(n) - nD(n - 1) (-l)n for n> 2.
5.4 Combinatorial Probability
Probability, an important branch of mathematics with an exten-
sive literature, will be treated here in a very limited fashion. We shall
restrict attention to a few questions closely related to the main sub-
ject of this book. Because of this restriction it will suffice to give a
simple definition of probability which, although inadequate for a
more sophisticated study of the subject, encompasses all the problems
brought into our discussion.
To be specific, we shall confine attention to situations where we
can presume what are called equally likely cases. For example, if a
coin is tossed, we shaH take it for granted that the two outcomes,
heads and tails, are equally likely. If a die (plural" dice") is cast,
we shall assume that the six outcomes, namely 1, 2, 3, 4, 5, or 6
coming up, are equally likely to occur. Or if a card is drawn at random
from an ordinary deck, we shall assume that all 52 cards have an
equal chance of being drawn, that it is just as likely that the three
of hearts (say) will turn up as any other card.
The probability assigned to the three of hearts turning up is 1/52.
In general, probability is defmed as the ratio of the number of "fa-
vorable" cases to the total number of equally likely cases:
PROBABILITY 83
Number of favorable cases
Total number of equally likely cases
Thus the probability of getting heads when a coin is tossed is 1/2;
of a 4 coming up when a die is cast is 1/6; of an even number turning
up when a die is cast is 3/6 or 1/2; of getting an ace in a single random
draw from a deck of cards is 4/52 or 1/13.
An important condition imposed on this definition is that the
cases entering into the calculation be equally likely cases. For ex-
ample, consider the question: What is the probability of getting a
total of 12 when two dice are thrown? We could argue incorrectly
that the sum of the two numbers turning up on a pair of dice may be
2, or 3, or 4, ... , or 12, so the total number of cases is 11, and so the
probability of throwing a 12 is 1/11. This answer is incorrect because
these 11 cases are not equally likely. The chances of throwing a 12
are clearly not as great as those of throwing (say) 8, because for a
12, there must be a 6 turned up on each die, whereas for an 8 there
may be a 4 on each die, or a 3 and a 5, or a 2 and a 6.
When two dice are thrown the proper number of equally likely
outcomes can be found by thinking of the dice as two distinct inde-
pendent objects, say one white die and one blue die. There are 6
possibilities for the white die and 6 for the blue die, and so by the
multiplication principle of Chapter 2 there are 36 equally likely
cases:
1, 1 1,2 1,3 1,4 1,5 1,6
2, 1 2,2 2,3 2,4 2,5 2,6
3, 1 3, 2 3,3 3,4 3,5 3,6
4,1 4, 2 4,3 4,4 4, 5 4,6
5,1 5, 2 5,3 5,4 5,5 5,6
6,1 6, 1 6,3 6,4 6, 5 6,6.
Of these 36 cases there is only one, namely 6, 6, that gives a total of
12. Hence the probability of getting a total of 12 is 1/36.
Consider the question: What is the probability of a sum of 8 when
two dice are thrown? From the above table of 36 cases we see that a
sum of 8 arises in the 5 cases 2, 6 3, 5 4, 4 5, 3 6, 2.
Hence the answer is 5/36.
84 MATHEMATICS OF CHOICE
Consider the question: What is the probability of getting one
head and two tails when three coins are tossed? To get the total
number of equally likely cases we conceive of the three coins as
distinct, then use the multiplication principle of Chapter 2, and find
that there are 222 or eight cases, namely
HHH
HHT
HTH
HTT
TIIH
TIlT
TTH
TTT
where II stands for heads and T for tails. Thus the answer to the
question is 3/8 since the favorable cases are HTT, TIlT and TTH.
PROBLEM 5.6 If ten coins fall to the floor, what is the probability
that there are five heads and five tails?
SOLUTION: We conceive of the coins as distinct, a first coin, a
second coin, and so on. There are 2
10
outcomes because each coin
can land in two possible ways, heads or tails. An outcome can be
designated by a string of ten letters, each either an H (for heads)
or a T (for tails) ; for example
(5.12) TTHHTHHHTT
means that the first coin is tails, the second tails, the third heads, etc.
The number of favorable cases, therefore, is the number of ways that
five H's and five T's can be written in a row, and by the work of
Chapter 3, this number is C(10, 5). Hence the answer to the ques-
tion is
C(10, 5) 63
2
10
256
PROBLEM 5.7 What is the probability that six cards drawn at
random from a standard deck of 52 cards will be red cards?
SOLUTION. The total number of cases is the number of ways of
selecting six out of 52, and this is C(52, 6). There being 26 red
cards in a deck, the number of favorable cases is C (26, 6), the num-
ber of ways of choosing six out of 26. Hence the answer is
C(26, 6)
C(52, 6)
PROBABILITY 85
PROBLEM 5.8 What is the probability of getting a total of 13
when four dice are thrown?
SOLUTION. Since each die can come up in six ways the total number
of cases is 6
4
Consider the dice as identifiable in some way, such as
by color, so that we can refer to the first die, the second die, etc. If
the number turning up on the first die is Xl, on the second die X2,
on the third die X3, and on the fourth die X4, then the number of
favorable cases is the number of solutions of
in positive integers from 1 to 6. By (5.9) this number of solutions is
C02, 3) - C(4, l)C(6, 3) = 220 - 80 = 140.
Hence the answer is 140/6
4
or 35/324.
PROBLEM 5.9 If a permutation of the integers 1, 2, 3, "', n is
taken at random, what is the probability that it is a derangement?
SOLUTION. The total number of permutations is n! and the num-
ber of favorable cases is D(n) as given in (5.11). Hence the prob-
ability is
n!
(5.13)
D(n) 1
+ (-1)"-.
n!
This probability has some interesting aspects, some of which
will be mentioned here. (Others will be elicited in the next problem
set.) For n = 1,2,3,4,5,6, 7, 8, the values of D(n)/n! are
(5.14) 0, .5000, .3333, .3750, .3667, .3681, .3679, .3679,
to four decimal places of accuracy. Note that the four place approxi-
mation to the value of D(n)/n! does not change from n = 7 to
n = 8. It is interesting that this does not change beyond n = 8, so
that .3679 is accurate for D(n) In! to four decimal places for all n
from 7 onwards, n = 7, n = 8, n = 9, and so on. In other words,
no matter how large n is, D(n) In! remains within .00005 of .3679.
86 MATHEMATICS OF CHOICE
As n increases without bound, the right side of (5.13) has more
and more terms, and D(n)/n! tends to the limiting value lie
where e is a basic mathematical constant.
In computing the probability of the occurrence of an event it is
sometimes more convenient to begin by computing the "comple-
mentary probability", namely the probability that the event will not
occur. The probability of an event is defined as
Number of favorable cases
p=
Total number of equally likely cases'
so the complementary probability is defined as
Number of unfavorable cases
q
Total number of equally likely cases
Since the number of favorable cases added to the number of un-
favorable cases is the total number of cases, we see that
p + q = 1 or p = 1 - q.
Problem Set 21
L Check the calculations giving the values in (5.14).
2. Find the probability of getting two tails if two coins are tossed.
3. What is the probability of getting a total of 7 when two dice are
thrown?
4. Two dice, one red and one white, are tossed. What is the probability
that the white die turns up a larger number than the red die?
5. If four dice are thrown, what is the probability that the four numbers
turning up will be all different?
6. If seven dice are thrown, what is the probability that exactly three
6's will turn up?
PROBABILITY 87
7. Show that the terms of the binomial expansion of a + iF are the
probabilities that when seven dice are cast the number of 6's turning
up will be respectively 0, 1, 2, 3, 4, 5, 6, 7.
8. What is the probability of getting a total of 15 when five dice are
thrown?
9. When eight coins are tossed what is the probability of (a) exactly
five heads; (b) at least five heads?
10. What is the probability that four cards dealt at random from an
ordinary deck of 52 cards will contain one from each suit, that is to
say, one heart, one spade, one club and one diamond?
11. Find the probability that when 13 cards are dealt from an ordinary
deck of 52 cards (a) at least two are face cards; (b) exactly one
ace is present; (c) at least one ace is present.
12. The letters of the alphabet are written in random order. What is
the probability that x and yare adjacent?
13. If a five-digit integer is chosen at random, what is the probability
that (a) the sum of the digits is 20; (b) the product of the digits
is 20?
14. A teacher is going to separate ten boys into two teams of five each
to play basketball by drawing five names out of a hat containing
all ten names. As the drawing is about to start, one boy says to a
good friend, "I hope we get on the same team." His friend replies,
"Well, we have a fifty-fifty chance." Is he right, in the sense that the
probability that the two boys will be on the same team is i?
15. A man took the eight spark plugs out of his auto to clean them. He
intended to put each one back into the same cylinder it came from,
but he got mixed up. Assuming that the plugs were put back in
random fashion, what is the probability that at least one went back
into the cylinder it came from? at least two?
16. A solitaire type of card game is played as follows: The player has
two shuffled decks, each with the usual 52 cards. With the decks
face down the player turns up a pair of cards, one from each deck.
88 MATHEMATICS OF CHOICE
If they are matching cards (for example, if both are the seven of
spades) he has lost the game. If they are not matching cards he con-
tinues and turns up another pair of cards, one from each deck. Again
he has lost if they are a matching pair. The player wins if he can turn
up all S2 pairs, none matching. What is the probability of a win?
17. In the preceding problem suppose the game is played with two
"decks" of 13 cards each, for example the spades from two decks of
cards. What is the probability of a win in this case?
18. In Problem 16 suppose that a win is defined differently: The player
wins if there is exactly one matching pair in the entire S2 pairs. What
is the probability of a win?
5.5 Summary
Consider a collection of N different objects, some of which have
property a, some property f3, some property -y, and so on. Let
N(a) be the number of objects having property a, N(f3) the num-
ber having property f3, . , N(a, f3) the number having both
properties a and {3, N(a, f3, -y) the number having all three prop-
erties a, f3, and -y, and so on. Then the number of objects having
none of the properties is
N
-N(a) - N(f3) - N(-y) - ..
+N(a, f3) + N(a, -y) + N(f3, -y) +
-N(a, f3, -y)
Suppose that there are r properties under consideration. Also
suppose that the number of objects having anyone property is the
same as the number of objects having any other single property,
that the number of objects having two properties is the same no
matter which two are considered, and likewise for three properties,
PROBABILITY 89
four properties, and so on. Then the number of objects having none
of the properties can be written in the simpler form
N - C(r, l)N(a) + C(r, 2)N(a, (1) - C(r, 3)N(a, (j, -y) + ....
With the use of this inclusion-exclusion principle, as it is called,
the discussion of the equation
(5.15)
Xl + X2 + Xa + ... + Xk = m
is continued from the preceding chapter. We are now able to find the
number of solutions of an equation of type (5.15) under the conditions
that each variable is restricted to a specific set of consecutive integral
values. Whereas detailed formulas were not developed in general,
the following case was treated: Let c be any fixed positive integer;
the number of solutions of equation (5.15) in positive integers from
1 to c inclusive is
C(m - 1, k - 1) - C(k, l)C(m - c - 1, k - 1)
+ C(k, 2)C(m - 2c -- 1, k 1)
- C(k, 3)C(m - 3c - 1, k 1)
+ C(k, 4)C(m - 4c - 1, k - 1)
where the series continues until zero terms arise.
The discussion of combinations with repetitions is continued from
the preceding chapter to a wider variety of cases, again by use of the
inclusion-exclusion principle.
Define D(n) as the number of derangements of 1, 2, 3, "', n,
that is, the number of permutations with 1 not in the first place, 2
not in the second place, "', and n not in the n-th place. It was
established that
D(n) = n! [1 - ~ + - ~ + ~ - ~ + ... + (-1) n ~ ] .
1! 2! 3! 41 5! n!
90 MATHEMATICS OF CHOICE
Say that two permutations of n objects are incompatible if in the
two arrangements, all pairs of objects in corresponding positions con-
sist of two distinct objects. If P is a fixed permutation of the integers
from 1 to n, the number of permutations incompatible with P is
D(n). Derangements are permutations incompatible with the
natural ordering 1, 2, 3, . ', n.
Probability was defined in simple combinatorial situations as the
ratio of the number of favorable cases to the total number of equally
likely cases. The meaning of "equally likely cases" was taken as
intuitively clear in certain basic situations, and then extended to
more complex ones by use of the mUltiplication principle of Chapter 3.
CHAPTER SIX
Partitions of an Integer
In this chapter we discuss partitions of an integer, or what is the
same thing, partitions of a collection of identical objects. In case the
objects are not identical, the problem comes under the heading
"partitions of a set" and is discussed in Section 8.2.
The partitions of a positive integer are the ways of writing that
integer as a sum of positive integers. The partitions of 5, for example,
are
5 4+1
3+2
2+1+1+1
1+1+1+1+1
Since there are seven partitions of 5, we write P(5) = 7; in general,
we let p(n) denote the number of partitions of the positive integer
n. In such a partition as 3 + 2 above, the numbers 3 and 2 are
called the summands. Thus 5 has one partition with one summand,
two partitions with two summands, two partitions with three sum-
mands, one with four summands, and one with five summands.
Whereas 5 has two partitions with three summands, the equation
Xl + X2 + Xa = 5 has six solutions in positive integers; they are
(3,1,1), (1,3,1), (1,1,3), (2,2,1), (2,1,2), (1,2,2).
92 MATHEMATICS OF CHOICE
In counting the number of solutions of an equation, order is taken
into account; but in counting the number of partitions, the order of
the summands is irrelevant.
6.1 Graphs of Partitions
Let us look at the partitions of 6:
1 + 1 + 1 + 1 + 1 + 1 4+1+1
2+1+1+1+1 3+2+1
(6.1)
3+1+1+1 2+2+2
2+2+1+1
There are eleven, so we write p(6) 11. Also
number of partitions of 6
(6.2)
into 6 summands is 1,
in to 5 summands is 1,
into 4 summands is 2,
into 3 summands is 3,
into 2 summands is 3,
into 1 summand is 1.
5 + 1
4+2
3+3
6
we see that the
The notation qk(n) will denote the number of partitions of n with
k or fewer summands. For n = 6, the listing (6.2) above shows that
(6.3)
4
7
9
10
11.
Since the number 6 cannot be partitioned into more than six sum-
mands, we would expect that q6 (6) would be the same as p (6) .
Similarly qn(n) means the number of partitions of n having n or
fewer summands, and so
(6.4) p(n) .
PARTITIONS OF AN INTEGER 93
Partitions can also be classified according to the size of the sum-
mands. The listing (6.1) shows that the number of partitions of 6
(6.5)
with 6 as the largest summand is 1,
with 5 as the largest summand is 1,
with 4 as the largest summand is 2,
with 3 as the largest summand is 3,
with 2 as the largest summand is 3,
with 1 as the largest summand is 1.
Note the resemblance of this list to the list (6.2). This is no coin-
cidence, as we shall see. Furthermore, if we define pk(n) as the
number of partitions of n with summands no larger than k, we
find that
(6.6)
4
7
9
10
11.
This list resembles (6.3). In general it is true that pk(n)
Let us look at some special cases to see why this is so.
The partitions of 6 in to three summands are
(6.7)
4 + 1 + 1, 3 + 2 + 1, 2 + 2 + 2.
The partitions of 6 with 3 as the largest summand are
(6.8)
3 + 1 + 1 + 1, 3 + 2 + 1, 3 + 3.
To see why it is no accident that there are the same number(three)
of partitions listed in (6.7) and (6.8), we use the so-called graphs
of partitions. The graph of the partition 4 + 1 + 1 is
Similarly, the graphs of 3 + 2 + 1 and 2 + 2 + 2 are
MATHEMATICS OF CHOICE
Thus the graph of a partition of n with k summands simply con-
sists of k rows of dots, one row for each summand; the row repre-
senting the largest summand appears at the top, that representing the
next largest summand appears under it, and so on. There are as many
rows as there are summands, and the number of dots in each row cor-
responds to the size of each summand. The total number of dots in
the graph of a partition of n is n.
The reverse of a graph is obtained by interchanging the horizontal
and vertical rows of dots; for example,
GRAPH REVERSE OF THE GRAPH
4+1+1 3+1 +1 +1
3+3
PARTITIONS OF AN INTEGER 95
The reverse of a graph of a partition of n is again a graph of a
partition of n. If the original graph represents a partition with k
summands (i.e. has k rows), then the reverse graph has k dots in
its first (longest) row and hence represents a partition with maximum
summand k. For example, the partition of 12 into 4 summands
6 + 4 + 1 + 1 has the graph
The reverse graph
represents the partition 4 + 2 + 2 + 2 + 1 + 1 of 12, where 4 is
the maximum summand. Thus the one-to-one correspondence be-
tween graphs and reverse graphs can be interpreted as a one-to-one
correspondence between partitions of n with k summands and
partitions of n with greatest summand k. It follows that the num-
ber of partitions of n into k summands is the same as the number
of partitions of n with maximum summand k.
Moreover, since the number of partitions of n into 1, or 2, or
3, "', or k summands is the same as the number of partitions of
n with maximum summand 1, or 2, or 3, "', or k, we may say:
The number oj partitions oj n into k or Jewer summands
equals the number oj partitions oj n having summands no
larger than k; in symbols,
(6.9)
This result is illustrated for the special case n
equations (6.3) and (6.6).
6 in the lists of
96 MATHEMATICS OF CHOICE
Problem Set 22
1. Evaluate pel), p(2), p(3), p(4) and p(5).
3. Evaluate q2(8), q2(9) and, in general, q2(n).
4. Find the value of P99(99) - P98(99).
5. Evaluate P67(67) - P65(67).
6. Prove that pn(n) = pn+l(n) and, in general, that p,,(n) = pn(n) if
k> n.
7. Prove that Pn(n) = Pn-l(n) + 1.
6.2 The Number of Partitions
The number of partitions of n has been denoted by p(n), the
number of partitions of n with k or fewer summands by q" (n) ,
and the number of partitions of n with summands no larger than k'
by p,,(n). The relations obtained so far are
(6.10) and
In order to calculate the numerical values of these partitions we es-
tablish one more result:
(6.11)
To prove this for integers nand k satisfying 1 < k < n, we
separate the p,,(n) partitions of n with summands no larger than
k into two types:
(a) those having k as a summand;
(b) those not having k as a summand.
PARTITIONS OF AN INTEGER 97
We observe first that the partitions of type (b) are precisely the
pk-l(n) partitions of n having summands no larger than k - 1.
N ext we note that, since the summand k occurs at least once in
each partition of type (a), we can remove a summand k from each
of these partitions. If we do so, the resulting partitions are precisely
the partitions of n - k into summands no larger than k, in number
pk(n - k). Thus (6.11) is established for integers nand k such
that 1 < k < n.
As an illustration of this argument we take the case n = 6, k = 4,
so that (6.11) becomes P4(6) = Pa(6) + P4(2). All the partitions
of the number 6 are listed in (6.1) of the preceding section. There are
nine partitions of 6 having summands no larger than 4, so that
p4(6) = 9. These nine partitions are separated into type (a), those
having 4 as a summand, and type (b), those not having 4 as a
summand:
Type (a)
4+1+1
4+2
Type (b)
1+1+1+1+1+1
2+1+1+1+1
3+1+1+1
2+2+1+1
3+2+1
2+2+2
3+3
The partitions of type (b) are all partitions of 6 having summands
no larger than 3; the number of these is pa(6). When we remove a
summand 4 from each partition of type (a) we get the partitions
1 + 1 and 2. The number of these is p4(2) because
FOI"mula (6.11) is valid for positive integers k and n satisfying
< k < n. To make a table of values for pk(n) we need a few
additional observations. First, for k = 1 we note that
98 MATHEMATICS OF CHOICE
(6.12) for all n ;;;.. 1,
because there is only one partition of n with summands no larger
than 1. Next, there is no partition of n with a summand exceeding
n, and so
(6.13) if k ;;;.. n.
In case n = 1 this gives
Also, there is exactly one partition of n having n as a summand,
and hence
(6.14)
With these results it is a simple matter to make a table of values
of pk(n). To begin, we can write l's in the first horizontal row and
the first vertical column because of formulas (6.12) and (6.13). Then
the best way to proceed, perhaps, i'5 to fill in the values of p2(n) for
n = 2, 3, 4, "', then pa(n) for n = 2, 3, 4, "', then p4(n) for
n = 2,3,4, "', and so on, using formulas (6.11), (6.13) and (6.14).
TABLE OF VALUES OF hen)
k = 1 k = 2 k=3 k=4 k = 5 k=6 k = 7
n = 1
n = 2 2 2 2 2 2 2
n=3 2 3 3 3 3 3
n=4 3 4 5 5 5 5
n=5 3 5 6 7 7 7
n=6 4 7 9 10 11 11
n = 7 4 8 11 13 14 15
PARTITIONS OF AN INTEGER 99
Problem Set 23
1. Extend the table of values of p,,(n) as far as n = 12 and k 12.
3. Evaluate p(7), p(S), p(9) and p(10).
6.3 Summary
The number of partitions of a positive integer n, denoted by
p(n), is the number of ways of writing n as a sum of positive
integers. In such a partition as 7 = 4 + 2 + 1 there are three sum-
mands, 4, 2 and 1. The order of the summands does not matter, so
that 7 = 2 + 1 + 4 is the same partition. By qk(n) is meant the
number of partitions of n having k or fewer summands; by p,,(n)
is meant the number of partitions of n with no summand greater
than k. The following results were established:
pk(n)
pen)
pk(n)
qk(n) ,
pn(n) = pn+l(n) pn+'1.(n) = Pn+3(n)
pk_l(n) + pk(n - k) for 1 < k < n.
A short table of partitions was developed by use of these results
together with the following simple observations:
and
CHAPTER SEVEN
Generating Polynotnials
In this chapter we shall use polynomials to "generate" the solu-
tions of a class of problems. For example, we shall solve Problem 1.5
of Chapter 1: In how many ways is it possible to make change for a
dollar bill? The method introduced in this chapter is, in its level of
sophistication, just one step above the enumeration of cases.
In order to find the number of ways of changing a dollar bill, we
first examine the well-known technique of mUltiplying polynomials.
We shall be concerned, in particular, with multiplying polynomials
whose coefficients are 1. For example,
(1 + x + X2 + xl + XS) (1 + Xl + x
6
+ XS)
= 1 + x + X2 + Xl + 2x1 + xl' + XS + 2x
7
Now suppose we are interested in the terms of the product only up
to x
9
Then we would neglect terms involving higher powers of x
and we would write
(1 + x + X2 + xl + XS) (1 + Xl + x
6
+ x
9
)
= 1 + x + X2 + XS + 2x4 + x6 + XS + 2x
7
+ 2XS + x
9
+
GENERATING POLYNOMIALS 101
There would be no need to calculate powers of x beyond XI in the
process of multiplication. To illustrate this point, let us find the ex-
pansion, up to x
7
, of the product
(1 + x) (1 + X2) (1 + XS) (1 + x4) (1 + xli) (1 + XS) (1 + X7).
Working from the right-hand end we could write the multiplication
process as follows:
(1 + x) (1 + X2) (1 + XS) (1 + x4) (1 + xli) (1 + XS) (1 + X7)
(1 + x) (1 + X2) (1 + XS) (1 + x4) (1 + xli)
. (1 + x
6
+ x
7
+ ... )
(1 + x) (1 + X2) (l + XS) (1 + x4)
(7.1) (1 + xli + XS + x
7
+ ... )
(1 + x) (1 + X2) (1 + XS)(1 + x4 + xli + x
6
+ x
7
+ ... )
(1 + x) (1 + X2) (1 + XS + x4 + x6 + x
6
+ 2x
7
+ ... )
(1 + x) (1 + X2 + XS + x4 + 2xli + 2XS + 3x
7
+ ... )
1 + x + X2 + 2XS + 2x4 + 3xli + 4XS + 5x
7
+ ... .
A considerable amount of work is saved since the full expansion in-
cludes terms up to X
28
This saving in labor can be achieved, of
course, only if we are not concerned with terms beyond x
7
As we
shall see, such a limitation will be acceptable in the problems of this
chapter.
Problem Set 24
1. Expand the product (1 + x) (1 + x
2
) (1 + x4) (1 + XS) (1 + X
I6
)
including terms up to XIS.
2. Expand the product
(1 + x) (l + x
2
)(1 + XS)(1 + x4) (1 + xli)(1 + XS)(1 + x
7
)(1 + xS)
including terms up to xB.
102 MAT H E'M A TIC S 0 F C HOI C E
3. Multiply out the product
(l + x + X2 + x
3
+ Xi + x6 + x
6
+ x
7
) (l + x
2
+ Xi + x6) (l + x
3
+ x
6
)
. (l + Xi)(l + x6)(1 + xS)(l + x
7
)
including terms up to x
7

7.1 Partitions and Products of Polynomials
Let us look at the term 5x
7
in the expansion of the product (7.1)
of binomials of the form (1 + xn), n = 1, 2, ... , 7. The coefficient
5 tells us, in effect, that x
7
tUrns up five times in the multiplication
process. Tracking down these five cases we see that x
7
arises from
the products
where the factors 1 have been omitted for simplicity. The exponents
in these five cases correspond to the equations
7 = 7, 7 = 6 + 1, 7 = 5 + 2, 7 = 4 + 3, 7=4+2+1.
We observe that t4ese five equations are precisely the partitions of
the number 7 with distinct summands.
As a second example, consider all partitions of 6 with distinct
summands,
6 = 6, 6 = 5 + 1, 6 = 4 + 2, 6=3+2+1.
Here we have four equations, or four partitions, and this corresponds
to the coefficient 4 in the term 4x
6
of the expansion (7.1).
If we wanted to use polynomial products to find the number of
partitions of 8 with distinct summands, the expansion (7.1) would
be inadequate since it stops with (1 + X7). We would look at the
coefficient of x
8
in the expansion of
GENERATING POLYNOMIALS 103
(7.2) (1 + x) (1 + X2) (1 + xa) (1 + x4) (1 + XS) (1 + x
6
)
(1 + X7) (1 + XS).
(See Problem 2 of Problem Set 24.)
Another point can be made. The coefficients of x, x
2
, xa, x4, XS,
XS, x
7
in the expansion (7.1) are respectively the numbers of parti-
tions of 1, 2, 3,4, 5, 6, 7 with distinct summands. Similarly, the co-
efficients of x, X2, xa, x4, XS, x
6
, x
7
, xii in the expansion of the
product (7.2) are respectively the number of partitions of 1, 2, 3, 4,
5, 6, 7, 8 with distinct summands. It follows that the expansions of
(7.1) and (7.2) are identical up to the term involving x
7
, that is,
up to 5x
7

Can we use polynomial multiplication to get at the ordinary par-
titions of a number, without the" distinct summands" restriction?
We can, provided we choose the correct polynomials for multiplica-
tion. Consider the product
(7.3) (1 + X2 + x4 + xii) (1 + xa + XS)
(1 + x4)(1 + XS)(l + x
6
)(1 + X7).
Let us look at the third, second and first factors in the forms
Viewing these factors in this way (and not altering the factors 1 + x4,
1 + XS, 1 + XS, 1 + X7) we see that the coefficient of x
7
in the entire
product expansion can be thought of as the number of ways of writing
7 as a sum of numbers selected from one or more of the following
batches, where at most one member may be taken from anyone
batch.
104 MATHEMATICS OF CHOICE
First batch
Second batch:
Third batch:
Fourth batch:
Fifth batch:
Sixth batch:
Seventh batch:
1, 1 + 1, 1 + 1 + 1, 1 + 1 + 1 + 1,
1 + 1 + 1 + 1 + 1, 1 + 1 + 1 + 1 + 1 + 1,
1+1+1+1+1+1+1;
2, 2 + 2, 2 + 2 + 2;
3,
3 + 3;
4' ,
5' ,
6' ,
7.
But this is Just an elaborate description of the number oj partitions oj 7.
Thus we see that the coefficients of x, x
2
, xa, X", xn, x6, x
7
in
the expansion of the product (7.3) are simply the numbers of par-
titions of 1, 2, 3, 4, 5, 6, 7 respectively. In the notation of the pre-
ceding chapter, these coefficients are the numerical values of P(1),
P(2), P(3), P(4), p(5), P(6), p(7).
As another example, consider the product
(7.4)
(1 + x + X2 + xa + X" + xn + x6 + x
7
+ x6 + XI)
. (1 + xa + x6 + x
9
)(1 + xn)(1 + X7)(1 + X9).
An argument similar to that used with the product (7.3) shows that
the coefficients of x, X2, xa, X", xn, x
6
, x
7
, x6, XI are the numbers of
partitions of 1, 2, 3, 4, 5, 6, 7, 8, 9, with odd summands only.
These examples suggest the following general principle. Let a, b, c,
d, e be unequal positive integers. Then the coefficient oj xn in the ex-
pansion oj
(1 + x<' + x
2a
+ Xi" + )(1 + xl> + X
2b
+ x3" + ... )
(7.5) . (1 + XC + x
2c
+ xa
c
+ ... ) (1 + xd + X
2d
+ xa
d
+ ... )
.(1 +xc+x
2e
+xa
e
+ . )
equals the number oj partitions oj n with summands restricted to a, b,
c, d, e. Each Jactor in (7.5) must include all exponents not exceeding n.
GENERATING POLYNOMIALS 105
To illustrate this last remark, consider the case n = 34 and a = 6;
the first factor in (7.5) would be
No harm would be done by the presence of higher powers such as
Xl6, x4
2
, and so on, but these are not necessary in case n = 34.
There is, of course, no reason to restrict the summands to five
items a, b, c, d, e. The extension of formula (7.5) to more summands
merely involves additional appropriate factors, and the contraction
to fewer summands merely involves the removal of appropriate
factors.
Question: What product can be used to give the number of parti-
tions of 20 with summands 3, 4, 5, 6? Answer: The number of such
partitions is the coefficient of x
20
in the expansion of the product
(1 + XI + x
6
+ x
9
+ XI2 + XIS + X
I8
)
(7.6) (1 + x4 + xB + XI2 + X
I6
+ x
20
)
(1 + XS + x
lO
+ XIS + x
20
) (1 + x
6
+ XI2 + X
I8
).
Finally, we note that there is another interpretation of the coeffi-
cient of X20 in this expansion. It is the number of solutions, in non-
negative in tegers, of
3y + 4z + 5u + 6v = 20;
for, each such solution corresponds to a partition of 20 with sum-
mands 3, 4, 5, 6. For example, the solution y = 1, Z = 3, U = 1,
v = 0 corresponds to the partition 20 = 3 + 4 + 4 + 4 + 5.
Problem Set 25
1. Give an interpretation of each of the following in terms of partitions:
(a) the coefficient of x1
2
in the expansion of
(1 + x
2
+ X4 + x
6
+ x
8
+ x
lO
+ x1
2
) (1 + X4 + x
8
+ X
12
) (1 + x
6
+ X
12
)
. (l + xS)(l + x
10
)(1 + xU);
106 MATHEMATICS OF CHOICE
(b) the coefficient of x' in the expansion of
(1 + x + X
2
+ xS + x + Xl; + X
6
+ X
7
+ X
8
+ X
9
)
(1 + X
2
+ x4 + X
6
+ xS) (1 + X
3
+ xS + X
9
) ;
(c) the coefficient of x
6
in the expansion of
(1 + x)(1 + v) (1 + xB)(1 + x4)(1 + xb) (1 + xS).
2. Calculate the indicated coefficients in the preceding question.
3. Write a polynomial product whose expansion can be used to find
(a) the number of partitions of 38 with summands restricted to 6,
7, 12, 20;
(b) the number of partitions of 15 with summands greater than 2;
(c) the number of partitions of 9 with distinct (i.e. unequal)
summands.
Calculate the number of partitions in each case.
4. How many solutions are there in non-negative integers of the equation
2y + 3z + 5w + 7t = 18?
5. How many solutions in positive integers are there of the equation
3u + 5v + 7w + 9t = 40?
7.2 Change for a Dollar Bill
In the light of the general principle formulated in the preceding
section, it is not difficult now to determine in how many ways it is
possible to break a dollar bill into change. Since coins come in the
denominations 1, 5, 10, 25 and 50 cents, our task is to find the num-
ber of partitions of 100 with summands restricted to 1, 5, 10, 25, 50.
Thus we can apply the formulation (7.5) with
GENERATING POLYNOMIALS 107
a = 1, b = 5, c = 10, d = 25, e = 50;
the answer to the question is the coefficien t of x
lOO
in the expansion
of the product P
1
P
2
P
a
P
4
P", where the P's are the polynomials
P
2
+ xO + x
lO
+ XIS + x
20
+ .. + X
95
+ x
IOO
,
P
a
+ x
lO
+ X20 + x30 + x40 + . + x90 + x
1OO
,
P4 + X
26
+ xOO + x
7S
+ x
1OO
,
P" + x60 + x
lOO

All calculations will be made up to XIOO. We compute
1 + X
25
+ 2x60 + 2X
75
+ 3x
1OO
+ ' .. ,

+x65 + 3x
80
+ XSS + 3x
70
+ 3X
75
+ 3XSO + 3XSS + 3x
90
+ 3X
95
+ 6x
1OO
+
P2PaP 4 P" = 1 + xD + 2x
lO
+ 2x1
6
+ 3X 20 + 4x
2
" + 5XSO + 6XSS
+ 7x40 + + 11x60 + 12xfi6 + 15x80 + 16x% + 19x
70
+ 22x
76
+ 25XSO + 28XSS + 31x90 + 34xD
6
+ 40x
1OO
+
The final multiplication need not be done in detail, since we are con-
cerned only with the coefficient of x
lOO
We notice that each term in
the polynomial product P
2
P
a
P
4
P" enters exactly once in contributing
to the coefficient of x
lOO
in the product of PI and P
2
P
a
P
4
P". It
follows that this coefficient can be calculated simply by adding all
the coefficients in P
2
P
S
Pf,P" (including the constant term 1);
1 + 1 + 2 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 11 + 12
+ 15 + 16 + 19 + 22 + 25 + 28 + 31 + 34 + 40.
This sum is 292, and so there are 292 ways of changing a dollar bill.
108 MATHEMATICS OF CHOICE
Problem Set 26
1. Find the number of ways of changing a hundred dollar bill into bills
of smaller denominations, namely 1, 5, 10, 20, 50 dollar bills.
2. In how many ways can the sum of 53 cents be made up in coins of
denominations 1, 5, 10, 25 cents?
3. Find the number of solutions in non-negative integers of the equation
5y + 10z + 25w + 50t = 95.
4. Find the number of solutions in positive integers of the equation
5y + lOz + 25w + 501 = 155.
7.3 Summary
The incomplete multiplication of polynomials with unit coefficients
-incomplete in the sense that the result is obtained only up to a
certain power of the variable x -is used to determine the number
of certain partitions and solutions of equations.
For fi.ve summands, the procedure is illustrated by the following
general principle. Let a, b, c, d, e be unequal positive integers. Then
the coefficient of xn in the expansion of
(1 + X" + x
2a
+ .x3
a
+ ... ) (1 + x
b
+ X2b + .x3
b
+ ... )
(1 + XC + x
2c
+ x3
c
+ ... ) (1 + xd + X
2d
+ .x3
d
+ ... )
(1 + x" + x
2e
+ .x3
e
+ ... )
equals the number of partitions of n with summands restricted to
a, b, c, d, e. (Each of the five factors in parentheses in the product
must include all exponents not exceeding n. ) This coefficient is also
the number of solutions in non-negative integers y, z, w, U, v of the
equation
ay + bz + CUI + du + ev = n.
This theory is used to determine, for example, the number of ways
of making change for a dollar bill.
CHAPTER EIGHT
Distribution of Objects
Not All Alike
Many problems of combinatorial analysis can be stated in terms
of the number of ways of distributing objects in boxes. Some of these
distribution problems were considered in earlier chapters. We now
make a brief classification of the various types of questions.
First, the objects may be considered to be alike, and the boxes also
indistinguishable from one another. These are partition problems.
For example, the number of ways of distributing nine objects in
four boxes is the same as the number of partitions of 9 into at most
four summands. Problems of this sort were discussed in Chapters 6
and 7.
N ext, the objects may be alike, but the boxes may be thought of
as different. Under these conditions, the number of ways of dis-
tributing nine objects in four boxes equals the number of solutions of
in non-negative integers. If no box is to be empty, solutions in posi-
tive integers are to be counted. Similarly, other restrictions on the
number of elements in the boxes correspond to restrictions on the
solutions of the equations. Questions of this sort were studied in
Chapters 4 and S.
110 MATHEMATICS OF CHOICE
In the present chapter we study the distribution of objects that
are not all alike. The words "not all alike" admit two interpretations:
(1) objects all different in the sense of no two alike; (2) a mixed
collection of objects, some alike and some different, such as coins,
for example. In the first section we discuss the case of objects all
different, with boxes also different; in the second section, the case of
objects all different with boxes alike; in the third section, objects
some alike and some different, with boxes different.
8.1 Objects Different, Boxes Different
If m objects, no two alike, are to be distributed in k boxes, no
two alike, the number of ways this can be done is km since there are
k alternatives for the disposal of the first object, k alternatives for
the disposal of the second, and so on.
But now suppose the additional requirement that there be no
empty box is imposed; that is, we are to count only those distribu-
tions in which each box receives at least one object. Of course we
must now have at least as many objects as boxes, m > k; otherwise
no such distribution can be made. Let j(m, k) denote the number of
ways of putting m different objects into k different boxes, with no
box empty. For example, j(3, 2) = 6. For convenience we define
j(m, k) = 0 if m < k.
We derive a formula for j(m, k) by using the inclusion-exclusion
principle of Chapter 5. The method is illustrated by the computation
of j(m, 7). Consider the total number of arrangements, 7
m
, of m
different objects in seven different boxes. Say that such an arrange-
ment has property a in case the first box is empty, property (3 in
case the second box is empty, and similarly properties ,)" 6, E, r, ."
for the other five boxes respectively. To fmd the number of distribu-
tions with no box empty, we simply count the number of distributions
having none of the properties a, (3, ,)" etc. We can apply formula
(5.6) of page 74 because of the symmetry of the seven properties.
Here N = 7
m
is the total number of distributions. By N(a) we
mean the number of distributions with the first box empty, and so
N(a) = 6
m
Similarly, N(a, (3) is the number of distributions with
the first two boxes empty. But this is the same as the number of
DISTRIBUTION OF OBJECTS 111
distributions into five boxes, and hence N(a, p) = 5"'. Thus we can
write
N(a, (3) = 5"',
N(a, (3, ,, (5) = 3"',
N(a, (3, ,, 15, E, t) = 1"', N(a, (3, ,, 0, E, t, 7]) = O.
Applying formula (5.6) of page 74 with r = 7 we get
j(m,7) = 7'" - C(7, 1)6'" + C(7, 2)5'" - C(7, 3)4'"
+ C(7, 4)3'" - C(7, 5)2'" + C(7, 6)1"'.
By a direct generalization of this with k in place of 7, we see that
(8.1)
j(m, k) = k'" - C(k, 1) (k - I)'" + C(k, 2) (k - 2)'"
- C(k, 3)(k - 3)'" + ... + (_I)k-1C(k, k - 1)1"'.
If m < k then j(m, k) = O. In such cases formula (8.1) can be
used to give identities about C(n, r). For example, if m = 6 and
k = 7, then (8.1) tells us that
7
6
- C(7, 1)6
6
+ C(7, 2)5
6
- C(7, 3)4
6
+ C(7, 4)3
6
- C(7,5)26 + C(7,6)16 O.
Problem Set 27
1. Find the number of distributions of five different objects in three
different boxes, with no box empty.
2. Find the value of 1(5, 2).
3. It is stated in the text that 1(3,2) = 6. Verify this both by an actual
count of the cases, and by use of formula (8.1).
4. In how many ways is it possible to distribute k distinct objects in k
distinct boxes with no box empty? Answer this question in two ways,
namely by direct consideration and by use of formula (8.1), and
derive an identity.
112 MATHEMATICS OF CHOICE
5. Prove that if m is any positive integer less than S,
Sm - C(S, 1) 7
m
+ C(S, 2)6
m
- C(S, 3)5
m
+ C(S, 4)4
m
- C(S, 5)3
m
+ C(S, 6)2
m
- C(S, 7) = O.
8.2 Objects Different, Boxes Alike (Partitions of a Set)
If a set contains m elements, it is always presumed as part of the
meaning of the word" set" that the elements are different from one
another. Thus the number of ways that m different objects can be
put into k like boxes is the same as the number of partitions of a
set of m elements into k subsets. Note that nothing is said about
the number of elements in the k subsets. However, in some problems
it will be specified that the subsets are non-empty.
Let G(m, k) denote the number of distributions of m different
things into k like boxes, i.e., boxes that are not ordered, and cannot
be distinguished in any way. To say it another way, G(m, k) is the
number of separations of m different objects into k or fewer batches;
we include the words "or fewer" because one or more of the batches
may be empty. For example, consider G(3, 2). Denoting the three
objects by A, B, and C, we see that there are four cases:
A, B, and C in one box, nothing in the other;
A in one box, B and C in the other;
(S.2)
B in one box, A and C in the other;
C in one box, A and B in the other.
Thus G(3, 2) = 4.
Now let gem, k) denote the number of distributions of m differ-
ent objects in k like boxes, with no box empty. Thus gem, k) is the
number of ways of separating m different objects into k non-empty
batches, or the number of ways of separating a set of m things into
k non-empty subsets. Looking at the cases listed as (S.2) we see that
g(3, 1) = 1 and g(3, 2) = 3.
DISTRIBUTION OF OBJECTS 113
In general, we can separate the G(m, k) distributions into those
where no box is empty, those where exactly one box is empty, those
where exactly two boxes are empty, and so on, to get
(8.3)
G(m, k) = gem, k) + gem, k - 1) + gem, k - 2)
+ gem, k - 3) + '" + gem, 1).
Next we derive a formula for g( m, k). There is a simple relation-
ship between gem, k) and f(m, k); it parallels the relationship
between combinations and permutations in the elementary theory.
To see this, consider any distribution counted by gem, k); since
there are k! ways of numbering the k boxes to change them from
like to unlike boxes, each distribution gives rise to k! distributions
of the f(m, k) type. It follows that
f(m, k) = gem, k) k! or gem, k) = f(m, k)jk!
In view of equation (8.1) of the preceding section, this last equation
can be rewritten in the form
1
gem, k) k! [km - C(k, 1) (k - l)m + C(k, 2) (k - 2)m
(8.4)
- ... + (-I)-lC(k, k - 1)l
m
J.
It is an easy matter to determine the value of gem, k) by (8.4),
and then to determine G(m, k) by (8.3). Also, since formula (8.4)
gives the number of partitions of a set of m elements into k non-
empty subsets, the total number of partitions of a set of m elements
can be obtained by adding the values of gem, k) for all the appropri-
ate values of k, namely k = 1, k = 2, "', k = m. Thus the total
number of partitions of a set of m elements is
gem, 1) + gem, 2) + gem, 3) + ... + gem, m),
where each term of this sum can be evaluated by use of (8.4).
114
MATHEMATICS OF CHOICE
Problem Set 28
1. In how many ways is it possible to separate the nine letters a, b, c, d, e,
j, g, h, i into three non-empty batches?
2. If we separate four distinct objects into four non-empty batches, it is
clear that there is just one way to do it. Check that formula (8.4)
gives this result.
3. In how many ways is it possible to separate m distinct objects into
two non-empty batches?
4. In how many ways is it possible to factor the number 30,030 into
three positive integer factors (a) if 1 is allowed as a factor, (b) if
each factor must be greater than 1? (Order does not count: 307713
is the same factoring as 133077. )
5. Find the total number of ways of partitioning a set of five (distinct)
elements.
6. Without using the formulas of the text, establish from the meaning
of the symbolism that g( m, m) = 1. Hence prove the identity
m! = mm - C(m, 1) (m - 1)m + C(m, 2) (m - 2)'"
- C(m. 3) (m - 3)m + ... + (-1)m-1C(m, m-1) (1)"'.
7. Without using the formulas of the text, establish that
g(m, m - 1) = C(m, 2).
Then use a similar kind of analysis to evaluate g(m, m - 2).
8.3 Objects Mixed, Boxes Difierent
Consider several different objects, each of which may be in more
than one copy; for example, a collection of stamps, or of books. Let
there be a copies of the first object, b copies of the second, c of
the third, and so on. Let the total number of objects be n, so that
(8.5) a + b + c + ... = n.
DISTRIBUTION OF OBJECTS 115
These objects are to be distributed into several unlike boxes as follows:
a objects into the first box, fl into the second box, 'Y into the third
box, and so on. Each distribution into the boxes will use up all the
objects, so that the sum of a, fl, 'Y and so on is n:
(8.6)
a + fl + 'Y + ... = n.
We shall use the symbolismt
(8.7) [a, b, c, .. 0 a, fl, 'Y, J
to denote the number of distributions of the objects in the boxes, as
specified. As an example, we consider the notation [1, 2, 2 0 2, 3J,
where n = 5. One way to visualize the five objects is to think of
colored balls, say one red ball, two blue balls, and two white balls.
The two blue balls are identical; the two white balls are identical.
The problem is to find the number of ways of putting two of the balls
into the first box, and three into the second box. It is not difficult to
verify that there are five ways of doing this, that is,
[1, 2, 2 0 2, 3J = 5.
We shall not derive any general formula for the number of dis-
tributions denoted by (8.7). The problem of this distribution number
is rather difficult, and so we shall analyze some special cases only.
First we examine two basic properties of the distribution number
(8.7). One property is that the order of the terms on either side of
the vertical separator is immaterial. For example,
[1, 2, 2 0 2, 3J = [2, 1, 2 0 2, 3J = [2, 2, 1 0 3, 2J.
The second, less obvious, property is that the two sides can be inter-
changed, as in the examples
[1, 2, 2 0 2, 3J [2, 3 0 1, 2, 2J,
(8.8) [4, 5, 6 0 2, 2, 3, 8J = [2, 2, 3, 8 0 4, 5, 6J.
t Adapted from H. Rademacher and O. Toeplitz, The Enjoymenl of Ma#hemalics,
Princeton, 1957, with permission.
116 MATHEMATICS OF CHOICE
We now establish the validity of the second statement, i.e., of
equation (8.8). The notation [4, 5, 6 0 2, 2, 3, 8J means the
number of ways of putting 4 red balls, 5 blue balls, and 6 white balls
into 4 boxes, with 2 balls in the first box, 2 in the second box, 3 in
the third box, and 8 in the fourth box. The balls are distinguishable
only by color. In any distribution we shall denote by Xl the number
of red balls put into the first box, and similarly by X2, Xa, X4 the
numbers of red balls put into the second, third, and fourth boxes
respectively. In the same way, let Yl, Y2, Ya, Y4 denote the numbers
of blue balls put into the boxes, and Zl, Z2, Za, Z4 the number of white
balls. Then the notation [4, 5, 6 0 2, 2, 3, 8J can be interpreted
as the number of solutions in non-negative integers of the system of
equations
Xl + X2 + Xa + X4
4
Xl + Yl + Zl
2
Yl + Y2 + Ya + Y4
5
X2 + Y2 + Z2
2
(8.9)
6 3
Zl + Z2 + Za + Z4 Xa + Ya + Za
X4 + Y4 + Z4
8
Now let us consider the right hand side of equation (8.8). The
symbolism [2, 2, 3, 8 0 4, 5, 6J denotes the number of ways of
putting 2 green balls, 2 orange balls, 3 yellow balls, and 8 black balls
into 3 boxes with 4 balls in the first box, 5 balls in the second box,
and 6 balls in the third box. Let t
l
, t
2
, ta denote the numbers of
green balls put in the first, second and third boxes respectively, in
any distribution. Similarly, let Ul, U2, Ua denote the numbers of
orange balls, VI, V2, Va the numbers of yellow balls, and WI, W2, Wa
the numbers of black balls, put in the first, second and third boxes
respectively. Then the notation [2, 2, 3, 8 0 4, 5, 6J can be inter-
preted to mean the number of solutions in non-negative integers of
the system of equations
(8.10)
2
2
3
tl + UI + VI + WI
~ + U2 + V2 + W2
Is + Ua + Va + Wa
4
5
6
DISTRIBUTION OF OBJECTS 117
To see that the system of equations (8.10) is the same as the system
of equations (8.9), let
X2, Xa,
Ya,
Ua Va Za, Wa
This shows that (8.8) holds. A similar argument with more elaborate
systems of equations can be used to prove that
(8.11) [a, b, c, '" U a, (3, 'Y, J = [a, (3, 'Y, U a, b, c, . J
for any integers satisfying a + b + c + ... = a + (3 + 'Y + . .. = n.
A result of this type in mathematics is called a duality principle.
As a special case of (8.11), consider the situation where a = 1,
(3 = 1, 'Y = 1 and so on :
(8.12) [a, b, c, ... U 1,1,1, ... , IJ [1,1,1, ",,1 U a, b, c, . J;
here each block of 1 's has n terms, and a + b + c + ... = n. The
notation on the left of (8.12) can be interpreted to mean the number
of permutations of n things taken all at a time, where a of the
things are alike, another b alike, another c alike, and so on. The
number of such permutations, as given in the summary of Chapter 3, is
n!
(8.13)
a!b!c!
Now we can assert that the right member of (8.12) also has the value
(8.13). Thus (8.13) is the number of ways of distributing n distinct
things in boxes with a in the first box, b in the second box, c in
the third box, and so on.
Problem Set 29
1. Find the numerical values of the following:
(a) [1, 1, 1, 1 U 1, 1, 1, 1J
118 MATHEMATICS OF CHOICE
(b) [1, 1, 1, 1, 1, 1, 1, 1, 1 U 4, 5J
(c) [1, 1, 1, 1, 1, 1, 1, 1, 1, 1 U 1, 1, 1, 1, 1, 1, 4J
(d) [30, 10 U 10, 10, 10, 10J
(e) [2, 1, 1 U 2, 1, IJ
(f) [2, 2, 2 U 2, 2, 2J
(g) [4, 4, 4 U 6, 6J
2. Express each of the following in the notation of previous chapters:
(a) [1, 1, 1, "', 1 U 1, 1, 1,
of the separator;
1J, with n ones on each side
(b) [1, 1, 1, ",,1 U 1,1,1, ,1, n - r J, with n ones to
the left of the separator, and r ones to the right;
(c) [1, 1, 1, "', 1 U r, n - r J, with n ones to the left of the
separator;
(d) [aI, <l2, a3, "', air 0 r, n - r J, where
and each of the a's is not less than r.
3. Evaluate [2, 1, 1, 1, "', 1 U 2, 1, 1, 1,
on each side of the separator.
8.4 Summary
1 J, with k ones
The number of distributions of m different objects in k different
boxes is km. If no box is to be empty, the notation f(m, k) is used
for the number of distributions, with f(m, k) = 0 in case m < k.
It was shown that
f(m, k) = km - C(k, 1) (k - 1)m + C(k, 2) (k - 2)m
- C(k, 3) (k - 3)'" + ... + (_1)k-IC(k, k - 1) 1"'.
DISTRIBUTION OF OBJECTS 119
If we have m different objects and k boxes that are indistinguish-
able from each other, the notation G(m, k) is used for the total
number of distributions of the objects in the boxes, and gem, k) for
the number of distributions with no box empty. It is proved that
gem, k) j(m, k)/k!
and
G(m, k) = gem, k) + gem, k - 1) + gem, k - 2) + ... + gem, 1).
Another interpretation of G(m, k) is the number of partitions of
a set of m (distinct) elements into k (unordered) subsets; note
that there is no restriction on the number of elements in the subsets.
However, if the k subsets are required to be non-empty, the number
of partitions of the set is gem, k). The total number of ways of
partitioning a set of m (distinct) elements is G(m, m). To evaluate
this for any specific value of m, we use the result
G(m, m) =g(m, m) + gem, m-1) + gem, m- 2) + ... + gem, 1),
together with gem, k) = j(m, k)/k! and the formula above for
j(m, k).
Let a, b, c, and a, /3, 1', be two sets of positive integers
having the same sum n:
a + b + c + ... = n,
a+/3+1'+
n.
Let there be n objects of which a are alike, another b are alike,
another c are alike, and so on. The number of distributions of these
objects into boxes, with a objects in the first box, /3 objects in the
second box, l' objects in the third box, etc., is denoted by
[a, b, c, 0 a, /3, 1', ]. It was shown that
[a, b, c, 0 a, /3, 1', ] = [a, /3, 1', 0 a, b, c, . ].
CHAPTER NINE
Configuration Probletns
The questions discussed in this chapter are related to geometric
patterns or configurations of one kind or another. We begin with a
concept which is widely used throughout mathematics-the pigeon-
hole principle.
9.1 The Pigeonhole Principle
If eight pigeons fly into seven pigeonholes, at least one of the
pigeon holes will contain two or more pigeons. More generally, if
n + 1 pigeons are in n pigeon holes, at least one of the holes con-
tains two or more pigeons.
This simple form of the pigeonhole principle can be generalized
as follows: If 2n + 1 pigeons are in n pigeonholes at least one of
the holes contains three or more pigeons. Here is an even stronger
statement that includes all the preceding assertions as special cases:
If kn + 1 pigeons are in n pigeonholes, at least one of the holes
con tains k + 1 or more pigeons.
CONFIGURATION PROBLEMS 121
It is not difficult to prove this; for, if it were not so, then every hole
would contain k or fewer pigeons. Thus there would be n holes
with k or fewer pigeons in each hole, and so a total of at most nk
pigeons could be accommodated. But this is a contradiction because
there are kn + 1 pigeons in all. Hence we have established the result
by an indirect proof.
Problem Set 30
1. Given the information that no human being has more than 300,000
hairs on his head, and that New York City, by a recent census, has a
population of 7,781,984, observe that there are at least two persons
in New York with the same number of hairs on their heads. What is
the largest integer that can be used for n in the following assertion?
There are n persons in New York with the same number of hairs on
their heads.
2. Assume the informatIOn that at least one of al and b
i
has a certain
property P, and at least one of az and b
2
has property P, and at
least one of aa and b
a
has property P. Prove that at least two of
aI, a2, aa or at least two of b
I
, b
z
, b
a
have property P.
3. Assume the same information as in the preceding question, and also
that at least one of a4 and b
4
has property P, and at least one of
a6 and b
6
has property P. Prove that at least three of aI, az, aa. a4, a6
or at least three of bI, b
2
, b
a
, b
4
, b
6
have property P.
4. Assume that at least one of ai, b
l
, CI has property Q, and likewise
for {lol, b
2
, C2, and likewise for aa, b
a
, Ca, "', and likewise for alD, blO,
CIO' What is the largest integer that can be used for k to make the
following assertion correct? At least k of at, az, aa, "', alO, or at
least k of bI, b
2
, b
a
, "', b
lO
, or at least k of CI, C2, Ca, "', CIO, have
property Q.
5. Assume that at least two of ai, b
I
, CI have property T, and likewise
for az, b
2
, C2, , and likewise for a6, b
6
, C6. What is the largest
integer that can be used for,. to make the following assertion correct?
At least ,. of ai, az, a3, a4, a6, or at least ,. of bI, b
2
, b
a
, b
4
, b
6
, or at
least ,. of CI, C2, Ca, C4, C6 have property T.
122 MATHEMATICS OF CHOICE
9.2 Chromatic Triangles
Consider six poin ts in a plane, no three of which are collinear (on a
straight line). There are C(6, 2) or fifteen line segments connecting
the points. Let these fifteen segments be colored in any way by the
use of two colors, say red and white; all the segments may be red,
all may be white, or some may be red and the rest white. Say that
any triangle connecting three of the points is chromatic if its sides
have the same color.
We shall prove that no matter how the fifteen line segmen ts are
colored, it is always possible to find a chromatic triangle. It is a
property of the number 6 that 6 is the smallest number of points in
the plane (no three collinear) such that, no matter how each of the
segments joining pairs of points is colored in one of two colors, it is
always possible to find a chromatic triangle.
Proof that it is always possible to find a chromatic triangle: Take any
one of the six points, say A, and consider the five segments AB,
AC, AD, AE, AF emanating from A. (See Figure 9.1.) By the
pigeonhole principle, at least three of these five segments must have
the same color. There is no loss of generality in presuming that the
three segmen ts having the same color are AB, A C, and AD. (In
Figure 9.1, where one color is indicated by dashed lines, the other by
solid lines, it is actually AB, AC, and AE that have the same
color. But since we can interchange the letters on the points B, C,
D, E, and F -in the case illustrated we would interchange the
labels on the points D and E -we can always fix it so that the
segments AB, AC, and AD have the same color.)
red
white
F 4E-----i---*"----i-----:;:1it C
Figure 9.1
CONFIGURATION PROBLEMS 123
Next, there is no loss of generality in presuming that the three
segments AB, AC, and AD are red. For if they were white, we
would simply reverse the color of every one of the fifteen line segments
with no effect on the existence of a chromatic triangle: any red chro-
matic triangle would become a white chromatic triangle, and vice
versa; furthermore, no new chromatic triangles would be created in
the process.
We now take the three red segments, AB, AC, and AD ema-
nating from A and consider the triangle BCD formed by their
endpoints. There are two possibilities: either all three sides of BCD
are white, or it has at least one red side. If all three sides of BCD
are white, then BCD is a chromatic triangle. On the other hand, if
at least one side of triangle BCD is red, then this red side together
with the appropriate two of the three red segments AB, AC, and
AD, forms a red chromatic triangle. In full detail, if BC is red,
then ABC is a chromatic triangle; if BD is red, then ABD is a
chromatic triangle; if CD is red, then A CD is a chromatic triangle.
This completes the proof.
We note two other ways of stating the same principle. Among any
six persons, it is possible to find three who are mutually acquainted,
or it is possible to find three no two of whom are acquainted. Among
any six persons, it is possible to find three each of whom has shaken
hands with the other two, or it is possible to find three no two of
whom have shaken hands.
Problem Set 31
1. Prove that 6 is the smallest number of points having the chromatic
triangle property; that is, exhibit 5 points in the plane, no 3 collinear,
with each of the 10 line segments joining pairs of points colored in
one of two colors, either red or white, in such a way that the configura-
tion has no chromatic triangle. (Note that if 5 such points are
exhibited, this implies that 6 is the smallest number.)
2. Consider 17 points in the plane, no 3 collinear, with each of the seg-
ments joining the points colored red, white, or blue. Prove that there
is a chromatic triangle no matter what color pattern is present. (The
reader might wish to solve the analogous problem for an integer
124 MATHEMATICS OF CHOICE
larger than 17. The number 17 is the smallest that can be used in this
problem, in the sense that the proposition is not true for 16 or fewer
points. However the proof that 17 is the smallest, given by R. E.
Greenwood and A. M. Gleason in 1955, is beyond the scope of this
book.)
Additional problems on chromatic triangles are included in the Mis-
cellaneous Problems following Chapter 11.
9.3 Separations of the Plane
Consider n straight lines in a plane satisfying the following condi-
tions: (1) each line is infinite in extent in both directions; (2) no
two lines are parallel; (3) no three lines are concurrent, Le. no three
lines meet in a point. Into how many regions is the plane separated
by the 11, lines? Let fen) denote the number of regions into which
n such lines separate the plane; we find, by simple observation, that
f(1) =2, f(2) =4, f(3) =7 (see Figure 9.2). The problem is to
evaluate fen) in the general case.
2
Figure 9.2
To solve this problem we employ a technique which has already
been used in Section 3.8. It consists in finding expressions for the
differences f(k) - f(k - 1) for k = 2,3, , n and adding them.
Their sum is just fen) - f(1) since each intermediate term is sub-
tracted and then added. Such a sum is often called a "telescoping"
sum. To find the appropriate expressions in this case, consider n - 1
straight lines in the plane that separate it into fen - 1) regions.
Now introduce the n-th line. Far out on the line--farther out than
any intersection point-this n-th line is dividing a region in two.
Then, if we move along the line, we observe that whenever this n-th
CONFIGURATION PROBLEMS 125
line crosses one of the other lines, it splits another region in two. For
example, let n = 4; if we move along the fourth line in Figure 9.3
from left to right, we see that it splits region "4", and then succes-
sively regions" 5", "6", and" 3" as it crosses the three other lines.
Thus the fourth line creates four new regions. By the same reasoning
we conclude that the n-th line creates n new regions, and we express
this fact by the equation f(n) = n + fen - 1), or
(9.1) f(n) - f(n - 1) = n.
4
fourth ~ __ -----
-----
3
6
Figure 9.3
Now we apply the method of the "telescoping" sum; that is, we
write equation (9.1) followed by its counterparts with n replaced
successively by n - 1, n - 2, ",,3, 2:
f (n) - f (n - 1) = n,
fen - 1) - fen - 2) n - 1,
fen - 2) - fen - 3) n - 2,
f(3) - f(2) 3,
f(2) - f(1) 2.
When these equations are added, the sum of all the left members is
simply fen) - f(1). Thus we have
fen) - f(1) = 2 + 3 + ... + (n - 2) + (n - 1) + n.
126 MATHEMATICS OF CHOICE
The right side of this equation is the sum of the natural numbers
from 2 to n. Now by Section 3.8 the sum of the natural numbers
from 1 to n is n(n + 1)/2, and so
J(n) - J(1) = n(n + 1) - 1
2
Next we replace J(I) by its known value, 2, and add 2 to both sides
of our equation to obtain the final solution,
(9.2)
J(n)
n(n + 1)
---":,,,,+1
2
n
2
+ n + 2
2
As another illustration of the" telescoping sum" method, consider
the following
PROBLEM: Let there be n + k lines in the plane satisfying these
conditions: (1) k of the lines are parallel to each other; (2) there
are no other cases of parallel lines; (3) no three of the n + k lines
are concurrent. Into how many regions is the plane separated by the
n + k lines?
SOLUTION: Let G(n, k) denote the number of regions of separa-
tion. For example, G(1, 2) = 6 and G(2, 2) = to. The argument
leading to equation (9.1) can be modified to get a similar kind of
equation in this case; that is, we study the effect of introducing the
k-th parallel line, thus changing the number of regions of separation
from G(n, k - 1) to G(n, k). The k-th parallel line crosses n
lines, and so creates n + 1 new regions. Thus
G(n, k) = n + 1 + G(n, k - 1),
or
(9.3) G(n, k) - G(n, k - 1) = n + 1.
Again we write this equation followed by its counterparts with k
replaced successively by k - 1, k - 2, .. ', 2, 1:
CONFIGURATION PROBLEMS
G(n, k) - G(n, k - 1) = n + 1,
G(n, k - 1) - G(n, k - 2)
G(n, k - 2) - G(n, k - 3)
G(n,3) - G(n, 2)
G(n, 2) - G(n, 1)
G(n, 1) - G(n, 0)
n + 1,
n + 1,
n+l.
n + 1,
n + 1,
127
Here we have k equations, each having the right member n + 1.
When we add these equations, the sum of the right members is
ken + 1), and the sum of the left members is G(n, k) - G(n, 0), so
G(n, k) - G(n, 0) = ken + 1).
The symbol G(n, 0) denotes the number of regions created by n
lines none of which are parallel and no three of which are concurrent;
this number is the same as fen) in the preceding problem, and hence
we can use equation (9.2) to get
or
n
2
+ n + 2
G(n,k) - -----2---- ken + 1),
G(n, k)
n
2
+ 2nk + n + 2k + 2
2
Problem Set 32
1. Consider n straight lines in the plane, no two of which are parallel.
However, three of the lines, and only three, are concurrent. Into how
many regions is the plane separated?
2. A set of k parallel lines in the plane is intersected by another set of
m parallel lines. Into how many regions is the plane separated?
128 MATHEMATICS OF CHOICE
3. In the preceding question, introduce another line, parallel to no pre-
vious line, and passing through none of the mk previous intersection
points. Into how many regions is the plane separated?
4. Let there be q + t straight lines in the plane satisfying the following
conditions: no two lines are parallel; q of the lines pass through a
certain point A; t of the lines pass through another point B; no line
passes through both A and B. Into how many regions is the plane
separated?
5. Let there be k + q straight lines in the plane satisfying the following
conditions: k of the lines are parallel to each other; there are no
other cases of parallel lines; q of the lines, but none of the k parallel
lines, pass through a certain point A. Into how many regions is the
plane separated?
6. In addition to the k + q lines in the preceding question, let there be
introduced n more straight lines in the plane, such that there are
no other cases of parallelism beyond the k parallel lines, and no further
cases of concurrency beyond the q lines intersecting at the point A.
Into how many regions is the plane separated?
9.4 Summary
The pigeonhole principle, in its simplest form, states that if n + 1
pigeons are in n holes, then at least one of the holes contains two or
more pigeons. More generally, if kn + 1 pigeons are in n holes,
then at least one of the holes contains k + 1 or more pigeons.
This principle is applied to prove that, given six points in the plane,
no three collinear, if each of the 15 line segments joining pairs of
points is colored with one of two colors, then there is a chromatic
triangle present for every possible color pattern. By "chromatic
triangle" is meant one whose three sides are of the same color.
The" telescoping sum" method is used to prove that a plane is
separated into ! (n2 + n + 2) regions by n straight lines satisfying
the conditions (a) no two lines are parallel, and (b) no three lines
are concurrent. A somewhat more general situation is handled by
the same method and further generalizations are indicated in the
problems.
CHAPTER TEN
Mathem.atical Induction
Consider the sums of the odd in tegers:
(10.1)
1 = 1
1 + 3 = 4
1+3+5 = 9
1 + 3 + 5 + 7 = 16
1 + 3 + 5 + 7 + 9 = 25
1+3+5+7+9+11 = 36
A clear pattern emerges in the sums 1, 4, 9, 16, 25, 36; they are the
squares of the natural numbers 1, 2, 3,4, 5, 6. These equations suggest
the general proposition that the sum of the first n odd positive
integers is equal to n2, or, stated in symbols,
(10.2) 1 + 3 + 5 + 7 + .. + (2n - 1) = n
2

Of course the verification of the first few cases in equations (10.1)
does not in any way guarantee that the general formula (10.2) is
correct for every positive integer n. Perhaps the easiest way to
prove formula (10.2), which is valid for every positive integer n,
is to use mathematical induction.
130 MAT HEM A TIC S 0 F C HOI C E
10.1 The Principle of Mathematical Induction
Let us use the symbol P .. to denote equation (10.2). To every
positive integer n there corresponds an equation of the form (10.2);
for example, the equations listed in (10.1) are of this form, and we
designate them by PI, P
z
, P
a
, P
4
, P
6
, P
6
Moreover, we can tell by
actual calculation that all six statements of equality are true. The
assertion "P n is true for every positive integer n" actually comprises
the infinitely many assertions" PI is true, P
2
is true, P
a
is true,
. ". So far, we have seen only that Ph P
2
, ', P
6
are true and we
want to establish the truth of all (infinitely many) of these proposi-
tions. The principle of mathematical induction states that we can es-
tablish the truth of any such infinite sequence of propositions if we can
prove two results:
(i) that PI is true;
(ii) that PHI follows from P
k
for every positive integer k.
Other ways of stating (ii) are that "P
k
implies PHI" and "PHI
is implied by P/'.
The idea is that if we can prove (ii), that P
k
implies P
k
+
l
, then
we can conclude
PI
implies P
2
,
P
2
implies P
a
,
P
a
implies P
4
,
P
4
implies P
6
,
and so on. So if we prove (i) we will have a start on this chain, and
the truth of P
2
, P
a
, P
4
, P
6
, and so on, will follow by (ii) from the
truth of Pl.
Let us return to the special case where the proposition P n is the
equation (10.2). There is no difficulty with (i), since PI is simply
1 = 1. To prove (ii), we must show that
P
k
: 1 + 3 + 5 + 7 + ... + (2k - 1) k2
implies:
Pk +
l
: 1 + 3 + 5 + 7 + ... + (2k - 1) + (2k + 1) (k + 1)2;
MATHEMATICAL INDUCTION 131
that is, we are to assume P
k
and prove that P
k
+
1
follows as a con-
sequence. Assuming the proposition P
k
, let us add 2k + 1 to both
sides of the equation:
1 + 3 + 5 + 7 + ... + (2k - 1) + (2k + 1) k
2
+(2k+l)
k2 + 2k + 1
(k + 1)2.
Thus P
k
+
1
follows from P
k
, and we have proved the validity of
equation (10.2) for all positive integers n.
As a second illustration, consider the sums of the cubes of the
natural numbers:
13 = 1,
13 + 2
3
= 9,
(10.3)
13 + 2
3
+ 3
3
= 36,
1
3
+ 2
3
+ 3
3
+ 4
3
= 100,
13 + 2
3
+ 3
3
+ 4
3
+ 53 = 225,
1
3
+ 2
3
+ 3
3
+ 4
3
+ 53 + 6
3
= 441.
The numbers 1,9, 36, 100, 225, 441 on the right sides of these equa-
tions are all squares, namely the squares of 1, 3, 6, 10, 15, 21. If we
look at Pascal's triangle on page 41 we note that these numbers are
in the third vertical column, and so can be written, in terms of com-
bination symbols, as
C(2,2), C(3,2), C(4,2), C(5,2), C(6,2), C(7,2).
Might it be that C(n + 1, 2) is the appropriate number whose
square is the sum of the cubes of the natural numbers from 1 to n?
Since
C(n + 1,2) = !n(n + 1),
this conjecture may be expressed by
(10.4)
1
3
+ 2
3
+ 3
3
+ 4
3
+ ... + n
3
[C(n + 1, 2)J2
132 MATHEMATICS OF CHOICE
Let us now regard (10.4) as the proposition P
n
, or rather as the
infinite collection of propositions, one for n = 1, a second for n = 2,
a third for n = 3, and so on; then equations (10.3) are the proposi-
tions PI, P
2
, P
a
, P4., Po, P
6
To prove P n by mathematical induc-
tion, we must establish (i) that PI is true, and (ii) that P
k
im-
plies PHI for every positive integer k. Now PI, the first of equa-
tions (10.3), simply states that 13 = 1, and this is clearly true.
Before proving (ii), let us write out P
k
and P
k
+
l
in full, by re-
placing n by k, and then n by k + 1 in (10.4),
Pk : 13 + 2
3
+ 3
3
+ 4
3
+
Pk+l: 1
3
+ 2
3
+ 3
3
+ 4
3
+
+ k3 = ik
2
(k + 1)2;
+ k
3
+ (k + 1)3
= ! (k + 1)2(k + 2)2.
We are to assume P
k
and establish PHI' Adding (k + 1)3 to both
sides of the equation P
k
, we obtain
13 + 2
3
+ 3
3
+ 4
3
+ ... + k3 + (k + 1)3 = ik2 (k + 1)2 + (k + 1)3.
The question is whether this is the same as PHI' Using basic algebra
we shall see that it is Pk+1o
(k + 1)2[{k
2
+ (k + 1)J
[
k2 + 4k + 4]
(k + 1)2
4
Hk + 1)2(k + 2)2,
and so the proof of (10.4) is complete.
Problem Set 33
1. Prove that 1 + 2 + 3 + 4 + ... + n = !n(n + 1) by mathematical
induction.
2. Prove that 12 + 22 + 3
2
+ 42 + ... + n
2
= n(n + 1)(2n + 1)/6
by mathematical induction.
MATHEMATICAL INDUCTION 133
3. Let K(n) denote the number of unordered pairs of integers selected
from 1, 2, 3, . , n, subject to the restriction that no pair is con-
secutive. For example, K(5) is the count of the pairs
1,3 1,4 1,5 2,4 2,5 3,5
and so K(5) = 6. By such counting it can be determined that
K(3)
K(6)
1
10
K(4)
K(7)
3
15
K(5)
K(8)
6
21.
Make a conjecture about K(n) from this information, and, if pos-
sible, prove your conjecture by mathematical induction.
4. Some of the following equations hold for all positive integers n. Try
to establish each by mathematical induction.
(a) 1 + 4 + 7 + 10 + ... + (3n - 2) = n
2
+ n - 1;
(b) 12 + 23 + 34 + ... + n(n + 1) = (n
3
+ 3n
2
+ 2n)/3;
(c) 12 + 3
2
+ 52 + ... + (2n - 1)2 = (4n
3
- n)/3;
Cd) 13 + 35 + 57 + ... + (2n - 1)(2n + 1)
= (5n
3
+ IOn - 6)/3;
(e) 12 + 33 + 54 + 75 + ... + (2n - l)(n + 1)
= (n
3
+ 5n
2
- 4n + 2)/2;
(f) 112 + 223 + 334 + ... + nn(n + 1)
= n(3n3 + lOn2 + 9n + 2) /12.
10.2 Notation for Sums and Products
In writing such an equation as
1 + 2 + 3 + ... + n = in (n + 1)
there is some difficulty with the notation. Whereas with n = 10
there is no doubt as to what is meant by 1 + 2 + 3 + ... + n, in
the case n = 2 one must in terpret 1 + 2 + 3 + ... + n as simply
134 MATHEMATICS OF CHOICE
1 + 2. There is a notation that avoids this confusion and at the
same time has the virtue of greater compactness, namely
n
L j in place of 1 + 2 + 3 + ... + n.
i-I
This is read "sigmaj, j = 1 to n", and means "sum the element j
for all integer values from j = 1 to j = n". Here are some other
illustrations:
n
"'J'
2
...J means 12 + 22 + 3
2
+ ... + n2;
r-t
100
Lj(j + 3) means 14 + 25 + 36 + 47 + ... + 100103;
J-l
n
L (P + 1) means (13 + 1) + (2
3
+ 1) + (3
3
+ 1)
+ ... + (n3 + 1);
n-l
L (P + 1) means (4
3
+ 1) + (53 + 1) + (6
3
+ 1)
j=4
+ ... + n - 1)3 + 1).
We note that constant factors can be moved to the left of the sigma:
n n
(10.6)
L 5(P + 1) = 5 L (P + 1);
r-l r-l
the reason is that" the constant factor multiplies each term in the
sum and may therefore be written as a factor in front of the entire
sum. Also we note that expressions consisting of several terms may
be summed term wise ; for example,
n n n
L (P + 3j)
LP+ L3j,
i-I J-l J-l
(10.7)
.. .. n
L (P + 3p - j) = LP + L 3p - Lj
J-l
This is a consequence of a mere re-grouping of terms.
MATHEMATICAL INDUCTION 135
The sum of the natural numbers from 1 to n and the sum of their
squares were evaluated in Chapter 3, page 47. The sum (10.4) of the
cubes of the natural numbers from 1 to n was found by mathe-
matical induction in the preceding section. With the sigma notation,
these sums can be written as follows:
"Lj = in(n + 1),
r-
1
(to.8) In(n + 1) (2n + 1),
"LP = {n2(n + 1)2.
i-I
Note that the symbol j is a "dummy"; we could just as well write
n
"L k = in (n + 1),
and "L r
2
= In(n + 1) (2n + 1)
k-l r-l
instead of the first two formulas in (10.8). Let us use sigma notation
to evaluate the sum
112 + 223 + 334 + ... + nn-(n + 1).
We write it in the form
n n
"LP(j + 1)
or
"L (P +P)
r-l r-
1
Using the property illustrated in (10.7) and formulas (to.8) we get
.. n
"LP +"LP
in2(n + 1)2 + In(n + 1) (2n + 1)
n(n + 1) (n + 2) (3n + 1) /12,
where we have omitted the simple algebra involved in arriving at
the last formulation.
136 MATHEMATICS OF CHOICE
As another example, consider the sum
1 + 4 + 7 + 10 + ... + (3n - 2)
which, in sigma notation, can be written
n
L: (3j - 2).
,7=1
Again using (10.8) along with basic properties described above, we
have
n
L: (3j - 2)
,...1 j=l
3n(n + 1)
- . . . : . . . . - - ~ - 2n
2
j=l
i=l
n(3n - 1)
2
Sums whose terms are preceded by alternating plus and minus
signs are written in sigma notation with the help of (-1) i; for
example,
7
L: (-1)iC(7,j) C(7,0) - C(7, 1) + C(7, 2) - C(7, 3)
.,-0
+ C(7, 4) - C(7,S) + C(7, 6) - C(7, 7).
As another illustration, consider the formula from Chapter 8 for
the number of distributions of m distinct objects into k distinct
boxes with no box empty:
I(m, k) = km - C(k, 1) (k - 1)m + C(k, 2) (k - 2)m
- C(k, 3) (k - 3)'" + ... + (-1)k-1C(k, k - 1) (1)"'.
This can be written in compact form as
MATHEMATICAL INDUCTION 137
k-l
f(m, k) = L: (_1)i C(k,j) (k - j)m.
Also in Chapter 8 the number of partitions of a set of m (distinct)
elements into k (non-distinct) subsets with no subset empty was
denoted by gem, k), with the relation
gem, k) = f(m, k)jk! .
Thus a compact formula for gem, k) would be
k-1
gem, k) = L (-1)iC(k,j)(k - j)mjk!.
i=6
If in this formula we replace C (k, j) by its factorial form, there is a
cancellation of k! and the result becomes
k-l (_1)i (k _ j)m
gem, k) = L "(k _ ')'
i=6 J. J .
There is also a convenient shorthand notation for products; it uses
the upper case Greek letter pi, II, in place of the upper case sigma.
For example, n! can be written
n
n! IIj.
r-1
Here are some other examples:
II (j2 + 1) means (12 + 1) (22 + 1) (3
2
+ 1) (n2 + 1);
i-I
n
II (3j - 1) means 25811 ... (3n - 1);
r-
1
7
II (1 + Xi) means (1 + X) (1 + X2) (1 + x3) (1 + XC)
r-
1
. (1 + xli) (1 + xli) (1 + x
7
).
138 MATHEMATICS OF CHOICE
Problem Set 34
1. Express the following sums without the sigma notation:
6 4 6
(a) LP; (b) L (2P - 1); (c) L (k
2
+ 2).
r-1 r-1 k-3
2. Evaluate the following sums by use of the sigma notation and
formulas (10.8):
( a) 3 + 6 + 9 + 12 + ... + 3n;
(b) 2 + 5 + 8 + 11 + ... + (3n - 1);
(c) 13 + 35 + 57 + 79 + ... + (2n - 1)(2n + 1);
(d) 12 + 33 + 5-4 + 7-5 + --- + (2n - l)(n + 1);
(e) 5 + 9 + 13 + 17 + 21 + --- + (4n + 1).
3. Write formulas similar to formulas (10.8) for the sums
(a) 1 + 2 + 3 + .. - + (n - 1);
(b) 1 + 2 + 3 + --- + (n + 1);
( c) 12 + 22 + 3
2
+ .. - + (n + 1)2.
4. Find the numerical value of
]00
L (-l)i.j.
1-1
5. Write the equation
G(n,O) + G(n, 1) + G(n, 2) + G(n,3) + --- + G(n, n) = 2"
in sigma notation.
6. Identify
,.
L (-IV G(n,j)
i-O
as a sum discussed earlier in this book, and so evaluate it.
7. Prove
MATHEMATICAL INDUCTION
n
L: 2i = 2
n
+
1
- 1
,7-0
139
by mathematical induction. Hence prove that, in Pascal's triangle
(page 41), the sum of the elements in any row equals the sum of all
elements in all preceding rows, with 1 added.
6
8. Evaluate the product II (j + 1).
i=2
n
9. Express the product II (2j) in factorial notation.
i-I
10. Verify that
IT (2j - 1) = (2n)!
2
n
'n! .
11. Let f (n) be defined by
n
fen) = L:j-j!.
1-1
Verify that f(l) = 1, f(2) = 5, f(3) = 23, and find the numerical
values of f(4), f(5), and f(6). Then compare these with the nu-
merical values of 2!, 3!, 4! , 5!. 6!, and 7!, conjecture a formula
for f(n) , and try to prove it by mathematical induction.
10.3 Summary
The proof technique known as mathematical induction can be used
to establish an infinite sequence of propositions Ph P
2
, P
3
, - - -, pro-
vided one can show
Ci) that PI is true,
(ii) that P
k
+
l
follows from P
k
for every positive integer k.
The sigma notation for sums and the pi notation for products are
explained.
CHAPTER ELEVEN
Interpretations of aNon ...
Associative Product
Consider the mathematical expression
There appear to be two ways of interpreting this---one by starting
with 2
3
and so interpreting the expression as 8
4
; another by starting
with 3
4
and so interpreting the expression as 281. These ways lead
to different results because 8
4
is 4096 whereas 2
81
is much larger.
We can indicate these two interpretations by using parentheses; thus
(11.1)
Now in actual fact there is a convention or agreement in mathe-
matics as to precisely how 23
4
is to be interpreted, namely as the
second form in (11.1),
For the purposes of this chapter we disregard this convention. We
look upon (11.1) as a demonstration that exponentiation is not
associative, in contrast, for example, to addition and multiplication;
NON-ASSOCIATIVE PRODUCTS 141
(2 + 3) + 4 = 2 + (3 + 4),
(23)-4 = 2(3-4).
Ignoring the conventional meaning for such expressions as
(11.2) or
we ask how many interpretations there are when four numbers are
stacked up this way in exponential fashion. More generally, how
many interpretations are there when n numbers are stacked up in
exponential fashion?
11.1 A Recursion Relation
To simplify the typography we shall write the second expression
in (11.2) as though it were a "product" abed. We presume that such
"products" are non-associative, so that the 3-products a(be) and
(ab)e are different. All possible interpretations of a 4-product can
be readily enumerated:
(11.3) a( (be)d), a(b(ed, (ab) (cd), (a(be) )d, ab)e)d.
Let us define F(n) as the number of interpretations of a non-
associative n-prod uct; then the enumeration (11.3) shows that
F(4) = S. Also, we know that F(3) = 2, because of the two cases
a(be) and (ab)e. There is only one interpretation of a 2-product
ab, and likewise only one interpretation for a I-product a, and
hence we can write F(2) = 1, F(l) = 1.
The general problem of this chapter is the evaluation of F(n),
the number of interpretations of an n-product
(11.4)
with no associative property. F(n) can be thought of as the number
of ways of putting parentheses on (11.4) to make it non-ambiguous.
To illustrate what we are about to do, let us take the special case
n = 6. In putting parentheses on a 6-product, one possible first step
is to split the product into two parts. This can be done in any of the
following five ways:
142 MATHEMATICS OF CHOICE
(a) Xl ,
(b)
(XIX2) (XaX4Xr.XG),
(11.S) (c)
(x4x5Xe) ,
(d) (X5Xe),
(e)
(XIX2XaX4Xli) XiI
In how many ways can additional parentheses be installed? In ex-
pression (a), there are F( S) in terpretation s of In expression
(b), there are F ( 4) interpretations of XaX4Xr.XG. In expression (c),
there are F(3) interpretations for each of and X4X5Xe, and
so F(3)F(3) interpretations in all for (c). Expressions (d) and
(e) are similar to (b) and (a) respectively. Putting all this informa-
tion together we see that
F(6) = F(S) + F(4) + F(3)F(3) + F(4) + F(S).
Since F(l) = land F(2) = 1, this can be written in the more
symmetric form
F(6) = F(l)F(S) +F(2)F(4) +F(3)F(3) +F(4)F(2) +F(S)F(1).
By a similar argument we can conclude that
F(7) = F(l)F(6) + F(2)F(S) + F(3)F(4) + F(4)F(3)
+ F(S)F(2) + F(6)F(1),
and, in general, that
(11.6)
F(n) = F(1)F(n - 1) + F(2)F(n - 2)
+ F(3)F(n - 3) + ... + F(n - 1)F(1).
With the sigma notation for sums the recursion relation (11.6) can
be written in the form
n-l
F(n) L: F(j)F(n - j)
,-1
and used to calculate successive values of F(n) as n increases
NON-ASSOCIATIVE PRODUCTS 143
through the natural numbers. For example, if we take F(1) = 1
and F(2) = 1 as our starting values, we can find
F(3)
F(4)
F(1) F(2) + F(2)F(1) = 1 + 1 = 2,
F(1)F(3) + F(2)F(2) + F(3)F(1) = 2 + 1 + 2
F(5) F(1)F(4) + F(2)F(3) + F(3)F(2) + F(4)F(l)
5 + 2 + 2 + 5 = 14,
and so on.
Problem Set 35
5,
1. Find the number of interpretations of (i) a 6-product, (ii) a 7-product,
(iii) an 8-product, in a non-associative system.
2. What is the conventional non-ambiguous meaning of 5
432
?
3. Enumerate the fourteen interpretations of a 5-product, analogous to
the formulation (11.3) in the text.
11.2 The Development of an Explicit Formula
Consider any non-associative product such as
(11.7)
The parentheses, which serve to indicate the arrangement of associa-
tion of the elements, occur in pairs, with a left and a right parenthesis
in each pair. To any product such as (11.7) we attach two numbers,
denoted by nand k; n is the number of elements in the product
[ n = 9 in the example (11.7)], and k denotes the number of
elements preceding the rightmost of the left parentheses. (In the
example (11.7) the rightmost of the left parentheses is the one im-
mediately preceding x&, and hence k = 5. ) As another example
consider
(11.8)
144 MATHEMATICS OF CHOICE
where n = 7 and k = 3. In any such product the rightmost of the
left parentheses is followed by two elements and the corresponding
righ t paren thesis;t in (11. 7) this pattern is (XsX7) , and in (11.8) it
is (X4Xr;).
Next we define a transformation which takes any product and
transforms it into a product having one element less. The transforma-
tion removes the rightmost of the left parentheses, the element follow-
ing it, and the corresponding right parenthesis. Thus (11.7) is trans-
formed into
(11.9)
and (11.8) into
(11.10)
In (11.9) we see that n = 8 and k = 5, and in (11.10) n = 6
and k = 2.
In general, an n-product with k elements preceding the rightmost
of the left parentheses is transformed into an (n - I)-product be-
cause one element is removed. The transformed expression either has
k elements preceding the rightmost of the left parentheses (this is
the case whenever that parenthesis is adjacent to another left paren-
thesis), or the transformed product has fewer than k elements
preceding it.
Let us denote by F(n, k) the number of non-associative n-
products with exactly k elements preceding the rightmost of the
left parentheses. It turns out that the following relation holds:
(11.11)
F(n, k) = F(n - 1, k) + F(n - 1, k - 1)
+ F(n - 1, k - 2) + ... + F(n - 1,0).
We illustrate this in the case n = 5 and k = 3. There are five
products corresponding to these specific values of nand k; that is
to say, F(5, 3) = 5. We list these five products in the left column
and the corresponding transformed products in the right column:
t By "such a product", we mean one which has been made unambiguous by the
insertion of sufficiently many parentheses.
NON-ASSOCIATIVE PRODUCTS 145
Product Transformed product n k
(XIX2) (Xa(X4X6 (XIX2) (XaX6) 4 2
Xl (X2(Xa(X4X6) Xl (X2(XaX6 4 2
Xl ( (xaXa) (X4X6) ) XI( (X2Xa)Xo) 4
(Xl (XaXa (X4Xo) (Xl (X2Xa) )X6 4
XIX2)Xa) (X4X6) ( (XIX2)X3)X5 4 0
The first two transformed products are of the F(4,2) type, the next
two of the F( 4, 1) type, and the last one of the F( 4, 0) type. In
fact, these collections of types are complete, so that F(4, 2) = 2,
F(4, 1) =2, F(4, 0) =1. Furthermore, there is no product of the
F(4, 3) type, and so F(4, 3) =0. Thus by actual count we have
verified the special case
F(S,3) = F(4,3) + F(4, 2) + F(4, 1) + F(4, 0)
of (11.11).
A proof of (11.11) is suggested by this example. First, if any product
of the F(n, k) type is transformed by the procedure described above,
there results a product of one of the types listed on the right side of
(11.11 ). Secondly, the transformation is reversible as follows: take
any product of a type listed on the right side of (11.11); replace the
(k + 1)-st element, say y, by two elements in parentheses, say
(yz); this procedure gives a product of the type F(n, k). So we
have a one-to-one correspondence between the types of products
listed on the two ~ i d e s of equation (11.11), and the result is thereby
established.
Now if, in formula (11.11), we replace k by k - 1 the result is
F(n, k - 1) = F(n - 1, k - 1) + F(n - 1, k - 2)
+ F(n - 1, k - 3) + ... + F(n - 1,0).
146 MATHEMATICS OF CHOICE
Subtracting this from (11.11), we get
F(n, k) - F(n, k - 1) = F(n - 1, k)
or
(11.12) F(n, k) = F(n, k - 1) + F(n - 1, k).
This formula somewhat resembles the result
C(n, r) = C(n - 1, r) + C(n - 1, r - 1).
There is a connection between the functions F(n, k) and C(n, r)
which we now reveal by comparing brief numerical tables.
To develop a table of values of F(n, k) we use (11.12) along with
certain basic results. Because parentheses are not needed in the
simple cases n = 1 and n = 2, let us confine attention to values of
n > 3. For any value of n, the corresponding values of k are
0, 1, 2, "', n - 1. (It turns out to be convenient in the formulas
to ignore the case k = n, for which there are no products.) The
values of F(n,O) and F(n, n - 1) can easily be determined from
the definition of F(n, k). First, F(n, 0) means the number of n-
products having no element preceding the rightmost of the left
parentheses. There is one such product illustrated, in the case n = 8,
by
and so F(n, 0) = 1. Now the rightmost of the left parentheses is
followed by at least two elements (since we do not enclose a single
element in parentheses), and so there is no product of type
F(n, n - 1). Thus we have
(11.13) F(n,O) = 1, F(n, n - 1) = 0 for all n > 3.
With this information and the easily established result F(3, 1) 1,
it is now possible to use (11.12) to develop a table of values.
NON-ASSOCIATIVE PRODUCTS 147
TABLE OF VALUES OF F(n, k)
I ~
0 1 2 3 4 5 6 7 8 9
-
3 1 1 0
----
--
--------------
-
4 1 2 2 0
--------------------
-
5 1 3 5 5 0
---------------------
6 1 4 9 14 14 0
--------------------
-
7 1 5 14 28 42 42 0
----------------
----i-
8 1 6 20 48 90 132 132 0
--------------------
I-
9 1 7 27 75 165 297 429 429 0
--------------------i-
10 1 8 35 110 275 572 1001 1430 1430 0
------------
________ i_
11 1 9 44 154 429 etc.
------------
12 1 10 54 208 637
------------
I ::
1 11 65 273 910
1 12 77 350 1260
This is to be compared with a table of values of C(n, r), that is,
with Pascal's triangle. In every row of Pascal's triangle, we list the
differences of adjacent pairs of values, the left one subtracted from
the right one, by writing these in parentheses between each pair;
but we do not list negative differences (see the table on p. 148).
A comparison of these tables shows that the entries in the F(n, k)
table turn up as differences in the C(n, r) table; for example,
F(7,3)
F(8,4)
F(9, 6)
F(12, 3)
C(8,3) - C(8, 2),
C(lO,4)
C(13,6)
C(13, 3)
C(lO,3),
C(13, 5),
C(13, 2).
148 MATHEMATICS OF CHOICE
These results suggest the general proposition
01.14) F(n, k) = C(n+k-2, k) - C(n+k-2, k-1).
This conjecture is correct, but of course it cannot be proved by an
examination of a few special cases in the tables.
TABLE OF VALUES OF G(n, r}, DIFFERENCES IN PARENTHESES
~
0 1 2 3 4 5 6 7
--- ---
---
---------------
I 1{0} 1 0 0 0 0 0 0
r----
------
------
------------
2 1 (I)
2 1 0 0 0 0 0
--------
------------------
3 1(2) ~ ( O )
3 I 0 0 0 0
r-----
------
---------
---
------
4 1(1) 4(2} 6 4 1 0 0 0
r----
----------------- ---------
5 1(4) 5(5) 10(O} 10 5 1 0 0
r----- ----------------
---
------
6 1 (5) 6(9) 15(5) 20
1<;
6 1 0
-----
----
---
------
----------
7 1(6) 7(14) 21 (14) 35(0) .15 21 7 1
--
---------
---
--------
------
8
1(7) 8(20) 28(28) 56(14) 70 56 28 8
--
---------------------------
9 1(8) 9(27) .16(48) 84(42) 126(0) 126 84 36
- ---
---------
---------
---
10 1(9) 10(35) 4'<;(75) 120(90} 210(42) 252 210 120
--
---------------
---------
II 1(10) 11(44) 55(110) 165(165) 330(132) 462(0) 462 330
- ------
------
---
---
------
12 1(11 ) 12(54) 66(154) 220(27<;) 495(297} 792 (132) 924 792
-
-------------- ----------
---
13 1 (]2) 13(65) 78(208) 286(429) 715(572) 1287(429) 1716(0) 1716
11.3 Proof of the Conjecture
Before proving the conjecture (11.14) we write it in a dilTerent
form by making an algebraic calculation:
C(n+k-2, k) - C(n+k-2, k-1)
(n + k - 2)!
k!(n - 2)!
(n + k - 2)!
(k - 1)!(n-1)!
(n + k - 2)!
k!(n-1)! [(n-1)-kJ.
NON-ASSOCIATIVE PRODUCTS
Thus (11.14) can be written as
(11.15) F(n, k)
(n + k - 2)!
(n - k - 1) .
k!(n - 1)!
We note that this is true for k = 0, because
F(n, 0)
(n - 2)!
---- (n - 1)
Ol(n-l)!
1
149
agrees with the value calculated before. Also we note that (11.15)
gives the correct results F(3, 1) = 1 and F(3, 2) = O.
We are now in a position to prove (11.15) by mathematical induc-
tion. It is necessary to argue in a slightly more sophisticated way than
in the proofs by induction of the preceding chapter, because there are
now two variables, It and k. However, we can reduce this problem
to one in a single variable by the following device. Let Pm denote
all cases of (11.15) with n + k = m. Since n > 3 we start with
m = 3:
P
a
is equation (11.15) in the one case n = 3, k = 0;
P
4
is (11.15) in the cases n = 4, k = 0 and n = 3, k
Po is (11.15) in the cases n = 5, k = 0; n = 4, k = 1;
n = 3, k = 2.
1 ,
Similarly P
6
would consist of 4 cases, P
7
of 5 cases, and so on. Our
inductive proof of (11.15) will consist in proving (i) that P
3
is true,
and (ii) that Pm implies Pm+!.
We have already checked that P
3
holds, so we turn to (ii). Assuming
that P", holds, we are to prove Pm+l, that is, equation (11.15), for
any pair of integers n and k whose sum is m + 1. So in what
follows we regard n and k as integers for which n + k = m + 1.
Of course, in proving that Pm implies P m+l we make use of Pm,
and so we use (11.15) for F(n, k - 1) and F(n - 1, k) because
n + k = m + 1 implies n + (k - 1) = m and (n - 1) + k = m.
150 MATHEMATICS OF CHOICE
Thus Pm includes the two statements
(n + k - 3)!
F(n,k-1) = (k_1)!(n_1)!(n-k)
and
. (n + k - 3)!
F(n - 1, k) = (n - k - 2).
k!(n - 2)!
Making use of (11.12), we get
F(n, k) = F(n, k - 1) + F(n - 1, k)
(n+k-3)! (n+k-3)!
-(k---1)-!-(n---1-)! (n-k) + k!(n _ 2)! (n - k - 2)
(n + k - 3)!
----- [ken - k) + (n - 1)(n - k - 2)J
k!(n - 1)!
(n + k - 3)!
----- (n + k - 2)(n - k - 1)
k!(n - 1)!
(n + k - 2)!
(n - k - 1),
k!(n - 1)!
and so (11.15) is established.
11.4 A Formula for F(n)
Our aim now is to answer the question posed in the introduction to
this chapter: What is the number F(n) of n-products in a non-
associative system? By using the results of the intervening sections,
we now derive a simple formula for F (n) .
First we observe that the total number of n-products consists of
those with no element preceding the rightmost of the left parentheses,
plus those with one element preceding it, plus those with two ele-
NON-ASSOCIATIVE PRODUCTS 151
ments preceding it, "', plus those with all but one preceding it,
plus those with all preceding it. In symbols,
F(n) = F(n,O) + F(n, 1) + ... + F(n, n - 2)
(11.16)
+ F(n, n - 1) + F(n, n).
In view of formula (11.13) and the fact that F(n, n) = 0, we may
write (11.16) in the form
.. -2
(11.16') F(n) L F(n,j).
j=O
N ext, we write formula (11.11), derived in Section 11.2, with n
replaced by n + 1 and k replaced by n - 1. This yields
F(n + 1, n - 1) = F(n, n - 1) + F(n, n - 2)
(11.17)
+ ... + F(n, 0).
But F(n, n - 1) is zero, so we may write (11.17) as
.. -2
F(n + 1, n - 1) = L F(n,j),
1-0
and, comparing it with (11.16'), we see that
(11.18) F(n) = F(n + 1, n - 1).
Finally, we apply formula (11.15), derived in Section 11.3, to the
right member of (11.18); in other words, we replace n by n + 1
and k by n - 1 in (11.15) and obtain
[(n+1) + (n-l) -2J!
F(n+l, n-l) = [n+l- (n-1)-lJ
(n - l)!n!
(2n - 2)!
n!(n-l)!
152 MATHEMATICS OF CHOICE
Substituting this into (11.18) gives the desired result
F(n)
(2n - 2)!
n!(n - 1)!
for the number of ways of meaningfully inserting parentheses into
an expression of the form X1X2Xa- - -Xn.
11.5 Summary
A mathematical "product" is non-associative if a(be) = (ab)e
does not hold in all cases. The word" product" is in quotation marks
because for the purposes of this chapter ab can represent the result
of any binary operation on elements a and b yielding a non-associa-
tive system. One illustration of this arises from in terpreting ab as
the exponential form abo
In a non-associative system there are two interpretations of the
3-product abc, namely a(be) and (ab)e. The topic of this chapter
is the number of interpretations, denoted by F(n), of a non-associa-
tive n-product XIX2Xa'" X
n
First a recursion relation
n-l
F(n) L F(j)F(n - j)
,7=1
is established; then the explicit formula
F(n)
(2n - 2)!
n!(n - 1)!
is derived. We proved this result by separating F(n) into parts,
with F(n, k) denoting the number of n-products having exactly k
elements preceding the rightmost of the left parentheses. Properties
of F(n, k) developed in formulas (11.11) and (11.12) resulted in a
table of values for this function. On comparing these values with
differences in Pascal's triangle, it was easy to guess how F(n, k) is
related to the C(m, j). This guess, conjecture (11.14), was proved
by mathematical induction, and thus F(n) was evaluated.
Miscellaneous Problem.s
1. A class is given a true-false test consisting of 12 questions. One of
the students, rather unprepared, decides on the following strategy.
He answers 3 of the questions about which he feels absolutely certain,
and then handles the other 9 by tossing a coin to make his decision
in each case. Assuming that the student answered those 3 correctly,
establish that his probability of getting at least half the answers
right is greater than 9/10.
2. How many terms of the sequence of natural numbers 1, 2, 3, 4,
must be added to give a sum exceeding one million?
3. Consider the sequence 2, 22, 84, 212, , whose terms are obtained
by taking j = 1, j = 2, j = 3, in the expression 4j3 - 3j2 + j.
Find a formula for the sum of the first n terms.
4. If 12 boys are separated at random into 3 teams of 4 each, what is
the probability that 2 particular boys will be on different teams?
S. In the preceding question, what is the probability that 3 particular
boys will be completely separated, one on each team?
6. Given a set of N objects of which N(ex) have a certain property
ex, and N(ex, (J) have both properties ex and fJ, etc., prove that
3N+N(ex, fJ)+N(ex, 'Y)+N(fJ, "I) > 2N(ex)+2N(fJ)+2N('Y).
7. Write a polynomial product so that the coefficient of x
lOO
denotes
the number of partitions of 100 into unequal positive odd integers.
154 MATHEMATICS OF CHOICE
8. In a certain mythical country, postage stamps come in the following
denominations: 3 kinds of 1 cent stamps (the regular kind and two
commemoratives), 3 kinds of 2 cent stamps, 2 kinds of 3 cent stamps,
and one kind each of 4 cent, 5 cent, 10 cent and 20 cent stamps.
Write a polynomial product so that the coefficient of x20 denotes
the number of ways of getting 20 cents worth of stamps.
9. Prove that the Fibonacci numbers F(O) = 1, F(I) = 2, F(2} = 3,
F(3) = 5, F(5) = 8, etc. have the property
n-2
F(n) = 2 + L F(j) if n > 2.
i-O
10. For any given positive integer n, prove that
L C(j, k) = 1 + L C(j, k),
i+k-n+l i+k<n
where the sum on the left includes all terms C( j, k) with non-
negative integers j, k satisfying j + k = n + I, and the sum on
the right all such terms with j + k < n. (Suggestion: Use the result
of the preceding problem.)
11. Of the 30! permutations of the integers 1, 2, 3, ",,30, how many
have the property that multiples of 3 are not in adjacent places,
that is, no two of the integers 3, 6, 9, 12, 15, 18, 21, 24, 27, 30 are
adjacent?
12. Find the number of permutations of the 8 letters a, b, c, d, e, j, g, h,
taken all at a time, subject to the condition that b does not im-
mediately follow a, c does not immediately follow b, "', and
h does not immediately follow g.
13. A collection of 100 coins, 20 of which are cents, 20 nickels, 20 dimes,
20 quarters, and 20 fifty cent pieces, are to be put into 5 distinct
boxes. In how many ways can this be done if no box is to be empty?
(Presume that the 20 coins of each single denomination are
indistinguishable. )
14. Find the number of permutations of the 8 letters AABBCCDD,
taken all at a time, such that no two adjacent letters are alike.
MISCELLANEOUS PROBLEMS 155
15. How many permutations are there of the 9 letters D, D, D, E, E, E,
F, F, F, taken all at a time, subject to the restriction that no two
D's are adjacent?
16. What would be the answer to the preceding question if the additional
restriction were imposed that no two E's are adjacent?
17. What would be the answer to the preceding question if yet another
restriction were imposed, namely that no two F's are adjacent?
18. Find the number of quintuples (x, y, z, u, v) of positive integers
satisfying both equations
x + y + z + u = 30
and
x + y + z + 'II = 27.
19. Of the solutions in positive integers of x + y + z + w = 26, how
many have x > y ?
20. Evaluate en, n, n, n, U 2n, 2nJ , that is, the number of ways of
dividing 4n objects, which are alike in batches of n, equally between
two persons.
21. In how many ways is it possible to separate nj different objects
into n batches with j objects in each batch?
22. Which would you expect to be larger, the number of partitions of
1000 into 3 positive even integers, or the number of partitions of
1000 into 3 positive odd integers? Give a proof of your conjecture.
23. Which would you expect to be larger, the number of partitions of
1000 into 4 positive even integers, or the number of partitions of
1000 into four positive odd integers? Give a proof of your conjecture.
24. Which would you expect to be larger, the number of partitions of
1000 into positive even integers, or the number of partitions of 1000
into positive odd mtegers? Give a proof of your conjecture. (This
question differs from the preceding two questions in that the number
of summands is now unrestricted.)
25. How many integers between 1 and 1,000,000 inclusive have the
property that at least two consecutive digits are equal? (For ex-
ample, 1007 has the property but 1017 does not.)
156 MATHEMATICS OF CHOICE
26. Find the number of permutations of the letters of the alphabet,
taken all at a time, such that (i) no letter is in its natural place, and
(ii) the letters A and B are adjacent.
27. Find the number of permutations of the 6 letters a, b, c, d, e, f,
taken all at a time, subject to the condition that letters which are
consecutive in the alphabet are not adjacent. (For example, a and
b are not adjacent, band c are not adjacent, etc.)
28. Prove that the number of people through all of history who have
shaken hands (with other people) an odd number of times is even.
29. In any group of people, prove that there are two persons having the
same number of acquaintances within the group. (Presume, of course,
that if A is acquainted with 13, then B is acquainted with A.)
30. Given n points in the plane, no 3 collinear, let each of the line seg-
ments joining pairs of points be colored one of two colors, say red and
white. Then from each point there emanate n - 1 line segments,
some Ted and some white. Prove that no matter what configuration
of colors is used, there are two points out of which there emanate
the same number of red segments, and hence also the same number
of white segments.
31. Let there be m + 1 equally spaced parallel lines, intersected at
right angles by k + 1 equally spaced parallel lines. Presuming
m < k, what is the total number of squares in the network?
32. The Tower of Hanoi Puzzle. There are 8 circular discs placed over
one of three vertical pegs. The discs are of 8 unequal radii, with the
largest disc at the bottom of the pile on one peg, coveled by suc-
cessively smaller discs so that the smallest one is on top. The problem
is to transfer the tower of discs from the peg on which they rest
initially to one of the other two pegs. The rules arc that the discs
may be moved freely, one at a time, from peg to peg, except that no
disc can ever be placed on top of a smaller disc. The question is
whether it is possible under these rules to move the tower of discs
from one peg to another, and if so, how many moves are needed to
effect the transfer.
33. Given 6 points in the plane, no 3 collinear, let each of the line seg-
ments joining the points be colored one of two colors, say red or
white. Prove that no matter what configuration of colors is used,
MTSCELLAN.EOUS PROBL.EMS 157
there are always at least two chromatic triangles present, that is,
two triangles whose three sides have the same color. (The two
triangles need not be of the same color; one may be a red chromatic
triangle, and the other white.)
34. In the preceding problem prove that there need not be 3 chromatic
triangles. That is, exhibit a configuration of colored segments with
only 2 chromatic triangles.
35. Given 7 points in the plane, no 3 collinear, let each of the line seg-
ments joining the points be colored one of two colors, say red or
white. Prove that no matter what configuration of colors is used,
there are always at least three chromatic triangles present.
36. Consider 66 points in the plane, no 3 collinear, with each of the line
segments joining these points colored one of 4 colors. Prove that for
any arrangement of colors whatsoever there is always a chromatic
triangle present, i.e. a triangle whose 3 sides have the same color.
(The information that with 17 points and 3 colors there is a chro-
matic triangle might be useful.)
37. Consider 17 points in a plane, no three collinear, with each of the
segments joining two points colored red, white or blue. Prove that
there are at least two chromatic triangles in the configuration.
38. Consider 24 points in the plane, no 3 collinear, with each of the seg-
ments joining the points colored one of two colors, say red or white.
Prove that no matter what distribution of colors is made, it is always
possible to find 4 points such that the 6 line segments joining them
are of the same color. (The reader might wish to solve this problem
with a larger integer substituted for 24. The smallest number that
can be used to replace 24 is 18, in the sense that the proposition is
not true for 17 or fewer points. However the proof that 18 is the
smallest, given by R. E. Greenwood and A. M. Gleason in 1955, is
beyond the scope of this book.)
39. Given n points on the circumference of a circle, there are C(n, 2)
or n (n - 1) /2 line segments joining pairs of points. Suppose the n
points are spaced so that no 3 line segments have a common inter-
section point inside the circle. What is the total number len) of
intersection points inside (not on the circumference of) the circle?
For example, /(4) = 1, /(5) = 5, /(6) = 15.
158 MAT HEM A TIC S 0 F C HOI C E
40. In the preceding problem, into how many regions is the interior of
the circle divided by the line segments joining the n points? Let
R(n) be the number of regions; for example, R(2) = 2, R(3) = 4,
R( 4) = 8, R(5) = 16.
41. Given n equally spaced points on the circumference of a circle
(the vertices of a regular n-gon); consider the
C(n,3) = In(n - 1)(n - 2)
triangles that can be formed by straight line segments linking the
points. How many of these triangles are isosceles?
42. If n identical dice are thrown, how many possible outcomes are
there? (Say that two outcomes are the same if they contain the
same number of ones, the same number of twos, .", and the same
number of sixes.)
43. Consider n planes in 3-dimensional space satisfying the following
conditions: no two are parallel; no two lines of intersection are
parallel; no four intersect in a point. Into how many regions is space
separated by the planes?
44. What is the probability that a randomly selected permutation of
1,2,3, "', n has the "2" somewhere between the "1" and the "3"?
45. Find the number of permutations of 2n things which are alike in
pairs (for example AABBCCDDEE) taken all at a time, such
that no two adjacent things are alike.
46. Find the probability that a randomly selected permutation of 1, 2,
3, "', n taken all at a time has exactly j of the numbers out of
their natural positions.
47. How many permutations are there of the n + k letters
AAA ABBB B,
of which n are A's and k are B's, subject to the condition that
no three A's are adjacent?
MISCELLANEOUS PROBLEMS 159
48. Find the number of permutations of 1, 2, 3, "', 2n taken all at a
time, such that no odd number is in its natural position.
49. Suppose that the prime factorization of an integer n has exactly
m factors, all distinct. How many factorings are there of n into k
factors, where k is some integer <m, (i) if each factor must be
greater than 1, (ii) if 1 is allowed as a factor? (Factorings that differ
only in the order of the factors are not counted separately.)
50. Consider the integers 1,2,3"", n. Let K(n,j) denote the number
of subsets of these n integers satisfying the conditions (i) each
subset contains j integers, (ii) no subset contains a consecutive
pair of integers. For example, K(5, 3) = 1 because the only subset
of 1, 2,3, 4, 5, satisfying the conditions is 1, 3, 5. By separating the
subsets counted by K(n, j) into two types, those that contain n
and those that do not, obtain a recursion relation for K(n,j). Then
use this relation to construct a short table of values of K (n, j), say
up to n = 100 and j = 10. This table, when contrasted with
Pascal's triangle, should suggest a conjecture about the value of
K(n, j). Find the proper conjecture and then prove it by mathe-
matical induction.
51. Three persons, strangers to one another, enter a room in which
there are 3 mutual acquaintances. Prove that among the 6 people
there are at least 3 other triples each of which consists of 3 strangers
or 3 mutual acquaintances. A more definite statement of the problem
follows: Say that a set of 3 persons has property a in case they are
pairwise strangers, property (j in case they are pairwise acquainted.
Consider six persons A, B, C, D, E, F, such that A, B, C have
property a, and D, E, F have property (j. Prove that the sum of
the number of triples with property a and the number of triples
with property (j is at least 5.
52. A flight of stairs has 14 steps. A boy dm go up the stairs one at a
time, two at a time, or any combination of ones and twos. In how
many ways can the boy go up the stairs?
53. How many integers between 1 and 1,000,000 inclusive have the
property that no digit is smaller than a digit to its left? (For example
1468 has the property stated, but 1648 does not.)
Answers and Solutions
Answers are given for almost all problems. Solutions are given for
many, although for the most part the "solution" is a mere sketch, in
some instances nothing more than a suggestion or two. If the reader's
answer to a problem is not the same as the one given here, he should
allow for the possibility that the difference is merely one of form. For it
should be kept in mind that most problems admit more than one method
of solution and that two answers may be equal without looking the same.
Problem 1.1, page 1. 1, 2 or 3
We give here an analysis of years having 365 days; the analysis for
366 day years is similar. First, let us call Sunday a type 0 day, Monday
a type 1 day, Tuesday type 2, "', Saturday type 6. If January 13 is a
type 0 day, then February 13 is a type 3 day since it is 31 or 3 + 28
days later, March 13 is type 3, April 13 is type 6, May 13 is type 1, ,
December 13 is type 5. The entire list of types from January 13 to
December 13 is
0, 3, 3 .. 6, 1, 4, 6, 2, 5, 0, 3, 5.
There are two Friday the thirteenths, since Friday is of type 5. The
analysis thus far has been on the assumption that January 13 is a Sunday.
The easiest way to proceed is to vary what is meant by type O. For ex-
ample, if we redefine type 0 to be Monday, then Friday is of type 4,
and the list above shows that in such a year there is only one Friday the
thirteenth. Thus the list reveals the answer to the problem by considera-
tion of all seven interpretations of what is meant by type O. For a 366
day year, the corresponding list is 0, 3, 4, 0, 2, 5, 0, 3, 6, 1,4,6.
ANSWERS AND SOLUTIONS 161
Problem 1.2, page 2. 10
There is 1 kind of block with six blue faces; 1 kind with five blue faces;
2 kinds with four blue faces, because the two red faces may be opposite
or adjacent to each other; 2 kinds with three blue faces, because there
may be, or may not be, two blue faces opposite one another. The number
of different kinds of blocks with two blue faces is the same as the number
with four blue faces; with one blue face, the same as with five blue faces;
with no blue face, the same as six blue faces.
Problem 1.3, page 3, is solved on page 27.
Problem 1.4, page 4, is solved on page 59.
Problem 1.5, page 4, is solved on page 106.
Problem Set 1, page 5
1. 55 2. 138 3. 185 4. n + r - 1 S. k - r + 1 6. h + 1
7. 80 integers from x = 145 to x = 224.
8. (a) 49 (b) 44 (c) 35
Argument for part (c). Subtract 11 from each integer: 6, 12, 18, 24,
, 210. Divide each by 6: 1, 2, 3,4, "',35. These operations have not
changed the number of elements.
9. (a) 181: the integers 11, 22, 33, "', 1991;
(b) 121: delete from the integers in (a) the following: 33,66, 99,
"', 1980; these are 60 in number; hence 181 - 60;
(c) 167: delete from 6,12,18,24, "',1998 the integers 12,24,36,
"', 1992; thus 333 - 166.
10. 9: 4 cents, 2 nickels, 1 dime, 1 quarter, 1 fifty-cent piece (alter-
natively, replace 2 nickels, 1 dime by 1 nickel, 2 dimes).
11. 39
Let a, b, c denote a cents, b nickels, c dimes. Then with no 25
cent piece the solutions in triples a, b, care
162 MATHEMATICS OF
47,0,0 42,1,0 37,2,0
32,1, 1 27,4,0 27,2, 1
22,3, 1 22,1,2 17,6,0
17,0,3 12,7,0 12,5, 1
7,8,0 7,6,1 7,4,2
2,9,0 2,7, 1 2,5,2
With one 25 cent piece the solutions are
12. 7
13. 3
22,0,0
7, 1, 1
17, 1,0
2,4,0
12,2,0
2,2, 1
CHOICE
37,0,1
27,0,2
17,4,1
12,3,2
7,2,3
2,3,3
12,0,1
2,0,2
32,3,0
22,5,0
17,2,2
12,1,3
7,0,4
2, 1,4
7,3,0
14.3,4,5,6,8,9,10,12, 15,18,20,24,30,36,40,45,60,72,90, 120, 180,
360
A regular polygon with n sides has exterior angle 360/n degrees,
and so an interior angle has size 360 - (360/n) degrees. Hence we choose
all positive integers n such that 360/n is an integer, except n = 1
and n = 2.
15. 36
Let the colors be denoted by R, G, Band W, say for red, green, blue
and white. There are 4 cases of solids painted one color: all R, all G,
all B, all W. Solids painted two colors yield 18 cases: if the colors are
Rand G there are 3 cases because the number of R-faces may be 1, 2
or 3; similarly there are 3 cases for each of the other color combinations
RB, RW, GB, GW, BW. There are 12 different kinds of solids painted
t ~ r e e colors: if the colors are R, G, B, there are 3 cases-for example,
one case with two R-faces, one G-face and one B-face. Solids painted
four colors can be of 2 kinds: orient the tetrahedron so that the bottom
is R and there is a G-face towards you; then the other two faces can
be BW or WB.
16.6
17. 36
ANSWERS AND SOLUTIONS 163
Problem Set 2, page 10
1. 676 (or 26 26) 5. 30 (or 65)
2. 600 (or 2524) 6. 64 (or 8222)
3. 3380 (or 26265) 7. 4%8 (or 231236)
4. 3000 (or 52524) 8. 243 (or 33333); 768 (or 34444)
Problem Set 3, page 11
1. 6; 120; 40320 6. 2
2. 132; 2; 30; 5040 7.720
3. 120 8. 11880; 151200
4.25 9. 210
5.6 10. (b) and (c) are false.
Problem Set 4, page 17
1. 210, 1680 and 380
3. pen, 1) = n; P(m,l) = m; pen + m, 1) = n + m
4. pen, n) = n! and pen, n - 1) = n(n - l)(n - 2)2 = n!
5. 12144 (or 242322)
6. 13824 (or 242424); 14400 (by adding 2424 to 13824)
7. 4536 (or 9987); 2240, since there are 5 choices for the units'
digit (digit on the right end), 8 choices for the thousands' digit, 8
choices for the hundreds' digit, and 7 choices for the tens' digit.
8. 120 (or S432); 72 (or 4323)
164 MATHEMATICS OF CHOICE
9.720 (or 6654); 420
10. 103920
There are P(8,8) = 40320 integers with 8 digits; P(8, 7) = 40320
integers with 7 digits; P(8, 6) = 20160 integers with 6 digits. Integers
with 5 digits are separated into two types depending on the digit on the
left end; if the left end digit is 5, there are 15654 = 600 possibilities
because, taking the digits from left to right, there is one possibility for
the first digit, 5 possibilities for the second digit (namely the digits
3, 4, 6, 7, 8 since integers with 0, 1 or 2 in this place would be less than
53000); if the first digit is 6,7, or 8, there are 37654 = 2520 pos-
sibilities. The answer is obtained by adding these various results.
11. 90360
The solution of the previous problem can be used as a model, but must
be modified because of the presence now of the digit O. This digit cannot
be used as the first or left end digit in an integer. The number of pos-
sibilities can be obtained by thinking about the number of possibilities
for each digit position, from left to right. Thus,
8 digit numbers: 77654321 = 35280;
7 digit numbers: 776543 2 = 35280;
6 digit numbers: 776543 = 17640;
5 digit numbers beginning with the digit 5: 14654 = 480;
5 digit numbers beginning with the digit 6 or 7: 27654 = 1680.
1. 15, 35 and 84
3. (a) C(10, 2)
4. C(720, 10) or
Problem Set 5, page 21
C(10, 8)
720!
10!710!
45; (b) 45
6. C(20, 2) or 190; C(20, 3) or 1140
7. 10! - 291 = 89!
The number of unrestricted arrangements is 10!. The number of
arrangements with two specific persons together is 29! because the two
persons can be regarded as a unit, but in two ways.
ANSWERS AND SOLUTIONS 165
8. Let n be the largest of the five integers, so that we must prove that
n(n - 1) (n - 2) (n - 3) (n - 4) is divisible by 5! . Now we solve the
problem by observing that C(n, 5) is an integer given by the formula
C( ) = n(n - l)(n - 2)(n - 3)(n - 4)
n,5 5! .
More generally, the formula for the integer C(n, r) shows that the
product of r consecutive integers is divisible by r!.
9. (a) 362880 or 9!; (b) 5760 or 2(5!41); (c) 17280 or 614!;
(d) 2880 or 5!4!
In part (c) the red books may be treated as a unit, so there are 6 items
to be permuted; this gives 6!. But in anyone of these arrangements
the red books can be permuted in 4! ways. In part (d), the green books
can be permuted in their allocated positions in 5! ways, the red books in
4! ways.
10. (a) 2C(30, 3)C(30, 5) + C(30, 4)C(30, 4)
Add the results of three cases, namely 3 professors, 4 professors, or 5
professors. For example, the 3 professors case implies 5 business men,
and so there are C(30, 3)C(30, 5) possibilities.
(b) C(60, 8) - C(30, 8)
If none of the eight were a business man, the number of possibilities
would be C(30, 8). This is then subtracted from the total number of
unrestricted possibilities.
11. 79 (or 454 - 1)
12.4
There are as many zeros as the number of occurrences of 10 as a factor.
Now 5 occurs as a factor four times, namely in 5, 10, 15,20; and 2 oc-
curs as a factor many more times.
13. 12
The argument is similar to that in the preceding problem, with this
difference: the terms 25 and 50 in the product have 5 as a factor twice.
14. 7
6
, because there are 7 choices for each flag.
15. (a) 7.6
4
; (b) P(7,5) = 76543 = 2520
166 MATHEMATICS OF CHOICE
16. 2024
The total number of unrestricted subsets is C(26,3) = 2600. From
this number we subtract the number of cases with three consecutive
letters, such as J, K, L. There are 24 of these. Then we subtract the
number of cases with two, but not three consecutive letters; if the letters
are A, B there are 23 cases; B, C, 22 cases; ; X, Y, 22 cases;
Y, Z, 23 cases; so SS2 in all. The answer is thus 2600 - 24 - SS2.
17. k!j(k - n) 1
First choose n of the k boxes to receive one object each; this can be
done in C(k, n) ways. For each such choice, the things can be put in
the boxes in n! ways. Thus the answer is C(k, n) 'n! .
Problem Set 6, page 24
1. S040 or 71
2. 3600
Start with the solution of the preceding problem and subtract the
number of cases where the two persons, say A and B, are in adjacent
seats. Taking A and B as a unit we see that there are 61 cases with A
to the left of B, and 6! cases the other way about. Thus the answer is
7! - 6! - 6".
3. 144
The ladies can be seated in alternate seats in 3! ways. The answer is
obtained by multiplying this by 4!, the number of ways the men can
be seated for any fixed arrangement of the ladies.
4. 12
Given any of the 31 seating arrangements of the ladies, the men can
be seated in exactly two ways.
5. 120
The number of firing orders is simply the number of ways of arranging
1, 2, 3, 4, S, 6 in a circle.
6.30
Let one of the colors be white. Then since one face must be white, let
it be the bottom of the block. The top can be colored in any of the S
ANSWERS AND SOLUTIONS 167
remaining colors. That done, the vertical faces are to be colored with the
4 remaining colors. This now amounts to a problem in circular permuta-
tions, because the cubical block can now be rotated about a vertical axis
through the center of the block without altering the colors of the top and
bottom. Hence there are 3! ways of coloring the vertical faces, and this
is multiplied by 5 to get the answer.
7.2
Starting with a blank block, number two opposite faces 1 and 6, and
place the block with the 6 on top. The four vertical faces are to be num-
bered 2, 3, 4, 5. Number the front face 2, and the back face 5. There
remain two choices for the numbers 3 and 4.
Problem Set 7, page 30
1. (a) 168 or 8!/(5!2!) (b) 211/(2!2!2!2!3191)
2. Choose a out of n, then b out of n - a, then c out of n - a-b.
This gives C(n, a)C(n - a, b)C(n - a - b, c), which can be evaluated
further to give the factorial answer.
3. 5035
We subtract from the total number 6435 of unrestricted paths the
number that includes the block from 5th to 6th on E. From 1st and A
to 5th and E there are C(8, 4) paths. From 6th and E to 9th and
H there are C(6,3) paths. Hence from 6435 we subtract
C(8, 4) C(6, 3).
4. 151/(4!5!6!)
Denoting by R, B, U the motions of distance one unit to the right,
back, and up, we see that the problem is the same as finding the number
of permutations, all at a time, of the fifteen letters
RRRRBBBBBUUUUUU
5. 17!/(4!5!612!)
Problem Set 8, page 33
1. 15, 10, 5 2. C(10, 4) 3. C(49, 10)
168 MATHEMATICS OF CHOICE
4. (a) C(n - 1,1') = C(n - 2,1') + C(n - 2, l' - 1);
(b) C(n - 1, l' - 1) = C(n - 2, l' - 1) + C(n - 2, l' - 2)
(n - I)!
5. (a) C(n - 1 1') =
, 1'!(n-1'-l)!
(n - I)!
(b) C(n - 1, l' - 1) = (r _ 1) !(n _ 1') 1
6. Adding the results of the preceding problem, we get
C(n - 1,1') + C(n - 1, l' - 1)
(n - I)! (n - I)!
~ ~ - - ~ ~ - + ~ ~ - - ~ ~ - -
1'!(n - l' - I)! (r - 1)!(n - 1')1
(n - 1)!(n - 1') + (n - 1)!1'
1'!(n-1')!
( )
= C(n, 1').
1'! n - r !
n!
(n-l)!n
1'!(n - 1')!
7. C(n,1') = C(n - 2, r - 2) + 2C(n - 2, r - 1) + C(n - 2,1')
8.n=1'=0
Problem Set 9, page 37
1. 6; n + 1
2. (x + y)6 = C(6, 0)x6 + C(6, l)xDy + C(6, 2)x4y2 + C(6, 3)x3y3 +
C(6, 4)x
2
y4 + C(6, 5)xy6 + C(6, 6)y6;
with x = y = 1, this sum equals 26 or 64.
3. (1 - 1)6 = 0
4. C(10, 7) = 120
8. 180 terms; bdsw and bfpu are actual terms.
ANSWERS AND SOLUTIONS 169
Problem Set lO, page 40
1. x" + y4 + z4 + 4x3y + 4xy3 + 4x
3
z + 4xz3 + 4"az + 4yz3 + 6xY
+ 6x
2
z
2
+ 6y2z2 + 12x2yz + 12xyz + 12xyz2
2. lOV(2!2!2!2!2!) 3.6!
5. 3
12
because the numbers are precisely the coefficients in the expansion
of (x + y + Z)12.
Problem Set 11, page 42
1. 1, 9,36, 84, 126, 126, 84, 36, 9,
1, 10,45, 120,210, 252, 2lO, 120, 45, 10, 1
I, 11,55, 165,330, 462, 462, 330, 165, 55, 11, 1
I, 12, 66, 220, 495, 792, 924, 792, 495, 220, 66, 12, 1
1, 13, 78, 286, 715, 1287,1716,1716,1287,715,286,78,13, 1
2. By formula (3.6) the sum of the elements of the ninth row is 28.
Similarly the sums of the elements of preceding rows are 2
7
, 2
11
, etc.
So it must be verified that
By virtue of the identity
(a - 1) (a,,-1 + a,,-2 + ... + a + a
O
),
we have 2
8
- 1 or
which is equivalent to the equation we wanted to verify.
3. This can be deduced from equation (3.7) by transposing terms with
minus signs.
Problem Set 12, page 43
1. 63 or 211 - 1
170 MATHEMATICS OF CHOICE
2. 6560 or 3
8
- 1, because on each issue a member has three choices:
yes, no, or abstention.
3. 1023 or 210 - 1
4. 254, because there are 27 types for a family of 7 children, 2
6
for 6
children, and so on.
Problem Set 13, page 47
1. 5050 or !(100) (101)
2. Denoting the sum by s we have 2s = 101 + 101 + ... + 101 with
100 summands. Hence 2s = 10100 and s = 5050.
3. Denoting the sum by S we have
S 1 + 2 + 3 + ... + (n - 2) + (n - 1) + n
S n + (n - 1) + (n - 2) + ... + 3 + 2 + 1
2S (n + 1) + (n + 1) + ... + (n + 1) = n(n + 1),
S !n(n + 1)
4. 338350 or HI00) (101) (201)
5. (a) 99 (b) 101 6. (a) n - 1
(b) n + 1.
7. 4851; 5151
With x = 1 the equation becomes y + z = 99 with 98 solutions in
positive integers; with x = 2 we have y + z = 98 with 97 solutions
in positive integers; ; with x = 98 we have y + z = 2 with 1 solu-
tion. The total number of solutions in positive integers is
98 + 97 + ... + 2 + 1 = !(98)(99).
8. i(n - 2) (n - 1); l(n + 1) (n + 2)
9. 10; 15; !(n + 1) (n + 2)
The number of terms in the expansion of (x + y + Z)4 is the number
of solutions of a + b + c = 4 in non-negative integers.
ANSWERS AND SOLUTIONS 171
10. Write equation (3.8) with r = 4 and n replaced by m + 3, m + 2,
m + 1, "', 6, 5, to get
C(m + 2,3) = C(m + 3,4) - C(m + 2,4)
C(m + 1,3) = C(m + 2,4) - C(m + 1,4)
C(m,3) = C(m + 1,4) - C(m, 4)
C(5,3)
C(4,3)
Adding these we get
C(6,4) - C(5, 4)
C(5, 4) - C(4, 4)
C( 4, 3) + C(5, 3) + ... + C(m, 3) + C(m + 1, 3) + C(m + 2, 3)
= C(m + 3,4) - C(4, 4).
i(4)(3)(2) + H5)(4)(3) + ... + !(m + 2)(m + l)(m)
= -hem + 3)(m + 2)(m + 1)(m) - 1.
Transpose the term -1 and multiply by 6 to get
(3) (2) (1) + (4) (3) (2) + (5) (4) (3) + ... + (m + 2) (m + 1) (m)
= Hm + 3)(m + 2)(m + l)(m).
The term (m + 2) (m + l)m, for example, can be written as
m
l
+ 3m
2
+ 2m, so the whole left side can be separated into three sums
(18 + 21 + 3
8
+ ... + ml) + 3 (12 + 22 + 3
2
+ ... + m
2
)
+ 2(1 + 2 + 3 + ... + m).
Writing S for the sum of the cubes from 11 to m
l
, and substituting
the known formulas for the other sums, we get
S + im(m + 1) (2m + 1) + m(m + 1)
= Hm + 3)(m + 2)(m + l)m.
This reduces to S = im
2
(m + 1)2 and so the answer is
172 MATHEMATICS OF CHOICE
Problem Set 14, page 54
1. F(ll) = 233.
2. F(n) is even if n = 1,4, 7, 10, 13, 16, .. In general F(n) is even
if n is of the form 3k + 1, and F(n) is odd in all other cases. This is
an immediate consequence of Formula (4.4) and the fact that the sum
of two integers is odd only if one of them is odd and the other even.
3. F(n + 1) = F(n) + F(n - 1)
4. Add the result of the preceding question to formula (4.4).
5. C(ll, 6)
6. C(15, 5)C(16, 6)
Ignoring the B's momentarily we observe that the A's and C's can
be arranged in order in anyone of C(15, 5) ways. Then there are 16
places between the A's and C's and at the ends where the B's may be
inserted. Thus for each arrangement of A's and C's, there are C(16, 6)
ways of inserting the B's.
7. 7350
Ignoring the i's momentarily we note that the other letters can be
arranged in order in 7V(4!2!) = 105 ways. Then there are 8 places
between and at the ends of these letters where the i's may be inserted.
Hence there are C(8, 4) or 70 ways of inserting the i's. The answer is
70105.
Problem Set 15, page 58
1. C(49, 3); C(53, 3)
2. We note that C(8, 3) = C(8, 5)
4. It suffices to establish that C(m - 1, k - 1)
and this follows from formula (2.4).
5. Use formula (4.10).
C{m - 1, m - k),
ANSWERS AND SOLUTIONS 173
6. (a) C(ll, 6)
Ignoring the integer 1,000,000 the sum of whose digits is not 6, we
interpret the integers from 1 to 999,999 as having six digits by allowing
zero as a digit. For example the integer 8365 can be written 008365. If
we write Xl, , Xs for the six digits, we can interpret the problem as
the number of solutions of Xl + X2 + ... + Xs = 6 in non-negative
integers.
(b) C(l0,5) + C(9,4) + C(8, 3) + C(7, 2) + C(6, 1) + 1
7. (a) C(21, 17)
Each term of the expansion is of the form (with an
appropriate coefficient), where the sum of the exponents is 17; thus
Xl + X2 + X3 + X4 + Xs = 17. Hence the answer is the number of solu-
tions of this equation in non-negative integers.
(b) C(t + k - 1, t)
Problem Set 16, page 60
1. r 2. C(ll, 6) 3. C(l2, 10) 4. C(16, 12).
5. C(l6, 7) - 1
The question amounts to asking for the number of combinations,
seven at a time, of the ten digits 0, 1, 2, .'., 9, each of which may be
repeated in the combination. The "-I" in the answer accounts for the
case of seven zeros, to which there corresponds no integer.
Problem Set 17, page 65
1. One of the twenty parts of the answer is: 6, 8, 7, 6 corresponds to
1, 3, 2, 1.
2. C(71, 3)
3. (a) C(37, 4) (b) C(30, 4)
4. C(l6, 3)
5. (a) C(13, 3) (b) C(7, 3) (c) None
6. (a) C(l7, 3) (b) C(ll, 3)
174 MATHEMATICS OF CHOICE
7. (a) C(m - Cl + 3, 3) (b) C(m - CI - C2 + 3, 3)
8. C(18,5) - 6C(8, 5)
Set aside the integer 1,000,000 the sum of whose digits is not 13. We
interpret the integers from 1 to 999,999 as having six digits by allowing
zero as a digit. If we write Xl, , Xu for the six digits we can interpret
the problem as the number of solutions of Xl + X2 + ... + Xu = 13
in non-negative integers not exceeding nine. Ignoring the "not exceeding
nine" limitation momentari1y, we note that the equation has C(18, 5)
solutions in non-negative integers. Next, the number oLsolutions in non-
negative integers with Xl > 9 is seen to be C(8, 5). This is subtracted
from C(18, 5), and analogous subtractions are made for the cases
X2 > 9, Xa > 9, etc.
Problem Set 18, page 71
1. N - N(a) - N(fJ) - N('Y) - N(fJ) + N(a, fJ) + N(a, 'Y) + N(a, 0)
+N(fJ,'Y) + N(fJ,fJ) + N('Y,fJ) - N(a,B,'Y) - N(a,fJ,o)
- N(a, 'Y, fJ) - N(fJ, 'Y, fJ) + N(a, fJ, 'Y, 0)
2. 2
r
, the total number of subsets of a set of r objects.
3. 16000
Let divisibility by 3, 5, 11 be denoted by a, fJ, 'Y. respectively. Then
formula (5.3) gives
33000 - 11000 - 6600 - 3000 + 2200 + 1000 + 600 - 200.
4. 998910
The fourth powers are included among the squares, so they can be left
out of the consideration. Say that an integer has property a if it is a
perfect square, property fJ if a perfect cube. An integer has both prop-
erties a and fJ if it is a perfect sixth power. Thus we make the
computation
N - N(a) - N(fJ) + N(a, fJ) = 1,000,000 - 1000 - 100 + 10.
5. N(a, fJ, 'Y) - N(a, fJ, 'Y, 0) - N(a, fJ, 'Y, E) + N(a, fJ, 'Y, 0, E)
6. N(fJ) - N(fJ, a) - N(fJ, 'Y) - N(fJ, fJ) + N(fJ, a, 1') + N(fJ, a, 0)
+ N (fJ, 'Y, fJ) - N(fJ, a, 1', fJ)
ANSWERS AND SOLUTIONS 175
Problem Set 19, page 77
1. C(13,3) - 4C(7, 3)
2. C(16, 5) - 6C(1l, 5) + 15C(6, 5)
The question amounts to asking for the number of solutions of
Yl + Y2 + ... + Ye = 17 in positive integers not exceeding 5, because
any even integer Xl can be written as- 2y!, where Yl is again an integer.
3. C(14, 3) - C(8, 3) - 2C(7, 3) - C(6,3)
Let N denote the number of solutions of the equation which satisfy
the conditions Xl > 0, X2 > 0, Xa > 2, > 3. X" Thus N = C(14, 3)
by the formula (4.22). If one of these solutions has Xl > 6, say it has
property a. Likewise let X2 > 7, Xa > 9 and x" > 11 correspond to
properties fl, -y and o. Thus we want to find how many of the C(14, 3)
solutions have none of the properties a, fl, -y, o. By use of formula (4.22)
we compute
N(a) =C(8, 3), N(fl) =C(7, 3), N(-y) =C(7, 3), NCo) =C(6, 3).
All further terms in formula (5.3) are zero.
4. C(16, 3) - 4C(9, 3)
5. C(13,3) - C(4,3) - C(5,3) - C(8, 3) - C(9,3) + C(4, 3)
This amounts to finding the number of solutions of
Xl + X2 + X3 + X" = 10
in non-negative integers subject to the restrictions Xl , 8, X2 , 7,
xa,4, x,,, 3.
6. C(12, 2) - C(3, 2) - C(4,2) - C(7, 2)
This amounts to finding the number of solutions of Xl + X2 + Xa = 10
in integers satisfying the inequalities 0 , Xl , 8, 0 , X2 , 7,
0, xa' 4.
7. C(1l,3) - 4C(8,3) + 6C(5, 3) 1
8. C(13, 3) - 4C(4, 3)
10. c = 23; C(1l,4) - 5C(5, 4) = C(22,4) - 5C(16, 4)
+ lOC(1O,4) - 10C(4, 4)
The substitution or transformation Xj = 7 - Yj for j = 1, 2, 3, 4, 5
will solve the problem.
176 MATHEMATICS OF CHOICE
11. C(m - 1, k - 1) - C(m - 1 - CI, k - 1) - C(m - 1 - C2, k - 1)
- C(m - 1 - Ca, k - 1) + C(m - 1 - CI - C2, k - 1)
+ C(m - 1 - CI - Ca, k - 1) + C(m - 1 - C2 - Ca, k - 1)
- C(m - 1 - Cl - C2 - Ca, k - 1)
12. C(24, 6) - C(15, 6) - 6C(14, 6)
Denote the digits from left to right by Xl, "', X7. Then the answer is
the number of solutions of Xl + ... + X7 = 19 in non-negative integers
not exceeding 9, but with the additional restriction that Xl is positive.
Problem Set 20, page 81
1. D(5) = 44; D(6) 265
2. 1234 2134 3142 1243 2143 3214 1432 2413 3412
3. (a) 1936
The integers 1, 2, 3, 4, 5 can be put into the first five places in D(5)
ways, because there are D(5) derangements of five things; the remaining
integers from 6 to 10 can be put into the last five places in D(5) ways,
so the answer is D( 5) D( 5).
(b) (5!)2 = 14400
Any arrangement of 6, 7, 8, 9, 10 in the first five places is a derange-
ment, so there are 5! possibilities; the same is true for the integers
1, 2,3,4,5 in the last five places.
4. 3216
We use the inclusion-exclusion principle with three properties of the
permutations: 1 in the first place; 4 in the fourth place; 7 in the seventh
place. Thus the answer is 7! - 6! - 6! - 6! + 5! + 5! + 5! - 4! .
5. 22260
There are C(9, 3) = 84 ways of choosing the three numbers which
are to be in their natural positions; for each such choice, there are
D(6) = 265 derangements of the other six numbers. The product of 84
and 265 is the answer.
[
1 1 1 1]
6. D(26) or 26! 1 - - + - - - + ... + -
I! 2! 3! 26!
ANSWERS AND SOLUTIONS 177
7. D(n) - nD(n - 1) = n! [1 _ !.- + ... + <-I)"]
1! n!
n! [1 _ ~ + ... + -'.(_-_1..:-)_,,-_1]
I! (n-l)!
After the subtraction is performed, the only remaining term is
Problem Set 21, page 86
2. 1 3. 1.
4. 5/12
There are 36 equally likely cases. Of these, 15 have a larger number on
the white die.
5. 5/18
There are 6
4
equally likely cases. For convenience we suppose that the
dice are of different colors, say white, red, blue and green. When the dice
are thrown we can argue that any outcome on the white die will be
satisfactory, so 6 possibilities; but whatever the outcome on the white
die, we want a different outcome on the red die, so 5 possibilities; similarly
there are 4 possibilities on the blue die, and 3 on the green die. So the
number of favorable cases is 6543. (Another way of calculating the
number of favorable cases is to count the number of four-digit integers
made up entirely with the digits 1,2,3,4,5,6, and having distinct digits.
Any such integer, say 3516, can be interpreted as meaning that the white
die comes up "3", the red die "5", the blue die "I", and the green die
"6" .)
6. 7.5
6
/6
1
There are 6
7
equally likely cases. To calculate the number of favorable
cases, we count the number of seven digit numbers (one digit for each
die) made up entirely of the digits 1, 2, 3, 4, 5, 6, and having exactly
three sixes present. This is seen to be 1115SS5C(7, 3).
8. 651/6
6
or [C(14, 4) - SC(8,4)J/6
6
There are 6
6
equally likely cases. The number of favorable cases is the
178 MATHEMATICS OF CHOICE
same as the number of solutions of Xl + ~ + X3 + X4 + XI> = 15 in inte-
gers from 1 to 6.
9. (a) 7/32
There are 2
8
equally likely cases. Of these the number of favorable
cases is C(8, 5), because it amounts to the number of ways of choosing
five out of eight coins.
(b) 93/256 or [C(8,S) + C(8, 6) + C(8, 7) + C(8, 8)J/28.
10. 13
4
/C(52, 4)
The number of selections of four cards from a deck is C(52, 4). The
number of selections of four cards, one from each suit, is [C(13, 1) J4,
or 13
4

11. (a) 1 - [C(4O, 13) + 12C(4O, 12) J/C(52, 13)
Compute the complementary probability. The total number of equally
likely cases is C(52, 13). The number of selections of 13 cards with no
face cards present is C( 40, 13); with exactly one face card present is
C(12, 1)C(40, 12).
(b) C(4, I)C(48, 12)/C(52, 13)
(c) 1 - C(48, 13)/C(52, 13)
This answer is arrived at by computing the complementary probability.
(The answer by a direct method looks different.) The number of selec-
tions of 13 cards with no aces present is C (48, 13).
12. 1/13
There are 26! orders in all. Of these, X and yare adjacent in 2-25!
cases.
13. (a) [C(23,4) - C(14,4) - 4C(13, 4) + 4C(4, 4)J/90000
There are 90000 five digit integers. The number of favorable cases is
the number of solutions of Xl + X2 + X3 + X4 + X5 = 20 in non-negative
integers not exceeding 9, but with the additional restriction that Xl
must be positive. The inclusion-exclusion principle along with formula
(4.22) can then be used.
(b) 1/1800
There are 50 five-digit integers satisfying the conditions of the problem.
Twenty of them have digits 5, 4, 1, 1, 1, and thirty of them have digits
5,2,2,1, 1.
ANSWERS AND SOLUTIONS 179
14. No, the probability is 4/9
There are C(10,5)/2 equally likely cases, because this is the number
of ways that 10 boys can be separated into two teams of 5. To compute
the number of favorable cases, we set aside the two friends and choose
three out of eight to accompany them on "favorable" teams; this gives
C(S, 3) favorable cases.
15. 1 - D(S) /S!; 1 - [D(S) + SD( 7) J/S!
The answers given arise from the complementary probability in each
part. The number of equally likely cases is S! . The number of ways in
which no spark plug can go back into its original cylinder is D(S), the
number of derangements of S things. Furthermore, the number of ar-
rangements with exactly one plug in its original cylinder is SD(7).
16. The probability of a win is the same as the probability that the
arrangement of cards in one deck is compatible with that in the other.
Since there are 52! possible arrangements and D(52) derangements, the
ratio of the number of favorable cases to the total number of equally
likely cases is
D(S2) = 1 _ !. + !. _ !. +
52! I! 2! 3!
1
+ 52!
(approximately .3679).
17. 1
1
13!
(To four decimal places, this answer is the same as that to Problem 16.)
18. The probability of a win is the probability that a shuffled deck will
produce a total derangement except for one card. There are 52 ways of
holding one card fixed and D(SI) derangements of the remaining 51
cards. Hence. the answer is
D(51) D(51)
52-- = --
52! 51!
1 1 1
1--+---+
I! 21 31
1
51!
(This differs from the answer to Problem 16 by 1/521 which is an ex-
tremely small number.)
Problem Set 22, page 96
1. 1, 2, 3, 5, 7 2. /JJ.(n) = 1,
180 MATHEMATICS OF CHOICE
3. q2(8) = 5, q2(9) = 5, q2(n) = 1 + !n if n is even,
q2(n) = Hn + 1) if n is odd.
4. 1 5. 2
6. The largest summand occurring among all the partitions of n is n
itself, and hence there are no partitions counted by PnH(n) not
already counted by Pn(n); similarly for pk(n) with k > n.
7. There is only one partition, namely n itself, that is counted by Pn(n)
but not by Pn-l(n).
Problem Set 23, page 99
1. Partial solution:
~
1 2 3 4 5 6 7 8 9 10 11 12
8 1 5 10 15 18 20 21 22 22 22 22 22
9 1 5 12 18 23 26 28 29 30 30 30 30
10 1 6 14 23 30 35 38 40 41 42 42 42
11 1 6 16 27 37 44 49 52 54 55 56 56
12 7 19 34 47 58 65 70 73 75 76 77
2. 7, 15, 28 3. 15, 22, 30, 42
Problem Set 24, page 101
1. 1 + x + x
2
+ xl + x4 + xl> + x
6
+ x
1
+ x8 + x
9
+ x
lO
+ XII + xl
2
+ X
l3
+ Xl4 + Xlii + X
l6
+ ...
ANSWERS AND SOLUTIONS 181
2. 1 + x + X
2
+ 2x1 + 2x4 + 3XIi + 4x11 + 5X7 + 6x1 + ...
3. 1 + x + 2X2 + 3xl1 + 5x4 + 7 x5 + 11x
6
+ 15x
7
+ ...
Problem Set 25, page 105
1. (a) the number of partitions of 12 with even summands;
(b) the number of partitions of 9 with summands not exceeding 3;
(c) the number of partitions of 6 with distinct summands.
2. (a) 11 (b) 12 (c) 4
3. (a) (1 + x
6
+ Xl2 + XIS + X24 + x30 + xIS)
(1 + x
7
+ XI4 + X21 + X28 + ro) (1 + X12 + xU + xIS) (1 + x20);
(b) (1 + xli + x
6
+ x
9
+ xl2 + Xlii) (1 + x4 + xl + X12)
(1 + xli + x
lO
+ x
15
)(1 + X6 + xl2)(1 + X7 + XI4)(1 + xl)
(1 + x
9
) (1 + Xlii) ;
(c) (1 + x) (1 + x2) (1 + xl) (1 + x4) (1 + x5) (1 + x
6
) (1 + x
7
)
(1 + xli) (1 + X9); 5, 17, 8 partitions respectively.
4. 14
Compute the coefficient of XIS in the expansion of
(1 + x
2
+ X4 + xii + ... + X 18)( 1 + x
3
+ x
6
+ ... + XIS)
.(1 + Xli + x
IO
+ Xlii) (1 + x
7
+ X14).
5. 3
The answer is the number of solutions of
3U + 5V + 7W + 9T = 16
in non-negative integers, as can be seen by use of the transformation
u = 1 + U, 'V = 1 + V, w = 1 + W, t = 1 + T. This is the
coefficient of X
16
in the expansion of
(1 + x
3
+ x
6
+ x
9
+ X
12
+ x
15
)(1 + Xli + x
lO
+ Xlii)
(1 + x
7
+ x
14
) (1 + xl).
182 MATHEMATICS OF CHOICE
Problem Set 26, page 108
(In these solutions PI, P
2
, P
a
, p., P,. denote the polynomials given
in the text on page 107.)
1. 343
Compute the coefficient of x
lOO
in the expansion of P
1
P
2
PaQP,.,
where Q = 1 + X20 + x40 + x
80
+ x
80
+ Xl00.
2.49
Compute the coefficient of x68 in the expansion of P
I
P
2
P
a
P . Each
polynomial can be abbreviated to exclude powers higher than x68.
3.34
This is the coefficient of x
90
in the expansion of P
2
P
3
P.P,..
4. 16
Apply the transformation y = 1 + Y, Z = 1 + Z, w = 1 + W,
I = 1 + T to get the equation 5Y + 10Z + 25W + 50T = 65 and
then find the number of solutions of this equation in non-negative integers.
This is the coefficient of x
66
in the expansion of P
2
P
a
P.P,..
Problem Set 27, page 111
1. 150 or 3
6
- 3.2
6
+ 3 2. f(5, 2) = 2
6
- 2 = 30
4. k! = k" - C(k, 1) (k - 1)" + C(k, 2) (k - 2)" - C(k, 3) (k - 3)"
+ ... + (-I)I:-IC(k, k - 1)
5. The expression in the problem comes from formula (8.1) with k = 8;
since there are no ways of distributing fewer than 8 objects into 8
boxes with no box empty, f(m, 8) = 0 for m < 8.
Problem Set 28, page 114
1. 3025 or
3
9
- 3.2
9
+ 3
3!
1
3. 2m-I - 1
ANSWERS AND SOLUTIONS 183
4. (a) 122 (b) 90
The number 30,030 has six distinct prime factors, and we want to
separate these into three sets. The notation for part (a) is G( 6, 3), for
part (b) is g(6, 3).
5. S2 7. gem, m - 2) C(m, 3) + 3C(m, 4)
Problem Set 29, page 117
1. (a) 24 (b) 126 or C(9,4) (c) 151200 or P(10,6)
(d) 286 (e) 7 (f) 21 (g) 19
Solution of (d). This is C(13, 3), the number of solutions of
x + y + z + w = 10 in non-negative integers.
Solution of (g). This is C(8,2) - 3C(3,2), the number of solutions
of x + y + z = 6 in non-negative integers not exceeding 4.
2. (a) n! (b) Pen, r) (c) C(n, r) (d) C(r + k - I, r)
Solution of (d). This is the number of solutions of
Xl + X2 + ... + Xk = r
in non-negative integers.
3. !(k
2
+ 3k + 4)k!
Denote the two like objects by A, A. The first box is to contain two
objects. The number of distributions with at least one A in the first box
is (k + I)!. The nUInber of distributions with the A's in boxes other
than the first is C(k, 2)C(k, 2)(k - 2)!, because there are C(k,2)
ways of choosing the two objects to go in the first box, C(k,2) ways of
choosing the two boxes for the A's, and (k - 2)! ways of distributing
the other k - 2 objects.
Problem Set 30, page 121
4. k = 4
Suppose that at most three of a I , ~ , "', alO, and at most three of
b
I
, b
2
, "', b
lo
, and at most three of CI, C2, "', CIO have property Q.
Then by simple addition at most nine of the entire thirty items have
property Q. This contradicts the given information.
5. r = 4
184 MATHEMATICS OF CHOICE
Problem Set 31, page 123
1. One way to handle this is to color AB, BC, CD, DE, EA blue, and
all other line segments red.
2. Denote one of the seventeen points by A and denote the others by
B
1
, B
2
, , B
16
. Consider the sixteen line segments emanating from
A, namely AB
1
, AB
2
, , AB
I6
. By the pigeonhole principle at least
six of these segments are of one color, say blue. We may as well take
these six blue segments to be AB
1
, AB
2
, , AB
6
Now if there is
at least one blue segment among the fifteen segments linking B
I
, B
2
,
B
a
, B
4
, Br., B
6
, then we have a blue chromatic triangle. (For example
if the segment BJ3r. is blue, then ABaBs is a blue triangle.) On the
other hand if there is no blue segment in this batch of fifteen, this
means that all segments linking the points B
I
, B
2
, B
a
, B
4
, Br., B6 are
red Or white. In this case we apply the basic result proved in Section 9.2.
Problem Set 32, page 127
1. Hn
2
+ n}
This result can be obtained from the answer !(n
2
+ n + 2) in the
text for the number of regions created by n lines, no two parallel, no
three concurrent. For if in that case we slide one of the lines across the
plane in such a way that it becomes concurrent with two other lines,
then one region is lost.
2. (m + 1) (k + I)
3. (m + l)(k + 1) + m + k + 1
The new line creates m + k + 1 new regions.
4. ql + 2q + 2t - 1
Denote the number of regions by F(q, t). If we remove one of the q
lines we see that 2 + t regions are lost, and so F(q, t) exceeds
F(q - 1, I) by 2 + t. Thus we have
F(q, I) F(q - 1, t) = 2 + t,
F(q - 1, t} - F(q - 2, t) 2 + t,
F(q - 2, t) - F(q - 3, t) 2 + t,
F(2, t} F(I, t}
F(I, t) - F(O, t)
2 + t,
1 + t.
ANSWERS AND SOLUTIONS 185
(Note the slight difference in the last equation.) Adding these we get
the answer by use of 1'(0, t) = 2t.
5. kq + 2q + k
Denote the number of regions by H(q, k). If one of the k parallel
lines is removed, the number of regions is reduced by q + 1. Hence
we see that H(q, k) - H(q, k - 1) = q + 1. Forming a telescoping
sum as in the preceding question, and using lI(q, 0) = 2q, we get the
answer.
6. kq + 2q + k + nk + nq + n(n + 1)/2
Denote the number of regions by ll(q, k, n) so that H(q, k, 0) is
the same as H(q, k) of the preceding question. If one of the n lines is
withdrawn, there is a decrease of n + k + q regions. Thus,
H(q, k, n) - H(q, k, n - 1) = k + q + n,
and from this we can proceed as in the two preceding solutions.
Problem Set 33, page 132
3. A comparison with Pascal's triangle suggests the conjecture
K(n) = C(n - 1,2) = !en - 1)(n - 2).
This turns out to be correct, because K(n + 1) = K(n) + n - 1 by
the following observation: K(n + 1) counts not only the pairs counted
by K(n) but also the pairs
1, n + 1 2, n + 1 3, n + 1 n - 1, n + 1.
4. (a) False (b) True (c) True (d) False (e) False (f) True
..
2. (a) L: 3j
,,-1
Problem Set 34, page 138
3n(n + 1)
2
186 MATHEMATICS OF CHOICE
.. .. ..
(C) L (2j - 1) (2j + 1) L (4j2 - 1) = 4 LJ"2 - n
i-1
n(n - 1)
3. (a) 2
4.50 6.0
.,-1
2n(n + 1) (2n + 1)
3
n(4n
2
+ 6n - 1)
3
(C) (n + 1) (n + 2) (2n + 3)
6
8. 2520 11. fen)
Problem Set 35, page 143
1. (i) 42 (ii) 132 (iii) 429
2. 5
262144
-n
(n+l)!-1
Solutions of Miscellaneous Problems
1. Consider the complementary probability, namely the chances of
getting fewer than half the answers correct. The number of equally
likely possibilities is 29. The student fails to get at least three right
out of nine in C(9, 0) + C(9, 1) + C(9, 2) cases, the terms of this
sum corresponding to none, one or two right. Noting that this sum is
1 + 9 + 36 = 46, we see that the complementary probability is
46/512, which is less than 1/10.
2. 1414
The answer to the question is the smallest positive integer n such
that !(n
2
+ n) > 1,000,000. The corresponding equation
Hn
2
+ n) = 1,000,000
has a positive root between 1413 and 1414.
ANSWERS AND SOLUTIONS 187
3. n
3
(n + 1)
The problem is to evaluate
n n n n
L (4j3 - 3j2 + j) or
4 Lj3 - 3 Lj2 + Lj
,-1 ,-1
Formulas for these sums can be found in the Summary of Chapter 3
and the answer to Problem 10 of Set 13. Thus we get
n
2
(n + 1)2 - !n(n + 1) (2n + 1) + !n(n + I),
which reduces to the answer given.
4. 8/11
It makes no difference whether or not the teams are "identified",
that is, given specific labels such as the red team, the blue team and the
green team. Here is a solution using identified teams. The total number
of ways of forming the teams is C(12, 4)C(8, 4), by first choosing four
boys for the red team and then four for the blue. Label the particular
boys A and Bj the number of ways of forming the teams with A on
the red and B on the blue is C(lO, 3)C(7, 3). Consequently the answer
is 6C(10, 3)C(7, 3)/[C(12, 4)C(8, 4)J.
5. 16/55
Using the background of the preceding solution, with the boys labeled
A, B, C, we note that there are C(9, 3)C(6, 3) ways of forming the
teams with A on the red, B on the blue and C on the green. Hence
the answer is 6C(9, 3)C(6, 3)/[C(12, 4)C(8, 4)J.
6. The number of objects having neither of the properties a, (3 is
N - N(a) - N({3) + N(a, (3). This is not negative and so
or
N - N(a) - N(fJ) + N(a, (3) > 0
N + N(a, (3) > N(a) + N(fJ).
Similarly we have
N + N(a, 'Y) > N(a) + N(y) and N + N({3, 'Y) > N({3) + N(y),
and the result follows by addition of these inequalities.
188 MATHEMATICS OF CHOICE
7. (1 + x) (1 + X
3
) (1 + X
5
) (1 + #') or
9. Add the equations F(n) - F(n - 1) = F(n - 2),
F(n - 1) - F(n - 2) F(n - 3),
F(n - 2) - F(n - 3) F(n - 4),
F(2) - F(I) = F(O).
10. The relation F(n) = C(n + 1,0) + C(n, 1) + C(n - 1, 2) + ...
from the Summary of Chapter 4 can be written as
F(n) = L C(j, k).
7+k-n+l
Similarly we see that
F(n - 2) = L C(j, k), F(n - 3)
L C(j, k),
7+k-==n-l 7+i=-n-2
F(O) = L C(j,k).
i+k=l
Adding these to 1 = C(O,O) we get
F(n - 2) + F(n - 1) + ... + F(O) + 1 L C(j, k).
7+k<n
The conclusion then follows by use of the preceding problem.
11. (201) (211)/111
Set aside the multiples of 3 momentarily; the other twenty integers
can be permuted in 201 ways. Given anyone of these permutations, there
are 21 spaces between and at the ends of the integers. Choose 10 of these
spaces to insert the multiples of 3; thus C(21, 10) choices. But then the
multiples of 3 can be inserted in 10! ways. So the answer is
(20!)' C(21, 10) (1O!).
ANSWERS AND SOLUTIONS 189
12. 16687.
Say that a permutation has property al in case a is followed im-
mediately by b i property a2 in case b is followed immediately by
Ci _ i property a7 in case g is immediately followed by h. The
problem is to find the number of permutations having none of these
properties, and this can be done by use of the inclusion-exclusion principle.
It can be seen that N(al) = N(az) = - - - = N(a7) = 7!,
N(al' az) = 6!, N(al, a2, aa) = S!, etc. Thus the answer is
8! - C(7, 1) -7! + C(7, 2) -6! - C(7, 3) oS! + C(7, 4) -4!
- C(7, 5) -3! + C(7, 6) -2! - C(7, 7)-11
13. {C(24, 4)}5 - S{ C(23, 3)}o + lOt C(22, 2)}6 - 10{ C(21, 1) }6
+ S{ C(20, 0)}6
Ignore momentarily the condition that no box is to be empty. Label
the boxes A, B, C, D, E. Then the number of distributions of the cents
is C(24, 4), the number of solutions of Xl + Xz + Xa + X4 + X6 = 20
in non-negative integers, where Xl is interpreted as the number of cents
in box A, etc. Hence the number of distributions of all the coins is
(C(24, 4) }o. Now introduce the condition that no box be empty and
use the inclusion-exclusion principle. Say that a distribution has property
a in case box A is empty, property {3 in case box B is empty, etc. Thus
we see that
N = {C(24, 4) }o, N(a) = {C(23, 3) 1, N(a, (3) = {C(22, 2) J6,
and so on, which give the answer.
14. 864
First disregard the restrictIOn that no two adjacent letters be alike.
The total number of permutations is then
8!
N = -- = 2520.
2!2!2!2!
Now apply the inclusion-exclusion principle, where a permutation has
property a in case the A's are adjacent, property (3 in case the B's
are adjacent, etc. It can be calculated that
7!
N(a) - --
212!21
N(a, (3, y)
630,
60,
6!
212!
N(a, (3) 180,
N(a, (3, y , ~ ) = 24.
190 MATHEMATICS OF CHOICE
Hence the answer is
N - 4N(a) + 6N(a, (3) - 4N(a, (3, 'Y) + N(a, (3, 'Y, ~ ) 864.
15. 700
First permute the E's and F's to get (61)/(3!31) or 20 permuta-
tions. Then in each of these 20 permutations insert the D's in any 3 of
the 7 spaces between letters or at the ends. Thus the answer is 20C (7, 3).
16. 340
In the solution to the preceding problem separate the 20 permutations
of the E's and F's into three types: 4 permutations having no E's
adjacent; 12 permutations having exactly two E's adjacent; 4 permuta-
tions with all three E's adjacent. The D's can be inserted in C(7,3),
C(6, 2), and C(5, 1) ways respectively for these three types. Hence
the answer is 4C(7,3) + 12C(6, 2) + 4C(5, 1).
17. 174
First consider all arrangements with DE on the left end, followed by
the other seven letters. With the F's omitted these arrangements are
six in number, namely
(1) DEDDEE
(4) DEEEDD
(2) DEDEDE
(5) DEEDED
(3) DEDEED
(6) DEEDDE
The F's can be inserted in the following number of ways in these six
arrangements: C(3,1), C(5,3), C(4,2), C(3,3), C(4,2), C(3, 1).
This totals 29, and the answer is obtained by multiplying by 6 to allow
for other pairs of letters on the left end, besides DE.
18. 2600
To any solution of x + y + z + v = 27 in positive integers, there
corresponds a unique solution of the other equation since
u = 30 - x - y - z.
Hence the question amounts to asking for the number of solutions of
x + y + z + v = 27
in positive integers. The answer is C(26, 3).
ANSWERS AND SOLUTIONS 191
19. 1078
By symmetry the number of solutions with x> y equals the number
with x < y. The total number of solutions is C(25, 3) or 2300. The
number of solutions with x = y is
12 12
L: C(25 - 2x, 1) = L: (25 - 2x) 144,
because for a fixed value of x the equation 2x + z + w = 26 or
z + w = 26 - 2x has C(25 - 2x, 1) solutions in positive integers.
Hence the answer is (2300 - 144)/2.
20. (n + 1) (2n
2
+ 4n + 3)/3
The question amounts to asking for the number of selections of 2n
objects from 4n objects, given that the 4n objects are identical in sets
of n. (Thus there are just 4 different kinds of objects.) This is the same
as asking for the number of solutions of Xl + X2 + Xa + X4 = 2n in
non-negative integers not exceeding n. By the work of Chapter 5 this
is C(2n + 3, 3) - 4C(n + 2, 3).
21. (nj) VI (j!)nn!}
A first batch of j objects can be chosen in C(nj, j) ways, a second
batch in C(nj - j, j) ways, and so on. Since the order of the batches
does not matter, the answer is
C(nj, j)C(nj - j, j)C(nj - 2j, j) C(3j, j)C(2j,j)/n!.
22. Partitions into positive even integers.
There are no partitions of 1000 into three positive odd integers.
23. Partitions into four positive odd integers.
Let a + b + c + d be a partition of 1000 into four positive even
integers, with a < b < c < d. Then
(a - 1) + (b - 1) + (c - 1) + (d + 3)
is a partition of 1000 into four positive odd integers. Moreover this
gives a one-to-one correspondence between all the partitions into four
even integers and some of the partitions into four odd integers. The
correspondence gives only "some" of the partitions into odd integers
because d + 3 exceeds c - 1 by at least 4, and so such a partition as
249 + 249 + 251 + 251 is not present.
192 MATHEMATICS OF CHOICE
24. Partitions into positive odd integers.
Any partition into even summands can be transformed into one having
odd summands by separating each even summand 2j into two parts,
1 and 2j - 1. For example 200 + 300 + SOO is transformed into
1 + 1 + 1 + 199 + 299 + 499. Thus each partition with even sum-
mands is transformed into a unique partition with odd summands, but
this procedure does not give all partitions with odd summands.
25. 402130
Count the integers not having the property. For example, there are 9
6
integers with 6 digits such that no two adjacent integers are equal. Thus
the answer is 1,000,000 - (9
6
+ 96 + 94 + 93 + 9
2
+ 9).
22
26. -24 + L: (_1)i{C(24, j) + C(23, j) + 46C(22, j)}(24 - j)!.
,...0
First consider those permutations with B in first place and A in
second place. Of these there are
24
D(24) or L: (_1)iC(24, j)(24 -j)!,
~
because these permutations are derangements. Next consider those with
A in second place and B in third place. Of these there are, by an argu-
ment using the inclusion-exclusion principle as in the theory for
derangements,
23
L: (_1)iC(23, j) (24 - j)! .
;-0
Finally with A and B in any other specified adjacent positions, there
are
22
L: (_1)iC(22, j)(24 - j)!
;-0
possibilities.
27.90
Apply the inclusion-exclusion principle to the 6! unrestricted parti-
tions, taking ex as the property that a and b are adjacent, 11 the
property that band c are adjacent, and so on.
ANSWERS AND SOLUTIONS 193
28. Each time two people shake hands, the number of people who have
shaken hands an odd number of times changes by 2, 0, or - 2.
29. The possible number of acquaintances of each person in a group of n
people is one of the n integers 0, 1, 2, "', n - L If no two people
have the same number of acquaintances, then all n integers are
represented. But and n - 1 cannot occur simultaneously because
it would mean one person is acquainted with everybody, another
with nobody.
30. This is simply the preceding question in a different form.
31. m(3mk - m
2
+ 3k + 1)/6
We count the number sICk, m) of squares of side 1, then the number
s2(k, m) of squares of side 2, etc. Then the total number of squares in
the grid is
m
S(k, m) = :E siCk, m).
i,,-1
Now sICk, 1) = k, sl(k, m) = mSl(k, 1) = mk; similarly,
s2(k, m) = (m - 1)S2(k,2) = (m - 1)(k - 1),
and so on. We evaluate
S(k, m) = mk + (m - 1) (k - 1) + (m - 2) (k - 2)
+ ... + 1 (k - m + 1).
Reversing the order of the terms in this sum, we write
S(k, m) = k - m + 1 + 2(k - m + 2) + 3(k - m + 3)
+ ... + m(k - m + m)
(k - m)(1 + 2 + 3 + + m)
+ (12 + 22 + 3
2
+ ... + m
2
)
(k _ m) m(m
2
+ 1) + m(m + 1 ~ ( 2 m + 1) ,
and this is the number given above.
194 MATHEMATICS OF CHOICE
32. It is possible in 255 moves.
The problem can be stated for n discs, reqUlnng say, f(n) moves.
A simple analysis reveals that f(n) = 2f(n - 1) + 1.
33. Let the points be A, B, C, D, E, F. By the work of Section 9.2 we
may presume that ABC (say) is a red chromatic triangle. If DEF
is not chromatic it has a white side, say DE. If ADE is not chromatic
then at least one of AD and AE is red. Likewise if BDE and CDE
are not chromatic, at least one of BD and BE, and at least one of CD
and CE, are red. So at least two of AD, BD, CD are red, or at least
two of A E, BE, C E are red. In the first case consider the triangles
ABD, A CD, BCD, and in the second case ABE, ACE, BeE.
34. Here is one pattern. Let the sides of ABC be red, and the sides of
DEF red, and let all other segments be white.
35. By the solution to Problem 33, we can take any six of the points
and get two chromatic triangles. Let A be one of the vertices of one
of these triangles. Then apply the solution to Problem 33 to the six
points other than A.
36. From anyone of the points, say A, there are 6S emanating segments.
Of these, at least 17 are of one color; say that AB
I
, AB
2
, , AB17 are
red. If any line segment joining two of B
1
, B
2
, , Bl7 is red, there
is a red chromatic triangle. Otherwise we can apply the 17 points, 3
colors result in Problem 2 of Set 31.
37. This problem can be solved by a slight sharpening of the argument
given in the solution of Problem 2 of Set 31. Take A not as anyone of
the points, but as a point which is not the vertex of a chromatic tri-
angle, and use the result of Problem 33 of this set.
38. From anyone of the points there are 23 emanating segments of
which at least 12 are of one color. Say that AB
I
, AB
2
, . , ABl2 are red
segments. If among the 12 points BI to B12 there is a red chromatic
triangle, then such a triangle together with the point A gives a solution.
Otherwise consider the 11 segments B
I
B
2
, B
I
B
3
, , B
I
B
12
; at least 6 of
these, say B
1
B
2
, BIBa, , B
I
B
7
, are of one color. If the color is red,
the points B
2
, B
a
, B
4
, B6 give a solution. If the color is white, then
consider the six points B
2
, B
a
, "', B
7
There is a chromatic triangle,
necessarily white, among these six points. This triangle, together with
B
1
, gives a solution.
ANSWERS AND SOLUTIONS 195
39. n(n - 1) (n - 2) (n - 3)/24
Any four of the points on the circle detennine a unique intersection
point, so C(n, 4) is the answer.
40. C(n, 4) + 1 + !n(n - 1)
Adding one point at a time, consider the increase R(j) - R(j - 1)
in the number of regions as we pass from j - 1 to j points. Let P be
the j-th point, and Q any of the j - 1 points. If the line PQ has k
intersection points inside the circle, then the line PQ creates k + 1
new regions. But all the lines PQ (with P fixed and Q anyone of the
j - 1 points) create C(j, 4) - C(j - 1, 4) intersection points by
the result of the preceding problem. Thus we have
R(j) - R(j-1) = j- 1 + C(j,4) - C(j- 1,4),
and the problem can be solved by summing this from j = 2 to j = n.
41. (n
2
- n)/2 if n is odd and not a multiple of 3; (n
2
- 2n)/2 if n is
even and not a multiple of 3; subtract 2n/3 in case n is a multiple of 3.
42. C(n + 5, 5)
This is the number of solutions of Xl + X2 + ... + XII = n in non-
negative integers, where Xl is the number of the dice showing ones, X2
the number showing twos, and so on.
43. (n' + 5n + 6)/6
We make use of the number of regions into which a plane is separated
by n lines of which no two are parallel and no three concurrent. This
was denoted by fen) in Section 9.2, and it was established that
f(n) = !(n
2
+ n + 2).
Now in the present problem if we introduce one plane at a time, and if
the j-th plane thereby causes an increase of g( j) - g( j - 1) in the
number of regions of space, then it can be argued that
g(j) - g(j - 1) = f(j - 1).
The answer is obtained by summing this equation from j = 2 to j = n.
196 MATHEMATICS OF CHOICE
44. 1/3
Consider any arrangement of the n integers; 1, 2,3 occur somewhere,
say in the i-th, the j-th and the k-th positions, respectively. Now hold
all other integers fixed in their positions, but permute 1, 2, 3. There
are 6 ways of placing 1, 2, 3 into the i-th, j-th and k-th positions; two
of these ways are favorable, in the sense that 2 occurs between 1 and 3.
Since this reasoning may be applied to every selection of positions i, j, k,
we see that the probability is -i or {.
45.
~ (-1)iC(n,j)'(2n - j)!
.L..J 2n - i
j=O
Apply the inclusion-exclusion principle to the unrestricted permuta-
tions, taking the property al to be A's adjacent, property a2 to be B's
adjacent, etc.
46. C(n, j)D(j)/n!
Choose n - j integers to be in their natural positions, and then the
others can be arranged in DC j) ways, where DC j) denotes
derangements.
n
47. L: C(k + l,j)C(k + 1 - j, n - 2j)
i-O
First line up the B's, with k + 1 spaces between them and at the
ends. Then consider the number of permutations having j pairs of A's
in j of the spaces, and n - 2j single A's in another n - 2j spaces.
n
48. L: (-I)iC(n, j)(2n - j)!
3=0
Use the inclusion-exclusion principle applied to the total number
(2n)! of permutations. Say that a permutation has property al in case 1
is in its natural position, a2 in case 3 is in its natural position, and so on.
49. (i) gen, k) of Chapter 8;
(ii) G(n, k) of Chapter 8.
50. The recursion relation is K(n,j) = K(n - 2,j - I) + K(n - I,j).
The proper conjecture is K(n, j) = C(n - j + 1, j).
ANSWERS AND SOLUTIONS 197
51. Consider the table:
Column 1 Column 2 Column 3
Row 1: AD BD CD
Row 2: AE BF. CF.
Row 3: AF BF CF
If a row contains two pairs of strangers, we get another triple with
property r. If a row contains three pairs of strangers, we get three
triples with property r. Two similar observations can be made
about a column containing two pairs, or three pairs, of acquaintances.
Next, if the table contains seven or more pairs of strangers, there
must be one row with three pairs of strangers, and the problem is
solved. A similar argument applies if the table contains seven or
more pairs of acquaintances. If the table contains six pairs of strangers
and three pairs of acquaintances, then either some row has three
pairs of strangers or every row has two pairs of strangers. In either case
the problem is solved. The rest of the argument is left to the reader.
52. 610
Say that the boy can go up n steps in fen) ways, so we are to deter-
mine f(14). Now fen) = fen - 1) + fen - 2) because the boy can
move to the n-th step directly from either of the two preceding steps.
This recursion relation is the same as that for the Fibonacci numbers
F(n) of Section 4.1, but the beginning values here are f(l) = 1 and
f(2) = 2; so fen) = F(n - 1), and so f(14) = F(13).
9
53. 4995 or L: (10 - j)C(j + 4,4)
r-l
Disregarding the integer 1,000,000 we note that all the others can be
thought of as six-digit integers, with digits Xl, X2, "', Xe from left to
right, where zeros are allowed as digits. Define the differences d
l
, d'}., "',
dr, between adjacent digits by d
1
= X'}. - Xl, d'}. = Xa - X'}.,
do = X6 - Xo; the integers with the desired property have non-negative
values for the differences d
1
to dr,. Furthermore, their digits are uniquely
determined from each set of values Xl, d
1
, d
2
, d
a
, d
4
, dr" and each such
set satisfies the equation d
1
+ d
2
+ d
3
+ d
4
+ dr, = Xe - Xl-
The number of solutions of this equation in non-negative integers is
C(X6 - Xl + 4, 4). Writing j for X6 - Xl we can assemble the answer
given, keeping in mind that 0 ..;;;; Xl ..;;;; Xe ..;;;; 9.
Bibliography
[IJ H. Hadwiger, H. Debrunner and V. Klee, Combinatorial Geom-
etry in the Plane, Holt, Rinehart and Winston, New York, 1964.
[2J John Riordan, An Introduction to Combinatorial Analysis, John
Wiley , New York, 1958.
[3J H. J. Ryser, Combinatorial Mathematics, Carus Monograph No.
14, John Wiley, New York, 1963.
[4J W. A. Whitworth, Choice and Chance, Hafner, New York, 1959.
General combinatorial problems are treated in [2J, [3J and [4J
whereas [l J deals with questions akin to Chapter 9 of this book.
References [IJ, [2J, [3J are advanced books; reference [4J is a re-
printing of an older book, easy to read, but not very up-to-date.
Index
Addition principle, 16
Binomial expansion, 34
Binomial theorem, 34
Chromatic triangles, 122
Circular permutations, 23
Combinations, 18
Property of, 154
With repetitions, 59, 76
Combinatorial probability, 82
Complementary probability, 86
Configuration problems, 120
Debrunner, H., 199
Derangements, 78
Digit, 15
Distributions, 109, 110
Dollar bill, change for, 106
Factorials, 10
Factorial zero, 16
Fibonacci numbers, 50
Formulas for, 52, 66
Property of, 154
Generating polynomials, 100
Gleason, A. M., 124, 157
Graphs of partitions, 92
Greenwood, R. E., 124, 157
Hadwiger, H., 199
Inclusion-exclusion principle, 67,
70,74
Incompatible permutations, 81
Induction, principle of mathemati-
cal, 130
Integer, 4
Klee, V., 199
Linear equations
With restricted solutions, 60,
75
With unit coefficients,
Mathematical induction,
M ul tinomial expansion,
Multiplication principle,
54
129
38
8
Non-associative product, 140
Number of interpretations of,
152
Notation (see Symbols)
For products, 137
For sums, 134
OIds, C. D., 53
202 MATHEMATICS OF CHOICE
Partitions of an integer, 91, 102
Graphs of, 92
Number of, 96
Partitions of a set, 112
Pascal's formula for C(n, r), 31
Pascal's triangle, 41
Applications of, 148
Permutations, 12
In a circle, 23
Incompatible, 81
Of things not all alike, 28
Pigeonhole principle, 120
Principle of mathematical induc-
tion, 130
Probability, 82
Product
Non-associative, 140
Notation for, 137
Proper subsets, 43
Riordan, John, 199
Ryser, H. J., 199
Separations of the plane, 124
Subsets, 42
Proper, 43
Sum
Telescoping, 45, 125
L notation for, 134
Summands, 91
Sums of powers of natural num-
bers, 44
Symbols, see list below
Telescoping sum, 45, 125
Tower of Hanoi puzzle, 156
Whitworth, W. A., 199
Zero factorial, 16
Symbols
n! 11
p(n) 91
P(n, r) 12
~ ( ~ ~
O! 16
~ ( ~ ~
C(n, r) 18
[a, b, c, .. Oa, {J, 'Y, ] 115
(:)
19
L 134
D(n) 78
II 137

S-ar putea să vă placă și