Vilenkin Combinatorial Mathematics
Vilenkin Combinatorial Mathematics
Vilenkin Combinatorial Mathematics
VILENKIN
COMBINATORIAL
MATHEMATICS
FO R
R E C R E AT I O N
MIR PUBLISHERS
M O S C OW
N. VILENKIN
COMBINATORIAL
MATHEMATICS
FOR
RECREATION
1\UR ·PUBLISHERS
MOSCOW
UDC 519.1=20
Ha aBrJIHii:CKOM HS&IKe
CONTENTS 5
preface . . 7 A bookshelf problem 40
CHAPTER I. THE GENERAL RULES· King Arthur's Round Table 40
OF COMBINATORICS She's got a date . . 41
Superstitious cyclists . . 9 A session in telepathy 42
Permutations with repetitions 9 General problem of derangements 44
Number systems 10 Subfactorials . 45
Secret lock . 11 Caravan in the desert . . . . . 46
Morse code . . . 11 Merry-go-round . . . . . . . . 47
Wigwag code . . 11 Standing in line at a ticket office 48
Electronic digital computer 12 The problem of the two ranks . 51
Genetic code . . . . . . . 13 New properties of combinations 51
General rules of combinatorics 13 CHAPTER IV. THE COMBINATORICS
Domino problem . . . 15 OF PARTITIONS
The crew of a spaceship . 15
Dominoes ..... 54
Checkerboard problems . 16
Placing objects into cells 55
How many people don't know foreign
A bouquet of flowers . . 55
languages? . . . . . . . 17 The number-of-divisors problem 56
The principle of inclusion and exclusion 18 Picking apples . . . 56
Where's the mistake? . . 20 Hunting mushrooms . 57
The sieve of Eratosthenes 20 Mailing photographs 57
CHAPTER II. PERMUTATIONS AND COMBINATIONS Flags on masts . . . 58
Footba,ll championship 22 Total number of signals 59
Permutations without repetitions 22 Particle statistics • . 59
A science club . . . . . 22 Partitions of integers . 59
Permutations of n elements 23 Mailing packages . . . 60
The problem of the rooks 23 General problem of postage stamps 61
Linguistic problems . . . 24 Combinatorial problems of information
Round dance . . . . . . 25 theory . . . . . . . . 61
Permutations with repetitions 25 Entrance-exams problem 61
Anagrams 26 Paying money 62
Combinations 27 Buying candy . . . . 63
Genoese lottery 29 Getting change . . . 64
Buying cakes . 30 Partitioning integers 65
Combinations with repetitions 31 Arrays of dots 65
The football championship again 32 Dual arrays 67
Properties of combinations . . 33 Euler's formula .· 67
A particular case of the principle of CHAPTER V. COMBINATORICS AND CHESS
inclusion and exclusion . . . . 37
Wandering about town 70
Alternating sums of combinations . . 37
The arithmetic square . 70
CHAPTER III. COMBINATORIAL PROBLEMS WITH Figurate numbers . . . 71
RESTRICTIONS The arithmetic triangle 72
Lions and tigers . 39 The extended arithmetic triangle 73
Building a stairway 39 The chess king . . . . . . . . 74
6
The generalized arithmetic triangle 74 The case of equal roots of a characteristic
Generalized arithmetic triangles and a equation •• 102
base-m number system 75 Application of the theory of recurrence
Some properties of the numbers Cm (k, n) 75 relations to problems of transmitting infor-
A checker in the corner • 77 mation . , 103
The arithmetic pentagon 78 A third solution to the majordomo problem 103
Geometric proof of properties of combina-
CHAPTER VII. COMBINATORICS AND SERIES
tions .. 79
Random walks . . 80 Dividing polynomials 104
· Brownian motion 81 Algebraic fractions and power series 104
The queen's realm 82 Operations on power series 107
Absorbing barriers 83 Using power series to prove identities 108
Random walks on an infinite plane 84 Generating functions 109
The general problem of the rocks 84 Newton's binomial theorem 109
Symmetric arrangements 85 The multinomial theorem 111
Two knights 87 Newton's series 112
Extracting square roots 114
CHAPTER VI. RECURRENCE RELATIONS
Generating functions and recurrence rela-
Fibonacci numbers 89 tions . 116
An alternative proof 91 Decomposition into partial fractions 116
The process of successive partitions 91 On a single nonlinear recurrence relation 118
Multiplying and dividing numbers 92 Generating functions and partitions of
Problems involving polygons 93 integers • 119
Difficulties of a majordomo 94 Summary of the combinatorics of parti-
Lucky trolleybus tickets 96 tions 122
Recurrence tables . . 97
Alternative solution of the majordomo Combinatorial Problems 123
problem 98 Solutions and Answers 152
Solution of recurrence relations 99
Linear recurrence relations with constant Index 205
coefficients 100
PREFACE 7
.Specialists in a broad range or ueM.s haveo to
deal with problems that involve cotn.lW:latil,ms
made up of letters, numbers, or any other objects.
'The department head in a factory has to allocate
production assignments to machine-tool opera-
tors, the agronomist has to decide on what crops
to grow on a selected group of fields, the school
principal draws up schedules of lessons, the
investigating chemist analyzes relations involv-
ing atoms and molecules, the linguist examines
the meanings of combinations of letters in an
unknown language, and so forth. The field of
mathematics that studies problems of how many
different combinations (subject to certain restric-
tions) can be built out of a specific number of
{)bjects is called combinatorial mathematics (com-
binatorics).
This branch of mathematics has its origin
in the 16th century, in the gambling games that
played such a large part in high society in those
times. Whole fortunes, from gold and precious games of chance, particularly the so-called prob-
stones to pedigreed horses, castles and estates, lem of points in determining the division of the
were won 1or lost in a game of cards or dice. All stakes of an interrupted game of chance. This
manner of lotteries were in vogue. It is quite problem was posed to Pascal by his friend the
natural that jthe first combinatorial problems Chevalier de Mere, an ardent gambler. Roughly,
had to do mainly with gambling, such as in the problem was this: a match of coin tossing
how many ways can a certain sum in throws of two to six winning games is interrupted when one
or three dice be scored, or in how many ways is player has won five tosses and the other four
it possible to get two kings in a card game. These tosses. How are the stakes to be divided? It was
and other problems in games of chance gave clear that a division of 5 to 4 would not be fair.
the initial impetus to develop combinatorial Applying methods of combinatorics, Pascal solved
mathematics and the burgeoning theory of pro- the problem for the general case when one player
bability. has r games left to win and the other one has s
One of the first to enumerate the various com- games. An alternative solution was given by
binations 'achieved in games of dice was the Fermat.
Italian mathematician Tartaglia. He drew up Further advances in the theory of combinations
a table illustrating the number of ways r dice were connected with the names of Jakob
can fall. It was not taken into account, however, Bernoulli, Leibniz and Euler. However, in
that the same sum can be obtained in different these studies the main role was played by appli-
ways (say, 1 + +3 4= 4 + + 2 2). cations to various games _(lotto, solitaire, etc.).
In the 17th century, the French scholars Pascal During recent years, combinatorial mathematics
and Fermat made a theoretical investigation has seen extensive developments associated with
into the problems of combinatorics. Again, the greater interest in problems of discrete mathe-
starting point was in the form of problems of matics. Combinatorial methods are employed
8
in solving transport problems, in particular, an analysis of some amusing examples. In the
scheduling; the scheduling of production facili- third chapter, a study is made of combinatorial
ties and of the sale of goods. Links have been problems in which certain restrictions are imposed
established between combinatorics and problems on the combinations. Chapter IV considers
of linear programming, statistics, etc. Combinato- problems involving partitions of numbers into
rial methods are used in coding and decoding integers and- contains a description of certain
and in the solution of other problems of infor- geometrical methods in combinatorics. Chapter V
mation theory. is devoted to random-walk problems and to
The combinatorial approach also plays a signi- a variety of modifications of the arithmetic
ficant role in purely mathematical problems such triangle. Chapter VI takes up recurrence rela-
as the theory of groups and their representations, tions, and Chapter VII discusses generating
in the study of the foundations of geometry, functions and, in particular, the binomial for-
nonassociative algebras, and elsewhere. mula.
In the present book, the aim has been to set The last section of the book is devoted to com-
forth a variety of combinatorial problems in binatorial problems of which there are over 400.
popular form and understandable language. This material has been taken from a variety
At the same time, an attempt is made to present of sources, including Whitworth's Choice and
some rather involved combinatorial problems Chance (London, 1901), John Riordan's An
and to give the reader an idea of the methods Introduction to Combinatorial Analysis (New York,
of recurrence relations and generating functions. 1958), an interesting book by A.M. Yaglom and
The first chapter is devoted to the general I. M. Yaglom entitled Nonelementary Problems in
rules of combinatorics, the rules of sum and an Elementary Exposition (Moscow, 1954), and
product. In the second chapter we investigate variQus collections of problems given at mathe-
permutations and combinations. This traditio- matical olympiads in the USSR.
nally grade-school material is accompanied by
CHAPTER I
SUPERSTITIOUS CYCLISTS
MORSE CODE
WIGWAG CODE
The Morse code is used in telegraph communica-
tions. In this code, the letters, numbers and The navy has a visual signalling system by
punctuation marks are represented by dots and flags, called a semaphore. Each letter is repre-
dashes. Some characters require only a single sented by two flags in a specific arrangement.
12
A4 f F' ~ K4 ;rl ;( z pi
L~ ~ ~ T
~
~ ~
I
2 G v I
RECEIVED OR GO
~ f/ ~
INTERVAL
~ow~~
~ M4r
'f?
3 8 w
D f 4 ~ N~ 9 ~ X
( ""f"
ERRO~J.RE~
n~~
TIMES) ,
E
~
5 ~~
J
, ~
END OF MESSAGE
(REPEATED SEVEilAL
n~~
·..!/
For the most part, an individual letter is dis- ELECTRONIC DIGITAL COMPUTER
played by a pattern of one flag on each side of
the signal-man·. But some of the letters (say Electronic computers are capable of handling
H, 0, X) require both flags on one side. The an enormous range of problems. A single machine
reason is obvious if we examine the formula can decipher inscriptions in an unknown language,
for permutations with repetitions. The point perform the design computations for a dam,
is that each flag has a total of five positions: and process the trajectory data of a space vehicle.
straight down, inclined down, horizontal, incli- How does one account for such versatility?
ned up and straight up. Since we have two flags, Mainly the reason is that all these problems
the total number of combinations of the basic reduce to computations involving numbers.
positions comes to X:= 52 = 25. One position How does such a machine handle so many pro-
has to be omitted (both flags down) since it serves blems involving so many numerical data? How
to separate words. This yields 24 combinations, many combinations of numbers is a computer
which is not sufficient to transmit all letters of the capable of processing?
alphabet. That is why some letters have patterns Let us illustrate this case with a relatively
with both flags on one side. small computer called "Strela" (Arrow). This
13
machine has an immediate-access memory of redundant information-the number of com-
.2,048 storage cells, each one of which can accom- binations is 64 while the number of amino acids
modate 43 binary digits. Each digit is either is only one third that.
.a 0 or a 1. Altogether we have 43 X 2,048 > A single chromosome contains several tens of
> 87,000 distinct positions, and two ways millions of nitrogenous bases. The number of
{0 or 1) the cells can be filled. Using formula (1), distinct combinations which they can form is
we find that the "Strela" can be in any one of more simply horrendous-it is equal to 4N, where N
than 287 ,ooo distinct states. This enormous num- is the number of bases in the chromosome; go
ber is far beyond the limits of our imagination. back to formula (1). A minute portion of these
:Suffice it to say that the number of neutrons combinations has been sufficient to ensure the
packed side by side in a sphere the radius of extraordinary diversity of all living nature over
which is equal to the distance to the most distant the entire span of life here on the planet Earth.
·stellar systems does not exceed 2500 • Note of course that only a very small fraction
If we used just one memory cell, it would of the theoretically possible combinations lead
take nine years for a typist pool of 100,000 wor- to viable organisms.
kers to type out all the numbers that this single
cell can accommodate (we assume they work
~ seven-hour day and do one 43-digit number in GENERAL RULES OF COMBINATORICS
10 seconds).
As we shall soon see, combinatorial problems
offer a multiplicity of types. But most of them
GENETIC CODE can be solved with the aid of two basic rules:
the rule of sum and the rule of product.
Breaking the genetic code has been one of the It is often possible to partition the combinations
most remarkable achievements of twentieth under study into several classes, one combination
•Century biology. Biologists now know how gene- appearing in one and only one class. It is then
tic (hereditary) information is passed on to the clear that the total number of combinations is
:next generation. This information is recorded equal to the sum of the numbers of combtnations
in the form of gigantic molecules of desoxyri- in all classes. This assertion goes by the name of
bonucleic acid (DNA). The various molecules the rule of sum. It is sometimes formulated thus:
.of DNA differ in the order in which four nitro- If a certain object A can be chosen in m ways
genous bases are arranged: adenine, thymine, and another object B can be chosen in n ways, then
guanine, and cytosine. These bases determine the choice of "either A or B" can be accomplished
the order in which the proteins of the organism in m + n ways.
are built up out of roughly twenty amino acids, When employing the rule of sum in this latter
·each amino acid being in the form of a code made formulation, take care to see that no choice
up of three nitrogenous bases. of A should coincide with any choice of B (or,
It is easy to see where the number 3 came from. as we put it at the beginning, that no combina-
Using combinations of two bases, we could code tion should appear in two classes at once). If
only 42 = 16 amino acids, which is not enough. there are such coincidences, then the rule of sum
Using three bases, we get 43 = 64 combinations, breaks down, and all we have is m +n- k
which is far and away sufficient to encode choices, where k is the number of coincidences.
some twenty amino acids. The intriguing ques- The second rule, called the rule of product, is
tion is how nature takes advantage of so much somewhat more complicated. When making up
14
combinations of two objects, it is often known It may, of course, happen that we need com-
in how many ways the first object can be chosen binations of more than two elements (objects).
and in how many ways the second one, the Then we arrive at the following problem.
number of ways of choosing the second object How many k-arrangements can be made if the
being independent of how the first object was first element can be one of n1 distinct objects, the
chosen. Suppose the first object can be chosen second, one of na distinct objects, and the kth, one
in m ways, the second in n ways. Then the pair of nk disttnct objects. Here, two arrangements are
can be chosen in mn ways. To put it differently: considered distinct if at least one position is occu-
If an object A can be chosen in m ways and if, pied by different elements.
after every such choice, an object B can be chosen This problem is solved in the same way as the
in n ways, then the choice of the patr (A, B) in that problem of the cyclists. The first element may
order can be accomplished in mn ways.
To prove the rule of product, note that each
one of the m ways of choosing A can be combined
with n ways of choosing B, which brings us to mn
ways of choosing the pair (A, B).
The rule of product can be pictorialized as
follows:
Table 1
08 Fig. 1.
CHECKERBOARD PROBLEMS
Solve the following problem.
In how many ways can two checkers (or draughts) (a)
'(white and black) be placed on a checkerboard
so that the white can take the black?
(b)
Fig. 3. Fig. 4.
By the rules of the game, the pieces are placed
.on black squares and one checker take& another is 4. Finally, if white has become a king on
by jumping over it and occupying the next square square h8, then there are 6 positions in which
(Fig. 3). If the piece reaches the last row, it beco- black is under attack by the king.
mes a king and can take all men on the same It is therefore simpler to indicate for each
.diagonal except those on the end squares. position of white the number of possible positions
This problem is complicated by the fact that of black and add the results obtained. Fig. 4a
ior different positions of white there are different shows a checkerboard with the appropriate figures
17
lem to one that has already been solved. To do
this, let us find the total number of positions
for placing white and black on the board. White
can be placed on any one of 32 black squares.
That leaves 31 squares for black. Thus, by virtue
of the rule of product, the arrangement is pos-
sible in 32 X 31 = 992 ways. But these include 87
in which white can take black, and 87 in which
black can take white. We have to reject
2 X 87 = 174 ways. However, we must take
into consideration that in doing so we have
rejected some of the ways twice: because white
can take black and because black can take white.
We have seen that there are 50 positions in
which both men can take each other. Consequent-
ly, the number of positions in which neither
man can take the other is
92-174+~0=868
... t
;:.~ poin s
This equality can be proved directly, without
resorting to the formula kl C!:_ =A~. To do this,
arrange. ~n order all n elements that make up
the combinations, and label each combination
by an n-arrangement of zeros and ones. Namely,
if some element appears in a combination, then
we put a 1 in its place, if it does not appear, we
write a 0. For example, if we are making up com-
binations of the letters a, b, c, d, e, f, g, h.
i, j, k, l, then the combination {a, c, g, i, j}
will be associated with the arrangement
1 0 1 0 0 0 1 0 1 1 0 0 and to the arrangement
0 1 1 1 0 0 1 0 0 1 0 0 there will correspond the
combination {b, c, d, g, j}. Clearly, to each
k-combination there corresponds an arrangement
of k ones and n - k zeros, and to each arrange-
ment of k ones and n - k zeros there corresponds
The formula for the number of combinations some k-combination, distinct k-combinations
is readily obtained from the earlier derived corresponding to distinct arrangements. Hence
formula for the number of permutations. Indeed, it follows that the number of k-combinations
let us first consider all k-combinations of n ele- of n elements coincides with the number of per-
ments, and then let us permute the elements mutations of k elements of one type (ones) and
of each combination in all possible ways. We n - k elements of another type (zeros).
get all the k-permutations of n elements taken Using formula (6) it is easy to solve the problems
one at a time. But it is possible to produce kl given at the beginning of this section. The number
permutations out of each k-combination; the of distinct outcomes in the semifinals of the
number of these combinations is equal to C!:_. chess championship is given by the formula
The following formula is thus true:
k ·iCkn =Ann q 0 = 3 ~~!7! -= 1,140
From this formula we find that The number of distinct "sad" outcomes of the
footb~ll championship is
(6) Cf 7 = 41:;!
1 = 2,380
It is a remarkable fact that the equation we Here is another problem involving combina-
derived coincides with the formula for the tions:
number of permutations of k elements of one type In how many ways is it possible to place 8 rooks
and n-k elements of a second type: on a chessboar& Unlike the problem examined
nl on page 23, here the restriction that the rooks
p (k, n- k) = kl (n- k)l are nontaking is lifted. All we have to do is to
29
choose any 8 squares of the 64 squares of the
chessboard. This can be done in
3-59
Therefore the first class includes C~:-11 combina- where the sum is extended over all partitions
tions. The combinations of the second class are of the numbers n into k integers (with regard
k-combinations made up of (n- 1.) elements for the order of the integers).
a 1, ... , an-t· And so there are C~_1 of them. Now consider m-combinations (with repeti-
Since any k-combination of the elements tions) consisting of elements of n + 1 types.
a17 • • • , an belongs to one and only one of these say n + 1 letters a, b, c, ... , x. There are
classes, and the total number of such combina- C~+t = C~m such combinations. Split all
tions is C~, we arrive at equation (11). these combinations into classes, placing in the
A similar proof is used with respect to the kth class the combinations in which the letter
relation 11. occurs k times; the remaining m - k places
may be occupied by the remaining letters
C~+C!+C! + ... +C~=2n (12)
b, c, ... , x, the number of which is n. There-
Recall that 2n is the number of n-permutations fore, the kth class includes as many combina-
of elements of two types with repetitions. Split tions as there are (m - k)-combinations (with
these permutations into classes, referring to the repetitions) which can be formed from elements
kth class those involving k elements of the first of n types, that is, c:+~-k-1· Thus, the total
type and n - k elements of the second type. number of such combinations is equal to
The permutations of the kth class are all possible
permutations of k elements of the first type and c:+m- 1 + c:+.!- 2+ ... + c! + c~_ 1
n- k elements of the second type. We know
that the number of such permutations is On the other hand, we saw that this number is
p (k, n- k) and P (k, n- k) = C~ (see pages 26 equal to c:+m· We have thus proved the equa-
and 2 8). Which means that the total number of per- tion
mutations of all classes is equal to c~ + c~ +
+ ... ·+ C~. On the other hand, this same C~_ 1 +C!+c;+ 1 + ... +C:+m-t =C:+m (15}
number is equal to 2n, which completes the Replacing n by n+1 and m by m-1 and using
proof of (1.2). (10), we find that
In exactly the same way we can prove that
~+C~+t +~+2+···+C~+m-t =C~+!t (16)
~ p (nt. n2, ng) =an (1.3)
n1+n2+n3=n Particular cases of formula (16), for n =
where the sum is extended over all partitions of = 1, 2, 3, are
the number n into three integers [the order of the 1+2+ ... +m= m(m2+1) (17)
integers being taken into account; for example,
both P (n1, n 2 , n 3 ) and P (n2 , na, n1) are counted]. 1 x2+2x 3+ ... +m (m+i)=
To prove this, we have to consider all n-permuta- m(m+1)(m+2)
tions of elements of three types and split them (18)
3
into classes of the same composition (that is to
1 X 2 X 3+2 X 3X4+ ... +m (m+1) (m+2)=
say, we take permutations with one and the
same number of elements of the first type, of the m (m+1) (m+2) (m+3)
(19)
second type and of the third type). 4
Generally, we have the equality Using formulas (17) to (19), it is easy to find
~ p (nt' ... ' nk) = kn (14) the sum of the squares and the sum of the cubes
nt+···+nk=n of the natural numbers from 1 to m. Formula (18}
35
may be rewritten as From this it follows, by the rule of product,
12+22+ ... + m2+1+2+ ... +m= that C~C~-=:l combinations are included in the
kth class. Adding up the number of combinations
m (m+1) (m+2)
of each class, we find the total number of m-com-
3
binations (with repetitions) of elements of n types
But from formula (17) m . '
or Cm+n-1· Such IS the proof of the equality
m (m+1)
1+2+ ... +m= 2 c!c~_ 1 +C!c;,_ 1+ ... +C~c~-:::..\ =c;::+n- 1
and so (22)
The identities obtained above may be genera- This identity can readily be verified combinato-
lized. To do this let us consider a set consisting rially. To do this, take n distinct elements, select
of elements of q types: n1 elements of the first k elements from among them, and from the
type, n2 elements of the second type, ... , n11 remaining n - k elements choose another set
elements of the kth type; elements of one type of m- k. We thus get an m-combination of
are distinct (for instance, the type is determined n elements. For k fixed, this process can be car-
by the colour of an object while objects of the ried out in c~c;r:.=-: ways. It is easy to verify
same colour have different shapes). then that each of the C~ combinations is obtai-
Let us form all possible m-combinations of the ned in C~ ways. Whence follows the equality
elements of this set and let us classify them as (29).
37
Write (29) for k = 0, ... , m and combine And so in this case the principle of inclusion and
the resulting equalities. Since, by (12), exclusion yields the following formula:
C~+ c:n + ... + c:;:= 2m N< 0 >=N-C~N< 1 >+c;.N< 2 >- ...
we get • . • + ( -f)nC~N(n) (32)
C~C~+C~C~:::l+ ..• +C~C~-m=2mC~
or ALTERNATING SUMS
Cnocn-m+c1rm-m+
n n(..n-1 ••• OF COMBINATIONS
Now let us derive some further properties of
combinations. These properties are much like
the ones proved earlier, but differ from them
in that the signs of the terms vary-they alter-
A PAR:TICULAR CASE
nate from plus to minus to plus, etc.
OF THE PRINCIPLE
The simplest of these formulas is
OF INCLUSION AND EXCLUSION
C~-C~+C;- ... +(-f)nC~=O (33)
Many properties of combinations are derived
on the basis of the principle of inclusion and This identity follows from equality (11). In
exclusion (see page 18). We will need a special order to prove this, note that C~ = C!-1 = 1.
case of this formula (the inclusion and exclusion Replace the first term by C~_ 1 and note that,
formula). Let the number N (a:1 • • • a:k) of ele- by (11), C~_ 1 - C~ = -Ctr Furthermore, we
ments possessing the properties et~o • • . , a;k have - C!_1 + c; = C~_ 1 and so on. All terms
be dependent not on the properties themselves but finally cancel out.
only on their number, that is, let This formula may be proved combinatorially.
N (ett) = ... =N (a:nj, Write out all combinations of the n elements
a1o ••• , an and make the following transforma-
N (a:1a:2) = N (a:1a:3) = ... = N (a:n-tetnj,
tion: to a combination not containing the letter
N (ettet2et3) = N (ettet2a:~) = ... = N (a:n-2etn-tCtn) a 1 adjoin this letter, and delete it from combina-
and so on. Then all the terms in the sum tions in which it appears. It is easy to check
N (ett) + ... +N (an) are equal to one and that again we thus obtain all the combinations,
and, in this instance, one at a time. However,
the same number, which we denote by Nm.
Since there are n terms in this sum, it is equal in the given transformation, all combinations
to nN<ll = C!Nu>. In exactly the same way having an even number of elements turn into
we prove that combinations with an odd number of elements,
and conversely. Hence, there are just as many
N {ettet0 + N {etteta) + ... + N (a:n-tetn) = C!N< 2 > combinations with an even number of elements
where N<2> = N (a: 1a: 2) and, generally, as there are with an odd number (we include
N {ettet2 ... a:k) + ... the empty combination which has no elements).
That is what formula (33) expresses.
· · · +N (a;n-k+l ••. etn) =C!N<k> (31)
Now let us prove a more complicated formula:
[it is clear that the sum (31) is extended naturally cOcm
over all possible combinations of k properties n n - ctcm-1+C2C!!"-2
n n-1 n n-2- • • •
out of n]. ••• +(-1)mC~C~-m=0 (34)
38
Consider m-combinations of the n elements number of (m - k)-combinations (with repeti-
a" •.. , an. Denote by (a" ••. , ak) the pro- tions) of elements of n types, that is, N (a1 , • • •
perty of a combination to definitely include the ..• , ak) = c:::+!-k-1· Furthermore, the total
elements a 1 , ••• , ak. The number N (a" ••. , ak) number of m-combinations with repetitions is
of such combinations is equal to c:;:_::kk (here, equal to CJ:+m-t and there are no combinations
k positions are occupied by the elements not possessing a single property (ak), 1 ~ k ~ n.
a" .•. , ak, and the remaining m- k positions Substituting the values N< 0 > = 0, N = c:::+m-h
have n- k aspirants). The total number of
N<k>=c:::+!-k- 1 thus found into the formula
com~inations is C~, and there are no combina-
tions devoid of any one of the properties we arrive at the identity (35).
Finally, let us prove the identity
(a1), ••• , (an)-every m-combination has some
quantity of elements. Therefore, in our case, nm-C~ (n-f)m+C~ (n-2)m- ...
N = cr.;:, N< 0 > = 0, N<k> = c:;:_::kk· Substitut- ... + (-f)n-1 c~- 1 .fm=O (36)
ing these value~!. into (32), we arrive at the iden-
tity (34). which holds for m < n.
The following relation is proved in exactly To do this, consider the m-permutations (with
the same way: repetitions) of n distinct elements and denote
by (ak) the property of a permutation not to
cOcm c1cm-1 -l-C2cm-2 include elements of type ak. Then N (ah . . . , ak)
n n+m-1- n n+m-2 ' n n+m-3
is the number of m-permutations (with repeti-
... +(-f)nC~c~:1=0 tions) that do not contain elements of the types
if m > n, a 1 , ••• , ak, that is, the number consisting of
cOcm c1cm-1
n n+m-1- n n+m-2
+ •· • n - k types of elements ak+h ... , an- Now
the number of such permutations is equal to
... +(-f)m c~c~-1 =0 (35) (n- k)m. Thus, N<k> = N (ah •.. , ak) =
if m< n = (n - k)m. The total number of permutations
Namely, we consider m-combinations (with (32), is nm.
repetitions) of n kinds of elements a11 a 2 , ••• , an Finally, there are no permutations not pos-
and denote by (ak), 1 <.k<.n, the property sessing a single one of the properties (a1), •••
of a combination to include elements of the kind ... , (an). Indeed, if a permutation does not
ak (and, possibly, elements of other kinds). possess a single one of the properties (ak), then
Then N (a 1, • • • , ak) is the number of it contains elements of all n types. But this
combinations that definitely include elements is impossible because the number m of elements
of the types a 1 , • • • , ak. It is possible to elimi- in a permutation is less than n. And so N< 0 > = 0,
nate from each such combination one element and we arrive at the identity (36).
each of the types a" ... , ak· As a result, we We have proved a number of relations for the
get some (m - k)-combination (with repetitions) numbers c!. They can be proved in other ways.
of n types of elements a" ... , an· Now, con- In Chapter V we will examine geometric proofs
versely, by adding to the (m- k)-combination of these relations, and in Chapter VII we will
(with repetitions) of elements a" .•. , an one give the most powerful proof, the method of
element each of the types a 1 , •• , ak, we get generating functions. With this method we can
an m-combination which definitely has the prove not only all the relations of the present
types ah ... , ak. From this it follows that chapter, but also a wide range of other inte-
the number N (a1 , • • • , ak) is equal to the resting relations.
CHAPTER III
A BOOKSHELF PROBLEM
0.6 Fig. 9.
tations in which exactly one element remains
fixed, 10 X 43 = 640 permutations in which
exactly two elements remain fixed, 10 X 42 =
= 160 in which three remain fixed, 5 X 4 = 20
in which four remain fixed, and 1 X 4° = 1
average, be guessed correctly. If a trend is revea- in which five remain fixed. This yields
led in which a larger number of figures is guessed, 1,024+ 1,280+640+160+20+1 =3,125
then a detailed investigation is called for to find
out whether the person is cheating (as is often permutations, which is in accord with the for-
the case) or whether he actually doeo;; possess mula
certain capabilities. Ag=5o=3,125
44
Guessing at random, we get a correct answer The number of permutations in which exactly r
(on the average) of elements remain fixed and the remaining n - r
change their positions, is given by the formula
1,280+640x2+160x3+20x4+1x5 =1
3,125 (4)
The answer is the same: in random guessing we Indeed, it is first necessary to choose which
pick one correct figure out of five, irrespective r elements remain fixed. This can be done in
of whether repetitions are allowed for or not. C~ ways. The remaining n - r elements can
However, the distribution of the number of cor- then be deranged in any way so long as none occu-
rectly guessed figures will be different, as we pies its original position. This can be done in
can see from the table below. Dn-r ways. By the rule of product, we see that
the total number of desired permutations is
Number of cor-
Without With equal to C~.Pn-r·
rectly guessed
figures repetitions repetitions Let us partition all permutations into classes
depending on the number of elements that remain
fixed under a given permutation. Since the total
0 0.366 0.328 number of permutations is nl, we get the identity
1 0.375 0.410
2 0.167 0.205 n n
3 0.083 0.051 nl= ~ Dn,r= ~ C~Dn-r (5}
4 r=O r=O
0 0.006
5 0.009 0.000 A different identity relating n! and the num-
bers Dn,r is obtained in the following manner.
Take all n! permutations of the elements
a11 • • • , ~ and compute the number of numbers
GENERAL PROBLEM
that remained fixed in all these permutations.
OF DERANGEMENTS
This computation can be done in two ways.
(may be skipped in a first reading) Firstly, note that if, say, element at is in its
position, the remaining elements can be per-
We solve the general problem of derangements
muted in Pn-t = (n - 1)! ways. Therefore,
in the same way as the foregoing problems: find
element at resides in first position in (n - 1)!
the number Dn of derangements of n elements in
permutations. So also, element a 2 is in second
which not a single element remains tn its original
position in (n - 1)! permutations, etc. In all,
position. The answer is given by the formula
we obtain n (n- 1)! = nl elements holding
Dn = Pn- C~Pn-1 + C!Pn-2- ... + (-1)n c: their positions. But the number of these ele-
1 1
=nl [ 1 -11+21-" · +
(-1)n
nl
J (3)
ments can be computed differently. The number
of permutations of class r, that is such that r ele-
ments are in their proper places, is equal
The reader familiar with the theory of series to Dn,r· Each such permutation yields r fixed
will recognize, in the brackets, the partial sum elements. Therefore, the total number of fixed
of the expansion of e-1. elements in the permutations of class r is equal
n
Generalizing formula (3) to the case of n = 0,
to rDn ,,. and in all we get~. rD0 r fixed elements.
we find that it is natural to a5i1ml~ Dll ~ A
45
'This proves the identity Besides,
n n (-1)n-l(n-1)=n! [ <;;!l;~!l +(~~)n]
.n!= ~ rDn, r= ~ rC~Dn-r (5')
r=O r=O And so
We can solve the following problem by apply-
ing the principle of inclusion and exclusion:
find the number of permutations of n elements in
.which r given elements are deranged (the remain-
ing elements may either be deranged or fixed
in their natural positions). The answer is given
by the formula Relation (8) that we have just proved can, if
.n!- q (n-1)1-t-q (n-2)!- ... we follow Euler, be derived by means of purely
... -t--(-1)r(n-r)! (6) combinatorial arguments. Consider all permuta-
tions in which all elements have been deranged
(derangements). Any element, except the first,
can occupy the first position in such derange-
.SUBFACTORIALS ments. Since the number of remaining elements
(may be skipped in a first reading) is n - 1, it follows that Dn derangements can be
split up into n - 1 groups according to the ele-
Some authors use the term subfactorials for the ment that occupies the first position. It is clear
numbers Dn. These numbers have much in com- that all groups will have the same number of
mon with ordinary factorials. For instance, the elements.
following equality holds for factorials: Let us compute the number of elements in one
n!=(n-1) [(n-1)!+(n-2)!] (7) of these groups, say in the group where the first
Indeed~ position accommodates the second element.
This group is then split into two parts: those
{n-1) [(n-1)!+ (n- 2)!] = (n-1) (n- 2)! n=n!
with first element in the second position, and
Now we will show that this equation holds all the others. If the first element takes the second
true for the subfactorials Dn as well; that is, position (and the second, as we recall, the first
that position), then the remaining n - 2 elements
Dn=(n-1) [Dn-!+Dn-21 (8) may be permuted in any fashion so long as not
one of them occupies its natural position. This
Replace Dn-! and Dn- 2 by their expansions ac- can be accomplished in Dn_ 2 ways, which means
cording to (3). Separating the last summand in the first part consists of Dn _2 derangements.
the expression of Dn-l• we find that Let us show that the second part consists of
(n-1) [Dn-1+Dn-2l=(n-1) [(n--1)!+-(n-2)!] Dn-i derangements. Indeed, the second part will
include all derangements in which the first ele-
r 1 1 1
X l1-1f+2f-3f+ ... ment does not stand in the second position, and
... +
( -1)n-2
(n- 2)!
J
+(-1)n-1 (n-1)
the remaining elements are deranged. If we
temporarily consider the second position "proper"
for the first element, then it turns out that the
But, by (7) first, third, fourth, ... , nth elements do not
(n-1) [(n-1)!+(n-2)!]=n! reside in their proper positions. Since there are
46
n - 1 such elements, it follows that there are the second to the last, No. 2, and so on. We hav&
Dn_ 1 derangements in the second part. But then to find all the permutations of the numbers 1
the entire group consists of Dn_ 2 +
Dn-1 deran- through 9 in which there are no pairs like (1, 2),
gements. Since the whole set of derangements (2, 3), (3, 4), (4, 5), (5, 6), (6, 7), (7, 8), (8, 9).
consists of the (n - 1) st group, it includes Now we again apply the principle of inclusion
(n - 1) Wn- 2 + Dn- 11 derangements. This pro- and exclusion.
ves equation (8). First compute the number of permutations
From formula (8) it follows that including the pair (1, 2). In such permutations,
we can take the pair to be one element, and so
Dn- nDn-t=- [Dn-t-(n-1) Dn_ 2 ]
the total number of elements will be 8 instead
And so as n varies, the expression Dn - nDn_f of 9 and the number of permutations containing
only changes sign. Applying this relation several (1, 2) is P 8 • We get the same result for all
times, we find that 8 pairs.
Now let us consider the permutations con-
Dn-nDn-t=(-1)n-2 (D 2 -2Dt] taining two given pairs. In this case we combin&
But D 2 = 1 and D1 =0, and so the elements that enter into each of these pairs.
Dn= nDn-t+( -1)n (9) And if both pairs contain one and the same ele-
ment [say, the pairs (1, 2) and (2, 3)], then w&
This formula resembles the relation n! = n (n -1)1 combine all three elements, otherwise [say
for factorials. for (1, 2) and (5, 6)) we combine two elements at
Let us write down the values of the subfacto- a time. In both cases, there will be 7 new ele-
rials for the first 12 natural numbers. ments after the combining process (part of them
n Dn n Dn n Dn n Dn represent a pair or triple of the original elements}
1 0 4 9 7 1,854 10 1,334,961 which can be permuted in P 7 ways. Now, two
2 1 5 44 8 14,833 11 14,684,570 pairs can be chosen from 8 pairs in C2 ways.
3 2 6 265 9 133,496 12 176,214,841 hi exactly the same way we prove that th&
number of permutations containing k given
pairs is P 9 _k. Here, k pairs may be chosen in
C~ ways. Applying the principle of inclusion
CARAVAN IN THE DESERT
and exclusion, we find that the number of per-
A caravan consists of 9 camels. The journey has mutations not containing a single one of th&
been in progress for many days and, finally, eve- given pairs is
ryone is tired of seeing the same camel in front of
him. In how many ways can we permute the camels Pg- ClPs + qP7- qp6 + C3Ps- qp 4 + qp3_
so that each one has a different camel in front
of him? -qP2+C 88Pt =81 rl_9-1f+2f-3f+4f-
8 7 6 5
Such permutations surely exist. Say, we could
4 3 2 1
reverse the order of the camels so that the last
is first, etc. As the Arab proverb goes, "when
- 51+ 61 -7!+8! = 148,329 J
~
•.. +
(-1)n-1
(n-1)!
J (10)
1 1 (-1)n-1]
=n! [ 1-11+2!- ... + (n- 1)! = nDn-1
... +
(-1)n-1
(n-1)! +
J+
(-1)n
n!
It would be interesting to substantiate the-
answer obtained, Fn = nDn_ 1 , with a purely
combinatorial argument.
+(n-1)![1--h-+ ir - ...
"· +
(-1)n-2 (-1)n-1
(n-2)! + (n-1)!
J
MERRY-GO-ROUND
[we added one term-the last one- in each of the
brackets; it is obvious that these terms cancel There are n children on a merry-go-round. They·
out since they turn into (-1)n and (-1)n-t res- decide to change places so that somebody else is in
pectively when the brackets are removed!. But front of each one. In how many ways can they
the first term is precisely Dn, while the second achieve this?
one is just Dn _1 • Therefore The problem is like the caravan problem we just
En=Dn+Dn-1 (11) solved. This time, however, the number of for-
bidden pairs is equal to n; the following pairs
Thus, the number of permutations of 1, 2, 3, ... do not occur: (1, 2,) (2, 3), ... , (n- 1, n) and
that do not contain a single one of the pairs (n, 1). Besides, permutations obtained one from
(1, 2), (2, 3), ... , (n- 1, n) is equal to Dn+Dn_ 1 • the other by reseating the children circularly
In exactly the same way we can prove that will be dropped since they make no difference-
the number of permutations of n elements that when the merry-go-round is in motion. Therefore~
exclude given r -< n - 1 pairs, is out of k elements we can generate only Pk-1 =
Pn-CWn-t+qPn-2- ... +(-1)rCfPn-r (12) = (k - 1)! essentially distinct permutations.
Finally, the new problem provides for permuta-
The answer is different if the number of for- tions in which all n pairs are included. Such,
bidden pairs is greater than n - 1. Suppose, for for example, is the original permutation. Taking
instance, that in addition to the pairs (1, 2}, all these circumstances into account, we see,
48
STANDING IN LINE AT
A TICKET OFFICE
There is a line (queue) of m + k persons at the
ticket office of a cinema. m have roubles, k have
fifty--coprtck pieces. A ticket costs 50 copecks and the
cashier has no change to begin with. In how many
ways can the people line up with roubles and
50-copeck pieces so that the line keeps moving and
no one has to wait for change?
For example, if m = k = 2, then there will
only be two favourable cases: frfr and ffrr, where
f stands for 50-copeck coins and r for roubles.
In four cases-rrff, rfrf, rffr and frrf-therl' is
a hold-up; in the first three cases, the first person
in line does not get his change, and in the last
instance, the third in line has change trouble.
When the values of m and k are small, the
problem can be solved just by running through
the cases. But if m and k are relatively large,
by applying the principle of inclusion and exclu- this will not do, because, as you will recall, the
sion, that the number of desired permutations is number of distinct permutations of m roubles
Qn=Pn-1-C~Pn-2+C~Pn-3- ... and k 50-copeck coins is equal to
... +(-1)n-I c~- 1 P 0 +(-1)nC~ (14) p ( k)= (m+k)!
m, m! kl
It is easy to verify that this expression may
be written as If, say, m=k=20, then
Qn=Dn-1-Dn-2+Dn-3- ... +
(-1)n- 3 D 2 (15) 40!
p (20, 20) = 20! 20!
True enough, from (14), by virtue of the equ-
ality C~-C~=i=C!_ 1 it follows that for n)d which is a number exceeding 100,000 million.
Let us derive a formula that expresses the num-
Qn+Qn-1=Pn-1-C!_1Pn-2+C;_1Pn-3- ... ber of desired combinations in terms of m and k •
... +(-1)n What we need is to find the number of permuta-
Now this expression is equal to Dn- 1 (see tions of m r's and k f's having the following pro-
+
page 45). Thus, Qn Qn-1 = Dn+ Besides, perty: for any d, 1 -:(: d -:(: m + k, the number
from (14) it follows that Q2 =0. We thus have off's in the first d terms of the permutation is not
less than the number of r's (the f's must not be
+
Qn Qn-1 = Dn-1>
fewer thau the r's, for otherwise the line would
-Qn-1-Qn-2= -Dn-2•
come to a halt).
Qn-2 + Qn-3 = Dn-3• It is clear that for the problem to be solvable,
it is necessary that the condition m -:(: k be met,
( -1) n-3 Q3 = ( -1) n-3 D 2 otherwise there will be a stop due to a lack
Adding these equalities, we arrive at the rela- of 50-copeck pieces for change for those who have
tion (15). only roubles. We therefore assume that o-<:
m -:(:k.
49
tion in the line, we say that this is being done
to get change). We have a permutation of m
r's and k + 1 f's, the first letter of the permuta-
tion being f and the same number of r's and f's
among the first 2s +
2 letters (there were s f's
and s + 1 r's, we added one f and evened the
score).
We now undertake an operation that will
displease the rouble owners and please the
50-copeck piece owners: in the first 2s + 2 posi-
tions, we will change the r's to f's and the f's
to r's. To illustrate, suppose the line was of this
form,
f rfrfrrfrrffrffr
It will stop at the bold-face r. After an f is pla-
ced in front, and the above-described operation
is completed, the line looks like this:
rrrfrfrffrffffrffr.
As in certain other combinatorial problems, it is Since in the first 2s +2 positions there were
better, here, to seek the number of "unfavourable" identical numbers of roubles and 50-copeck
cases, that is, cases where there is an interrup- pieces, there will be no change in the total num-
tion in the movement of the line due to a lack ber of coins of each kind, and we get a permuta-
of change. If we find that number, then, subtract- tion of m r's and k + 1 f's. This time the first
ing it from the number P (m, k) = C~+k of all letter is r. Thus, we associated with each "unfa-
permutations of m r's and k f's, we will have vourable" sequence of m r's and k f's a sequence
the answer to our problem. of m r's and k +1 f's beginning with the let-
Let us first prove the following assertion: the ter r.
number of unfavourable cases for permutations We will now demonstrate that in this way it
of m r's and k f's is equal toP (m- 1, k + 1) = is possible to obtain any sequence of m r's and
= C~1k• that is, to the number of all permuta- k + 1 f's beginning with the letter r. Indeed,
tions of m - 1 r's and k + 1 f's. The proof take such a sequence. Since we assume that
is this. Take any unfavourable permutation of m <: k, there will be a position at which the
m r's and k f's. Let the line stop moving at some letters f and r even out. If, up to this position,
point. Then up to this point there will be an we replace all f's by r's and all r's by f's and
identical number of f's and r's (all 50-copeck drop the first letter f, then we get an unfavourable
coins will have gone to rouble owners), and we arrangement of roubles and 50-copeck pieces in
have the letter r standing here (otherwise the the line. The line will stop moving at precisely
line would continue to move). that position where, in the given sequence, the
The position at which the hold-up occurred is number of letters f and r is the same for the first
of the form 2s + 1; in front of this position time.
there are s f's a~d s r's. Now place the letter We have thus established that the number of
f in front of our permutation (if there is agita- unfavourable distributions of roubles and 50-copeck
4-59
50
pieces in a line is exactly equal to the number of all sons with 50-copeck pieces were placed at the
permutations of m r's and k + 1 f's, the permuta- head of the line. The problem can therefore be
tions beginning with the letter r. If we discard the restated as follows:
first letter, we get all possible permutations of There are k + q persons in line with 50-copeck
m- 1 r's and k +1 f's. Now the number of pieces and m persons with roubles, the first q posi-
such permutations is tions being occupied by those with 50 copecks. In
how many cases will no one have to wait for
P (m-1, k-t-1)=C~+~ change?
Thus, the number of unfavourable permutations This problem can be solved in the same way
is equal to cr;::.f:.,_. Since the number of all per- as the above particular case for q = 0. We shall
mutations of m r's and k f's is C~+"-• the number seek the humber of unfavourable cases. In each
of favourable permutations is given by the such case, the interruption will occur at the
formula person holding a rouble, in front of whom are the
same number of s roubles and 50-copeck pieces.
(16) Now put one person with 50 copecks at the head
of the line and give roubles for 50-copeck pieces
In particular, if k = m, i.e. if there is the
same number of roubles and 50-copeck pieces
to the first 2s+ 2 persons in line (also replace
roubles with 50-copeck pieces). What we get is
in the line, then it will move on in k-~ 1 c~,_ a permutation of m roubles and k + +q 1
50-copeck pieces, the first q + 1 positions being
cases and will come to a halt in k ~ 1 c~,_ cases. roubles. Here, any such permutation can be uni-
Thus, the greater k is, the smaller the percentage quely obtained from the unfavourable arrange-
of favourable cases. ment of roubles and 50-copeck pieces. But the
That completes the solution of our problem. first q + 1 roubles can be dropped and then we
Let us now consider a related problem. Namely, get all possible permutations of m - q - 1
assume that the cashier had foreseen trouble and roubles and k + +q 1 50-copeck pieces. Now
has put q 50-copeck pieces in the register at the the number of such permutations is P (m - q -1.
start. In how many cases will a line move without k + + q 1) = C~+-~- 1 • We have proved that
interruption if it consists of m rouble-owners and in the problem at hand there are c~.:;::g_- 1 unfa-
k 50-copeck piece owners? vourable permutations. And since the total num-
It is clear that if m <: q, then the line will ber of permutations is c~+k' the number of
most likely go smoothly since the reserve of favourable permutations is given by
50-copeck pieces in the register at the start will
suffice to satisfy all change-giving operations. (17)
But if m > k + q, then the line is sure to come
The foregoing approach enables one to solve
to a halt: there will not be enough 50-copeck
coins in the cash register and in the line to handle many other problems. For example, using it.
the situation and give change to all those with we readily obtain the following results.
roubles. We can therefore confine ourselves to If m < k, then the number of permutations of
a consideration of the case when m r's and k f's such that in front of each letter
(except the first) there are more f's than r's is
q<m<:k+q equal to '
We further assume that q 50-copeck pieces em -cm-1 - k- m em
m+R.-1 m+k-1 - - - k - m+k-1 (18)
appeared in the cash register because q new per-
51
The reasoning is the same as before, only we do suppose someone takes up the kth position in the
not need to add an f at the beginning. second rank. Then there will only be k - 1 taller
This formula holds true for m < k. But if persons among the rouble-holders. Among the
m = k, then the number of permutations with holders of 50-copeck pieces there will be at least
the indicated property is equal to ~ c~;.:z. k persons taller (the one in front and all persons
to the right). So when he comes up to the cashier,
This is easy to see. Each such permutation must there will be at least one 50-copeck piece availab-
begin with the letter f and terminate with r. le, and he will get his change.
If we drop these letters, we get a permutation Conversely, suppose we have an arrangement
of k - 1 r's and k - 1 f's. The line will clearly of n persons with 50-copeck pieces and n persons
move along without a hitch for that permuta- with roubles in which the line proceeds without
tion. Conversely, a permutation with the pro- stopping. Without any loss of generality, we can
perty we need is obtained from each permutation take it that all 2n persons are standing according
of k - 1 f's and k - 1 r's, for which the line to height. Now select all holders of 50-copeck
moves without stopping, by adding the letter f pieces and put them according to height in the
at the beginning and the letter r at the end. But first rank, and rouble-holders in the second rank.
the number of permutations of k - 1 f's and We leave it to the reader to verify that the resul-
k - 1 r's for which the line moves without stop- ting arrangement satisfies the hypothesis. From
. . . 1 ck-1
pmg ts preCise1y k 2k-2· this it follows that there are as many possible
arrangements as there are favourable permuta-
tions of n f's and n r's, that is, n~ 1 qn.
THE PROBLEM OF THE TWO RANKS
It often happens in combinatorial mathematics NEW PROPERTIES OF COMBINATIONS
that two disparate, at first glance, problems (may be skipped in a first reading)
reduce to one another. Consider the following
problem. The formulas developed in the preceding sec-
In how many ways is it possible to arrange 2n tions enable us to establish some more properties
persons of different height in two ranks of n persons of the number of combinations C~ (see page 33).
each so that in each rank they stand according to To do this split into classes all the "unfavourable"
height and, besides, so that each man in the first permutations of m r's and k f's. We have seen
rank is taller than the man behind him in the that for such permutations the line comes to
second rank? a halt at the position with the number 2s + 1;
We will demonstrate that the solution of this note that in front of it are s r's and s f's, the
problem reduces to the problem already solved position itself being occupied by the lettc:>r r and
of the ticket line. Put all persons in two ranks the line moving without interruption up to that
as required and give a 50-copeck piece to each position. Put in the sth class all unfavourable
one in the first rank and a rouble to each one in permutations for which there is a halt at the
the second rank and then arrange them by height position 2s + 1. Clearly, s can assume the
in a single file: We get a line of n holders of values 0, 1, 2, ... , m- 1.
50-copeck pieces and n holders of roubles. From Find the total number of permutations which
the statement of the problem, it follows that enter into the sth class. In the first 2s positions
the line moves without interruption. Indeed, there can be any favourable permutations of s r's
4*
52
and s f's; this is because the line does not stop piece. Let us split up all favourable permutations
until the position 2s + 1 is reached. We have into classes, putting in the sth class all permuta-
seen that the number of such permutations is tions in which the cashier does not have a single
50-copeck piece for the first time at the position
8: 1 C~ 8 At the position 2s + 1 we haver, after 2s, s = 1, 2, ... , k.
which comes any permutation of the remaining Let us find the number of permutations in the
m - s - 1 r's and k - s f's. The number of sth class. Each such permutation splits up into
these permutations is P (m - s - 1, k - s) = two parts. The first 2s letters form a permutation
= C~:t'k":_2s-1· Thus, by virtue of the rule of of s f's and s r's such that each letter is preceded
product the number of unfavourable permuta- by more f's than r's (otherwise the equalization
tions of the sth class is would have occurred before the position 2s).
1 C' cm-s-1
We have seen that there are is c2;~ 2 such permu-
s+i 2s m+k-2s-1 tations (see page 51). After the sale of the first 2s
tickets the cashier has no change. Thus, if the
Since the total number of unfavourable permuta-
line is to move without interruptions, the last
tions is C~1k and the number of classes is equal
k - s r's and the k - sf's must form a favourable
to m- 1, we get, for m -<
k, the relation
permutation. But there are k _ !+ 1 C~k"~2s such
C Ocm-1 + 1 c1cm-2 + 1 c2cm-3 +
0 m+ll.-1 2 2 m+ll.-3 3 4 m+ll.-5 · '· permutations (see page 50). By the rule of pro-
duct, we see that there are
+m
1 cm-1 CO cm-1
2m-2 ll.-m+1 = m+k (19)
1 cs-1 ck-s
s(k-s+i) 2s-2 211.-2s
This relation is a particular case of the formula permutations in the class. And since the total
m-1
~
~
[C' cs-p-1] cm-s-1
2s-p- 2s-p
-cm-p-1
m+k+p-2s-1- m+k number of favourable permutations is k! 1 c~k'
B=P we obtain the identity
(20)
k
where p < m-<
p + k (in the first summand, c·i/ is """
-""' s (k
k+1
+ c•-1 ck-s -ck
s-1) 2s-2 211.-2s - 211.
(21 )
taken to be zero). Formula (20) is proved in the 8=1
same way as (19), by partitioning into classes
If we introduce the notation
the unfavourable permutations of m r's and
k + p f's, in which there are p r's at the begin-
ning (see page 50).
s! 1 C~s= Ts
Let us now consider the relations obtained by formula (21) becomes
splitting into classes the favourable permutations ToTk-t + T1T11.~2+ ... + Tk-tTo= T11. (22)
made up of k r's. There are k! 1 C~11. such Another relation between the numbers C~
permutations. After the whole line has passed is obtained as follows. Specify the number l,
through, there will again be no 50-copeck pieces 1 -< -<
l m, and partition the set of all favourable
in the cash register, all having been used up for permutations into classes such that the sth class
change. However, in certain favourable permuta- has all permutations containing exactly s r's
tions there occur situations in which the cashier among the first l elements. Then the number of
has no change; it so happens that the next in line f's among the first l elements is equal to l - s.
saves the situation by handing in a 50-copeck Since there must be at least as many f's as r's,
53
it follows that s satisfies the inequalities 0 <: 2s <: product, we find that the number of permutations
<:l. in the sth class is
Let us find the number of permutations in the
sth class. Each such permutation splits up into l-2s+1 Cs(cm-s -cm+s-Z-1]
l-s+1 l m+k-1 m+k-l
two parts: one contains the first l letters, the
other, the last k + m - l letters. The first Since the total number of favourable permuta-
part includes l - s f's and s r's. Here, since
the entire permutation is favourable, so also tions of k f's and m r's is k:~i 1 C:+"' we
is its part consisting of the first /letters. But using obtain the identity*
l-2s+1
l - sf's and s r's, we can form l-s+i C~ E ({-)
n 2 objects of another kind, ... , nk objects of sors of the natural number N = p~t ... p~k
a kth kind, then they can be divided between two is equal to (n1 +
1) .•. (nk +
1). We denot3
people in this number by 1: (N).
(2)
PARTICLE STATISTICS
PARTITIONS OF INTEGERS
Problems of placing objects into cells are of
, extreme importance in statistical physics, which ~ In most of the problems considered above, the
deals with the distribution of physical particles objects to be divided were distinct. We shall
according to properties: for instance, what part now examine problems in which all the objects
60
undergoing division are the same. We will now f (N - 6); and there are f (N- 10) combina-
speak not of dividing objects but of partitioning tions ending in a 10-copeck stamp. Since any
positive integers into parts (summands which, of combination terminates in one of the stamps
course, are also positive integers-the natural indicated above, we get relation (10) by the rule
numbers). of sum.
Here we have a great variety of problems. Relation (10) permits reducing the problem of
In some we have regard for the order of the pasting on postage stamps totalling N copecks
integers, in others, we disregard the order. We to problems of pasting on stamps of smaller
may consider partitions into an even number sums. For small values of N the problem may be
of parts or only into an odd number of them, into solved directly. A simple computation shows
distinct summands, or into arbitrary summands, that
etc. The basic method for solving partition
/(0)=1, /(1)=1(2)=/(3)=0, 1(4)=1, 1(5)=0.
problems is to reduce them to problems of par-
titioning smaller integers or of partitioning /(6)=1, 1(7)=0, /(8)=1, 1(9)=0
into a smaller number of summands. The equality f (0) = 1 means that the sum of
0 copecks may be paid in only one way: by not
putting on any stamps at all. Sums of 1, 2, 3, 5, 7,
MAILING PACKAGES and 9 copecks cannot be obtained in any way via
stamps costing 4, 6, and 10 copecks apiece. Using
We have to pay 18 copecks to post a package. the values f (N) for N = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
In how many ways can we pay using postage stamps we easily find f (10):
of 4, 6 and 10 copecks if two ways that differ as to
the order fJj the stamps are considered distinct?
I (10) =I (6)+ I (4)+1 (0)~3
(There is an unlimited supply of stamps.) and then we find
Denote by f (N) the number of ways 4-, 6- and I (11) =I (7)+ I (5)+1 (1) =0,
10-copeck stamps can be used so that the total
price of the postage stamps is N. Then for f (N) t (12) = I (8) + I (6) + I (2) = 2
we have the relation and so on. Finally, we get I (18) = 8, which
I (N)=I (N -4)+ I (N -6)+1 (N -10) (10) means that the stamps can be put on in eight
ways. These ways are:
Indeed, suppose we have a method for pasting
on stamps totalling N copecks, and let the last 10,4,4; 4,10,4; 4,4,10; 6,4,4,4; 4,6,4,4; 4,4,6,4;
4,4,4,6; 6,6,6.
one be a 4-copeck stamp. Then all the remaining
stamps cost N-4 copecks. Conversely, adjoining It may be noted that the values of f (N) for
one 4-copeck stamp to any combination of N = 1, 2, 3, 4, 5, 6, 7, 8, 9 are obtainable without
stamps costing N-4 copecks, we obtain a com- direct verification. The point is that £or N <0
bination of stamps totalling N copecks. Then we have f (N) = 0, since a negative sum cannot
from different combinations costing N - 4 co- be paid using a nonnegative quantity of stamps.
pecks we obtain different combina~ions costing Yet, as we have seen, f (0) = 1. And so
N copecks. Thus, the number of desired combina-
tions where the last stamp is a 4-copeck stamp I (1) =I (- 3) +I (- 5) +I (- 9) = o
is equal to f (N - 4). In exactly the same way we obtain f (2) =0,
In the same way we prove that the number of I (3) = 0. Now for N = 4, we have
combinations ending in a six-copeck stamp is I (4) =I (0) +I (- 2) +I (- 6) = 1
61
"partition" N = N). If the number of integers
GENERAL PROBLEM
OF POSTAGE STAMPS
is equal to s, then we get crv-:.1
partitions
(see page 57). Therefore
The above problem is a particular case of the <p (N, N)=C~_ 1 +C~_ 1 + ... +C~=i =2N-i
following general problem:
We have postage stamps of nit n 2 , • • • , nk co- We have thus proven that the natural num-
pecks each (all the numbers n1 , • • • , nk are distinct ber N can be partitioned in 2N-1 ways. Note
and the supply of stamps is unlimited). In how that the order of the terms is taken into account.
many ways can they be used to pay a sum of N co- To illustrate, the integer 5 can be partitioned
pecks if two modes of payment differing as to in 25 - 1 = 16 ways:
order are taken to be distinct? 5= 5 5 = 3+1+1 5 = 1+2+2
In this case the number f (N) of ways satisfies 5 = 4+1 5 = 1+3+1 5 = 2+1+1+1
the relation 5 = 1+4 5 = 1+1+3 5 = 1+2+1+1
5 = 2+ 3 5 = 2+ 2+ 1 5 = 1+1+2+1
/(N)=!(N-nt )+f(N- n 2 )+ ... +!(N-nk)
5 = 3+ 2 5 = 2+ 1+ 2 5 = 1+1+1+2
(11) 5 = 1+1+1+1+1
Here, f (N) = 0 if N < 0 and f (O) = 1. Using
(11), we can find f (N) for any N by computing COMBINATORIAL PROBLEMS
successively f (1), f (2), ... , f (N - 1). OF INFORMATION THEORY
Consider a particular case of this problem when
n1 = 1, n 2 = 2, ... , nk = k. We get all pos- The theory of information offers a problem
sible partitions of N into the integers 1, 2, ... , k, much like the one we have just solved. Suppose
different orders of the integers being considered a message is being transmitted by means of sig-
as distinct partitions. Denote the number of these nals of several types. The transmission time of the
partitions by <p (k; N). * From (11) it follows that first type of signal is tit of the second type,
t2, . . . , of the kth type, tk units of time. How
<p(k; N)=<p(k; N-1)+cp(k; N-2)+ ... +
many different messages can be transmitted with
+cp(k;N-k) (12)
the aid of these signals in T units of time? Here
Here, we are only dealing with maximum messages;
<p (k; 0) = 1 and <p (k; N) = 0 if N <0 these are messages in which not a single signal
The computation of <p (N; k) may be simpli- can be added without going beyond the restric-
fied if we note that tions of our transmission-tim e limit.
Denote the number of messages that can be
<p (k; N -1) = <p (k; N- 2) + ... + <p (k; N- k) + transmitted in time T by f (T). Arguing as in
+cp (k; N-k-1) the stamp problem, we find that f (T) satisfies
and therefore the relation
<p(k; N)=2<p(k; N-1)-<p(k; N-k-1) (13) f(T)=f(T-tt)+ ... +f(T--tk) (14)
The integers cannot, clearly, exceed N. There- Here, again, f (T) = 0 if T <
0 and f (0) = L
fore cp (N, N) is equal to the number of all par-
titions of N into positive integers (including the ENTRANCE-EX AMS PROBLEM
* Here and henceforward we agree to indicate the num- Entering a higher educational institution requires
ber of summands (integers) first, the number being parti- taking 4 examinations. Our student-to-be thinks
tioned, second, and the restrictions on the number of
summands, last. he can make it by collecting a total mark of 17
62
(marking is done on a scale of 5 in which 3 is passing we get 17 points in 16 ways. The approach is the
and 5 is the highest mark). In how many ways can he same for finding the number of ways of obtain-
pass the exams and enter? ing 18, 19, and 20 points.
This is a lot like the stamp problem, but Generally, let F (m; N) bo the number of ways
differs in that we indicate the number of "stamps" of partitioning N into m parts, each of which is
needed to "pay the sum of 17 point~". Passing equal to one of the numbers n1 , n 2 , • • • , nk.
marks are 3, 4, and 5. Denote by F (k; N) the Then for F (m; N) the following relation hold~:
number of ways of collecting N points after
F(m; N)=F(m-1; N-n 1)+ ...
k exams. The following relation holds:
... +F(m-1; N-nk) (15)
F(k; N)=F(k-1; N-3)+F(k-1; N-4)+
+F(k-1; N-5) which is derived just like (11). The reader may
like to derive it himself.
the derivation is exactly analogous to that
In particular if n1 = 1, n 2 = 2, ... , nk = k.
of (11) on page 61.
then we gl:'t partitions of N into m summands.
From this we get
each of which is equal to one of the numbers
F (4; 17) = F (3; 14)+ F (3; 13)+ j (3; 12)= 1, 2, ... , k. Denote the number of these parti-
= F (2; 11) +2F (2; 10)+ 3F (2; 9) +2F (2; 8) + tions by F (m; N; k). Then for F (m; N; k) we
+F(2; 7)=2+3F(2; 9)+2F(2; 8)+F(2; 7) have the relation
since 2 exams cannot yield 11 points and the F(m; N'; k)=F(m-1; N-1; k)+
only way to reach 10 points in two exams is to get +F(m-1; N-2; k)+ ... +F(m-1; N-k; k}
the top mark of 5 twice. (16)
Continuing the computation, we get
As on page 61, it follows. from this relation
F(4; 17)=2+3F(1; 6)+5F(1; 5)+6F(1; 4)+ that
+3F (1; 3)+F (1; 2) F (m; N; k) = F (m, N -1; k) +
+F(m-1; N-1; k)-F(m-1; N-k-1; k)
But F (1; 6) = F (1; 2) = 0 (there is no mark
of 6, and 2 is failing), and F (1; 5) = F (1; 4) = (17)
= F (1; 3) = 1. Therefore F (4; 17) = 16. In
exactly the same way we conclude that Now let us investigate partitions in which
those differing solely in the order of the inte-
F (4; 18) = 10, F (4; 19) =4 and F (4; 20) = 1 gers are considered identical.
which gives us 16 + 10 + 4 + 1 = 31 ways
of passing the examinations. PAYING MONEY
There is another way of obtaining the same
result. It is easy to check that 17 points rna y In your purse you have the following coins (one
be obtained in two essentially different ways: of each): 1, 2, 3, 5, 10, 15, 20, and 50 copecks. In
either by getting 2 fives, 1 four, and 1 three, how many ways, using these coins, can you pay for
or by getting 1 five and 3 fours. These marks a purchase of 73 copecks?
may be distributed in arbitrary fashion among Here, the order of the coins is irrelevant, the
the four subjects. Since important thing is the type of coin. Let us use
4! 4! the notation
P(2, 1, 1)+-e(1; 3) 2! 1! 1! + 31 1! =16 F (nit n2, ..• , nm; N)
63
to denote the number of ways of paying N copecks But
by means of coins of value n11 n 2 , • • • , nm co- F (1, 2, 3, 5, 10, 15; 3) = F (1, 2, 3; 3)
pecks each, using not more than one coin of each =F(1, 2; O)-t-F(1, 2; 3)=1-t-F(1; 3)-t-
value. Split up all the modes of paying into two +F(1; 1)=2
classes according as a coin of value nm copecks
is used or not. If it is, then we haveN -nmcopecks Compute the second term
to pay by means of coins of value n 11 n 2 , • • • F (1, 2, 3, 5, 10, 15; 23) = F (1, 2, 3, 5, 10; 8) +
... , nm-t copecks. Now this can be done in +F (1, 2, 3, 5, 10, 23)=F(1, 2, 3, 5, 10; 8)
F (n 1 , n 2, ... , nm_ 1 ; N- nm) ways. If the
nm-copeck piece is not used, then the whole + <
since 1 2-t- 3-t- 5-t- 10 23. But F (1, 2, 3, 5; 8}
sum of N copecks has to be paid with the aid of =F (1, 2, 3; 3)=2.
the coins nit n 2, ... , nm-t co pecks. This can be We finally get
done in F (n 11 n 2, .. , nm-t; N) ways. F (1, 2, 3, 5, 10, 15, 20, 50; 73) = 4
We thus have the relation
Thus the payment can be made in four ways.
F (nit n 2 , ••• , nm; N)= namely: 50, 20 and 3; 50, 20, 2 and 1; 50, 15, 5
=F(nit n2, . .. , nm-1; N-nm)+ and 3, and, finally, 50, 15, 5, 2 and 1.
.+ F (nit n2, ... , nm-1; N) (18)
This relation enables us to reduce the problem BUYING CANDY
of choosing from among m coins to that of choos-
ing from among m - 1 coins. Repeating the A shop sells different varieties of sweets: 3 kinds
argument, we reduce the problem to one of at 2 copecks apiece, 2 kinds at 3 copecks apiece.
choosing from m - 2 coins, and so on, until we In how many ways can one buy 8 copecks worth of
arrive at the problem of paying a zero sum or of candy if he takes at most one item of each kind?
choosing from a total of one coin. Both problems The solution is obtained from the following
have unique solutions. In the course of the com- relations:
putations, many terms are dropped. For instance F (2, 2, 2, 3, 3; 8) = F (2, 2, 2, 3; 5) -t- F (2, 2, 2, 3; 8)
in n1 -t- n 2 -t- ... + nm < N, then F (nt, n2, ...
... , nm; N) = 0 since there are not enough coins =F(2, 2, 2; 2)-t-2F(2, 2, 2; 5)-t-F(2, 2, 2; 8)
to pay. Besides, if nm > N, then (18) is repla- =F(2, 2, 2C2)=F.(2, 2; O)+F(2, 2; 2)
ced by = 1 + F (2; 0) + F (2; 2) = 3
F (n 11 n 2, •.• , nm; N) = F (nit n2, ... , nm-1; N) The purchaEe may be made in three wayfl: buy
since the coin nm cannot participate. one of both kinds at 3 copecks apiece and add
Let us apply this method to solving our pro- either one of the 2-copeck candies.
blem. By (18), we conclude that The following problem would appear to have
F (1, 2, 3, 5, 10, 15, 20, 50; 73) = F (1, 2, 3, 5, the same number of solutions: We have three
10, 15, 20; 23) -t- F (1, 2, 3, 5, 10, 15, 20; 73) = 2-copeck coins and two 3-copeck coins in a purse.
= F (1, 2, 3, 5, 10, 15, 20; 23) In how many ways can they be used to pay out a sum
of 8 copecks?
since 1+2+3+5+10 +15+20 < 73 and so This depends on the kind of coins. If the 2-co-
F (1, 2, 3, 5, 10, 15, 20; 73) =0. Then we get peck and the 3-copeck pieces are considered dis-
F (1, 2, 3, 5, 10, 15, 20; 23) = F (1, 2, 3, 5, 10, tinguishable, then the problem coincides with
15; 3) +F (1, 2., 3, 5, 10, 15; 23) the foregoing one and the payment is made in
64
three ways. But if the 2-copeck coins are indi- GETTING CHANGE
-stinguishable, then the only mode of payment is
two coins of 3 copecks each and one of 2 copecks. What with slot machines at every turn today,
Thus the problem of payment differs depen- people always need change. This raises the follo-
ding on the distinguishability or otherwise of wing question.
coins of the same value. The above-analyzed In how many ways can we get change for a 10-
method of solution is good only if all the coins copeck piece (the equivalent of a U.S. dime) in
.are considered distinguishable irrespective of the form of 1-, 2-, 3-, and 5-copeck coins?
whether they are of the same or different This problem is similar to the one solved at
value. Now let us see how to solve the problem the end of the preceding section. The only diffe-
for the case when coins of one value are con- rence is that there are no restrictions on the num-
sidered indistinguishable. ber of coins of any value. And so we denote the
We have ten 2-copeck coins and five 3-copeck number of solutions by 11> (1, 2, 3, 5; 10). Arguing
coins in a purse. In how many ways can they be in the same way as in the preceding section, we
used to pay out 22 co pecks if coins of the same value get the relation
are indistinguishable? (1, 2, 3, 5; 10) = Q;> (1, 2, 3; 10) +
Q;>
Denote the number of solutions of the problem
by Q;> (10 X 2, 5 X 3; 22) (10 X 2 means that
+
Q;> (1, 2, 3; 5) +
<D (1, 2, 3; 0) (20)
we have ten 2-copeck coins and 5 X 3 means (all modes of getting change are split into classes
that there are five 3-copeck coins). Partition all according to the number of 5-copeck pieces-or
·modes of solution into classes depending on how nickels if you like-in each class). Clearly, <D
many three-copeck coins are used. If, say, two (1, 2, 3; 0) = 1: 0 copecks can be paid in only
are used, then there remains 16 co pecks to be paid one way.
out using 2-copeck coins, and if all 5 are used, In order to compute 11> (1, 2, 3; 5), let us split
then we have 7 copecks left to pay. Now if 3- up all modes of changing 5 copecks into 1-, 2-,
copeck coins were not used at all, then the whole and 3-copeck pieces into classes depending on how
sum of 22 copecks will have to be paid with many 3-copeck pieces are accepted. We get
2-copeck coins. We thus have t~e equation 11>(1, 2, 3; 5)=<D(1, 2; 5)+11>(1, 2; 2)
(JJ(tox2, 5x3; 22)=11>(10x2; 22)+ (the first term corresponds to the case of none,
+<D (10 X 2; 19)+11> (10 X 2; 16)+ the second to that of only one 3-copeck coin).
+ 11> (10 X 2; 13) + 11> (10 X 2; 10) + Continuing the computation, we obtain
+ 11> (10 X 2; 7) (19) Q;> (1, 2, 3; 5) = <D (1;· 5) +
Q;> (1; 3) +
Q;> (1; 1) +
We do not need to continue because vve only +11> (1; 2)+ <D (1; 0)
have five 3-copeck coins. It is clear that ten 2-co- All these summands are equal to 1, since any
peck coins are not enough to pay 22 copecks. sum is paid in only one way when using 1-copeck
Therefore 11> (10 X 2; 22) = 0. It is furthermore pieces. And so 11> (1, 2, 3; 5) = 5. In the same
obvious that an odd sum cannot be paid with way we find that 11> (1, 2, 3; 10) = 14. Alto-
2-copeck coins, and an even sum can be paid in gether, we get 14 + 5 + 1 = 20 way'> of obtaining
unique fashion. It therefore follows from (19) change.
that In place of relation (20), we could have star-
<D (10 X 2; 5 X 3; 22)=2 ted with the relation
There are only 2 ways of paying: Q;> (1, 2, 3, 5; 10) = Q;> (1, 2, 3; 10) +
22 = 8 X 2 + 2 X 3 = 5 X 2 + 4 X 3 +11> (1, 2, 3, 5; 5)
65
It shows that the modes of making change split .... , n summands, which may be done in n~-n
up into those without 5-copeck pieces and those ways.
that make use of at least one such coin. Now let us impose the restriction that all
To put the matter generally, if one needs to summands must be distinguishable. Then the num-
pay out Nco pecks with coins of value nh ... , nk ber of solutions is denoted by Cl>~ (here, Cl>~ = 1).
copecks, then we have the relation We leave it to the reader to demonstrate that
for Cl>~ we have the relation
Cl> (nit ... , nk-t. nk; N) = Cl> (nit ... , nk-1; N)
+ Cl> (nit ... , nk-1! nk; N- nk) (21) (24)
It shows that either we do not use a single nk coin (the number n cannot be used again as a summand).
and then the whole sum of N has to be paid with It is readily seen that II>\ = 1 and Cl>"A, = 0
the remaining n1 , • • • , nk -ccopeck coins, or for N > 1, and it is possible, with the aid of
at least one nk-copeck coin is used and then we (24), to compute Cl>~ successively for all n and
have to pay the remaining sum of N-nk copecks N. For n~ it is more convenient, in place of
using coins of n1 , • • • , nk-h nk copecks. Howe- (23), to use the relation
ver, if, as was the case on page 63, the coins -nn-1+nn-1
nnN- N N-n
+nn-1
N-2n
+ · •' (25)
must not repeat, then relation (21) is replaced
by the earlier relation: which is obtained by successive application of
(23). It is then sufficient to notice that n]v = 1
F (nit ... , nk-!t nk; N) (any natural number can be decomposed uniquely
=F(nt. ... , niH; N)+F(nlt ... , nk-1; N-nk) into summands equal to 1). Using relation (25),
(22) we consecutively compute llfv for all N, then llfv
and so on.
Note that the number of all possible ways of
decomposing N into summands is n~ -no sum-
PARTITIONING INTEGERS
mands greater than N will appear in the parti-
Let us consider a special case of making change tion. In exactly the same way, the number of
when any coins from 1 to n copecks are allowed. ways of partitioning N into distinct parts is
In other words, solve the following problem. equal to Cl>~.
In how many ways is it possible to partition
a number N into parts (summands) each of which
is equal to one of the numbers 1, 2, . .. , n (disre- ARRAYS OF DOTS
gard the order of the summands)?
Let us denote the number of such modes of The original methods of proving theorems
partitioning by n~ (we assume the value of n~ involving partitioning of integers were exceeding-
to be 1). We then get the relation ly complicated. As in many other problems of
mathematics, by invoking geometrical reasoning
(23) we greatly simplify and pictorialize the proofs.
Each partition of a number N into parts may
Indeed, if the number n is not used as a sum- be depicted as an array of dots. Each row of the
mand, then N is partitioned into the summands array consists of a number of dots equal to the
1, 2, ... , n-1, and this is possible in n~-1 units that make up the appropriate summand.
ways. But if n is used as one of the summands, For example, the array in Fig. 10 corresponds
then the number N-n is partitioned into 1, 2, ... to the partition 7 = 1 + 1 + 2 + 3.
5-59
66
Since the order of the summands in the parti- implies that the number of these arrays is the
tion is irrelevant, the rows may be arranged so same, and this proves the assertion.
that they do not decrease in length when moving The proof of the following theorem (Euler's
downwards. Also, the first points of each row theorem) is a little more complicated.
will be depicted in the same column. Such arrays The number of ways of partitioning N into at
will be termed normal. most m parts is equal to the number of partitions of
N + m (~+ 1 ) into m unequal parts•
• Each partition of N into at most m parts is
• depicted as an array of N dots containing no more
••
••• ~i',
I ',
Fig. 10.
le
I •',
I ' e',e
'
• • ________' ..,. •
•
I•
I
Diagrammatic arrays of dots enable us to prove
• • • • t• e • ~I • • • •
a variety of properties of partitions with relative
ease. Let us prove, for instance, that the number
of modes of partitioning N tnto at most m parts is Fig. 12.
the same as that of the ways of partitfoning N m +
into m parts. Indeed, the array depicting the than m rows. To each array let us adjoin an isos-
partition of N into at most m parts consists celes right triangle of m rows, and then reduce the
of N points arranged in no more than m rows. array to its normal form (Fig. 12), where we have
Adjoin to each such array a column consisting the transformation for N = 6, m = 4. Since
of m points (see Fig. 11 where we have this tran-
sformation for N = 5, m = 4). We get an array the number of dots in the triangle is m (m2+ 1) , we
made up of N + m dots arranged in m rows.
obtain an array of N + m (m2+ 1) dots involving m
(0'\ rows, all the rows being of unequal length. Indeed,
I I the lengths of the rows of the original array do
I• lI not decrease, while the lengths of the rows of
. •• •
I
the triangle constantly increase, and so after
• • lele
I
,.,
I
I
I the triangle is adjoined, we get an array whose
• • • ... .-~
tn=lf
rows increase in size all the time. Consequently,
there will be no equal-length rows.
Conversely, from each array illustrating the
Fig. 11.
partition of N + m(~ 1) into m unequal parts,
+
Conversely, removing the first column from each we can remove an isosceles right triangle contai-
array consisting of N + m dots arranged in m ning m rows and thus obtain an array for parti-
rows, we get an array of N dots, the number of tioning N into at most m parts. This correspon-
rows not exceeding m. dence between the two types of arrays indicates
We have thus established a one-to-one corre- that their number is the same, which proves our
spondence between the two kinds of arrays, which assertion.
67
DUAL ARRAYS In exactly the same way it may be proved that
the number of partitions of N into n summands is
We can transform our arrays so as to inter- equal to the number of partitions into summands
change rows and columns. To do this, rotate an not exceeding n, of which at least one is equal
array through 90" and reduce it to normal form to n.
(as illustrated in Fig. 13). Now let us consider the partition of the number
N into even parts. These partitions are depicted
• by arrays whose rows contain an even number of
•
• • • • •
• • • • • • • • •
Fig. 13.
• • • • •
• • • • • • •
It is easy to see that if we repeat the process, we • • • • • • • • •
return to the original array. Hence, all arrays may • • • • • • • • • • •
be divided into dual pairs (note, too, that some
are self-dual, as witness Fig. 14). Fig. 15.
Utilizing the dual nature of such arrays of
dots, we can compare partitions subject to cer- dots. But then the dual array will have an even
tain restrictions regarding the size of the sum- number of parts of each kind (Fig. 15). We draw
mands with other partitions restricted relative the following conclusion.
to the number of the summands. For instance, The number of partitions of N into even parts is
we have the assertion: equal to the number of partitions into which each
of the numbers enters an even number of times
• (some summands may naturally not enter at
all since zero is an even number).
• • The proof is the same for the following.
• • • The number of partitions of N into odd summands
is equal to the number of partitions into which each
Fig. 14. of the summands (except the largest) enters an even
number of times and the largest summand enters
an odd number of times.
The number of partitions of N into summands
not exceeding n is equal to the number of partitions
of N into at most n summands.
This is true since the arrays for partitions of N EULER'S FORMULA
into summands (parts) not exceeding n consist (may be skipped in a first reading)
of N dots, with no more than n dots per row.
Hence, such an array has at most n columns. But In connection with certain p,roblems of par-
then the dual array has at most n rows, that is to titions, Euler mane a study of the infinite pro-
say it corresponds to the partition of N into at duct
most n summands. · A=(1-x) (1-x2) (1-x3) •.. (1-xn)... (26)
5•
68
Removing the first 22 brackets in this product, to the partition 12 = 5 + 4 + 3, the term
we get the expression (- x5) ( _ x4) ( _ x3) = _ x12
A= [1- x-x2+ x5+ x1 _ xl2_ x15+ x22 + ... ] X
Thus, in the expansion (27), the coefficient of
x (1-x23) (1-x24) ... (1-xn) ...
xNis equal to the difference between the number
where the dots stand for terms containing higher of partitions into an even number of distinct
powers of x than 22. We did not write out these
terms since they change when the square bracket
is multiplied by 1-x23 , 1-x24... and so on,
while the terms that are written out will not • • •
change. And so if we remove all the brackets, • • • • •
we get an infinite series, the first terms of which • • •
are of the form
• • ••• • • • • •
1-x-x2+x5+x1-x12-x15+x22+... (27)
Fig. 16.
We see that two negative terms are followed
by two positive terms, which in turn are followed summands and the number of partitions into
by two negative terms, etc. But it is more diffi- an odd number of distinct summands. The Euler
cult to detect the law governing the exponents theorem reads:
of these terms. After a good deal of experimen- If a number N can be represented in the form N =
ting Euler established the following rule.
If the infinite product
3k2
2+ k , then it has the same number of parti-
tions into an even and into an odd number of dis-
(1-x) (1-x2) (1-x3) ... (1-xn)
tinct summands. For numbers of the type N =
is converted into a series, then only terms like + k
3k2
3k2 ± k = 2- , the difference between these quantities
(-1)k x--2-, where k is a natural number, is (-1)k (that is to say, if k is even, then one more
will be different from zero. partition into an even number of summands,
Enter's theorem is of great importance not and if k is odd, then one more partition into an
only in the theory of partitions, but also in the odd number of summands).
theory of elliptical functions and in other areas In order to prove Euler's theorem, let us illu-
of mathematical analysis. However, most of strate one transformation of an array with an even
the proofs of this theorem are rather involved. number of rows into an array with the same num-
We give here only an extremely simplified geo- ber of dots having an odd number of rows, and
metrical proof of Euler's theorem, but first we conversely. Since we are considering only parti-
will have to formulate the theorem in the langua- tions into distinct parts, the arrays of such
ge of partition theory. partitions consist of several trapezoids on top
When removing brackets in expression (26), of each other. Denote the number of dots in the
the terms +xN appear as many times as there upper row of the array by m, the number of rows
are ways of partitioning N into distinct summands. of the lower trapezoid by n. Fig. 16 portrays an
Also, xN appears if the number of summands is array for which m = 2 and n = 3.
even, and - xN if this number is odd. Say, to Let us suppose that an array has at least two
the partition 12 = 5 + + +
4 2 1 corresponds trapezoids, m ~ n. In this case we discard the
the term (- x5) (- x 4) (-x 2) (-x) = x12 and first row and extend the last m rows of the lower
69
trapezoid by one dot, which does not alter the illustration of the result of just such a transfor-
total number of points; all rows are then of diffe- mation. A comparison of Figs. 17a and 17b con-
rent length, but the parity in the number of rows vinces us that the above-described transformations
will change. The same kind of transformation are inverses: performing one and then the other,
may be effected if the array consists of a single we get the original diagram.
.. .,
,,.---,
____,
Thus, arrays of partitions of N which allow for
one of these transformations split up into the same
number of arrays with an even and an odd number
• • • • • • of rows. It now remains to find out which arrays
• • • • • • • • (8',
', ',
do not allow for such a transformation. Clearly,
• • • • • • • • • • ' ......!}
• • • • • • •
Fig. 17 a.
• • • • • • • • •
trapezoid and m < n- 1. Fig. 17a is an illustra- • • • • •
m=n~J
• • • • • •
m~4,n~J
tion of the result of such a transformation.
Now let the array contain at least two trape-
zoids, m > n. Then take one dot from each row Fig. 18.
of the latter trapezoid and use these dots to make
the first row of a new array. This can be done
they consist of one trapezoid, and for them we
because m > n and therefore the generated row
is shorter than the first row of the original array.
either have m = n or m = n +
1. In the former
3n2-n
instance,! the array contains - -2- dots, in the
..
Besides, since we took all the rows of the lower
,,.---
.... ___ ......,,
3n2+n
2-
latter, - - dots (Fig. 18).
(1)
Fig. 19.
which, also, is the number of shortest routes
between A and B.
B along the shortest possible route, that is, by going
from "left to right" and "upwards". How many
routes can he take? THE ARITHMETIC SQUARE
The meanderings of a person wandering about
town resemble the movements of a chess rook.
Take an infinite-sized chessboard bounded on
two sides by perpendicular rays and place a rook
in the corner. We assume the rook moves either
downwards or from left to right. Combining such
movements, we get a variety of pathways leading
from the corner square to a given square of the
chessboard. In each square we write the number
of these routes. It is clear that this number de-
pends on the coordinates of the square, that is,
on the vertical (file) and horizontal (rank) inter-
section.
It will be convenient to label the verticals
and horizpntals with the numbers 0, 1, 2, ...
. . . . , n, . . . In this notation, the corner squa-
re has the coordinates (0, 0). Using the result
obtained in solving the above problem, we assure
ourselves that at the intersection of the kth ver-
71
tical line and nth horizontal line we have the FIGURATE NUMBERS
number c!+k (to reach this square we have to make
k moves to the right and n moves downwards).
When we calculated the elements of Table 3,
In place of C~+k substitute their numerical valu- we made use of the elements of the preceding row
es. What we get is Table 3, which is called an and the preceding column. However, it would
a.rithmetic square. have sufficed to use the elements of the pl."ece-
ding row. Indeed, on page 34 we proved for-
Table 3 mula (15):
k k ck-1 + +Con-1
1 1 1 1 1 1 . Cn+k=Cn+ k-1+ n+k-2 ·· ·
1 2 3 4 5 6 This formula shows that each element of our table
1 3 6 10 15 21 is equal to the sum of the elements of the prece-
1 4 10 20 35 56 ding row, beginning with the first and termina-
1 5 15 35 70 126 ting with the element occurring directly above
1 6 21 56 126 252
•
• • •
Let us investigate some of its properties. First •
• • • • • •
of all, a study of the numerals in the squares
• C)
••• • • • •
shows that they are obtained by the following Fig. 20.
law: each number ts equal to the sum of the number
written above it and the number to the left of it. the one being computed. Thus, by adding in
Say, 10 = 4 + 6, because 4 stands above it and succession the elements of the (n- 1)st row,
6 is to the left of 10. we compute the succession of elements of the
This rule follows readily from the equation that nth row.
was proved earliel" on page 33: C! = C!_1 + This method of computing Table 3 goes back.
+ c!:t. It can be proved directly, however. to the ancient Greek mathematicia ns Pythago-
A rook can reach square (k, n) either from square ras and Nicomedes and their figurate numbers.
{k- 1, n) or (k, n - 1). And so, by virtue of The numbers 1, 2, 3, ... may be depicted
the rule of sum, the number of waya, of reaching as rows of one, two, three, etc., dots, the rows
square (k, n) is equal to the sum of the number being combined to form triangles (Fig. 20). Then
of ways of reaching square (k - 1, n) and the the number of dots in every triangle will be
number of ways of reaching square (k, n - 1) equal to the corresponding number in the second
which is just our assertion. row of the table*.
From the telation C~+k = c:+k it follows that Whence the name triangular numbers for 1, 3, 6,
the arithmetic square is symmetric about the 10, 15, 21, etc., the kth triangular number being
diagonal going through the corner (we will call (k+ 1) k
it the principal diagonal). Incidentally, this 2
property can just as easily be proved geometri-
cally: we have the same number of ways of get- Going another step, we can combine the trian-
ting to the intersection of the nth vertical and gles depicted in Fig. 20 into pyramids. The num-
kth horizontal as to the intersection of the kth
vertical and nth horizontal. * The rows are labelled 0, 1, 2, ... , and so the top row
·is zero, the next, 1, then 2, etc.
72
her of dots in each pyramid is equal to the corre- lines, and the problem becomes that of the move-
sponding number in the third row of our table. ments of a rook. The numbers in Fig. 21 are ordi-
And so the numbers 1, 4, 10, 20, 35, etc. are narily depicted as a triangle (Table 4).
termed pyramidal numbers. Their general form is
Table 4
(k+2) (k+1) k
1X2X3 1
1 1
To continue similar interpretations of the num-
1 2 1
bers of succeeding rows, we would have to pass
1 3 3 1
to pyramids in spaces of higher dimensions.
1 4 6 4 1
The theory of figurate numbers has enticed
mathematicians for many centuries and at one
time was an important division of the theory of
numbers. Here, each number is equal to the sum of the
two numbers of the preceding row between which
it lies. This triangle is often called Pascal's
THE ARITHMETIC TRIANGLE · triangle after Pascal (1623-1662). But the Ita-
lian mathematician Tartaglia* (1500-1557) was
Now take a board bounded on one side only and familiar with it. But long before Tartaglia's
put a checker on square A of the zeroth hori- time, this triangle was used in the works of the
zontal row (Fig. 21). Moving in accord with the Arabian mathematicians al-Kashi and Omar
Khayyam. We will therefore call it simply the
arithmetic triangle.
The arithmetic triangle can also be written
in tabular form:
Table 5
1 0 0 0 0 0
1 1 0 0 0 0
1 2 1 0 0 0
1 3 3 1 0 0
1 4 6 4 1 0
Fig. 21. 1 5 10 10 5 1
THE EXTENDED ARITHMETIC TRIANGLE A glance at the portion above the zeroth row
convinces us that it differs from the arithmetic
The arithmetic triangle only occupies a portion square on page 71 solely in the signs of the terms.
of the plane. Let us extend it to the entire plane,
Namely, we have (-1)k- 1 C~+k- 1 at the inter-
while retaining the rule formulated above that
each element is equal to the sum of the element above
section of the (-n)th horizontal and the kth
vertical. Quite naturally, a simple inspection
it and the element of the preceding row upward
left. Here, since the zeroth column of the arith-
of part of a table cannot serve as proof that this
metic triangle consists of units, we fill this column assertion holds for all rows and all columns.
with units in the extended triangle as well. To see that this assertion holds true, notice that
Applying this rule to the elements of the zeroth
column, we see that there should be a column
<- 1)k-1 c~+k-1 + (-1)k-2 c~+L 2
in front filled with zeros. But then all columns =(-1)k-1 [C~+k-1-C~:t-L21
to the left will consist of zeros as well. And so we
= (- 1)k-1 c~+k-2
have to find out what goes above the zeroth row
of the triangle. The first element of the zeroth row
[see formula (11) on page 33). This equality shows
is zero and at an angle from it upwards we find
that in a table made up of the numbers (-1)k-l
1, so we have to write -1(1 + (-1) = 0) above
it. But then if we must obtain zero in the second C~+k-h the kth element of the row n + 1 is
position of the zeroth row, we have to place the equal to the sum of the elements of the (-n) th
number 1 above it. Continuing, we see that a new row with labels k and k - 1. In other words,
row appears over the zeroth row and it consists the rule for filling up a table of the numbers
of an alternation of the numbers 1 and -1. (-1)k-1c!+k-t coincides with the rule for fil-
The other rows, moving upwards, are filled in ling in a table of the extended arithmetic triangle.
the same fashion. Besides, since these tables have the same rows
This yields a table, a portion of which is shown labelled -1 and a zeroth column, it follows that
below: all their elements coincide.
74
In the original arithmetic triangle, we have The number of ways in which the chess king can
the number C~ at the intersection of the nth reach some square of the nth horizontal line is equal
horizontal and the kth vertical. In the extended to the sum of the numbers of ways the three adjacent
triangle, we have the number (-1)11.-lC~+k-t squares of horizontal n - 1 can be reached.
at the intersection of the (-n)th horizontal
and the kth vertical. We can therefore generalize
the symbol C~ to negative values of n, putting
ell.-n = (-1)11.- 1 ell.n+ll.-1 (2)
Fig. 22.
THE CHESS KING
An arithmetic triangle can be generated in the It is agreed that the square occupied by the
following manner. Put a "one-sided chess king" king is reached in one way only-by remaining
(this is a piece that can only move one square where it is; such ways don't exist at all for the
forward and one square upward right) in the other squares of the zeroth horizontal.
upper left corner of the table. Write in each square
the number of ways it can be reached by the king.
This yields the arithmetic triangle. THE GENERALIZED ARITHMETIC
Now replace the "one-sided king" by an ordina- TRIANGLE
ry chess king, and restrict its movements in only
.one way: the king must always move forward to The triangle in Fig. 22 may be depicted in an-
the next rank (horizontal). To enable the king other way by shifting all numbers to the right so
to utilize its new opportunities, we have to extend that the table fits into the portion of the chess-
the board and take a chessboard bounded only on board bounded by two perpendicular rays. Then
.one side by a straight line. Fig. 22 depicts such a the rule for obtaining any number of the array
chessboard, each square of which indicates the reads as follows.
number of ways the king can reach it from Each number is equal to the sum of three numbers
-square A. of the preceding row: one straight up and two adja-
Let us see how the new table is constructed. cent ones to the left. The corner is occupied by the
Suppose that we have already found the number number 1, and all other elements of the zeroth row are
of ways our wandering king can reach each square zero.
-of horizontal line n - 1. Let us find the ways of For example, the number 16 in the fourth row
reaching squares on the nth horizontal. The king is the sum of the numbers 3, 6 and 7 of the third
can reach every one of them from adjacent squares row .
.of horizontal n - 1 (see Fig. 22: immediately Further generalization of the arithmetic tri-
below, right upward and left upward). By the angle is clear. Take some natural number m and
rule of sum, we get the following result. fill in the array using the rule: put the number 1
75
in the upper left corner and adjoin zeros for all GENERALIZED ARITHMETIC TRIANGLES
the remaining cells of the zeroth row. Then write, AND A BASE-M NUMBER SYSTEM
in each cell of the first row, the sum of the m
-elements of the zeroth row: the one directly The numbers Cm (k, n) are related to the base-m
above the desired element and the m - 1 ele- number system. Namely, Cm (k, n) is equal to
ments to the left of it. Then, quite naturally, the the number of n-digit numbers in a base-m system of
first m elements of the first row will be equal to numeration in which the sum of the digits is k.
unity, and the remaining elements, zero (if cer- The term "n-digit" will be taken to include num-
tain summands are lacking when constructing bers beginning with one or several zeros. To
a sum, the missing terms are considered equal illustrate, 001, 215 will be regarded as a six-
to zero; in othe.r words, the table is completed digit number the sum of whose digits is equal to 9.
leftwards by an array of zeros (see Table 7). In order to prove the stated assertion, denote
by Bm (k, n) the set of n-digit numbers in the
Table 7 base-m system of numeration, the sum of the
digits of which is k. We will demonstrate that
0 0 1 0 0 0 0
0 0 0 0 the numbers Bm (k, n) satisfy the same relation
0 0 1 1 1 0 0
0 0 0 .o (3) as Cm (k, n) does. Indeed, the last digit
0 0 1 2 3 2 0
1 0 0 0 of a number in the base-m system of numeration
0 0 1 3 6 7 6 1 3 0 0 can assume one of the values 0, 1, ... , m - 1.
0 0 1 4 10 16 19 16 10 4 1 Accordingly, the sum of the digits of an (n - i)-
.. . . . . . . . . . . . . . . digit number obtained from an n-digit number
by dropping the last digit can assume one of
the values k, k - 1, ... , k - m + 1. Then,
The remaining rows are filled in exactly the
from the rule of sum, we obtain
same way: each element of the table is equal to
the sum of the m elements of the preceding row: Bm (k, n)=Bm (k, n-1)+ ...
the element directly above the desired element ... +Bm(k-m+i, n-1) (4)
and the m - 1 elements to the left. In particular, Besides it is clear that Bm (k, 1) is equal to
the arithmetic triangle is obtained when m = 2, 1 if 0 ~ k ~ m - 1, and 0 otherwise (in a base-
and the triangle in Table 7 when m = 3. m system of numeration there is only one single-
In order to differentiate between arithmetic digit number with the sum of the digits equal
triangles with distinct values of m, we will term to k, if 0 ~ k ~ m - 1, and there is no such
them m-arithmetic triangles. The element of an number if k ;;a. m). Thus, the first row of the table
m-arithmetic triangle lying at the intersection of num~ers Bm (k, n) coincides with the first
of the nth horizontal and kth vertical is denoted row of the table of numbers Cm (k, n). Since
by Cm(k, n). From ,the definition of an m-arith- the rules (3) and (4) for constructing these
metic triangle it follows that the numbers Cm (k, n} tables also coincide, we have Bm (k, n) =
satisfy the relation = Cm (k, n} for arbitrary k and n.
Cm(k, n)=Cm (k, n-1)+Cm(k-1, n-1)+···
SOME PROPERTIES
... +Cm(k-m+1, n-1) (3)
OF THE NUMBERS Cm (k, n)
'The boundary conditions are The numbers Cm (k, n) have a range of proper-
C (k 1 = { 1 if 0 k < < m -1; ties resembling those of the numbers C~. This
m ' ) 0 if k;;;., m should be no surprise since by virtue of the con-
76
struction of the arithmetic triangle we have with digit sum k is equal to Cm (k, n), relation
C2 (k, n) = C~. Note first of all that Cm (k, n) (7) follows by the rule of sum.
is nonzero only when 0 ~ k ~ n (m - 1). This In particular, for l = 1, relation (7) leads to.
follows immediately from the fact that each suc- (3) (since Cm (k, 1) = 1 for 0 ~ k<m- 1
ceeding row of the m-arithmetic triangle is longer and Cm (k, 1) = 0 when k ;;;;;;: m).
than the preceding one by m - 1. Finally, let us show that the following equation
We now show that the numbers Cm (k, n) holds:
possess the following symmetry property:
C~Cm_ 1 (k-n, n)+C!Cm_ 1(k-n+1, n-1)+ ..•
Cm(k, n)=Cm(n(m-1)-k, n) (5)
+C~Cm_ 1 (k-n+s, n-s)+ ..•
To do this, we associate with each n-digit number
in the base-m system of numeration a "comple-
+C~Cm_ 1 (k, O)=Cm (k, n) (8)
mentary number" obtained by replacing each
digit by its complement with respect to
m- 1. For example, in the base-7 number system, To do this, split into classes all n-digit numbers
the complement of 3, 140, 216 is the number in the base-m system of numeration whose-
3, 526, 450. Clearly, if the sum of the digits digii sum is k. Put in the sth class, 0 ~ s ~ n,
of the given number is k, then the sum of all numbers whose base-m notation exhibits exa-
the digits of the complementary number is equal ctly s zeros.
to n (m - 1) - k. For this reason, there are Let us see how many numbers enter into the
just as many n-digit numbers with the sum sth class. Each number of the sth cla'3s can be
of digits k as there are with the digit sum chosen in two stages. First choose the positions
n (m - 1) - k. But that is what (5) expresses.
of the zeros. Since n-digit numbers are being con-
Since the total number of n-digit numbers in sidered and the number of zeros is s, this can be.
the base-m system of numeration is equal to done in C~ ways. Then cross out all zeros and
mn (see page 11), the following relation holds:
reduce each remaining digit by unity. We get an
(n - s)-digit number written with the digits
Cm (0, n)+Cm (1, n)+ ... + Cm (n (m-1), n)= mn 0, 1, ... , m- 2 [which is a number in the
(6)
base-(m- 1) system of numeration], the sum
of the digits of which is equal to k - (n - s) =
Let us now prove the relation
+
= k - n s. There are Cm-t (k - n + s, n - s}
Cm (0, l) Cm (k, n-l) + such numbers. From the foregoing reasoning, it
is evident that the sth class includes C~Cm-t (k-
+Cm (1, l) Cm (k-1, n-l)+ ... - n + s, n - s) numbers. Since the total num-
.•. +Cm (k, l) Cm (0, n-l)=Cm (k, n) (7) ber of n-digit numbers having digit sum k is equal
to Cm (k, n), relation (8) follows by the rule of
where 0 ~ l ~ n. To do this, partition into clas- sum.
ses all n-digit numbers with digit sum equal to Since C2 (k, n) = C~, relation (8) implies
k. Put in the sth class those numbers whose sum of
the first l digits is equal to s. Then the sum of Ca(k, n)=C~Ck-n+c!q:~+t+···+~cg
the last n - l digits will be equal to k - s.
By the rule of product we find that the sth class Repeated application of formula (8) yields the
includes Cm (s, l) Cm (k - s, n - l) numbers. expression of Cm (k, n) in terms of binomial
Since the total number of n-digit numbers coefficients.
77
A CHECKER IN THE CORNER Each route can be denoted by a succession of
zeros and ones, a zero defining a move leftwards,
Again take an infinite chessboard bounded by and a one, a move to the right. The number of
two perpendicular rays and put a checker in the zeros and ones is then determined solely by the
.corner as shown in Fig. 23 (the figure includes square to be reached by the piece. For instance,
an extra column that will be needed later on). any route made up of 4 zeros and 6 ones leads to
In each square of the chessboard write the num- a square at the intersection of the second vertical
ber of ways the piece can reach it. The result line and the tenth horizontal line (as before, the
extreme lines are labelled zero).
However, not every succession of zeros and
ones is permissible. It is forbidden, say, to begin
with zero since it will take the piece off the board
at once. Admissible sequences have the follo-
wing characteristic features: there are at least
as many ones as there are zeros in front of each
position in the sequence at any instant, the num-
ber of moves rightwards must not be less than the
number of moves leftwards, otherwise the piece
will go beyond the limits of the board.
Fig. 23.
Fig. 28.
t
"' ~ BK (k,N-k)
~
the straight line Ox. Half turn left, the other half
turn right. In one hour, each group subdivides once
again, the halves going right and left. These subdi-
visions occur at hourly intervals. How many per-
m
I~ sons will arrive at each point after a lapse of N
~ hours?
We assume that in one hour they cover one
~ half of a unit of the route. Arguing in a manner
A similar to the reasoning of the above problem,
we get the following result: after N hours, the
Fig. 29. hikers will have reached the points Bk { k- ~) ,
k = 0, 1, ... , N (the starting point is 0). A
all reach Bk with coordinates of the form (k,
N- k), where k assumes the values 0, 1, . . . , N. total of C~ = k!(:}_ k)l persons will have arrived
All these points are located on the straight line at the point Bk.
passing through the points B 0 (0, N) and BN It is highly improbable that people actually
(N, 0) (see Fig. 29). walk as described (true, in the original version,
Our job now is to find out how many persons we are told, there was a decent bar at point 0).
arrive at point Bk (k, N - k). Label all routes But in certain problems of physics such wande-
leading from A (0, 0) to the points Bk (k, N - k), rings occur quite naturally. Random walks are
k = 0, 1, ... , N, by means of zeros and ones. just such an elementary model of the Brownian
We thus obtain all possible N-sequences of zeros motion executed by particles under the impacts
and one:::.. There are, as we know, 2N such sequen- of molecules.
ces, that is to say, just as many as there are peop- Let us consider particles that can only move
le that left A. This implies that each route will in a straight line. Since the molecular impacts
be traversed by exactly one person. Therefore, are of a random nature, we can take it, as a first
point Bk (k, N - k) will be reached by exactly approximation, that in unit time half the parti-
as many people as there are shortest routes lea- cles will have moved 1/ 2 unit length to the right
ding to it from A. But we have already computed and the other half, 1/ 2 unit length to the left
the number of such minimal-distance routes. (actually, of course, the process is far more intri-
It is cate and movements over a great variety of dis-
k N! tances are possible). Therefore, if we take 2N
p (k, N-k)=CN= k! (N-k)! particles originally at point 0, then they will
6-59
82
move, approximately, as described in our prob- are roughly
lem. In physics, this is called dtffuston. The pro-
blem we solved involving the random walks of 12amN
V2nN(mB-1)
[ 72xS
exp - NB(m2-f)2
J
a group of people enables us to find out how
diffusing particles move during a certain time particles (here, exp x is used to denote ex). Thi~
after the start of diffusion. Namely, in N units assertion can be interpreted as follows. Construct
of time the particles are distributed according a step-like line whose height at the point Bk (k -
to the following law: there will be. C~= k!(:~k)!
m-1
- - 2 -N) is Cm (N, k). Reduce all the abscis-
Fig. 30. 2 1 2 2
Qn=1+Cn+ 1X2 CnCn-2+
+
a 4n by 4n board: this is so because on a (4n 1) . 1 c2c2 c2
by (4n + 1) board one rook must be in the centre -t- 1 X 2 X 3 n n-2 n-4 +. •• (19)
and the central row and column can be crossed
out. Therefore It is derived by partitioning all placements of
the rooks into classes, the sth class including
(17)
positionings in which s pairs of rooks do not oc-
Now for (4n + 2) by (4n +
2) and (4n +3) cupy the diagonal.
by (4 n + 3) boards, the number of solutions In the same way it is demonstrated that the
is zero. Indeed, there are two cases for each number Bn of ways of putting n rooks on an
rook: either the centre of the board or not the n by n board such that the rooks are nontaking
centre. In the latter case, the rook is one of and are symmetric about both diagonals satis-
a foursome of rooks that pass into one another fies the relations
in rotations of the board through 90°. For this Bzn = 2Bzn-2 + (2n- 2) Bzn-4• B2n+1 = Bzn
87
Now the number of ways of placing two knights
TWO KNIGHTS
of different colours so that they do not capture
In how many ways can we put a white and a black each other is
knight on an m by n chessboard so that they do not m2n2- 9mn+ 12m+ 12n- 16
capture one another? (We can put two knights on an m by n board
The solution of this problem is complicated in mn (mn - i) ways.)
by the fact that on different squares of the board Composers of chess problems sometimes intro-
the knight has different numbers of moves: if duce "new" chessmen that move in unusual ways,'
m >- 5 and n >- 5, there are only two moves in Let us introduce a new piece and call it the
the corner of the board, three moves on some (p, q)-knight, p >- 0, q > 0. One move of
extreme squares, and four moves on others, while this piece consists in traversing p squares hori-
there are 8 moves in the centre. This is due to the· zontally and q squares vertically. For instance, the-
fact that the knight has 8 kinds of moves in all. ordinary knight is a combination of the (1, 2)- and
They can be specified by indicating how many (2, i)-knights. Reasoning as before, we con-
squares it moves horizontally and how many clude that if 0 < p -<
n, 0 < q -<m, then we
vertically. Thus, these moves are: (2, i), (i, 2), can put two (p, q)-knights of different colo-
(-i, 2), (-2, i), (-2, -1), (-i, -2), (i, -2), urs on an m by n board in 4 (n - p) (m - q)
(2, -1). ways so that they are nontaking. But if p or q
To master this situation, let us agree that the is zero, then there are one half as many ways.
knight is a combination of 8 chessboard pieces, The number of ways is also cut by one half if
each one of which has moves of one type only. the knights are of one colour.
Let us see in how many ways we can put a (2, i)- Any chessboard piece can be regarded as a com-
knight on the board so that it keeps a certain bination of several (p, q)-knights with a variety
square of the board under attack. Clearly, it can of values for p and q. For instance, the king
be in any column except the last two, and in any is a combination of (0, 1)-, (1, 0)- and (1,i)-
row, except the very last one. This means that knights. And so two different-colour kings can
we can choose a column in n - 2 ways, be placed on an m by n board in
and a row in m - i ways, making a total of 2 [n (m-i)+(n-1) m+2 (n-i) (m-1)]=
(m - 1) (n - 2) ways to put a white (2, i)- =8mn-6m-6n+4
knight on the chessboard. By virtue of symmetry,
taking ways. Consequently, there are m2 n2 -
it is clear that there are just as many ways to + 6m +
6n - 4 nontaking ways of pla-
- 9mn
put any one of the white (+2, +i)-knights cing them.
so as to capture the black knight. For the white The bishop is a combination of (i,i)-, (2,2)-,
(+1, +2)-knights, there are (m- 2) (n- 1)
, .. , (p, p)-knights, where p is the smallest of
ways. From this we get the total number of ways
the numbers m- i, n - 1. Suppose for the sake
of putting two knights on the board so that they of definiteness, that m -<
n. Then p = m - i,
capture one another. It is given by the formula and two bishops (black and white) may be placed
4 [(m-1) (n-2)+ (m-2) (n-1)] = in
=2 [(2m-3) (2n-3)-i] 4 [(n-1) (m-1) +(n-2) (m-2) + ...
If we were to place knights of the same colour ... +(n-m+i)Xi]
on the board so that they could defend each other, taking ways. Removing brackets and using the
we would get half the number of ways (due to formula for the sum of positive integers from 1
the possibility of interchanging the knights). to m - 1 and the sum of the squares of these
88
numbers, we find that the number of ways may Since the queen may be regarded as a combina-
2m (m-1) (3n-m-1) tion of a rook and a bishop, an m by n board
be written thus: 3 • For
(for m ~ n) can accommodate two taking queens
m :>- n, interchange m and n. In particular, in
2m (m-1) (2m-1)
if m = n, we have 3 ways.
2
For rooks it is easier to take a different appro- 3m (m-1) (3n- m-1~+ mn (m+n-2)
ach in enumerating the ways of placing rooks.
The white rook can be placed on any one of mn ways. When m = n, this expression takes on
squares. After that, it holds m + n - 2 squares the form ~ m (m- 1) (5m - 1). We leave it
under attack, on any one of which we can put the
black rook. We thus obtain mn (m + n - 2) to the reader to enumerate the ways to put these
ways of placing taking rooks. chessboard pieces in nontaking positions.
CHAPTER VI
RECURRENCE RELATIONS 89
In solving a number of combinatorial problems But P1 = 1 since one element can be permuted
we have already made use of the method of redu- in one way only. Therefore
cing the given problem to one involving a smal- P 11 =n (n-1) ... 2 X i=nl
ler number of objects. An instance is the formula
for the number of permutations with repetitions And we again have the formula P 71 = nl.
which we derived on page 10. This same method We encountered numerous recurrence relations
was used to solve almost all the partition pro- when solving problems involving partitions,
blems in Chapter IV. The method of reduction chessmen on a chessboard, etc. We will now exa-
to a similar problem for a smaller number of mine some more problems of this type and at
objects is termed the method of recurrence relations the end of the chapter we will investigate the
(from the Latin recurrere, to run back). Using are- general theory of recurrence relations.
currence relation, we can reduce a problem invol-
ving n objects to one involving n - 1 objects,
then to one dealing with n - 2 objects, etc. FIBONACCI NUMBERS
By consecutively reducing the number of objects,
In his book "Liber abaci", which appeared in
we arrive at a problem we are able to solve. In
1202, the Italian mathematician Fibonacci gives
many cases it is possible, from the recurrence
this problem (the Rabbit Problem):
relation, to obtain an explicit formula for sol-
How many pairs of rabbits can be produced from
ving the combinatorial problem.
a single pair in a year if every month each pair
For instance, in Chapter II (see page 23), we
begets a new pair which from the second month on
derived the formula P 71 = nl for the number of
becomes productive?
permutations of n elements using the formula
It follows that in one month's time there will
for the number of permutations without repeti-
he two pairs of rabbits. In two months only
tions. But the same formula may be derived in
the first pair will produce, and we have 3 pairs.
a different way, by first finding the recurrence
Within another month, the original pair will
relation which P 71 satisfies.
produce and so will the pair of rabbits that appe-
Suppose we have n objects a 11 •.. , lln-h lln·
ared two months before. There will then be 5 pairs
Any permutation can be obtained as follows:
of rabbits.
take a permutation of the elements a11 • • • , a 71 _ 1
Let us denote by F (n) the number of pairs
and adjoin element lln· Element lln can clearly
after n months starting at the beginning of a year.
occupy distinct positions. It can be placed at
the very beginning, between the first and second
We see that in n + 1 months there will be F (n)
pairs and as many more newly born pairs as there
elements of a permutation, between the second
were at the end of the month n- 1, which is
and third, and also at the very end. The number
to say, F (n - 1) pairs of rabbits. In other words,
· of distinct positions that lln can occupy is equal
we have the recurrence relation
to n, and so each permutation of the elements
a1o ••• , lln-1 yields n permutations of the ele- F(n+1)=F(n)+F(n-1) (1)
ments a1, • • • , ~Jn- 1 , lln· Which means that Since, by hypothesis, F(0)=1, and F(1)=2,
there are n times more permutations of n ele- we find, in succession,
ments than there are permutations of n - 1
F (2) = 3, F (3) = 5, F (4) = 8, etc.
elements. We thus have the recurrence relation
Pn=nPn-1 In particular, F (12) = 377.
Using this relation, we find, successively, that The numbers F (n) are called Fibonacci numbers.
P71 =nPn-t=n(n-1)P 71 _ 2 =n(n-1) ... 2P1 They possess a variety of remarkable properties.
90
correspond distinct pairs of rabbits, and, con-
versely, two distinct pairs of rabbits will always
have different genealogies, since, by hypothesis,
a she-rabbit gives birth to only one pair of
rabbits.
The relationship thus established shows that
the number of n-sequences with this property
is equal to F (n).
·Now let us demonstrate that
- 2 -1 I"f n IS
wh ere p = n+ · odd an d p = 2n I"f ·
n IS
even. In other words, p is the largest integer
in nt 1 [from now on we will denote the largest
such sequence and associate it with a pair of rule of sum, we get relation (2).
rabbits according to the rule: ones correspond Equation (2) may be proved differe~tly. Set
to the months when one pair is born of the "ance-
stors" of the given pair (including the original G (n)=C~+t +C!+c;_ 1 + ... +C~-v+t
pair), and zeros represent all the other months.
For example, the sequence 010010100010 esta- where p=E (nt 1 ). From C~=C!_ 1 +C!=i
blishes the following genealogy: the pair itself
it follows immediately that
appeared at the end of the 11th month, its pa-
rents, at the end of the 7th month, "grandfather" G (n)=G (n-1)+G (n-2) (3)
at the end of the 5th month, and "great grandpa"
Besides, it is clear that G(1)=2=F(1) and
at the end of the second month. The original
G (2) = 3 = F (2). Since both sequences F (n) and
pair of rabbits is labelled by the sequence
G (n) satisfy the recurrence relation X (n) =
000000000000.
It is clear that there will not be a single se-
=X (n-1) +X (n-2), we have
quence with two ones in succession, since a newly G (3)= G (2)+G(1)=F (2)+F(1)=F (3)
born pair cannot produce in one month. What
is more, the rule states that to different sequences and, generally, G (n) = F (n).
91
AN ALTERNATIVE PROOF To prove the coincidence of T (n) and F (n),
we still have to demonstrate that T (i) = F (1)
In the preceding section we established a di- and T (2) = F (2); then by the recurrence rela-
rect link between the Fibonacci problem and tion we have, also, T (3) = F (3), T (4) = F (4),
a combinatorial problem. This relationship could etc. There exist two 1-sequences satisfying this
have been established in another way, by pro- condition: 0 and i, and three 2-sequences: 00,
ving directly that the number T (n) of solutions Oi and iO. Therefore, T (1) = 2 = F (1) and
of the combinatorial problem satisfies the same T (2) = 3 = F (2). This proves the assertion.
recurrence relation
T (n+ 1)=T (n)+T(n-1) (4)
THE PROCESS OF SUCCESSIVE
as the Fibonacci numbers do. PARTITIONS
This becomes evident if we take any (n + f)-
sequence of zeros and ones satisfying the condi- Combinatorial problems are frequently solved
tion that no two ones come together. It can ter- by the method used in the above section. A recur-
minate either in 0 or 1. If it terminates in 0, rence relation is set up for the given problem
then, dropping the zero, we get an n-sequence. and then it is demonstrated that it coincides
satisfying our condition. Conversely, if we take with the recurrence relation of another problem
any n-sequence of zeros and ones in which no two whose solution is known. If, now, a sufficient
ones come together and if we adjoin a zero, then number of the initial terms of the sequences coin-
we have an (n + i)-sequence with the same cide (later on we will go into detail about how
property. We have proved that the number of many terms must coincide), then both problems
"good" sequences ending in zero is equal to T (n). have the same solutions.
Now suppose the sequence terminates in a 1. Let us apply this approach to the following
Since two ones cannot be in succession, this 1 problem. Suppose we have a certain set of n
will be preceded by a zero. In other words, the objects arranged in a definite order. We partition
sequence terminates in 01. Now the (n- i)- the set into two nonempty parts so that one of
sequence left after dropping the 0 and 1 can be them lies to the left of the other [say, one part
any so long as no two ones come in succession. consists of elements from i to m, the other, of
And so there are T (n- i) "good" sequences elements from (m + 1) to n]. Then take these
ending in one. But every sequence terminates two subsets and split them in the same fashion
either in 0 or in 1. By virtue of the rule of sum, into two nonempty parts (if one of the parts now
we have that T (n + 1) = T (n) + T (n - 1). consists of a single object, it is not further par-
This is the same recurrence relation. This does titioned). This process is continued until we
not yet imply however that the numbers T (n) have parts consisting of one object each. How
and F (n) coincide. We recall, for example, that many partition processes are there of this kind
for factorials and subfactorials (see page 45) (two processes are considered distinct if at least
we had the same recurrence relation one step produces different results)?
Denote the number of ways of partitioning a
X (n+1)=n [X (n)+X (n-1)] (5)
set of n + i objects by Bn. In the first stage,
But for factorials the first terms of the sequence this set can be partitioned in n ways (the
are 01 = 1, 11 = 1, while for subfactorials they first part, or subset, can contain one object,
are D (0) = 1, D (1) = 0. And so the third, two objects, ... , n objects). Accordingly, the
fourth, etc. terms of the sequence differed. set of all partition processes breaks up into n
92
classes, the sth class including processes in which
MULTIPLYING AND DIVIDING
the first part consists of s objects.
NUMBERS
Let us compute the number of processes in the
sth class. The first part consists of s eleJllents.
It can therefore be further partitioned by B 8 _ 1 We have n numbers a1 , • • • , ~ in a given
distinct processes. The second part contains order. By virtue of the associative law for mul-
n - s + 1 elements and it can be further par- tiplication, the product of these numbers may
titioned by Bn _8 processes. By the rule of product, be computed in different ways (preserving the·
we find that the sth class consists of B 8 _ 1 Bn -s order of the factors). For example, three numbers.
distinct processes. By the rule of sum, it then can be multiplied together in two ways (ab) c =
follows that = a (be), four numbers, in five ways, etc. It is
required to find the number of the ways of multi-
Bn = BoBn-1 + B!Bn- + ... + Bn-!Bo
2 (6)
plying together n numbers arranged in a given
We have obtained a recurrence relation for order.
Bn, which occurred (see page 52) when solving It is clear that each mode of multiplication
the problem of the line at the ticket office. There, reduces to the process of partitioning the given
it was shown that this relation is satisfied by n numbers into parts of one element each. For
the numbers example, the multiplication of four numbers.
by the formula (ab)(cd) reduces to the parti-
Tn = n~1 c-qn tion process a I b I c I d, and the multiplication
of these numbers by the formula ((ab) c) d, to the
To prove partition process a I b I c I d. Therefore the num-
1 ber of distinct modes of multiplication is equal
Bn=Tn=n+ 1 C¥n (7)
to the number of distinct modes of partitioning
we have to show that the initial terms T 0 and B 0 1 cn-1
a se t of n el emen t s, or Tn-1 = - 2n-2·
n
of the sequences T 0 , T1 , • • • , Tn, .. ~and B 0 , However, besides the associative property,
B 1 , • • • , Bn, ... coincide.
the commutative property also holds for mul-
We have T 0 = cg = 1. On the other hand, tiplication. If this is taken into account, then
B 0 = 1, since the set consisting of a single ele-
the number of processes of multiplication increa-
ment is partitioned in unique fashion. Thus, ses by a factor of nl because n numbers can be
B 0 = T 0 • But by the recurrence formula, we
permuted in n! ways; then we have to subject the
have B 1 = B~ = 1. Since T 0 satisfies the same permuted numbers to certain partitions. Whence
recurrence formula, it follows that T1 = T~ = 1. it follows that the total number of modes of
We then establish that
multiplying any n numbers is equal to (n - 1)t
CR,-;~2·
This same result can be reached directly,
and so on. Thus, all the terms of both sequences without resorting to the formula for the number
coincide. This, then, proves the following result. of partition processes. This conclusion yields
The number of processes of successive division of a a new method for obtaining a formula for par-
set of n + 1 elements arranged in a specific order tition processes and thus also for the problem of
is equal to the ticket-office line (provided the number of
roubles in the line is equal to the number of
Tn=n~1 C~n 50-copeck pieces).
93
The immediate conclusion is this. Suppose we This notation is meaningless unless we indicate
have found the number Ill (n) of ways of multi- the order in which the divisions are to be perfor-
plying n numbers. We adjoin one II).Ore factor, med. Let us enumerate the ways in which this
<Ln+t· Let us find out in how many ways we can expression becomes meaningful. To do so, note
adjoin this factor to one of the products of the that each way of indicating the order of division
numbers a1 , ••• , an. can also be regarded as a process of splitting n
We can multiply the entire product by this elements into parts containing one element each,
number an+t taking it either as the multiplicand as described above. We have seen that the num-
or as the multiplier. This gives us two modes of ber of processes is .!.
n
cr;:;:~2·
adjunction. But <Ln+t can also be adjoined at one
of the intermediate stages. The multiplication This means that expression (8) is meaningful
of n numbers reduces to n - 1 successive multi-
plications in each of which two numbers are
l' n n1 cn-l ways
2n-2 •
Let us now consider the operation of division. 2-gon"). For n = 2 we get two modes; they are
We write the expression shown in Fig. 31. In order to find the number of
ways F (n) for arbitrary n, let us derive the recur-
~ rence relation for F (n). Take one of the vertices
a2 A of the polygon. It can be joined to any of the
~ vertices B such that there are an even number of
vertices between A and B (Fig. 32). Accordingly,
(8) all methods of joining vertices fall into classes
94
depending on how many vertices remain to the ln how many ways can a corwez (n + 2)-gon
left of the segment drawn from point A. be partitioned into triangles by means of diagonals
If there are 2s vertices here, then there will be that do not intersect within the polygon?
2 (n- s - 1) vertices on the other side. Thus, Denote the number of ways by <I> (n). Take
a 2n-gon splits up into a 2s-gon and a 2 (n - s - one of the sides of the polygon and classify all
- 1)-gon. But it is possible, in a 2s-gon, to partitions depending on which vertex of the
A
\
\
\
\
\
\
\
\
\
\
\
\
\
Fig. 33.
Fig. 32.
polygon coincides with the vertex of the triangle
draw the line segments in F (s) ways so that they whose base is the chosen side (Fig. 33). If this
do not intersect. Now in a 2 (n - s - 1)-gon, triangle is removed, the polygon breaks up into
this can be done in F (n - s - 1) ways. By
the rule of product, we find that the sth class
an (s + 2)-gon and an (n - s + 1)-gon. Split-
ting these polygons into triangles and combining
includes F (s) F (n- s - 1) ways of drawing the partitions, we get all the partitions of the
line-segments. original polygon, which partitions include the
Hence, the total number of ways is removed triangle. Then, applying the rule of
P (0) F (n- 1) + F (1) F (n- 2) + ... + product and the rule of sum, we get the recurren-
+ F (n - 1) F (0). We have derived the recur-
ce relation
rence relation
+ ...
<II (n) =<I> (0) <I> (n -1) +<I> (1) <D (n- 2)
F (n)=F (0) F (n-1)+ F (1) F(n-2)+ ..• . .• +<II (n-1) <D (0)
... +F (n-1) F (0) where we set <D (0)= 1. We leave it to the reader
This is the very same relation which the num- to convince himself, using this relation, that
1
bers Tn = n~ 1 C~nsatisfy. Since F 0 = T 0 = 1, <D(n)=Tn=n+ 1 C~n
diagonals so that they do not intersect in pairs. Combinatorial problems crop up in which one
The answer is the same for the following pro- has to set up a whole system of recurrence rela-
blem. tions that link several sequences. These relations
95
express the (n +1)th terms of the sequences via which two pairs of neighbours are enemies is en.
the preceding terms not only of the given se- there are 2en ways in all.
quence, but of the other sequences as well. Now suppose there is only one pair of enemies
It so happened that the majordomo of King sitting side by side. One of the returning knights
Arthur noticed that six pairs of hostile knights had has to sit down between them. Then there will
been invlted to' dine at the Round Table. In how be 2n + 1 knights between which there are
many ways can they be seated so that no two adver- 2n + 1 places. Of these, there are two (next to
saries sit side by side? the guest who just took his seat) forbidden to
If we find some seating arrangement for the the second knight, and so he has 2n - 1 places
knights, theri by circulating them round the left. Since either of the two knights who left
table we get another 11 seatings. For the time can come in first, there are 2 (2n - 1) seating
being we will not consider as distinct those modes arrangements. But there are Bn cases when 2n
obtained by such circular rearrangements. knights took seats so that exactly two enemies
Let us introduce the following notations. The were side by side. And so we get 2 (2n- 1) Bn
number of knights is 2n. An will denote the num- seating arrangements for the guests in the manner
ber of ways of seating them so that no two oppo- required.
nents sit side by side, Bn will denote the num- Finally, suppose that no two enemies were
. her of ways of seating exactly one pair of ene- seated side by side. Then the first knight takes
mies, and en, the number of ways of seating exa- a seat between any two guests, which he can do
ctly two pairs of warring neighbours. in 2n wayl!. His enemy is then left with a choice
First, let us derive a formula expressing An+i of 2n - 1 seats: he can take any place, with the
in terms of An, Bn and en. Let n + 1 pairs of exception of the two places adjacent to the knight
knights be seated so that no two enemies sit next who just sat down. Thus, if 2n knights are already
to each other. We assume that all the hostile seated as required, then the returning guests can
pairs of knights are labelled. We ask the pair of be seated in 2n (2n - 1) ways. This makes a to-
knights with the number n + 1 to rise. There tal of 2n (2n - 1) An ways.
are then three possibilities: there is not a single As we have already pointed out, these cases
pair of hostile neighbours seated at the table, exhaust all the possibilities, and so we have the
there is one such pair, and, there are two such recurrence relation
pairs (the knights who got up could have been
An+1=2n(2n-1) An+2(2n-1) Bn+2en (9}
separating these pairs).*
Now let us find out in how many ways we can This relation is still not enough to be able to
again seat the knights who left the table so that find An for all values of n. We have yet to indi-
there is no pair of warring knights. cate how we are to express Bn+i and en+i in
Seating them is elementary if there are two terms of An, Bn, en-
pairs of enemies at the table. Then one of the Suppose that among the 2n + 2, n > 1, knights
newcomers takes a seat between the knights of there proved to be exactly one pair of enemy
the first pair, the other between those of the second neighbours. We know that this can occur in
pair. This can be done in two ways. But since Bn H cases. To avoid unpleasantness, we ask
the number of ways of seating 2n knights in them to get up and leave the table. This leaves
2n knights, and one of two things is possible:
either there are no enemy neighbours among
* Here and henceforth we assume that n > 1 as well. them, or there is exactly one pair of such enemi-
When n = 1 the arguments that follow become meanin•
gless. ' · es-they were on either side of the two who left
96
and now find themselves next to one another. n >-1,
In the latter case, those who left can only be Cn+t=2n (n+1) An+2 (n+1) Bn (11)
seated in their old places, otherwise another
hostile pair will appear. But since 2n knights can We now have a system of recurrence relations
be seated in Bn ways so that there is only one An+t=2 (2n-1) (nAn+B11 )+2Cn, (9)
hostile pair together, we obtain 2B11 variants Bn+1 = 2 (n+1) (2nAn +Bn), (10)
(the returning knights can change places). But
in the first case, we can seat those who left bet- + +
Cn+1 = 2 (n 1) (nA 11 Bn) (11)
ween any two knights, which is to say in 2n which hold true for n >- 2. However, a simple
ways; and since they can be interchanged, we computation shows that A 2 = 2, Bz = 0, C2 =
have 4n ways. Combining them with all the = 4. It therefore follows from the relations
other seating arrangements of n pairs of knights, (9)-(11) that A 3 = 32, B 3 = 48, C3 = 24. Con-
with no adjacent enemies, we get 4nAn ways. tinuing, we find that the guests may be seated
Finally, the label of the pair that left and retur- in the required fashion in a total of A 6 =
ned could be any one from 1 to n +
1, which = 12,771, 840 ways.
implies that the recurrence relation for Bn H The foregoing problem is much like the follo-
is of the form wing one, which is often referred to as the "pro-
(10) blem des menages".
In how many ways is it possible to seat n married
Finally, let us take up the case whell there are couples at a circular table so that men and women
two hostile adjacent pairs among 2n + 2 knights. are in alternate position and no wife stts next to
The labels of these pairs can be chosen in C~H = her husband?
i
n(n 1) ways. Let us replace each pair by a new This problem is solved in roughly the same
way as the majordomo problem. First seat the
knight and we consider the two new knights as women. If the seats are labelled, then either all
enemies. Then there will be 2n knights seated the women are on even seats, or on odd seats.
at the table, and among them there will be eit- But the number of even places is n, and the wo-
her no pair of enemy neighbours (if the new men can thus be seated in nl ways. The number
knights are not sitting side by side), or there will of ways is the same for the odd seats. Thus, the
be only one such pair. women can be seated in 2 X (nl) ways. Then
The first version occurs in An cases. We can consider the cases when no husband can sit next
revert to the original company in 4 ways because to his wife, when a couple is seated together, and,
of the possibility of changing the order of the finally, when two couples come together. We
knights in each pair. Therefore, the first version leave it to the reader to set up the appropriate
leads to 4C~HAn = 2n (n +1) An seating arran- system of recurrence relations.
gements.
The second version, however, can occur in
_!_ B11 cases*. Here too we can revert to the origi- LUCKY TROLLEYBUS TICKETS
n
nal company in 4 ways, and we get a total of There are people who believe that there are
2 (n +
1) B11 ways, which implies that, for lucky trolleybus tickets, such as when the sum of
the digits occupying the even positions is equal
* There are Bn cases when two hostile knights are side to the sum of the digits in odd sites. Say, the
by side. It we indicate the precise two that have to sit
:together, we get n times fewer cases. ticket 631 752 is "lucky" since 6 + 1 + 5 =
97
= 3 + 7 + 2 = 12. Our task now is to find the this sum is N. The number in the Nth site of
"lucky'' numbers between 000000 and 999999. the third row of our table indicates how many
To do this, first find out how many three-digit three-digit numbers have the sum N of digits.
numbers have the given sum N of digits (here In other words, this number indicates in how
we consider numbers of the form 075 and even many ways it is possible to choose the digits
000 as three-digit numbers). This problem resem- occupying even sites (that is, second, fourth and
bles the one solved on page 62: the number of sixth). In the same number of ways we can choose
summands is 3, the sum is N, and the summands the digits in the odd sites (first, third, and fifth).
are from 0 to 9. Let us denote the number of its Since these choices are independent of one an•
solutions by F (3, 9; N). Then we have the recur- other, it follows, by the rule of product, that there
rence relation are [F (N))2 lucky tickets with the sum N of
digits in even sites. But then, by the rule of sum,
F(3, 9; N)=F(2, 9; N)+F(2, 9; N-1)+
the total number of lucky numbers is
+F(2, 9; N-2)+F(2,9;N-3)+F(2, 9;N-4)+
2 [12+ 32 + 62+ 102 + 152+212+ 282+362+
+F (2, 9; N -5)+F (2, 9; N -6)+F (2, 9; N -7)+
+ 452 + 552 + 632 + 692 + 732 + 752)
+ F (2, 9; N- 8) + F (2, 9; N- 9)
This yields the answer: 55,252.
In exactly the same way, we have
F(2, 9; N)=F(1, 9; N)+F(1, 9; N-1)+···+
+F (1, 9; N -9)
RECURR~NCE TABLES
It is clear that F(1, 9; N)=1 if 0-<,N <,9, In combinatorics, one often deals with quanti-
and F(1, 9; N) = 0 otherwise. Using these relati- ties that depend on several numbers, not one.
ons, we can easily fill in the following table. For example, the number C~ is a function both
Table 8
~ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0
2 1 2 3 4 5 6 7 8 9 10 9 8 7 6 5
3 1 3 6 10 15 21 28 36 45 55 63 69 73 75 75
~ 15 16 17 18 19 20 21 22 23 24 25 26 27
1 0 0 0 0 0 0 0 0 0 0 0 0 0
2 4 3 2 1 0 0 0 0 0 0 0 0 0
3 73 69 63 55 45 36 28 21 15 10 6 3 1
Now we can find the lucky tickets by squaring of n and of k. If a quantity at hand, F (n, k),
the numbers of the third row and adding the re- say, depends on two natural numbers n and k,
sults. True enough, every lucky ticket has the then its values may be arranged in the form of
same sum of digits in even and odd sites. Suppose a table, positioning F (n, k) at intersections of
7-59
98
tll.e nth row and kth column. We have already Quite different is the recurrence relation for
encountered such quantities a number of times the arithmetic triangle and the m-arithmetic
in Chapter V: the arithmetic square, arithmetic triangle. Namely, for the m-arithmetic triangle,
triangles and generalized arithmetic triangles F (n, k)=F(n-1, k-m+1)+
were just such tables.
+F(n-1, k-m+2)+ ... +F(n-1, k) (13)
In all the examples studied in Chapter V, there
existed certain relationships between the ele- Here, F (0, 0)= 1 and F (0, k)=O if k > 0.
ments of the table. These relationships enabled
us to compute the .elements of the nth row of
the table on the basis of elements of the preceding ALTERNATIVE SOLUTION
row and, possibly, on the basis of the first several OF THE MAJORDOMO PROBLEM
elements of the nth row. For this reason, if the
first row of the table was specified and also the As yet another instance of the use of recurrence
first elements of the other rows, the remaining tables, we offer an alternative solution to the
rows could be computed one after the other. problem of the majordomo (see page 95). As the
Such tables are reminiscent of recurrence relations reader recalls, we were seeking the number of
and we shall call them recurrence tables from seating arrangements for 2n knights about the
now on. Round Table so that no two enemy knights
For the arithmetic square, the recurrence sat together (there were n pairs of enemies
relation is of the form among the 2n knights).
We denote by F (m, n) the number of ways of
F(n, k)=F(n-1, k)+F(n, k-1) (12) seating the knights so that exactly m pairs of
and the boundary conditions were ·specified as enemies come together. We will now derive a re-
F (n, 0) = 1, F (0, k) = 0 for '' > 0 (it will be currence formula expressing F (m, n + 1) in
recalled that relative to the arithmetic square we terms of F(k, n), k = m- 1, m, m + 1,
speak of the zeroth column or row, not the first). m+2.
The arithmetic pentagon and hexagon have We assume that at first there were n pairs of
recurrence relations that are of the same form knights at the table, then pair n + 1 came and
as (12). The point is that these figures appeared sat down. Now let us compute the number of
when we counted the number of ways a rook can cases of m pairs of adjacent enemies seated at the
~et to a certain square by moving over a board
table. This can occur in the following manner:
bounded by two perpendicular rays and one or (a) There were m- 1 pairs of enemies seated
two lines parallel to the principal diagonal. together at the table. This could occur in F(m -
But a rook can reach square (n, k) either from - 1, n) ways. In order to have m pairs of hostile
(n- 1, k) or from (k- 1, n). And so no matter neighbours, the new pair would have to sit down
what the restrictions imposed on its motions, together without breaking up any one of the
relation (12) will always hold. Now restrictions already seated enemy pairs. But there are 2n ·
result in certain of the elements of the table being gaps between 2n knights and m- 1 gaps are
zero for sure. Such elements in the arithmetic forbidden. This leaves 2n - m + 1 gaps where
pentagon are those lying above some straight the newly arrived knights can take seats. ~ince
line parallel to the principal diagonal; for each gap can be filled in two ways (the newcomers
the ll'l'ithmetic hexagon, these are the elements can change places), we get a total of
outside a domain cut off by two straight lines 2(2n-m+1)F(m-1, n) (14)
parallel to the principal diagonal. ways.
99
(b) There were m pairs of enemies seated Therefore, F(m, n) satisfies the following recur-
together. In this case, the newcomers could choose rence relation:
one of two things: either sit separately, without
F(m, n+1)=2 (2n- m+1) F (m-1. n)
separating any pair of neighbouring enemies,
or sit down together between two hostile neigh- +[(2n-m)2-2n+3m] F (m, n)
bours. It is easy to compute that the first solution +2(m+1)(2n-m-1)F(m+1, n)
can be accomplished in (2n - m) (2n - m - 1) +Cm+1)(m+2)F(m+2, n) (18)
ways, while the second can be done in 2m ways,
making a total of (2n - m) 2 - 2n + 3m ways. A direct computation shows that
Since n pairs of knights can sit in F(m, n) ways F (0, 2)=2, F(1, 2)=0, F(2, 2)=4
where there are m pairs of enemies, we get a total
(we do not consider as distinct the seating arran-
of
gements obtained by circular permutations).
[(2n-m)2-2n+3m]F(m, n) (15) Applying formula (18), we find that
F(O, 12) = 12,771,840.
ways.
(c) We further consider the case when there
were m + 1 pairs of enemies together among 2n
knights [this occurs in F(m + 1, n) ways]. In this SOLUTION
case, one of the newcomers has to sit between one OF RECURRENCE RELATIONS
of the enemy pairs, and the other has to sit so that
he does not upset any such pair. The former can We shall say that a recurrence relation has
be done in m + 1 ways, and the latter in 2n - order kif it permits expressing I (n +k) in terms
- m-1 ways. We get a total of 2 (m + 1) (2n - of l(n), l(n + 1), ... , l(n + k - 1). Say,
- m - 1) possibilities (the factor 2 appears f (n+2)=/ (n) I (n+1)-312 (n+1)+1
because either of the newcomers can sit down is a recurrence relation of the second order, and
between enemies). This case therefore offers a
a total of f (n +3)= 6/ (n) f (n+2)+ I (n+ 1)
is a third-order recurrence relation.
2(m+1)(2n-m-1)F(m+1, n) (16)
If a recurrence relation of order k is given, then
opportunities. it is satisfied by an infinite number of sequences.
(d) Finally, suppose that there were m + 2 The point is that the first k elements of the sequ8II-
pairs of enemy neighbours. This could occur in ce can be specified quite arbitrarily, there being
F(m + 2, n) ways. In order to obtain only m no relations between them. But if the first k ele-
pairs of warring neighbours, each of the newco- ments are specified, then all the remaining ele-
mers has to break up one such pair. The first ments are determined in unique fashion: element
knight can sit down in m +2 ways, and the se- l(k + 1) is expressed by virtue of the recurrence
cond one has only m + 1 seats to pick from. relation in term of 1(1), ... , l(k), element
In all, there are I (k+ 2) in terms of I (2), ... , I (k + 1), etc.
Using recurrence relations and the initial
(m+1)(m+2)F(m+2, n) (17)
terms, it is possible to write down the terms of
possibilities. a sequence one after the other, and sooner or
It is easy to see that we have exhausted all later we can obtain any term. However, -in the·
possibilities of seating at the Round Table m pairs process we will have to write out all the preceding
of hostile neighbours from among 2n + 2 knights. terms since without them we cannot write down
7*
100
the subsequent terms. Now in many cases we are Now it is easy to see that for any values of a
only interested in one definite term of a sequence, and b, the system of equations
the other terms being of no interest at all. In these { 2C 1 +3C 2 =a,
cases, it is more convenient to have an explicit 4Ct+9C2=b (21)
formula for the nth term of the sequence. We shall
has a solution. Therefore, (20) is indeed the
say that a certain sequence is a solution of a
given recurrence relation if upon substitution of general solution of the relation (19).
the sequence the relation is identically satisfied.
To illustrate, say, the sequence LINEAR RECURRENCE
2, 4, 8, ... , 2n, ... RELATIONS WITH CONSTANT
COEFFICIENTS
is one of the solutions of the recurrence relation
Generally speaking, there are no general rules
f (n+ 2) = 3/ (n+ 1)- 2/ (n) for solving recurrence relations. However, there
is a class of relations very often encountered that
Indeed, the general term of this sequence is of is solvable by a uniform method. These are recur-
the form f (n) = 2n. Hence, f (n + 2) = 2n+2, rence relations of the form
f (n + 1) = 2n+1. But for any n, we have the I (n+k) =atf (n+k-1)+a2/ (n+k-2)+ ... +
identity 2n+ 2 = 3 X 2n+1 - 2 X 2n. And so 2n +akf (n) (22)
is a solution of the indicated relation.
A solution of a kth order recurrence relation where a11 a2, •.. , ak are certain numbers. These
is termed general if it depends on k arbitrary relations are called linear recurrence relations
constants C11 • • • , Ck, and a selection of these with constant coefficients.
constants yields any solution of the given rela- Let us first see how they are solved for k = 2,
tion. For instance, the general solution of the that is let us make a study of relations of the form
relation f(n+2)=atf(n+1)a 2f(n) (23)
I (n+2)=5/ (n+1)-6/ (n) (19) The solution of these relations is based on the
following two assertions:
is
(1) If ft (n) and / 2 (n) are solutions of the recur-
(20) rence relation (23), then for arbitrary numbers
A and B the sequence I (n) = Aft (n) + B/2 (n)
It is easy to verify that in fact the sequence (20) is also a solution of this relation.
converts relation (19) into an identity. And so Indeed, by hypothesis, we have
all we have to do is demonstrate that any solu- It (n+2)=atft (n+1)+a2/t (n)
tion of our relation can be represented as (20).
and
But any solution of (19) is uniquely determined
by the values of f (1) and f (2). We therefore /2 (n+2)=atf2 (n+1)+a2/2 (n)
have to prove that for arbitrary numbers a and b Multiplying these equalities by A and B, respec-
there exist values Ct and C 2 such that tively, and adding the resulting identities, we
get
. 2C 1 -f-3C 2 =a
Aft (n+2)+Bf 2 (n+2)=at [Aft (n+1)+
and +B/2 (n+1)]
22Ct+32C:~=b +a2 [Aft (n)+B/2 (n)]
101
But this means that A/1 (n) +B/ 2 (n) is a solu- strated that any solution of (23) can be written
tion of (23). in this form. But any solution of a second-order
(2) If the number r 1 is a root of the quadra- relation is determined by the values f (1) and
tic equation f (2). It therefore suffices to show that the system
of equations
r 2=atr+az
Ct+C 2 =a,
then the sequence {
1, r~o rf, ... , rf- 1 ,
C1r1 +
C2 r 2 = b
has a solution for arbitrary a and b. Verify
is a solution of the recurrence relation that these solutions are
True enough,
f (n+ 1) = rf and
for if /(n)=rf- 1 , then
f (n+ 2) = rf+I. Substituting
..
Later we shall take up the case when both roots
these values into (23), we get of equation (24) coincide. Meanwhile we give
rf+1 = atrf+ azrf-1 an example of this rule.
When we studied the Fibonacci numbers, we
It holds true since, by hypothesis, we have
arrived at the recurrence relation
ri= a1r+-a 2•
Note that in addition to the sequence {rf- 1 } f (n)=f (n-1)+ f (n-2) (25)
any sequence of the form
Its characteristic equation is of the form
f(n)=rf+m, n=1, 2, ...
r2= r+-1
is also a solution of (23). To prove this, it suffices The roots of this quadratic equation are the
to use assertion (23), setting A = rf>+I, B = 0. numbers
From the assertions (1) and (2) there follows
a rule for the solution of linear recurrence rela- rt=
1+
2
-vs '
tions of the second order with constant coeffi-
cients: And so the general solution of the Fibonacci
Given a recurrence relation relation is of the form
f (n+-2) =ad (n+1)+-azf (n) (23)
(26)
Form the quadratic equation
r2=atr+a~ (24) (we took advantage of the remark made above
which is called the characteristic equation of the and took n instead of n - 1 as tJ·,e exponents).
given relation. If this equation has two distinct We used the term Fibonacci numbers for the
roots r1 and r2 , then the general solution of rela- solution to the relation (25) that satisfies the
tion (23) is of the form initial conditions f (0) = 1 and f (1) = 2, that
+ C 2 r~- is for the sequence 1, 2, 3, 5, 8, 13, . . . . It
f (n) = C 1r~<-J 1
is often more convenient to adjoin the numbers
To prove this rule, note first that by assertion 0 and 1 at the beginning, that is to consider the
(2), ft (n) = rf- 1 and f 2 (n) = r~- 1 are solutions sequence 0, 1, 1, 2, 3, 5, 8, 13, . . . . It is clear
of our relation. But then, by assertion (1), C1rf + that this sequence satisfies the same recurrence
+ C 2 r~ too is a solution. It need only be demon- relation (25) and the initial conditions f (0) = 0,
102
f (1) 1. Putting n = 0 and n = 1 (26), we
= Let us verify that f 2 (n) = nrjl-1 is indeed its
get a system of equations for C1 and C2 : solution. We have
fdn+2)=(n+2)rf+1 but /2(n+1)=(n+1)rjl.
Substituting these values into (28), we get the
obvious identity
Let us now examine the case when both roots f(n+k)=atf(n+k- 1)+ ... +akf(n) (29)
of a characteristic equation coincide: r 1 = r 2 • Set up the characteristic equation
In this case, the expression C1 r1n-1 + C 2 r~- 1
rk=a!rk-1+ ... +ak
will no longer' be the general solution, the point
being that since r1 = r 2 , this solution can be If all- the roots Tf> ••• , rk of this kth degree
written as algebraic equation are distinct, then the general
solution of (29) is of the form
f (n) =C 1 rr-1+C 2 r~-1+ ... +Ckr~-1
We only have one arbitrary constant C and it is
But if, say, r 1 =r2 = ... =r8 , then to this
impossible, speaking generally, to choose it so
root there correspond the solutions
as to satisfy the two initial conditions f (1) = a
and f (2) = b. /dn)=rr- 1, f2(n)=nrf- 1, j3(n)=
And so we have to find some second solution =n2rf-1, ... , fs(n)=ns-lrr-1
distinct from / 1 (n) = rf- 1 • It turns out that
of the recurrence relation (29). In the general
12 (n) = nrf-1 is such a solution. Indeed, if the
+ a 2 has two coin-
solution, to this root corresponds the part
quadratic equation r2 = a1 r
cident roots r1 = r 2 , then by Vieta's theorem, rf-1 [C 1+C2n+C3n2+ ... +C 8 ns-l]
a1 = 2rt> a2 = -r~. And so our equation is writ- Constructing such expressions for all the roots
ten thus: and combining them, we get the general solution
to relation (29).
By way of illustration, let us solve the recur-
But then the recurrence relation is of the form rence relation
f (n+ 2) =2rd (n+ 1)- rff (n) (28) f (n+4) = 5/ (n+ 3) -6f (n+2)-4f (n+ 1) + 8f (n)
103
The characteristic equation here is of the form A THIRD SOLUTION TO
r'- 5r3 + 6r2 +4r-8=0 THE MAJORDOMO PROBLEM
Solving it, we get the roots Both of the foregoing solutions of the majordo-
rt=2, r 2 =2, r 3=2, r 4 =-1 mo problem lead to recurrence relations. We will
now derive a formula for the solution of these
Hence, the general solution of our relation is relations such that permits us to compute at
of the form once the number of seating arrangements of
f (n)=2n-1 [C 1 +C 2 n+C 3n2J+C4 (-1)n-1 hostile knights at the Round Table. We take ad-
vantage of the principle of inclusion and exclu-
sion. Denote by ak an event such that the kth
pair of hostile knights are together. Compute
APPLICATION OF THE THEORY N (a1 , • • • ak), which is the number of cases
OF RECURRENCE RELATIONS when k pairs of enemies are seated together. The
TO PROBLEMS first pair may be seated in 4n ways (choose a place
OF TRANSMITTING INFORMATION for one in 2n ways, seat the second one adjacently
clockwise and note that the knights can change
We have already considered the problem of places). For the rest of the knights there remain
the number of distinct communications that 2n- 2 seats, and they must be occupied so
can be transmitted in time T if the transmission that the second, third, ... , kth pairs of enemies
time of the separate signals is known (see page are side by side. Combine these pairs of knights
61). In doing so, we arrived at the recurrence into a single "entity". These k - 1 pairs of
relation knights and the 2n - 2k remaining knights may
be permuted in (2n- k - 1)1 ways. If we take
f (T) = / (T- t1) + / (T- t2) + ... + / (T- tn) (30) one of these permutations and seat the knights
in order in the vacant places, then the k - 1
here, f (0) = 1 and f (T) = 0 if T < 0. pairs of enemies that we chose will be together.
We consider the numbers T, t 1 , ••• , tn as in- This condition is not violated even if we have
tegral, and we denote by A1 , • • • , ·Ak the roots some of the enemies that are sitting together
of the characteristic equation (30). Then the change places. Since such reseatings can be done
general solution to the equation is of the form in 2k-1 ways, we get a total of 4n2k-l (2n - k -
- 1)! seating arrangements. Thus
N(a 1 ••• ak)=2k+ln(2n-k-1)!
Let A1 be the largest, in absolute value, root of We want to find out in how many cases not a sing-
the characteristic equation. Then for large values le pair of enemies are neighbours at the Round
of T, all the terms will be negligibly small com- Table, that is, we wish to compute N (a;, ...
pared with the first one, and we get . . . ~). Taking into account that k pairs may
be chosen in c~ ways, we find, by the inclusion
/ (T)- CtA.f and exclusion formula, that
This equality enables us to give an approximate An=N (a]. ... a~)
estimate of the number c f communications that =(2n)l-q,22n (2n-2)! +C~23n (2n-3)!- ...
can be transmitted in time T by means of the +(-1)11 C~2k+ln (2n-k-1)!+ ...
given system of signals. ... + (
-f)n 2n+lnl
CHAPTER VII
the function -1 1 expands into the power series We will be interested in the expansion
-X
1 + + ... + + ....
x xn x2
eX=1+x+2T+3T+ · · •
x3
(10)
We can now elucidate a more general question •
.Suppose in the division of a polynomial f (x) From (10), we see that
by a polynomial cp (x), we get the power series
1 1
(6) e=1+1+2T+3f+ · • · (11)
It then turns out that for sufficiently small values Taking a sufficient number of terms in the
.of x, (6) converges to f (x)lcp (x). series (11), we get the value of e to any desired
The size of the interval of convergence depends degree of accuracy. To 15 decimal places, e is
.on the roots of the denominator, that is, on num- of the form
bers for which the denominator vanishes. Name- 2.718281828459045 ...
ly, if these numbers are xlt ••• , xk and r is the
least of the numbers J x1 I, ... , I xk 1. then the Note that the series (8), (9), and (10) converge
'lleries converges in the interval I x J < r. For in- for all values of x.
-stance, the function 1 - x vanishes for x = 1, Note likewise the following important asser-
.and therefore the expansion of 1 1 x holds true tion.
A function f (x) cannot have two distinct power-
·Only when IxI < 1. Now the function x2 - series expansions.
- 7x + 10 vanishes for x1 = 2, x 2 = 5, and In other words, if
x-1
therefore the expansion of x 2 _ 7x+ 10 converges I (x)=ao+a1x+ ... +anxn+ ...
for jx I< 2. and
Note that not one of the roots of the denomina-
f (x)=bo+b1x+ ... +bnxn+ ..•
tor is zero, since we assumed that the constant
term of the denominator is nonzero, and there- then
lore cp (0) = b0 =1= 0. a0 =b0, a1=b1t ... , an=bn•···
107
OPERATIONS ON POWER SERIES Generally, the coefficient of xn has the form
aobn+atbn-1+ ... +akbn-k+ ... +anbo
Now let us take a look at operations involving
power series. Let the functions f (x) and !p (x) be Thus
.expanded in the power series f (x) !p(x) =aobo+(aob! +atbo) x+ ... +(aobn+
f (x) =ao+a1x+ ... +anxn-j-... (12) + ...
+anbo) xn+... (16)
The series on the right of (16) is called the
and
product of the series (12) and (13).
q> (x)=bo+b1x+ ... +bnxn+ . .. (13) In particular, squaring (12), we get
Then /2 (x)=af+2a 0 a!x+(af+2a 0 a2) x 2 +2 (a 0a3 +
j (x)+IP (x)= (ao+a1x+ ... +anxn+ .. . ) + +a1a2) x 3 +... (17)
+ (bo+b1x+ ... +bnxn,-J- .. . ) Now let us see how power series can be divi-
It turns out that the terms on the right can be ded. Let the constant term of the series (13) be
interchanged and grouped together with terms nonzero. We then show that there is a power
of equal powers of x (this assertion is not so ob- series
vious as it might seem at first glance; the point (18)
is that in the right-hand member we have infinite
sums, and it is by far not always possible to rear- such that
range terms in infinite sums). After this rearran- (bo+b1x+ ... +bnxn+ .. . ) X (co+c 1x+ ... +
gement, we get +cnxn+ ... )=ao+atx+ ... +anxn+... (19)
f (x) + !p (x) = (ao + bo) +(at+ bt) x + · ··+ To prove this, multiply together the series in
+(an+ bn) xn+... (14) the left member of this equation. We get the
series
the series on the right of (14) is called the sum of
the power series (12) and (13). +
boco (b 0 c1 +b
1co) x + ... + (bocn + ...
Now let us see what the power-series expansion . .. +bnco) xn+ ...
is of the product of the functions f (x) and !p (x). For this series to coincide with the series (12),
We have it is necessary and sufficient that the following
f (x) !p (x) = (ao+atx+ ... +anxn+ .. . ) X equations hold:
X (bo+b1x+ ... +bnxn+ .. . ) (15) boco=a 0,
As in the case of polynomials, the series on the +
b0 c1 b1c0 =aft
right of (15) can be multiplied termwise (we omit
the proof of this assertion). Let us find the series
resulting from such a term-by-term multiplica-
tion. The constant term of the series is a 0 b0 • These equations yield an infinite system of
Terms in x appear twice: when multiplying a 0 equations for finding the coefficients c0 , c1 , • • •
by b1x and when multiplying a1 x by b0 • They yield •.. , cn, . . . . From the first equation of the
a 0 b1x + a1b0x = (a 0b1 + a1b0 ) x system we get c0 = ~~. Substituting this value
In exactly the same way, we compute the terms into the second equation, we get
containing x2: b1ao
a 0 b2x2 + a1b1x2 + a2b0 x2 = (a 0 b2 + a1b1+ a2bo) x2 b0 c 1 =a 1- - -
bo
108
from which we find that c1 = aibo~ b1ao . Gene- To illustrate, let us consider the familiar expan-
sion
rally, if we have already found the coefficients 1
co, ... , cn-1• then for Cn we have -1 -=1-f-x-f-x2-f- ... -f-xn-f- ...
-X
b0cn =an- b1cn-1- ... - bnco Squaring both members oi this expansion, we
This equation is solvable since b0 =1= 0. get
We have thus demonstrated the existence of 1
the series (18) which satisfies relation (19). The 1-f-2x-f-3x2-f- ... -f-(n-f-1) xn+ ...
(1-- x)2
series (18) is called the quotient obtained from (22)
the division of the series (12) and (13).' It can be
If we now replace x by -x, we get
proved that it is obtained in the expansion of
the function f (x)l<p (x). To summarize, power 1
(1-f-x) 2 =1-2x-f-3x2- ...
series can be added, multiplied and divided
(division is permissible provided the constant ... + (-1)n (n-f- 1) xn+... (22')
term of the divisor is nonzero). These operations Multiplying the expansions (22) and (22'), we
correspond to operations on expansible functions. obtain
Note that now we can give a different interpre- 1 1
tation to the ~::xpansion (1-x)2 (1-f-x)2= 1+ [1 (-2)-f-2 x.11 :r+
a0 + ... -f-anxn "+ -f-(1 X 3-f-2 (-2)-f-3X 1] x2-f- ...
b
0
+ • ••
-f-b m=co-f-ci-f- ... -f-ckx
mX
... (20)
... -f-[1 ( -1)n (n+ 1)+2 (-1)n-2n-f- .. .
The expansion signifies that the series c0 + ... +(-1)n(n-f-1)X1]xn-f- ... (23)
+ c1x + . . . + ckx" + . . . is obtained upon It is obvious that the coefficients of odd powers
the division of the finite power series a 0 + .. .
of x vanish (each term appears twice in these
... + anxn by the finite power series b'0 + .. . coefficients with opposite sign). Now the coef-
... + bmxm. In other words, this equation means ficient of x 2n is equal to
that
(bo+ ... +bmxm) (co-f-cix-1- ... -f-ckx"+ .•. )= 1 (2n+ 1)-2 X 2n+3 (2n-1)- ... -f-(2n+ 1)
=ao+ ... -f-anxn (21)
But the function( 1--x/( 1 +x) 2 may be expan-
where the product in the left-hand member is
ded in a power series differently. We have
given by a formula of the type (16).
1 1
q- x)2 (1 -f-x)2 (1-x2)2
USING POWER. SERIES 1
Now the expansion for is obtained
TO PROVE IDENTITIES (1-x2)2
from the expansion (22) by replacing x by x2:
Power series can be used to prove a great many 1
identities. This is done by taking a function and
expanding it in a power series in two ways. Since
... -f-(n-f-1) x2n+... (24)
a function is uniquely representable as a power
series, the coefficients of like powers of x in both We know that no function can have two distinct
series must coincide. This then leads to the iden- power-series expansions. Therefore the coefficient
tity being proved. of .rn in the expansion (23) must be equal to
109
the coefficient of x 2 n in the expansion (24). This and
yields the following identity: (a+ x)3 = a3 + 3a2x + 3ax2 +x3
1 (2n+1)-2·2n+3 (2n-1)- ... These equations are special cases of the more
... +(2n+1)X1=n+1 general formula which yields the expansion of
(a+x)n. Let us write (a+x)n as
(a+x)n= (a+ x) (a+x) ... (a+x) (25)
GENERATING FUNCTIONS '----------'
n times
Now we are in a position to take up the basic Removing the brackets in the right-hand mem-
topic of this chapter, the concept of a generating ber, we will write all the factors in the order
function. Suppose we have a sequence of numbers in which they come. For instance, (a+x)2 will
.a 0 , a 1 , • • • , ~· • • • • Form the power series be written as
.ao+a1x+ ... +anxn+ .' .. (a+x)2=(a+x) (a+x)=aa+ax+xa+xx (26)
If this series converges in some interval to the and (a+x)3 as
function f (x), then this function is called the
(a+x)3= (a+x) (a+x) (a+x)
generating function of the sequence of numbers
.a 0 , a1 , • • • , ~ • • • • • For instance, from the = aaa + aax + axa + axx + xaa + xax + xxa + xxx
formula (27)
1 It will be seen that formula (26) includes all
-1 --=1+x+.
X
·•+xn+ ...
permutations, with repetitions, made up of the
it follows that the function 1_!_ is the generating letters x and a, two letters each time, and for-
-x mula (27) includes the permutations, with repe-
function of the sequence of numbers 1, 1, 1, ... titions, of the same letters taken three at a time .
. . . , 1, . . . . And formula (22) shows that the The same idea holds in the general case: after
function (1 1x) 2 is the generating function of the removing the brackets in (25) we get all possible
n-element permutations, with repetitions, of the
-sequence of numbers 1, 2, 3, 4, ... , n, .... letters x and a.
We will be interested in the generating func- Now collect like terms. Like terms are those
tions of sequences a 0 , a 11 • • • , ~' • • • which containing the same number of letters x (then the-
are connected in one way or another with combi- re will be the same number of a's too). Let us
natorial problems. Using these functions we are find the number of terms in which there are k
able to obtain a great variety of properties of x's and, hence, n- k a's. These terms are per-
the sequences. Also, we will consider the conne- mutations (with repetitions) made up of k x's and
-ction between generating functions and the solu- n - k a's. Therefore, by formula (5) of Chapter
tion of recurrence relations. II, their number will be equal to
k nl
NEWTON'S BINOMIAL THEOREM P(k, n-k)=Cn=kl(n-k)l
We will now derive the generating function This implies that after collecting like terms, the
<>f a finite sequence of numbers. expression x"an_k will enter with the coefficient
From school algebra we know that
" - kl(n-k)l
Cn- nl . We have thus demonstrated
(a+x)2 =a2+2ax+x2
110
that And if we put X= -1, we get
(a-t-x)n=C\\_an+ Chan-lx+ ... +C~an-kxk+ ... O=C\\.-Ch+C~-Ci!.+ ...
Using formula (29) the proof is practically (1-t-x)n+m=[C\\.+Chx+ •• • +C~xk+ ... +C~xn] )(
instantaneous: all we have to do is put x = 1. X [C\h-t-Cfnx+ ••. -t-C~xs+ • •. +Cillxm]
111
Now apply the binomial formula to the left (with repetitions) made up of the letters x1, x2, •..
member (for the exponent n + m), and remove .•. , Xm such that in each permutation there are-
brackets in the right member. Comparing coeffi- n letters. But some of these permutations will
cients of x 8 on the left and on the right, we obtain yield like terms. This will occur if each letter
(35). A particular case of this equality is appears in the first permutation as many times
C~n=(C~)2+(C~)2+ ... +(C:i)2 (35') as it does in the second. Therefore, in order to
find the coefficient of x~t x:2 ••. x!rn, we have
(recall that c~ = c:;-">· to count the number of permutations, with repe-
titions, that contain the letter x1 k1 times, the let-
ter x 2 k2 times . . . , the letter Xm km times. It is
THE MULTINOMIAL THEOREM
clear that every such permutation is a permuta-
Using the binomial formula, we can expand tion, with repetitions, made up of k1 letters x1 ,
more involved expressions such as, for example, of k2 letters x2 , • • • , and km letters Xm· We de-
(x + +
y z) 4 • Namely, note the number of such permutations by P (k11
k2 , • • • , km)· Thus, indeed, the coefficient of
(x+u+z) 4 = [(x+y) +zl'
x~tx:s • . . x~m in the expansion of expression
= (x+y)4+Cl (x+y)3 z+Cf (x+y)2z2+ (37) is P (k1 , k2 , ••• , km> (where naturally,
+C: (x+y) z3+Gtz4 k1 + k2 + ... + km = n, this is because every
Now expand (x + y)', (x + y)a, (x + y) 2 , again term of the expansion includes one element from
using the binomial formula. We get every bracket, and the total number of brackets
being multiplied is n).
(x+ y + z)'= x'+ y'+z4+ 4x3y+4x3y + 4xy3 The formula that we have just proved can be
+ +
4y3z + 4xz3 + 4yz3 + 6x2y2 6x2z2 written as
+ 6y2z2 + 12x2yz + 12xy2z + 12xyz2 (36) (xt+xz+ ... +xm)n= ~ P (kt. kz, .•.
But this method is too complicated. What is • • . , km) xf•x~• ••. x~m (38}
more, it is hard to say what coefficient the term
x 2 y•za has in the expansion of (x + +
y z) 9 • where the sum is extended over all possible
+ +
partitions k 1 k 2 + ... km of the number n
It is therefore desirable to derive a formula that
directly gives the expansion of the expression into m nonnegative parts. Recall that
(xt+xz+ ... +xm)n (37) P( k k k )-(kt+kz+···+km)! (39}
1' 2 ' • • ·• m - ktlkzl ... km!
It is not so difficult to guess what this formula Clearly, if the numbers s11 • • • , Bm are obtai-
is. In proving the binomial theorem, we saw that ned from the numbers k1 , • • • , km by permuta-
in the expansion of (a+ x)n the term xkan-k tion, then P (s1 , ••• , sm) = P (kt, ... , kml·
has the coefficient P (k, n - k). We can conje- Therefore, to illustrate, the coefficients of x 2 yz
cture that in the expansion of (x1 + x 2 + ... and xyz2 in the expansion (36) are the same. This
... + Xm)n the coefficient of xf1x:z .•• x!rn will remark simplies writing out the terms of the
be P (k11 k2 , • • • , km>· We will now prove that expansion (37). It is sufficient to find the coeffi-
such is the case. cients of partitions n = k1 + k2 + ... +
km
Write (x1 + x 2 + ... + xm)n as a product such that k1 k2 >- >- ... >-
km· and then per-
of n factors and remove the brackets, writing mute the exponents in all possible ways.
out all factors in the order of their appearance. For example, compute (x + y +
z) 6 • Disre-
What we get, clearly, is all possible permutations garding the order of the summands, ·the number
112
5 may be partitioned into three parts in five and compare the coefficients of xi'x~• ••• x~m in
ways:
both members, we get the identity
5=5+0+0, 5=4+1+0, 5=3+2+0, P (rl! r 2, ... , rm) = ~ P (kh k2, .••
5=3+1+1, 5=2+2+1 kp+lp=rp
But P(5, 0, 0)=1, P(4, 1, 0)=5, P(3, 2, 0)=10, ... km) P (lb l¥, ..• , lm) (42)
P (3, 1, 1) = 20, P (2, 2, 1) = 30. Therefore, Here, the summation in the right member is
{x + y +z)& = x5+ y5 +z& + 5x4y + 5xy'+5x4z+ extended over all nonnegative integers k 11 k 2 , •••
... , km; lh l 2 , ••• , lm such that
+ 5xz4 + 5y4z + 5yz4 + 10xsy2 + 10x2y3 + 10x3z2
+ 10x2z3 + 10y3z2 + 10y2z3 + 20x3yz + 20xy3z k1+k2+ ... +km=n, l1+l 2 + ...
+ 20xyz3 + 30x2y2z + 30x2yz2 + 30xy2z2 .. , +lm=s and kt+lt=rh
k2+l2=rz, ••. , km+lm=rm
Formula (38) enables us, with ease, to prove
We leave it to the reader to carry out the compu-
certain properties of the numbers P (k1 , k 2 , • • •
tations in detail.
... , km). If we put x1 = x 2 = .. . =xm = 1 The formulas (40) to (42) could quite naturally
in this formula, we have
be obtained without resorting to the generating
(40) function (38). But then we would have had to
invoke geometrical arguments like those on page
Here, the sum is extended over all partitions of 7 9, and not in the plane but in n-dimensional
the number n into m nonnegative parts: n = space. The generating function allows us to obtain
= k1 + + ... +
k2 km with regard for the these identities in automatic fashion via simple
order of the summands. algebraic manipulations.
To continue, if we multiply both members
()f (38) by x1 + x 2 + ... + Xm and apply a si-
milar expansion to the left member, and then NEWTON'S SERIES
remove brackets in the right-hand member, we
get the following recurrence relation for P (k1 , The formula for (a +
x)n is often connected
.•. , ~em>: with Newton's name, but historically speaking
this is not true. The mathematicians of Central
P(kl! k2, ..• , km)=P (k1-1, k2, .. . , km) Asia, Omar Khayyam, al-Kashi and others knew
+P (klt k 2 -1, ... , km)+ ... the formula for (a + x)n very well. In Western
.. . +P(kt. k 2, ... , km-1) (41) Europe, Blaise Pascal used it long before Newton .
Newton's service here is of a different nature:
However, if we multiply both sides of the expa- he generalized the formula for (x + a)n to the
nsions case of nonintegral exponents. Precisely, what
(x1+x2+ ... +xm)n= ~ P (kh k2, ••• he did was to prove that if a is a positive number
I I
and x < a, then for any real value of a we have
.•. ' km) x~lx~2 ... x~m the equation
and (x+a)a=aa+aaa-1x+ a (a-1) aa-2x2
1X2
(x1+xz+ ... +xm) 8 = ~ P (lh lz, •.•
+ + a:(a:-1)1 X...2 .•(a-k+1) a-k k ( 43)
.•. , lm) xi1 x~2 ... x~ •• · •k a x
113
Only this time we get an infinite series and not But this is the familiar formula for the sum of
a finite number of summands. When n is a posi- an infinite decreasing geometric progression
tive integer, the bracket (n- n) vanishes. But
this bracket enters into the coefficients of all
(recall that here I t I = j : I< 1).
terms beginning with the (n + 2)th term, and Now suppose that (45) has already been pro-
so all these terms of the expansion are zero. That ved, we will show that from it follows the equa-
is why for n a positive integer, the series (43) be- tion
comes a finite surq. (1- t)-n-1= 1+Ch+tt+C~+ 2 t2+ ...
We will not prove the formula (43) for all
values a and will consider only the case when a ... +C!+ktk+... (47)
is a negative integer, a= -n. Then the formula To do this, multiply both sides of (47) by 1 - t.
to be proved takes the form If we obtain a true equality, then (47) holds true
as well. But multiplication by 1 - t yields
(x+a)-n=a-n-na-n-1x+ n (n+ 1) a-n-2x2
1X2 (1- t)-n= [1 +Ch+tt+C;+2 t2 + ... +C~+.L 1 tk-1
_ n(n-1--1) (n-1--2) -n- 3 3 + +C~+ktk+ .. . ] (1-t)
1X2X3 a x ...
Let us remove the brackets in the right member
+(- 1)k n(n-!--1) ... (n-t-k-1) -n-k k+ and collect terms. Terms in tk appear twice:
•.. 1X2 ... k a x "'
when c!+kt11 is multiplied by 1 and when
(44) c!+L1tk-l is multiplied by- t. Therefore, the
This equation can also be written as coefficient of tk on the right is
Ck 0 11.-1 0 ~~.
n+k- n+k-1 = n+k-1
( 1-1-- : ) -n = 1- Ch ( : ) -1-- CfHt ( : ) 2
r
[see formula (11) on page 33].
But by the induction hypothesis the coefficient
-Cft+z (: + ... -1--(-1)kC!+k-1 (:) k + ...
of tk in the expansion of (1 - t)-n is precisely
(44') equal to c!+k-t· Since after multiplication by
1 - t we obtain a true equality, it follows that
(f 't. t rue thatell.n+h- n (n+1) ... (n+k-1)) .
Ofl IS 1 1 2
X ... k
the equality being proved, (45), is true as well.
If the reader does not want to proceed from the
It will be more convenient for us to replace
equality being proved to the already familiar
X
-a by - t and prove the following equation ins- relation and prefers the reverse approach, he must
multiply both sides of (45) by the corresponding
tead of (44'):
terms of relation (46). This yields
(1- t)-n= 1+Cht+C~+lt2+ ... +C~+k- 1 tk+ ... (1-t)-n-1= (1+Cht+q+lt2+ ... -t-C!+k- 1tk+ .. .)
(45) X (1 +t+t2+ ... -1--tk+ .. . )
We carry out the proof by means of induction He must now remove the brackets and take
with respect to n. For n = 1 we have c!+k- 1 = advantage of the identity
= c~ = 1 and so the relation becomes c~_ 1 + c}, + c~+l + ... + c~+k- 1 = c!+~~.
1 (see page 34). We then arrive at the relation (47),
1-t=1+t+t2+ ... +tk+ ... (46)
which is what we are proving.
S-59
114
Thus, (45) is proved. Note once again that it EXTRACTING SQUARE ROOTS
holds true only for I t I < 1. If the incautious
reader attempts to put t = -1 in both members We proved the binomial theorem for integral
of the equality and, on this basis, derives the values of the exponent. But, as has already been
"remarkable" formula mentioned, the formula holds true not only for
integral but for fractional (even for irrational)
2~=1-CJ.+C~+l-Cl+s+ . •• values of the exponent. We will not prove it for
such values, and will only write down the expan-
... + (-1)"C!+k-1 + . . . (48) .
s10ns f or n = 1 an d n = -
2 21 ·
he will be seriously in error, for the right member
is the sum of integers and such a sum cannot be For n= ~ the binomial formula becomes
equal to the fraction 1/2n.
In the 18th century, when the theory of infinite
series had not yet been thoroughly investigated,
eminent mathematicians were capable of making
such mistakes. Decades of intensive study were
needed to grasp the meaning of the sum of an ~ (~-1) (~-2) 3
infinite series, to realize when "it exists and when
it does not. Incidentally, it must be added that
+ 1X2X3 X+ ...
at the end of the 19th century the concept of the
sum of an infinite series was appreciably genera- . ~ (~-1) ... (~-k+1) k
lized and there exist definitions for which formu- ... + 1 X 2 ... k X + "•
la (48) holds true. But such problems take us (51)
far beyond the scope of this book. Simplifying we get
Let us compare the expansion we have proved,
1
(1+t)-n=1-C~t+C~+ 1 t2- ... 2 1 1 1x3
<1 +x) = 1 +2x-2X4 x2 +2x4x6x3 -
... +< -1>"C!+k-1tk+ ... (49)
- 1)11-11 X 3 ... (2k-3) "+
with the formula ... +( 2X4 ... 2k X ...
(1+t)n=1+C~t+C~t2+ •.. 1
In the same way, when n= - 2 we find
... +C!t"+ ... +tn... (50) 1
--2 1 1 x3
We again conclude that when generalizing the (1+x) =1- 2 x+ 2 x 4 xs- ...
symbol c! to negative values of n, we have to put
- 1)k 1 X 3 ... (2k-1) "+ '
... +( 2x4 ... 2k x ... (52)
C~n = (-1) 11C~k-1
(see page 7 4). Now, for negative values of k, These formulas may be written in a different
C! = 0, since terms with negative powers of t way. Note that
do not enter into the expansions (49) and (50). 1 X3 ... (2k-1) (2k)l
For the same reasons, C! = 0 when 0 ~ n < k. 2X4 ... 2k 2211 (kl)2
115
And BO identity
-- 1
1
1 c~" + c~c~;;-~ 2 + c2c~;;-_: 4 + ... + c~k = 22k (55)
(i+x) 2 =1-wCix+ 21 c:x 2- ... Similar reasoning applied to (54) yields the
(-1)" k k
identity
···+~C 211 x +··· (53)
c~;;-~ 4 c~c~;;_: 6 c2c~;;~ 8
In the same way we get 1X(k-1) + 2(k-2) + 3(k-3) +···
1 c~;;-_:4 c~~2
(1+ x )2 = 1--"-_! 1 Cl z+ 3X25
~x-2X23 zX
1 c•4xs - ... ... + (k-1) X 1 k (56)
which holds true for k > 2.
(-i)k-1 h-1 1!.
... + kX 22k-1
c2k-2x +... (54) Now, multiplying the expansions (53) and (54)
termwise, we get
These expressions converge in the interval I x I < 1 1 1
[
< 1. They can be used to extract square roots 1= 1+2x- 2x2s Clx2+ 3x25 CfxS- ...
to any desired degree of accuracy. For example,
1
(-1)"'-1
···+ kX22k-1
" 1
C2k-2xk+ ... Jr· 1
_1-"]2Cix+
V30= V25+5=5 V1+0.2=5 (1+0.2)2
1 1
=5 [ 1+ 2 xo.2- 2 x 4 xo.22+
+ 2~ Cfx 111 + ... + ( 22 !)" C~"x"+ ... ] (57}
=-~(1-~)-1+~(1-~ri
The denominator of the same fraction is equal = _123 ( 1+ ~ + ... + ;: + ... )
to bo + ... + bmxm.
The fraction ; ~~ has then to be decomposed +230 (1+ ~ +···+ ~: +···)
into partial fractions, each one of which is expan- And therefore
ded in a power series by the binomial theorem.
The coefficient of xk in the resulting series yields 13 1 20 1 13 20
the value of ck•
Cn= -2x211+3X3n=- 2n+l + 3n+1
4. 14.
In how many ways can a vowel and a consonant A bookshop has 6 copies of Tolstoy's War and
be chosen from the word "almost"? Peace, 3 copies of Dostoyevsky's Crime and Punish-
ment and 4 copies of Turgenev's Fathers and
5. Sons. Besides that there are 5 separate sets con-
taining the first two books and 7 sets containing
The same for the word "orange". the second and third books. In how many ways
can a purchase be made so that one copy of each
6. novel is obtained?
A six-faced die is thrown and a teetotum having
eight faces is spun. In how many different ways 15.
can they fall? The same problem, only there are three more sets
including War and Peace and Fathers and Sons.
7.
Five roads lead to the top of a mountain. In how 16.
many ways can a climber asce,nd and descend? A basket contains 12 apples and 10 oranges. John
The same, provided that the ascent and descent takes an apple or an orange, then Tom takes an
are accomplished by different routes. apple and an orange. In which case does Tom
have more choice: when John takes an apple or
when he takes an orange?
8.
A farmer has 20 sheep and 24 pigs. In how many 17.
ways can he choose one sheep and one pig? If a
choice has been made, in how many ways can he There are three teetotums having 6, 8 and 10
choose the next time? sides respectively. In how many ways can they
fall? The same, if we know that at least two of
the teetotums fell showing the number 1.
9.
In how many ways can two squares (white and 18.
black) be selected on a chessboard? The same, if In how many ways is it possible to choose three
there are no restrictions as to thier colour. different colours out of five?
10. 19.
In how many ways is it possible to choose a white In how many ways is it possible to make a trico-
square and a black square on a chessboard if the lour flag if there is bunting of 5 different colours?
squares must not lie in the same row or column? The same, only one of the strips has to be red.
124
20. 29.
How many dictionaries are needed to translate The same problem, only two books are exchan-
directly from one of five languages: Russian, ged for two.
English, French, German, and Italian into any
one of the remaining four languages? 30.
Five persons, A, B, C, D, E, are to speak at a
21. meeting. In how many ways can they take their-
How many more dictionaries will be needed if turns without B speaking before A?
the number of distinct languages is 10?
22. 31.
The same, only A must speak immediately be-
In how many ways can one card of each suit be fore B.
selected from a full pack of cards? The same pro-
vided that no two cards drawn form a pair (say,
two kings, two tens, etc.). 32.
In how many ways can we seat 5 men and S.
23. women at a circular table so that no two men or·
In how many ways can we choose one card of each no two women come together?
suit from a full pack of 52 cards if the selected
cards make a red pair and a black pair (say, a 33.
nine of spades and clubs and a jack of diamonds The same problem, only they are seated at a mer-
and hearts)? ry-go-round and the seating arrangements that
24. pass into one another as they turn are considered
coincident.
A child is given at most 3 names. In how many
ways can this be done if the total number of 34.
names to pick from is 300?
Ten cards are drawn from a pack of 52. In how
25. many cases is there at least one ace? In how ma-
ny cases is there exactly one ace? In how many
Several persons take seats at a round table. We cases are there at least two aces? Exactly twO>
consider that two seating arrangements coincide aces?
if each person has the same neighbours in each
case. In how many ways can we seat four persons?
Seven persons? In how many cases are two assig- 35.
ned persons neighbours out of seven? In how many There are m light signals at a railway station.
cases will a given person (out of seven) have two How many distinct messages can be conveyed if
given neighbours? each light signal has three distinct states: red,
yellow and green?
26.
Five girls and three boys are going to play cro- 36.
quet. In how many ways can they form two sides In a small country there were no two persons with
of 4 each if each side is to have at least one boy? the same set of teeth. What is the largest popula-
27. tion the country can have (32 teeth forming a
maximum set)?
Six urgent letters are to be delivered. In how
many ways can this be done if there are three
messengers and each letter can be given to any 37.
one of them? In a railway car compartment there are two rows
of facing seats, five in each. Out of 10 passen-
28. gers, four wish to sit looking forward and three
One person has 7 mathematics books, another looking towards the rear of the train. The other
has 9 books. In how many ways can they exchan- three are indifferent. In how many ways can the
ge their books, one for one? passengers take seats?
125
38. 48.
A committee of 9 is elected. They elect a chair- In how many ways can we place white pieces (2
man, vice-chairman, secretary and treasurer. knights, 2 bishops, 2 rooks, a queen and a king)
In how many ways can this be done? in the first row of a chessboard?
39. 49.
A delegation of 5 members is to be elected by a There are n telephone subscribers. In how many
conference of 52 persons. In how many ways can ways is it possible to connect three pairs simul-
this be done? taneously?
50.
40.
Ten kinds of picture postcards are on sale. In
Automobile licence plates consist of one, two, or how many ways can I buy 12? 8? In how many
three letters and four digits. How many number- ways can I buy 8 distinct postcards?
letter combinations Gan be formed using 32 let-
ters of the Russian alphabet? 51.
Out of a group of 7 men and 4 women we have to
41. choose 6 persons so that there are at least 2 wo-
Mother has 2 apples and 3 pears. Every day, for men. In how many ways can this be done?
five days running, she gives me one piece of fruit.
In how many ways can this be done? 52.
How many distinct four-digit numbers divisible
42. by 4 can be generated out of the digits 1, 2, 3, 4,
The same, for m apples and n pears. 5 if each digit can occur several times in the re-
presentation?
43. 53.
The same for 2 apples, 3 pears and 4 oranges. A train carrying n passengers is to make m stops.
In how many ways can the passengers be distri-
44. buted among the stops? The same, provided we
Father has 5 pairwise distinct oranges which he only count the passengers that get out at a definite
gives his eight sons so that each receives either stop.
one orange or none. In how many ways can this
be done? 54.
How many permutations can be generated out
45. of n elements in which two given elements, a
The same, only the number of oranges each son and b, do not come together? 4 Three given ele-
gets is unlimited. ments, a, b, c, do not come together (in any or-
der)? No two elements out of a, b, c come toget-
46. her?
How many distinct words can be generated by 55.
permuting the letters of the words "mathematics" Ten persons compete in gynmastics. Three refe-
(regard 'th' as bound-one letter), "parabola", rees number them independently in accordance
and "ingredient"?
with their performance. The winner is the one
named first by at least two referees. In how many
47. cases (%) will the winner be named?
A club of 30 members makes up a team of 4 for
the 1,000 metres race. In how many ways can 56.
this be done? In how many ways can we form a Four students are taking exams. In how many
team of 4 for a relay race of 100+200 +
400 + ways can the marks be given if it is known that
+ 800 metres? all received passing marks (that is, 3, 4, or 5)?
126
57. 66.
How many necklaces can be made out of seven In how many ways can a group of men be selected
heads of different sizes (all seven have to be uti- for a job? The group may consist of 1, 2, 3, ..•
lized)? ... , 15 men. The same when the group is cho-
sen from n men?
58.
How many necklaces can he made out of five 67.
identical beads and two large-size beads? Let Pt. •.. , Pn be distinct prime numbers. How
many divisors has the number
59.
A village has a population of 2,000. Prove that <Xi "n
q=p1 · • · Pn
at least two of them have the same initials (if
29 letters are available for initials). where CGt. ••• , an are certain natural numbers
(including the divisors 1 and q). What is their
60. sum?
A group of seven boys and ten girls are at a dance
If in some dance all the boys participate, how 68.
many ways are there for the girls to take part? In how many ways can 12 identical coins be put
How many versions are there if we take into ac- into five different envelopes if no empty envelo-
count only those girls that were not invited? pes are allowed?
The same, if with respect to two girls we can
definitely say that they will be invited. 69.
In how many ways can 20 books be arranged in a
61. bookcase with five shelves if each shelf holds
A company of soldiers consists of 3 officers, 6 20 books?
sergeants and 60 privates. In how many ways
can a detachment be made consisting of one of- 70.
ficer, two sergeants and 20 privates? The same, In how many ways can 5 different rings be put on
provided the detachment must contain the cap- four fingers of one hllnd?
tain and the senior sergeant.
62. 71.
There are 12 girls and 15 boys at a school balL 30 persons vote on 5 proposals. In how many
In how many ways can we form 4 pairs in a dance? ways can the votes be distributed if each person
votes for one proposal and only votes cast for
63. each proposal are counted?
How many combinations can be made up of 3 72.
hens, 4 ducks and 2 geese so that each combina-
tion has hens, ducks and geese? A bookbinder has to bind 12 distinct books using
the colours red, green and brown. In how many
64. ways can this be done if each colour is used for
at least one book?
In how many ways can we split up m + +
n
objects into three groups so that there are m
p
92. 101.
A hike was organized with 92 persons participa- In how many ways can the letters of "opossum"
ting. Sandwiches were taken for lunch: 47 had be permuted so that the letter "p" comes immedi-
sausage, 38 had cheese, 42 ham, 28 cheese and ately after "o"?
sausage, 31 a combination of sausage and ham,
and 26 persons had a combination of cheese and 102.
ham. A total of 25 persons took all three types; In how many ways can the letters of the Russian
then there were a few who took meat patties word "o6opoHocrroco6HOCTL" be permuted so that
instead of sandwiches. How many took patties? no two o's come together?
93. 103.
There are 10 couples on a boating trip divided In how many ways can the letters of the Russian
into 5 groups, 4 in a group. In how many ways word "KapaKyJIR" be permuted so that no two
can they split up so that there are two men and vowels (a, y, or n) are in succession?
two women in each boat?
104.
94. In how many ways can the letters of the Russian
In how many cases will a given man be in the word "!J!an;eTJm" be permuted so that the order
same boat together with his wife? of the vowels (a, e, n, a) is preserved?
105.
95. In how many ways can we permute the letters in
In how many cases will two given men be with the word "parallelism" so as to preserve the order
their wives? of the vowels?
96. 106.
How many distinct four-digit numbers can be In how many ways can the letters of the phrase
made out of the digits 0, 1, 2, 3, 4, 5, 6, unlimi- "sell it" be permuted so that two vowels come
ted repetitions allowed? between 'two consonants?
97. 107.
Find the number of six-digit numbers such that In how many ways can you permute the letters
the sum of a three-digit number formed out of of the Russian word "Jiorapn!J!M" (=logarithm) so
the first three digits and a three-digit number that the second, fourth and sixth places are taken
constructed out of the last three digits is less by consonants (JI, r, p, .p, M are consonants)?
than 1,000.
108.
98. In how many ways can you choose two consonants
In how many ways can you place 12 white and and one vowel from the Russian word "Jiorapn!J!M"?
12 black draughtmen on the black squares of a The same problem, if the chosen letters include
draughtboard? the letter ".P".
129
109. 119.
In how many ways can the letters of the Russian How many nonnegative integers less than a mil-
word "oropoA" be permuted so that three o's do lion contain all the digits 1, 2, 3, 4? How many
not come together? numbers consist of these four digits alone?
110. 120.
The same as in 109, only no two o's are allowed Find the sum of the four-digit numbers obtained
to come together. in all possible permutations of the digits 1, 2, 3, 4.
111. 121.
In how many ways can several letters be chosen The same for 1, 2, 2, 5.
from the Russian phrase "oxo 3a OKO, 3y6 3a 3y6"
without regard for the order of the letters? 122.
112. The same for 1, 3, 3, 3.
In how many ways can three letters be chosen
from the phrase of Problem 111. 123.
The same for 1, 1, 4, 4.
113.
In how many ways can three letters be chosen 124.
from the phrase of Problem 111 if the order of The same' for all five-digit numbers which can be
the chosen letters is taken into consideration? obtained by permuting the digits 0, 1, 2, 3, 4.
Zero must not come first.
114.
In how many ways can the letters of the Russian 125.
word "rracTyxn" be permuted so that vowels and
consonants are in alphabetic order (vowels a, 11:, How many numbers less than a million can be
y and consonants H, c, T, x)? written with the aid of the digits 8 and 9?
115. 126.
In how many ways can the letters of the The same with the aid of 9, 8, 7.
Russian word "xO«fleBapKa" be permuted so that
vowels (o, e, a) and consonants (K, cf>, 'II, p, K) 127.
alternate? The same for "samovar". The same, using 9, 8, 0 (numbers beginning with
0 are forbidden).
116.
In how many ways can the letters of "Abakan" 128.
be permuted so that the consonants are in alpha- Find the sum of all three-digit numbers that can
betic order? The same, with the added restricti- be written using the digits 1, 2, 3, 4.
on that no two a's come together.
117. 129.
In how many ways can the letters of "fulfil" be per- Find the sum of all possible five-digit numbers
muted so that no two identical letters come toget- that can be written with the digits 1, 2, 3, 4, 5
her? The same for the word "murmur~·. and which contain each digit once and only once.
The same for five-digit numbers that can be
118. written using the digits 1, 2, 3, 4, 5, 6, 7, 8, 9.
In how many ways can 4 letters be selected from
the word "tartar" if the order of the chosen letters 130.
is disregarded? How many four-digit numbers How many odd numbers can be formed out of the
can be made out of the digits of the number digits of the number 3,694 (each digit being used
132,132? at most once)? How many even numbers?
9-5!l
130
131. 142.
How many six-digit numbers are there in which How many five-digit numbers can be generated
three digits are even and three are odd? by using the digits of the number 12,312,::H3
so that no three 3's come together?
132.
The same, provided "six-digit" numbers that 143.
begin with zero are also allowed. In how many ways can we permute the digits of
the number 12,341,234 so that no two identical
133. digits come together?
How many six-digit numbers are there in which
the sum of the digits is even (the first digit being 144.
nonzero)? The same if we take all numbers from 1 The same for the number 12,345,254.
to 999,999?
145.
134.
How many ten-digit numbers are there with sum In how many ways can the digits of the number
of digits equal to three (nonzero first digit)? 1,234,114,546 be permuted so that no three iden-
The same, but take all numbers from 1 to tical digits come in succession?
9,999,999,999.
146.
135. In how many ways can this be done so that no
How many nine-digit numbers are there in two identical digits follow one another in succes-
which all digits are distinct? sion?
136. 147.
How many integers are there between 0 and 999 In how many ways can you pick two numbers out
that are not divisible either by 5 or 7? of the natural numbers from 1 to 20 so that their
sum is odd?
137.
How many integers are there between 0 and 999 148.
which are not divisible by 2, 3, 5, or 7? In how many ways can three numbers be chosen
from the natural numbers 1 to 30 so that their
138. sum is oven?
How many numbers from 0 to 999 have the digit
9? How many have it twice? How many numbers 149.
have 0? How many have it twice? How many There are two high roads from London to Brigh-
numbers have 0 and 9? 8 and 9? How many ton and ten cross roads connecting the two high
numbers are there between 0 and 999,999 with
no two identical digits coming together?
139. L I
How many four-digit numbers can be formed from I
I
the digits of the number 123,153? I
140.
How many five-digit numbers can be formed from
the digits of the number 12,335,233?
Fig. 34.
141.
How many six-digit numbers can be formed from roads (see Fig. 34). In how many different ways
the digits of the number 1,233,145,254 so that no can the journey be made without traversing tho
two identical digits come together? same ground twice in the same journey?
131
150. 156.
If two travellers start from London one on each The faces of three dice are numbered 1, 4, 13, 40,
highway, in how many ways can they finish the 121, 364. How many different sums can be thrown
journey without both of them traversing in the with them?
same direction any part of the road?
157.
151. Six dice are thrown with the numbers 1, 2, 3, 4,
There are three high roads from London to Cam- 5, 6. In how many cases will they show one type
bridge and four cross roads connecting all the of sum? Two types? Three types? Four types?
high roads (see Fig. 35). By how many routes Five types? Six types? (All dice are distinguish-
able.)
158.
n dice are thrown. How many different outcomes
are possible (outcomes differing in order of points
alone are considered the same; each die is num-
bered 1, 2, 3, 4, 5, 6)?
160.
152.
Out of an unlimited number of coins, 10, 15 and The same, provided that the order of the factors
20 copecks each, in how many ways can 20 coins is disregarded.
be selected?
161.
In how many ways can you put 9 coins of diffe~
153. rent value into two pockets?
A person holds five coins and asks you to guess
what they are. Possible coins are 1, 2, 3, 5, 10,
15, 20, 50 copecks each and 1 rouble. How many 162.
wrong answers is it possible to give? In how many ways can 3n distinct objects be dis-
tributed among three people so that each gets n
objects?
154.
How many numbers (in decimal notation) are
there consisting of five digits? In 'how many of 163.
these is every digit an even number? In how Given 2n elements. We consider all possible
many, an odd number? In how many is there no partitions of them into pairs; all partitions diffe-
digit lower than 6? How many have digits that ring as to the order of the elements within the
do not exceed 3? How many of them contain all pairs and the order of the pairs are considered
the digits 1, 2, 3, 4, 5? How many contain all coincident. How many distinct partitions are
the digits 0, 2, 4, 6, 8? there?
155. I
J 164.
The faces of each of two dice are numbered 0, 1, The same problem, only there are nk elements
3, 71 15, 31. How many distinct sums can be being partitioned into n groups of k elements
thrown with these dice? each.
132
165. 175.
In how many ways is it possible to divide 30 In how many ways can 52 cards be dealt to four
workers into 3 teams of 10 each? Into 10 groups players so that each gets three cards of three suits
of 3 in each? and four cards of the fourth suit?
166. 176.
In how many ways can a pack of 36 cards be split In how many ways can 18 distinct objects be
in half so that each half contains two aces? distributed among 5 participants so that four get
167. 4 objects each and the fifth gets 2 objects? The
same, only three get 4 objects each while two get
In how many ways can 10 books be wrapped up 3 objects each.
in 5 packages of two each (the order of the packa-
ges is irrelevant)?
177.
168. There are 14 pairs of different objects. Find the
In how many ways can 9 books be wrapped up total number of samples of these objects. (Two
in 4 packages, 2 books in each and one package samples differ in composition but not in the order
containing one book? of the objects.)
169. 178.
The same problem, three packages with three In how many ways can 4 black balls, 4 white
books in each. balls, and 4 blue balls be placed into 6 different
packages (some of the packages may remain
170. empty)?
In how many ways can three persons divide among
themselves 6 identical apples, 1 orange, 1 plum, 179.
1 lemon, 1 pear, 1 quince and 1 date? In how many ways can 3 rouble-bills and 10
50-copeck pieces be put into 4 different envelopes?
171.
In Problem 170, make (he division so that each
gets 4 items. In:how many ways can this be done? 180.
Prove that the number of partitions of the num-
172. ber n into parts (summands) is equal to the num-
A, B and C have three apples each; besides, A ber of partitions of the number 2n into n parts
has 1 pear, 1 plum and 1 quince, B has 1 orange, (without regard for order of the parts).
1 lemon and 1 date, while C has 1 tangerine,
1 peach and 1 apricot. In how many ways can 181.
they distribute the fruit among themselves so There are n objects in a row. In how many ways
that each gets 6 pieces of fruit? can three objects be selected so that no two adja-
cent ones are taken?
173.
In how many ways can I deal a pack of 52 cards 182.
to 13 players, 4 cards to each player? The same,
provided however that each gets one card of each A child places black and white chessmen on the
suit. The same, provided that one has cards of first two lines of a chessboard (two knights, two
all four suits, while the others have cards of one bishops, two rooks, a queen and a king, both
and the same suit. white and black). In how many ways can he do
this?
174.
In how many ways is it possible to draw 4 cards 183.
from a full pack so that three suits are in eviden- In how many ways can this be done on the whole
ce? So that there are two suits? chessboard?
133
184. 193.
Solve the same problem with the pawns included In how many ways can 7 white balls and 2 black
(8 of each colour). balls be placed in 9 pockets? Some of the pockets
may be empty; all pockets are considered dis-
185. tinct.
In how many ways can you put 15 white and 15 194.
black draughtmen on 24 squares so that each
square is occupied only by white or only by black? In how many ways can 7 white balls, 1 black ball
(This is the arrangement of draughtmen in the and 1 red ball be put into 9 pockets?
game of "nardy" played in the East.)
195.
In how many ways can 27 books be given to A, B,
186. and C so that A and B together get twice as many
In how many ways can you place 20 white books as C?
draughtmen on a chessboard so that rotations of
the board through 90° bring the pieces into the 196.
same position? Eight persons get into a lift. In how many ways
can they leave on four floors so that at least one
187. person gets out on each floor?
In how many ways is it possible to place 20 white
draughtmen on a chessboard so that the arrange- 197.
ment is symmetric about the line dividing the In how many ways can three numbers be chosen
board in half? from the numbers 1 to 100 so that their sum is
divisible by 3?
188.
The same, provided the draughtmen are placed on 198.
black squares. In how many ways can three numbers be chosen
from 3n consecutive integers so that their sum is
189. divisible by 3?
In how many ways can you put 12 black and 12 199.
white draughtmen on the black squares of the We have one black ball and n white balls. In
board so that the arrangement is symmetric how many ways can some of these balls be put
about the centre of the board? into n + 1 pockets if each pocket holds at most
one ball?
190.
The same, only symmetry is retained by changing 200.
the colour of the draughtmen. In how many ways can n black and m white balls
be arranged so that there are 2r - 1 contacts
191. between black and white (2r contacts)?
In how many ways can 20 white draughtmen be
placed on the extreme lines of a chessboard so 201.
that the arrangement remains unchanged when In how many ways can 8 marks of 3, 4, or 5 be
the board is turned through 90°? obtained in a series of subjects so that their sum
is equal to 30?
192.
202.
In how many ways can 20 white draughtmen be
placed on the extreme lines of a chessboard so Prove that m +n objects can be permuted in
that the pieces on opposite sides of the board (m+n)! Drn ways so that exactly n remain fixed
are symmetric about the lines dividing the board m! n!
in half? (see page 44).
134
203. 210.
Prove that r distinct things can be distributed in If the objects are divisible into indistinguish-
able parts, the answers will be
Sr = (n+ p)r-n(n+ p-i)T+C~(n+p-2)- .. . + 1 1
+(-1)npr 2 (3n2+3n+2) and 3 (n+ 1) (8n2+4n+3)
209. 217.
If we adjoin 2n objects of a fourth kind, the num- In how many ways can postage stamps totalling
ber of ways of dividing them so that each gets 40 copecks be put on a package by using 5-,
4n objects is 10-, 15- and 20-copeck stamps arranged in a row?
(Arrangements with different orders of stamps
1 are considered distinct; the supply of stamps is
3 (2n+1) (8n2+8n+3) unlimited.)
135
2'18. 227.
In how many ways can you change a roub.le Prove that the number of partitions of 12n+ 5
(= 100 copecks) using 10-, 15-, 20-, and 50-co- into 4 parts such that none exceeds 6n+2 and
peck pieces? no two are equal is
n
219. 2 (12n2 + 3n-1)
In how many ways can 78 grams be attained using
eight weights of 1, 1, 2, 5, 10, 10, 20 and 50 grams 228.
each? The use of two different weights (even
though weighing the same) forms a new combina- Find the number of triples of positive integers
tion. forming a geometric progression and not exceeding
100.
220.
There are six balls: 3 black, 1 red, 1 white and 229.
1 blue. In how many ways can they form a row of 4 In how many ways can 6 Englishmen, 7 French-
balls? men and 10 Turks be arranged in a row so that
each Englishman is between a Frenchman and a
221. Turk, but no Frenchman and Turk stand together?
In how many ways can a natural number n be
represented in the form of a sum of three positive
integers (representations involving different or- 230.
ders of the integers are considered distinct)? The same for 5 Englishmen, 7 Frenchmen and
10 Turks.
222. \)
How many digits (and what kind) are needed to 231.
write all the numbers from 1 to 999,999 inclusi- How many solutions has the following problem:
ve? From 1 to fOn-t inclusive? Find two numbers such that their greatest com-
mon divisor is equal to G, the least common mul-
223. tiple is M Gaa b 6c'l' d{j (a, b, c, d prime num-
How many different ten-digit numbers can be bers).
written using three digits 1, 2, 3 with the provision
that the digit 3 is used exactly twice in each num- 232.
ber? How many of the numbers thus written are Solve the same problem dropping the words
divisible by 9? "greatest" and "least".
224.
233.
We shall say that two numbers in a permutation How many combinations can be formed out of
form an inversion if the larger one comes before 20 letters taking 6 at a time so that no letter
the smaller one. How many inversions are there appears more than twice in each combination?
in all permutations of the numbers 1, 2, . . . , n?
225. 234.
Prove that the number of partitions of n into There are p + q + r letters: { a's, q Ws and
3 parts such that no two parts are equal is ry's. They are permuted in al possible ways so
that the a's appear before the Ws and the Ws
E ~ -&-(n2-6n+12)] before the y's. How many permutations are pos-
sible?
226.
235.
Prove that the number of partitions of 12n+5
into 4 parts such that no part exceeds 6n + 2 is A pole 30 em long is to be painted in bands in
1 the following order: red, white, blue, red, white,
2 (n+ 1) (12n2+9n+2) blue, etc. Red at the bottom, blue at the top.
Each colour occupies 10 em, the bands occupy
136
an integral number of centimetres not less than
two. How many ways of painting them do we 242.
have? The same, if we remove the restriction that There are n things alike and n others all diffe-
blue is the last colour? Show that if no band must rent. In how many ways can n things be chosen
be less than 3 em, then there will be 153 arrange- from them? In how many ways can all 2n things
ments ending with blue, 71 with white and 81 be ordered?
with red.
243.
236. There are m Frenchmen and n Englishmen in a
row so that at least one compatriot stands next
I have 6 friends with each of whom I have met at to another. Show that the number of possible
dinner 8 times. I have met every two of them 5 orders is
times, every three of them 4 times, every four
of them 3 times, every five, twice, all six once, m!nl [1+(C~_ 2 +c;,_ 3 ) (C~_ 2 +C~_ 3 )
and I have dined out 8 times without meeting
any of them. How many times have I dined out +(C;,_3+C~-4) (C~-3+C~-4)
alone?
+ (C~-4 +C!,_5) (C;_t. +C~-5)+ ... ]
237.
Two examiners working together examine a class 244.
of 12 in two subjects. Each is examined for 5 How many six-digit numbers contain exactly
minutes in each subject. In how many ways can three distinct digits?
a suitable arrangement be made so that no boy
may be wanted by both examiners at once? 245. r:
How many m-digit numbers contain exactly k
distinct digits?
238.
Out of six pairs of gloves, in how many ways can
six persons take each a right-handed and a left- 246.
handed glove without any person taking a pair? Consider all k-permutations of the numbers 1, 2,
The same for 9 pairs and 6 persons. ... , n under which even numbers occupy even
positions and odd numbers, odd positions. How
many permutations of this kind are there in the
239. order of increasing numbers (say, of the form
The letters in the expression a2 ~ 2y 2 are permuted 3,678)?
in all ways so that an a must have another a
next to it (the same for the other letters). Prove 247.
that the number of such permutations is 6. For
as~svs also 6. For a 4 ~ 4 y 4 , 90, and for a 11 ~ 11 y 11 , 426.
Given 2n elements aft aft a 2 , a 2 , • • • , ~· an,
and ai =1= ai, if t =1= j. In how many permutations
of these 2n elements do we find that no two iden-
240. tical elements come together?
In a· chess tournament there are 4 representatives
from each of n countries. In how many ways can 248.
they stand in a row so that every man has a com- Given n sets, each of which includes q identical
patriot next to him? elements, the elements of distinct sets being
distinct. In how many permutations of these nq
241. elements are there no two identical elements
together?
The squares 9f a chessboard are painted with
8 colours so that each horizontal line contains all8
colours and each vertical line is so arranged that 249.
no two adjacent squares have the same colour. Solve Problem 248 when the elements are arran-
In how many ways can this colour pattern be ged in a circle.
arranged?
137
250. 258.
A bookshelf has n books. In how many ways can On a straight line take p points, on a parallel
p books be chosen from them so that between any line take q points. How many triangles can be
two selected books (and also after the pth sele- made using these points as vertices?
cted book) there are at least s books?
259.
251. The same conditions, but one more parallel line
The numbers expressing the number of contestants is added with r points, no three points lying on
at a mathematics olympiad of pupils of the 5th, one straight line which intersects all three paral-
6th, 7th, 8th, 9th and 10th classes are in arithme- lels. How many more triangles appear?
tic progression. The number of prizes for each
class is equal to the common difference of the 260.
progression. Prove that the number of ways of
awarding the prizes (all different) remains un- Each side of a square is divided into n parts.
changed if all prizes go to the 10th class. How many triangles can be built whose vertices
are the points of division?
252.
A square grid ABCD is built, with 4 cells on a 261.
side, and all the shortest routes from vertex A n straight lines are drawn in a plane, no two lines
to vertex C are drawn along the sides of the cells. being parallel and no three intersecting in one
Show that there are 70 routes, 35 routes going point. How many points of intersection do these
along 4 segments, 20 routes along 8 segments, lines have?
18 routes along 4, 15 routes along 4, 12 routes
along 4, 10 routes along 4, 5 routes along 4, 4 262.
rontes along 4, and 1 route along 4 segments. In a plane are n straight lines, of which p pass
Investigate the intersections in similar fashion: through point A and q pass through point B;
1 is crossed 36 times, 4, 35 times, 4, 30 times, besides, no three lines pass through one point,
4, 15 times, 4, 5 times, 4, 40 times, and 2 once no line passes through both points A and B,
(the endpoints are excluded). and no two are parallel. How many intersection
points do the lines have?
253. •
How many triangles are there whose vertices are 263.
the vertices of a given convex hexagon?
Into how many parts is a plane divided by n
254. straight lines of which no two are parallel and
How many triangles are there with the lengths no three concurrent?
of the sides assuming one of the values 4, 5, 6, 7?
264.
255. Into how many parts do n planes divide a space,
How many different rectangular rarallelepipeds no 4 planes passing through one and the same
can be constructed, the length o each edge of point, no 3 passing through one and the same
which is an integer from 1 to 10? straight line, and no 2 being parallel?
256. 265.
Draw 4 straight lines in a plane, no two lines There are five points in a plane. Among the
being parallel and no three passing through one straight lines connecting these five points there are
point. How many triangles are there? no parallel lines, perpendicular lines or coinci-
dent lines. Draw through each point perpendi-
257. culars to all the straight lines that can be built,
Given, in the plane, n points of which p lie on joining the remaining four points in pairs. What
one straight line; aside from these, no three points is the largest number of intersection points or
lie on one straight line. How many triangles are these perpendiculars (among themselves) if we
there with these points as vertices? discount the given five points?
f38
266. 272.
In how many ways can we construct triangles, There are n points in a plane no three of which
whose sides are integers greater than n and not are collinear and no 4 are concyclic. A straight
.exceeding 2n? How many isosceles triangles and line is drawn through every two of these points,
•equilateral triangles will there be? and a circle through every three. Find the largest
number of intersection points of all drawn lines
with all circles.
267.
Prove that the number of triangles with integral 273.
sides, the length of the sides not exceeding 2n, Given n points in space, no four of which lie in
is '! n (n + 1) (4n + 5). If we exclude isosceles
one plane. A plane is drawn through every three
points, no two planes being parallel. Find the
triangles, this number is equal to ! n (n -1) x
number of straight lines resulting from the inter-
section of the planes, and also the number of
straight lines not passing through a single given
X (4n- 5).
point.
:268. 274.
Out of n segments of length 1, 2, ... , n
Prove that the number of triangles the length of choose 4 so as to obtain a circumscribed quadri-
.the sides of which does not exceed 2n - 1 is
! n (n + 1) (4n - 1) and that, after excluding
lateral. Prove that this can be done in
2n (n-2) (2n-5)-3+3 ( -1)n
48 ways. How many
isosceles triangles, there remain ! (n - 1) x quadrilaterals result if sides of equal length can
be taken?
X (n - 2) (4n - 3) triangles.
275.
Given n points, no four of which lie on one circle.
269. A circle is drawn through every three. What is
n straight lines are drawn in a plane, no three of the greatest number of intersection points of these
them concurrent. Prove that the Ifumber of unor- circles?
dered groups of n intersection points, of which
no three lie on one straight line, is equal to 276.
1 Prove that if n planes pass through the centre of
2 (n -1)1 a sphere, then in the general case they divide the
sphere into at most n2 - n + 2 parts.
270. 277.
There are n points in a plane, no three of which In how many distinct ways (geometrically) can
lie on a single straight line. How many r-segment the faces of a cube be painted with six different
·closed polygonal lines are there with vertices at colours? Two modes of painting are considered
these points? geometrically coincident if one can be carried
into the other by rigid motions of the cube.
271. 278.
n points are taken on a straight line and m points In how many geometrically different ways is it
on a parallel line. These points are joined by possible to paint the faces of a tetrahedron using
straight lines. Prove that the number of inter- four different colours?
section points of the lines is mn(m-21)(n- 1) .
279.
{W& consider that no three of the drawn lines In how many geometrically different ways can
intersect in a single point; the given m n + the faces of an octahedron be painted with eight
points are not counted.) distinct colours?
139
280. (2) For any two routes, there is one and only
one stop where the change can be made from one
Solve similar problems for a regular dodecahedron route to the other;
and a regular icosahedron. (3) Each route has at least three stops.
How many stops has each of the 57 routes?
281.
In the preceding problems, consider cases when 287.
the number of colours is less than the number of Is it possible to set up 10 autobus routes and ar-
faces (say, a cube is painted with two colours, range the stops so that no matter what 8 routes
three colours, four colours and five colours). are taken, there is a stop not involving any one
of them, and any 9 routes pass through all stops?
282.
How many triangles are there with integral sides 288.
and perimeter 40? With perimeter 43?
What is the maximum number of distinct spheres
283. that can be built in space so that they contact
Prove that the number of triangles with integral three given planes and a given sphere?
sides and with perimeter 4n + 3 is n + 1 more
than the number of triangles with integral sides 289.
and perimeter 4n. Through each of three given points draw m stra-
ight lines so that no two are parallel and no three
284. are concurrent. Find the number of intersection
Prove that the number of triangles with integral points of these lines.
sides and perimeter N is given by the table
290.
Number Number Given n points in space of which m lie in the
N of triangles N of triangles plane P and the others are arranged so that no
II four lie in one plane. How many planes can be
drawn so that each contains three given points?
12n 3n2 12n+6 3n2+3n+1
12n+1 n(3n+2) 12n+7 (n+1) (3n+2) 291.
12n+2 n(3n+1) 12n+8 (n+1) (3n+1) A plane contains three points A, B, C. Draw m
12n+3 3n2+3n+1 12n+9 3n2+6n+3 straight lines through A, n through B and p
12~+4 n(3n+2) 12n+10 (n+1) (3n+2) through C. Among these lines, no three are con-
current and no two parallel. Find the number of
12n+5 (n+1) (3n+1) 12n+11 3n2+7n+4 triangles whose vertices are the intersection
points of the lines and do not coincide with the
given points A, B, C.
285.
In a city the bus routes are arranged as follows: 292.
(1) No changes are needed to get from any stop
to any other stop; How many triangles are there whose vertices are
(2) For any two routes, there is one and only one the vertices of a given convex n-gon, but whose
stop where the change can be made from one route sides do not coincide with the sides of the
to the other; n-gon?
(3) Each route has exactly n stops.
How many bus routes are there in the city? 293.
n straight lines are drawn on a plane and p points
286. are taken on each one so that no point is a point
A city has 57 bus routes, such that of intersection of the lines and no three points
(1) No changes are needed to get from one stop lie on one nongiven line. Find the number of
to any other stop; triangles with vertices at these points.
140
294. 301.
Prove that the number of points of intersection Into how many regions is a convex n-gon split by
of the diagonals of a convex n-gon exterior to its diagonals if no three diagonals intersect in
1~
a single point inside the n-gon?
the n-gon is n (n - 3) (n- 4) (n - 5) and
302.
the number interior to it is~ n (n -1)(n -2)X Suppose there is one card labelled 1, two cards,
X (n - 3) (it is assumed that no two diagonals 2, three cards, 3, etc. Prove that the number of
are parallel and no three are concurrent). ways of drawing two cards so as to obtain a sum
295.
t
of n is 2 (n2 - 1) or ; 2 (n2 - 4) depending
on whether n is odd or even.
There are n points on a circle. How many diffe-
rent polygons (not necessarily convex) can be 303.
inscribed in the circle, the vertices of the poly-
gons being the given points? How many convex There are 3n + 1 objects of which n are identical
polygons? · and the remaining are distinct. Prove that n
objects can be selected from them in 22n ways.
296. 304.
There are m parallel straight lines drawn on a Given a sequence of numbers 1, 2, 3, ... , 2n.
plane. Also, on the same plane are n lines not In how many ways can three numbers be extracted
parallel among themselves or to the earlier to form an arithmetic progression? The same for
drawn lines. No line passes through the point of
intersection of two other lines. Into how many
the sequence of numbers 1, 2, 3, ... , 2n 1. +
regions do the straight lines divide the plane? 305.
A number of closed curves are drawn on a plane
297. each of which intersects all the others in at least
Given 11 points, of which 5 lie on one circle. two points. Let nr be the number of points at
Other than these 5, no 4 lie on one circle. How which r curves meet. Prove that the number of
many circles can be drawn so that each contains closed regions bounded by arcs of these curves
at least 3 of the given points? and not containing within them such arcs is
1+n2 +2na+ •.. +rnr+i + ..•
298.
306.
Given, in a plane, 10 lines that intersect in pairs;
no 3 lines pass through one point and no 4 are Two pencils of straight lines are drawn on a plane
tangent to one and the same circle. How many with centres at A and B; one contains m lines,
circles can be built such that each one contacts 3 the other, n lines. Suppose no two lines are parallel
of the given 10 lines? and no line passes through both points A and B.
Into how many regions do the straight lines of
these pencils divide the plane?
299.
Find the total number of convex k-gons whose 307.
vertices are k of the n vertices of a convex n-gon · Can each one of 77 telephones make connections
two adjacent vertices of the k-gon must be sepa: with exactly 15 others?
rated by at least s vertices of the n-gon.
308.
300. Find the sum of the coefficients of the polyno-
~ parallelogram ~s c~t by two rows of straight
mial obtained after removing the brackets in the
l~nes parallel to Its sides; each row consists of r
expression
hnes. How many parallelograms are there in the (7 xS- 13y2 + 5z2)1964 (yS _ 8y2 + 6y + z)2 +
resulting figure? + (2x2+ 18y8-21)1965
141
two units of time, there are two particles). How
309. many particles will there be in 129 units of time?
A box contains 100 balls of different colours: in n units of time?
28 red, 20 green, 12 yellow, 20 blue, 10 white
and 10 black. What is the smallest number of 316.
balls that can be drawn so as to obtain 15 balls A certain alphabet consists of six letters which
of one colour? are coded for telegraph communications as follows:
310. ., ' .. , '. -,-
The faces of a cube may be painted as follows: In the transmission of one word, no gaps (blanks)
all white, all blac/<, or part white and part black. separating the letters were made and the result
How many distinct black and white patterns are was a continuous chain of dots and dashes con-
there? (Two cubes are considered distinct if they sisting of 12 characters. 1n how many ways can
are distinguishable no matter how they are tur- the word be read?
ned.)
311. 317.
Solve the same problem when black and white Of the numbers from 1 to 10,000,000, which are
are used for the vertices and not the faces of the more numerous, those that contain a unit or
cube. those that do not?
312. 318.
Models of polyhedrons are made out of plane deve- Dots and dashes are used to construct all possible
lopments. In a development, faces adjoin along "words" of exactly 7 characters. What is the lar-
edges, and the model is built by bending the card- gest number of words that can be chosen from
board development along the edges. A regular them so that any two selected words differ in at
tetrahedron has two such distinct developments. least three characters?
How many does a cube have?
313. 319.
A regular dodecahedron can be painted in four In how many ways can a circle divided into p
colours so that any two adjoining faces have parts (p prime) be painted with n colours? Modes
different colours. How many geometrically distinct that coincide under a rotation of the circle about
ways of solving this problem are there? its centre are considered to be coincident.
314. 320.
Out of six edges of a tetrahedron it is possible to An n by n grid of cells is built and the numbers
choose four edges that form a closed space tetra- 1, 2, 3, ... , n2 are placed, one in each cell, so
goo, which contains all the vertices of the tetra- that the numbers on each vertical line and hori-
hedron. The same may be done with the cube zontal line form an arithmetic progression. Find
(we obtain an octagon containing all the vertices the number of such arrangements.
of the cube). Can the same be achieved with an
octahedron, a dodecahedron, an icosahedron? 321.
How many solutions will there be for each poly- A man has no more than 300,000 hairs on his
hedron?
head. Prove that there are at least 10 persons in
315. Moscow who have the same number of hairs
(Moscow has a population of about 6 million).
A particle is located at the origin of coordinates.
In unit time, it decays into two particles, one of
which moves one unit of length to the left, the 322.
other to the right. This process is repeated every Given 2n +
1 objects, prove that an odd number
unit of time, and two particles at any one point of objects can be chosen from them in as many
mutually annihilate (so that, for instance, in ways as an even number of objects.
142
323. 331.
Prove that 1 rouble can be changed in a greater A pack of cards is shuffled as follows: take the
number of ways using coins of 2 and 5 cop~cks first ca~d, put the second on top of it, the third
than when usmg 3- and 5-copeck coins. under It, etc. Prove that if the pack contains.
6n - 2 cards, then the card 2n remains in its.
324. place.
In how many ways can a 20-copeck piece be chan- 332.
ged using 1-, 2-, and 5-copeck pieces?
22 cards are shuffled as indicated in Problem 331.
Prove that card 8 remains fixed, 5 and 14 change
325. places, and 3, 13, 18 move circularly, one into
Prove that with the aid of a standard set of another.
weights: 1 mg, 2 mg, 2 mg, 5 mg, 10 mg, 20 mg,
20 mg, 50 mg, 100 mg, 200 mg, 200 mg, 500 mg, 333.
and 1 g, etc. it is possible to make up any weight Prove that, under the same conditions, a pack of
expressed as an integral number of milligrams. 16 cards will regain its original order in 5 shuf-
fles, a pack of 32 cards in 6 shuffles, 42 cards in
326. 8 shuffles, 28 and 36 cards in 9, 12, 20, 46 cards
Given six digits: 0, 1, 2, 3, 4, 5. Find the sum of in 10 shuffles, 22 and 52 cards in 12 shuffles
all even four-digit numbers that can be written 14 cards in 14 shuffles, 18 cards in 18 shuffles'
with these digits (repetitions are allowed). 26 cards in 26 shuffles, 30 cards in 30 shuffles'
and 50 cards in 50 shuffles. •
327.
334.
A pack of 2n cards is shuffled by the following
process. Divide the pack into two equal parts. A square is divided into 16 equal squares. In
Push one half-pack into the other in such a way how many ways can it he painted using white.
that the cards of the first half go singly into the black, red and blue colours so that each horizon-
interstices between the cards of the second half. tal row and each vertical column has four colo-
Thus the (n + 1)th card will become top; the urs?
1st card, second; the (n + 2)th, third; the 2nd, 335.
fourth; and so on. Prove that after shuffling r
times, the card which was originally in the pth 15 children line up in 5 rows, 3 in a row. In how
place will now be in the xth place, where x is many ways can this be done without any 2 chil-
the remainder when p2r is divided by 2n +1. dren coming together twice?
328. 336.
?rove _that if n is a~ integer, then (n2)1/(n!) n+:t
Prove that if, given the conditions of Problem IS an mteger too; If m and n are odd, ·then.
327, the pack has 6 m + 2 cards, then the n+i m+i
(2m+ 1)th and (4m + 2)th cards will exchange (mn)!l(ml) - 2- (n !) - 2- is an integer.
places at every shuffle. .
329. 337.
If a pack of 14m + 6 cards is shuffled three times n objects are arranged in a circle. Prove that if
In is the ~umber of _rermutations of these objects
by the process described in Problem 327, the
(2m+ i)th, 2 (2m + 1)th, 3 (2m + 1)th, under which no obJect follows the one it origi-
4 (2m+ 1)th, 5 (2m + 1)th and 6 (2m + 1)th nally followed,
page 44).
then In+ fn+i = Dn (see
cards will regain their original positions.
330. 338.
If 2x - 1 is divisible by 2n + 1, a pack of 2n Find the number of integral solutions of the equa-
tion x, + + ... +
x2 Xp = m if all the un-
cards will be restored to its original order after
x shuffles by the process described in Problem 327. knowns satisfy the inequality 0 l < < <
xk n.
143
and one red ball, is
339.
There are 7 copies of one book, 8 of another book, (m -1- 1) (n+ 1) P(m+2 n+2)-1
and 9 of a third. In how many ways can they be m+n+3 '
distributed between two persons so that each
gets 12 books? Verify your answer using the Russian word
"OKOpOK".
340. 346.
All n-combinations (with repetitions) made up I have 7 friends. In how many ways can I invite
of n letters are written down. Show that each them to dinner, three at a time, in the course of
letter will appear c~n-1 times. 7 days so that no 3 come twice?
a41. 347.
The distance between A and B is 999 km. Poles Prove that if I want to have 7 different gathe-
are put up along the road at 1-km intervals indi- rings of 3 persons each and nobody left uninvi-
cating the distances to A and to B (0,999), ted, this can be done in
(1,998), ... , (999,0). How many signs have
only two distinct digits? AJ 5 - 7A~0 + 21Aio
ways.
~142.
All possible permutations, with repetitions, are 348.
formed out of m white balls and n black balls. Prove that if I want to have 7 different groups of
Show that there are P (m + 1, n + 1) - 2 per- 3 each and no friend comes every day, then this
mutations. can be done in Ai 6 - 7Ai5 ways.
343. 349.
We have all possible permutations of m white Show that the total number of permutations of
balls and n black balls (with repetitions). Show n >- 2 objects (1, 2, •.. , nat a time) is the clo-
that the total number of white balls in all permu- sest integer to en! - 1.
tations is
, mn-f-m-1 350.
1+ n+ 2 P(m+1, n+1) Prove that if all permutations are written out.
the number of times each object appears is the
and tho total number of black balls is closest integer to e (n- 1) (n- 1)!.
1+ mnm+_;;- 1 P(m+i, n-f-1) 351.
A coin is tossed 2n times. Prove that the numbe1·
Verify your answer using the Russian word of times of heads never once falling more often
"faara". than tails is · ·
344. 1+(C1)2+ ... +<cmz=qn
Show that the number of permutations that can
be generated from m white balls and n black 352.
balls and one red ball, 1, 2, ... , m + n + 1 In how many ways can 3n different books be dis-
at a time (in which the red ball is included) is tributed among three persons so that the numbers
of books are in arithmetic progression?
i-j- mn+m+n P(
m-f- 2 'n+~)
?
m+n+4 353.
There are n pairs consisting of identical letters,
345. different pairs consisting of distinct letters. These
The total number of permutations that can be letters are ordered in all possible ways so that no
generated using m white balls, n black balls two identical letters come in succession. Prove
144
that the number of distinct orders is
360.
2: [ (2n)!- ~ 2 (2n-1)! + From point 0, on a plane, all closed polygonal
lines of length 2n are drawn, the sides of which
+ n 1x2
(n-i) 22 (2 n- 2).-
I
... J lie on the lines of squared paper, the side of a cell
being 1. Find the number of these polygonal lines
if one such line is allowed to traverse the same
segment several times.
354.
There are r distinct things that are distributed 361.
among n + p persons so that at least n of them
On a piece of paper, a grid is constructed having n
receive at least one thing. Prove that the number
of modes of dividing the things is horizontal and n vertical lines. How many di-
stinct 2n-segment closed polygonal lines can be
{n-f--p)r-n(n-f--p-W -f-- drawn along the lines of the grid so that each
polygonal line has segments on all horizontal and
+ n(n-1)
1X2 (n-f--p- 2)T- ... all vertical lines?
362.
355. A factory manufactures rattles in the form of a
Denote by II~ the number of ways of dividing ring with three red balls and 7 blue balls. How
n distinct things into k groups. Prove that for many different rattles can be made (two rattles
n>1, are considered to be the same if one of them can
be obtained from the other simply by shifting
1- n; +21 Tift- 3! nt, + ... = o the balls around the ring and turning it over)?
356.
363.
There are m cells, in the first of which are n
objects, in the second, 2n objects, ... , in the n persons gather together. Some of them are
mth, mn objects. In how many ways can n ob- acquainted; every two persons who are unacquain-
jects be selected from each cell? ted have exactly two acquaintances in common,
and every two acquaintances have no acquain-
tances in common. Prove that every person pre-
357. sent is acquainted with the same number of pe-
A basket contains 2n + r apples and 2n - r ople.
pears. Prove that for a given n, the number of
choices of n apples and n pears will be greatest 364.
if r= 0. Several points are chosen on a circle; some are
labelled A, others B. The arcs thus formed which
358. divide the circle are labelled in the following
1,000 points are the vertices of a convex 1,000- manner: if both endpoints have the letters A,
gon inside of which are another· 500 points arran- then the arc is labelled 2; if both endpoints have
ged so that no three of these 1,500 points lie on the letters B, we write ~ ; if the endpoints of an
one straight line. The given 1,000-gon is divi-
ded into triangles so that all indicated 1,500 arc are designated by different letters, then we
points are vertices of triangles, and the triangles write the number 1. Prove that the product of
do not have any other vertices. How many tri- all indicated numbers is equal to 2a-b, where a
angles will there be? is the number of points denoted by A and b is
the number of points denoted by B.
359.
Five persons play a number of games of dominoes 365.
(two against two), each player having each of the The horizontal lines of a chessboard are designa-
others as partner once and, as opponent, twice. ted by the digits 1 to 8, vertical lines, by the
Find the number of games played and all possible letters a to h. Now let a, b, c, d, e, j, g, h be arbi-
ways of arranging the players. trary numbers. In each square of the board write
145
the product of the numbers denoting the appro- ups, the first of which includes all polygons one
priate horizontal and vertical line, and place of the vertices of which is point A., the second,
8 nontaking rooks on the board. What is the all the other polygons. Which group has more
product of the covered numbers? polygons?
366. 374.
The organizing committee of a competition con- There is a knight on an infinite chessboard. Find
sists of 11 persons. The materials of the competi- the number of squares it can reach in 2n moves.
tion are kept in a safe. How many locks must
the safe have and how many keys must each 375.
member of the committee have so that the safe There are 1,955 points. What is the largest num-
may be opened when any six members of the ber of triplets of points that can be chosen so
committee are assembled but cannot be opened that every two triplets have one point in common?
if there are less than six members present?
376.
367. The numbers from 1 to 100,000,000 are written
A piece of chain has 60 links. Each link weighs down in succession so that we have the sequence
1 gram. What is the smallest number of links that of digits 123456 ... 100,000,000. Prove that the
must be opened so that, by using the split links number of all the digits of this sequence is equal
and the resulting pieces, it is possible to obtain to the number of zeros in the sequence 1, 2, 3, .••
any integral weight from 1 to 60? Solve the same ... , 109.'
problem if a balance with two pans is available.
377.
368. How many four-digit numbers are there from 0000
How many pairs of integers :c, y lie between 1 to 9,999 such that the sum of the first two digits
is equal to the sum of the last two digits?
and 1,000 such that :c2 + y8 is divisible by 49?
369. 378.
How many two-digit numbers yield a perfect A total of 2n subjects are taught at school. All
square? When added to a number with the same the students have marks of 4 and 5 (5 is the highest
digits but in the reverse order? mark). No two students have the same marks,
yet no two students are such that one studies
better than the other. Prove that the number of
370. students in the school does not exceed ern (we
Find the sum of all four-digit numbers which will assume that one student studies better than
are made up of these digits from 1 to 6 and are another if in all subjects his· marks are not worse
divisible by 3. than another's, and in some subjects he has hig-
her marks).
371.
Find the sum of all even four-digit numbers that 379.
can be generated from the digits 0 to 5. Let Mr be the number .of permutations (without
repetitions) of m elements r at a time, and Nr
the number of permutations'(without repetitions)
372. of n elements rat a time. Prove that the number
How many distinct integral solutions does the of permutations of m + n elements taken r at
+ .
inequality I :c I I y I ~ 1,000 have? a time is given by the formula (M + N)r, where,
after raising to the power, we have to replace all
373. exponents by indices.
The points A 11 A 2 , ••• , Au~ are indicated on a 380.
circle. Construct all possible convex polygons
whose vertices are among the points At. A 2 , •••• Find the coefficient of :ell in the expansion of
• . . , Ata· Divide these polygons into two gro- (1 +z2- z3)9
10-59
146
381. 388.
Find the coefficient of xm in the expansion of Prove that
(1+x)l<+(1+x)l <+l+ ... +(1+x)n + +
Ch 6Cft 6Ci\ = ns,
in powers of x. Investigate the cases m < k, 1 + 7Ch + 12C~ + 6Ci\ = (n+ 1)3
m :;;;,. k separately.
389.
382. Prove that
Find the coefficients of x1? and x18 after remo-
ving brackets and collecting terms in the expres- 1 + 14Ch + 36C~+24Ci\ = (n+ 1)'- n4
sion (1 + xl! + x?) 20. Ch + 14C~ + 36Ci\ + 24C~ = n'
383. 390.
After removing brackets and collecting terms, in Prove that
which of the expressions (1 + x2- x')l,ooo or
(1 - x2 + x 1}1,ooo is the coefficient of x17 greater? 2n;n;
1-3C~+9C~-27Ct_ + ... =(-1)n2ncos - 3-
384.
Let a0 , a 1 , a 2 , • • • be the coefficients in the expan- CnI-3C3+9C6- _(-1)n+12n+l . 2n:rt
n n •. • - V3 Sill 3
sion of (1 + x + x2 )n in ascending powers of x.
Prove that
+
(a) aoat- a1a2 azas- ... - azn-tazn = 0, 391.
Prove that
2
(b) a~-ar+a~- •.. +(-1)n-lan-1 =
1 1 (a) C~ + Ci\ + C~ + ... = ; ( 2n+ 2 cos n3:rt ) ,
= 2 an+ 2 (-t)n-la~,
402.
Find the largest coefficient in the expansions of
398.
Prove that (a+b+c)lO, (a+b+c+ d)l4
(Ch)2+2 (Ch)2+3 (C~)2+ ... + n (qD2=
403.
(2n-1)!
Denote by Y n the coefficients of the expansioa
= [(n-1)!]2 1
of the function (1- 4x)- 2 in a power series;
399.
Prove that 1
419. 426.
Find ~. knowing the recurrence relation and From the identity (1+x)n(f-x2tn=(1-x)-n
the initial terms: infer that
(a) an+2-5an+1+6an=0, at=1, a 2 = -7, ~ ck-2scs ck
L..J n n+s-1=/n+k-1
(b) ~+ 2 -4an+1+4an=0, at=2, a2=4, s=O
150
427. ~ C28+l -22m(2
From the identity (1-x2tP-1=(1+x)-P -lX
Cp
~ 2P+2m+1 p+m-s- P+ 2m+1 ) pi(p+2m)!
(2m+1)! •
X (1-x)-P-1 infer that s=O
~ C2s-1 Cp
LJ 2p+2m p+m-s = 22m-1Cp
~ <-1) 8 c~+2h-P~+s = c~+h 8=1
p+2m-1 •
1=0
~ C28
LJ 2p+2m+1 CpP+m-s = 22mCPP+2m
428. 8=0
From the identities
431.
(1-x)-2P [ 1- ( 1 ~x} 2 ]-P =(1-2xtP Considering the formulas
and [(1 + x)P ± (1- x)P)2 =
(1-x)2P[1- ( 1 x x} 2 Y =(1-2x)P
= (1 +x)2P+ (1- x)2P ± 2 (1-x2)P,
[(1 + x)P+ (1- x)P) [(1 + x)P- (1- x)PJ = (1 + x)2P
infer that -(1-x)ZP
~ C~+sc:~!~+l = 2m-lC~+P-I for positive and negative values of p, prove that
•=O
2 ~ c~8c~m-28=qW+(-1)mCW,
and
8=0
~ ( -1)8 qq'};:.2:f8= 2PC? 2 ~ c~•+~c~m-28+1 = qw+2 + ( -1 )m cw+~,
8=0
8=0
429. 2 ""' c2•czm-2s+l_ c2m+1
LJ p p - 2P '
Prove that 8=0
2P+2m+1 + cPp+m•
~ Cs C2P+2s _ 2m-l 2p + m Cp
~
2 .2j p v
C p+2sC p+2m-2s =
c2p+1
~ p+s 2P+m- m m+p-1
8=0
•=0
2 ~ p-1 p-1 czv-1
LJ Cp+2sCp+2m-zs= 2P+2m+1- p+m•
cP
430. 8=0
LJ cPp+2S cvP+2m-2S+I = c2p+l
From the identities 2 ~ 2p+2m+2
8=0
(1-x)±2P[1+ ( 2x J±P =(1+x2)±P
1-x)2
432.
derive the formulas
Considering the expression
~ (-1) 8 C~+s-1Ci:lmii~s2 8 =0, [(1+x)P+l ± (1-x)P+l) [(1+x)P ± (1-x)P)
•=0
for all possible combinations of signs, derive
~ ( -1) 8 C~+s-lq~+~P+s-12 8 = ( -i)m C?+m-1• the formulas
e=O
2 ~ C.f>\~C~m-28=Ci~~+<-1)mCW,
~ (-i)sC~q?il$ 8 28=0, s=O
8=0
2 ~ q\lqm-2s+l=CiWJ l-(-1)mC?,
~ ( -1 )S c~q?.:-28828 = C? s=O
8=0
Using them, prove that
2 ~""'
I LJ C28+1C2m-2s-
p+l p 2P+1 + (- 1) m em
- C2m+l P •
S=O
~ 28 p 2 (p+2m-1)1
~ CzP+2mCp+m-s=2 m (p+m) p! (2m)! 2 ""'
LJ C28+1C2m-28+1-
p+l p -
czm+ll+
2P+l (-i)m cm+t P '
•=0 8=0
151
2~ cP-1 cP c•P cP
...:::... P+2s-1 p+Bm-ss= IP+Im+ p+m•
infer that for m > hn
8=0
~ (-1) 8 C~-shC~=h"
~ Cp-l
2 ..:::.J Cp sp C" a=O
P+liB-1 P+2m-lls+1 = Csp+2m+1 + p+m•
8=0
437.
2 ~ C~;:sC~+2m-2s=C=~+Im+1-C~+m•
8=0 From the identity
(1+x)±P (1-x)±P=(1-x2)±P
2 ~ C~~sC~+zm-2s+t = C~~+lm+2- C~+m+i
8=0 infer that
I(
infer that
8=0
~ (-1)• c:-k+s~+s=C~-11-1
•=0
-1) ': C '; if m is even,
434. = P+~
2
Prove that 0 if m is odd.
~ (-1)•CfnCf= { 0 if m =I= n,
""'"' (-1) 11 if m=n 438.
s=O Prove that
3. 16.
20. There is a greater number of choices when an
apple is taken since 11 X 10 > 12 X 9.
4.
8. 17.
6 X 8 X 10 = 480; if the first two teetotums fell
5. on "1", then the third can fall in 10 ways; simi-
9. larly for the cases when the other two teetotums
fall on the same side; in all, we get 6 + 8 +
6. + 10 ways, but one way (when all three teeto-
48. tums fall on "1") is counted three times; and so
there are 22 ways left.
7. 18. 0
30. 38.
A~= 3,024.
Divide all modes of ordering the speakers into
pairs, the modes consisting of the ways in which 39.
A and B are obtained from one another by per-
mutation. In each pair there is only one mode cg2 = 2,598,960.
that satisfies the stipulated condition. We there-
fore have 5!/2 = 60 ways. 40.
There are 32 X 10 4 combinations containing one
31. letter, 322 X 104 containing two letters, and
323 X 104 three letters. In all, by the rule of
If A speaks just before B, we can count them as sum, there are 33,820 X 104 licence plate num-
one speaker. Therefore we get 41 = 24 ways. bers.
154
41. 52.
Of the five days, we have to choose two on which A number has to terminate in one out of 5 com-
apples are given. There are q = 10 ways in all. binations: 12; 24, 32, 44, 52. The first two digits
may be arbitrary. We get 52 X 5 = 125 numbers
in all.
53.
43. Each one of n passengers can choose any one of m
p (2, 3, 4) = 1 ,260. stops. We therefore have mn modes of distribu-
tion. If we take into account only the number
44. of passengers that get off at each of the stops,
Since the oranges are distinct, we have A:= we have C~r;.! 1 ways.
= 6, 720 ways. 54.
45. If a and b are adjacent, then we can combine
Each orange goes to any one of the 8 sons. There- them into a single symbol. Noting that a and b
can be interchanged, we get 2 (n - 1)1 permuta-
fore we get 86 = 32,768 ways. tions in which a and b appear together. There-
46. fore, they fail to come together in nl -2 (-n - 1)1
permutations. Analogously, we find that a, b,
p (4, 3, 3, 2, 1, 1); p (3, 1, 1, 1, 1, 1); and c do not come together in nl - 6 (n- 2)1
p (2, 2, 2, 1, 1, 1). permutations. No two elements a, b, c, stand
47.
together in nl - 6 (n- 1)1 + 6 (n- 2)1 per-
mutations (by the inclusion and exclusion for-
C3o = 27,405; A~ 0 = 657,720. mula). ·
48. 55.
p (2, 2, 2, 1, 1) = 5,040. Three referees can choose the winner in 1os ways.
They name three distinct candidates in Af0=
49. = 720 cases. For this reason, in 280 cases at
First choose 6 subscribers in C~ ways. Arrange least two referees will have coincident ratings.
these subscribers in any order and divide them The portion of such cases is 0.28.
up into pairs (first, second, then third, fourth
and, finally, fifth and sixth). This can be done 56.
in 61 ways. Since the subscribers can be inter- Since each student can receive three kinds of
changed in each pair, and the order of the pairs marks, we get 34 = 81 ways of passing the exa-
is not important, the total number of ways must minations.
be divided by 23 X 31 = 48. We then get a total
nl 57.
of 48 (n-6)1 ways. Since the necklaces remain unchanged in cyclic
permutations of the beads and when turned over,
50.
fig= CU; Clo = Cf1; Cfo·
we can make 1 4= 360 types of necklaces.
7'
51. 58.
We can choose two, three or four women. Two The kinds of necklaces differ as to the number
women may be chosen in C: ways. Then 4 men of small beads between the two large beads. So
have to be chosen, which can be done in Cf ways. we get three types of necklace.
By the rule of product, we get C:Cf ways. If
three women are chosen, we get CfC~ ways, and 59.
if four women, then qc' ways. The total is
The total number of different initials does not
qq+CfC¥+CfC¥=371 ways exceed 292 = 841, which is less than 2,000.
155
60. 67.
A{0 = 604,800, Cf0 = 120. If two girls are de- The number Pk can enter into the given divisor
finitely invited to a dance, then there are A~ a with exponents 0, 1, ... , a..k in a total of
ways of choosing their partners; the remaining a 11 + 1 ways. By the rule of product, the number
5 boys choose a partner out of 8 girls, which is of divisors is equal to (a1 + 1) .•. (Gtn + 1).
done in A: ways; the total is A~A~ = 282,240 To find the sum of the divisors, consider the ex-
ways. Finally, if two given girls have been invited, pression
then another five girls can be chosen in C~ ways. (1+Pt+ ... +P~ 1 ) ... (1+Pn+ ... +P~n)
Removing brackets, we get a sum which includes
61. each divisor exactly once. By the formula for
The officer may be chosen in Cl ways, the ser- the sum of a geometric progression, we find that
geants in c: ways and the privates in c:g ways. this sum is
By the rule of product, we get a total of Clc:c:g
choices. If the captain is included in the detach-
ment and the senior sergeant as well, we have Pt-1
C!C:8 choices.
68.
62.
First put one coin in each envelope. Then we
Four girls may be chosen in Cf2 ways. We then have to distribute 7 coins into 5 envelopes.
choose boys in Af; ways (here, the order is im- This can be done in Cf1 = 330 ways (see page 122).
portant). In all, there are Ct 2Af 5 = 17,417,400
choices.
69.
63. Add to the 20 books 4 identical dividing objects
and consider all permutations of the obtained
Each hen is either chosen or is not chosen. We entities. There are 241/41. To each permutation
thus get 2 1 choices of hens. Since at least one hen corresponds a definite arrangement of the books.
has to be chosen we get 7 choices of hens. Analo-
gously, there are 24 -1 = 15 choices of ducks and
22 -1 = 3 choices of geese, making a total of 70.
7 X 15 X 3 = 315 choices. As in the preceding problem, we find the total
number of ways to be 81/31 = 6, 720.
6~ .
(m, n,p)= (m+t,+t)\ 71.
Thisnumber isequal toP
m.n.p Since only the number of votes cast for each
proposal is taken into account, we have to distri-
65. bute 30 identical "objects" into 5 "cells". To do
The books in black bindings can be permuted in this, append four identical dividing objects and
ml ways, those in red, nl ways. In all, by the take all permutations of the entities obtained. With
rule of product, ml nl ways. If the black books · The total number is P (30, 4) = 46,376. distri-
stand together, then we have also to choose for every permutation is associated a distinct
them a place between the books in red bindings. bution of votes.
This can be done in n + 1 ways. The total is
ml nl (n+1)=ml (n+1)! ways 72.
12 books can be bound in three colours in. 31•
ways. Of this number, there will be 3 X 212
66. cases when the books appear in at most two colo-
Each one of the 15 men may either be included urs, and three cases in one colour. By the inclu-
or not included. Since the group cannot be empty, sion and exclusion formula, the books will
we have 21~ - 1 = 32,767 ways. For n men, appear in bindings of all three colours in 312-3 X
there are 2n - 1 ways. X 212 + 3 = 519,156 cases.
156
73. from among which we choose the 4 rowers for the
Append to the 32 letters 5 identical "dividing starboard side. We have a total of C~ ct0 k C~ 1 -k
elements" and consider all permutations of the choices. Summing with respect to k, we get the
resulting entities, in which not a single dividing answer:
element comes at the beginning or at the end and 4
no two come together. The letters can be permuted ~ ckc4-kc4
in 32! ways, and there are 31 positions for the ~ 9 10 21-k =
dividers, which can be placed in CR1 ways. Noting k=O
that the order of the words is of no importance, 4
we get 32! q 1 /6! ways of forming words. 9! 10! '\1 (21- k)!
4! ~ k! (9-k)! (4-k)! (6+1•)! (17-k)!
74. k=O
12 persons can be chosen in Cf2 ways. The two
given persons are included in the chosen group 80.
in qg cases. This leaves cg - qg admissible The number 9 may be partitioned into three dis-
choices. tinct parts in three ways: 9 = 1 + 2 + 6 =
= 1 + 3 + 5 = 2 + 3 + 4. A sum less than 9
75. will occur in 4 cases: 1 + 2 + 3 = 6, 1 + 2 +
The precious stones can be permuted in P (5, 6, 7) + 4 = 7, 1 + 2 + 5 = 1 + 3 + 4 = 8. Since 3
ways. The bracelet remains unchanged under counters may be drawn in Cf0 ways, the sum is
cyclic permutations and symmetries. We obtain not less than 9 in Cfo - 4 = 116 cases.
18!
P (5, 6, 7)/36 = 36 X 51 61 71 ways. 81.
First choose one card of each suit. This can be
76. done in 134 ways. Then choose another two cards.
If all the chosen precious stones are of one kind, If they are of different suits, this can be done in
then in three ways, if two kinds are chosen, then Cl X 122 = 864 ways. Combining these choices
in 2q = 6 ways, and if all three are distinct, with the distinct ways of choosing the first 4
then in 1 way: a total of 10 ways. cards and taking into account the permutations
of the order of choice of two cards of each suit,
77. we obtain 216 X 134 ways. If the two new cards
The cups can be arranged in A1 ways, the saucers are of the same suit, then we get 4 X Ci 2 = 264
choices. The same reasoning leads to 88 X 134
in AR ways and the spoons in A~ ways, which, choices of all cards. This yields 304 X 134 ways
by the rule of product, makes a total of Af X in all.
X ARAB = 172,800 ways.
78. 82.
If the husband invites k women, then he invites On the first day, the participants may be chosen
6 - k men. Then the wife invites 6 - k women in Cfo = 210 ways, on the second, in Cfo - 1 =
and k men. By the rules of sum and product, = 209 ways, on the third, in Gto - 2 = 208
this choice can be made in ways, making a total of 210 X 209 X 208 =
5
= 9,129,120 ways.
~ (C~)2 (C~-k)2=267,148 ways.
83.
k=O
Since Cf = 20, each choice of company will be
79. utilized exactly once. The number of permutations
The port side can accommodate 0, 1, 2, 3, or 4 of these choices is equal to 201
persons from among those who are indifferent to
the choice. But if k persons are chosen among 84.
them, then it is necessary to choose another Each boy can choose from 5 jobs and each girl
4- k persons from the 10 that prefer the port from 4 jobs. We get a total of 53 X 42 = 2,000
side. Then there remain 12 +(9 - k) candidates, choices.
157
85. 92.
Any one of the 33 letters can come first, and By the inclusion and exclusion formula, 92-
any one of the 32 letters (the preceding one being - 47 - 38 - 42 + 28 + 31 + 26 - 25 = 25
excluded) can come next. We get a total of took patties.
33 X 324 = 34,503,008 words.
93.
86. . m
. 'd ed.m t o pans
Th e men may b e d IVI . ( 101 -
First choose the prize-winners and then distri- 2!) 551 ways
bute the books among them. By the rule of pro- (taking into account the permutations within
duct, we get C~ 0 P (3, 2, 1) ways. In the second pairs and the permutations of the pairs themsel-
case, first choose the person who received the ves). The women may be divided in 101/(21)1!
first book, then the one who received the second ways (here, the order of pairs is important).
book, finally, the one who got the third book. In all, (101) 2/210 51 ways.
The total number of modes of distribution is
qoCioClo· 94.
First choose one man and one woman who appear
87. together in the same boat as the earlier chosen
Match each domino (p, q) with a domino (n - p, pair (9 2 ways). Then split the remaining ones
n - q). If p +q = n - r, then (n - p) + . t 4
m o groups m . (8 !) 2
28 x 4 ! ways.
The tota 1 Is
· ( 9 !) 2
28 X 4 !
+ (n - q) = n + r. Thus, the number of pieces
ways.
with sum n - r is equal to the number of pieces
with sum n + r. The total number of all pieces
95.
is C~+i·
If the given two men are in the same group (and
their wives are with them), then the others can
88.
It is given that the women's seats and the men's 2
be split into groups in i~:! ways. But if they
seats alternate. We therefore get 2 (71) 2 seating are in different groups, then these groups can be
arrangements. augmented in (A~) 2 ways, after which the rema-
89. ining people are divided into groups in 266~ 31
Choose one horse out of every pair AA', BB', ways. In all, we have 17(8!) 2/28 X 41 ways.
CC' (8 choices), three horses out of the remaining
10 (Cf 0 = 120 choices) and choose the order of 96.
harnessing them (61 ways). The total is 8 X Since the numbers cannot begin with zero, we
X 61 Cfo = 691,200 ways. have 74 - 73 = 2,058 numbers.
90. 97.
The consonants may be chosen in Ct ways, the If the number represeRted by the first three digits
vowels in q ways. The 7 selected letters can be is equal to x, then the number represented by
permuted in 71 ways. The total is C~C~ X 71 the last three digits can have the values
ways. If no two consonants are adjacent, the or- 0, 1, ... , 999- x, or a total of 1,000- x
der of the letters is CVCVCVC. Here we have only values. Since x varies from 100 to 999, we have
::>!41 permutations and c:C¥3!41 words. to find the sum of the natural numbers from 1
to 900. It is equal to 405,450.
91.
By the inclusion and exclusion formula, the num- 98.
ber of employees is 6 + +
6 7- 4- 3- 2 + The white draughtmen can be placed in q~ ways.
+ 1 = 11. There are 6 - 4 - 2 +1 = 1 who After choosing 12 squares for the white pieces,
know only Spanish and 7 - 3 - 2 + 1 = 3 .who there remain ·20 squares for black, which can be
know only French. placed in q~ ways, maki~g a total of q~ q~ ways.
158
99. sonants may be placed either in front of or after
both vowels (2 ways), and for the second one we
Partition all permutations of the letters of "IOmr- have three positions. The total is 2 X 12 X 2 X
Tep" into classes so that permutations within a X 3 = 144 ways.
class differ solely in the order of the vowels.
The number of classes is P 6 /P 3 = 120. Only one 107.
permutation of each class satisfies the stipulated Choose 3 letters out of the 5 consonants and place
condition. Hence the answer is 120. them in the indicated sites (A~ ways). Then take
the 5 remaining letters and 'place them in the
100. remaining 5 sites in arbitrary fashion (5! ways).
Four "e's" in succession in any permutation may The total is 5! A~= 7,200 ways.
be taken to be a single letter. There are thus 5!
such permutations, which leaves P (4, 1, 1, 1, 1) 108.
-51= 1560 permutations. By the rule of product, C~q = 30 ways; qq =
= 12 ways.
101. 109.
If "p" comes immediately after "o", these letters P (3, 1, 1, 1)- 4! = 96 ways (see Problem 100).
can be combined. And so thJ number of desired
permutations is P (2, 1, 1, 1, 1) = 360. 110.
First arrange the consonants (31 ways). For the
102. three "o's" we have 4 places left which may be
First permute all the "non-o" letters of the word arranged in 4 ways, making the total 24 ways.
in P (3, 2, 2, 1, 1, 1, 1) ways. Then choose 7
out of 12 positions into which we can put the 111.
letter "o". This yields a total of P (3, 2, 2, 1, The letter "o" can appear among the chosen ones
1, 1, 1) X C{ 2 ways. 0, 1, 2, 3 or 4 times (5 ways), the letter "k", in 3
ways, etc. We obtain a total of 5·3·5·3·3·3 =
103. = 2,025 combinations.
Both vowels and consonants can be permuted in 112.
P (2, 1, 1) = 12 ways. If the consonants are
fixed, then five positions remain for the vowels. There are Cf = 20 combinations in which all
Hence, their positions can be chosen in q = 5 three letters differ, 6·5 = 30 combinations with
ways. Altogether we have 5·122 = 720 ways. exactly 2 distinct letters, and 2 combinations
containing only one letter. There are 52 choices
altogether.
104.
Write out the vowels in a given order. Then 113.
there are 5 positions for "4>". After "<P" is written If the order of the letters is also taken into acco-
down, there are 6 positions for "n;" and, finally, unt, we get AI + 3Ai + 2 = 212 choices.
7 positions for "T", making a total of 5 ·6. 7 =
= 210 ways. 114.
Since the order of both vowels and consonants is
105. fixed, all that remains is to choose 3 positions out
As in the preceding problem, we find the number of 7 for the vowels. This can be done in q ways.
of ways to be equal to Al 11P 3 = 277, 200 (note
that the letter "I" appears thrice in the word). 115.
For the word "Ko<l>eBapRa", the first and last let-
ters must be consonants. The consonants can be
106. permuted in P (2, 1, 1, 1) ways, the vowels in
First register the sequence of vowels (2 ways), P (2, 1, 1) ways. In all we have P (2, 1, 1, 1)X
then insert 2 consonants between the vowels X P (2, 1, 1) = 720 ways. For the word "samo-
(A~ = 12 ways). The first of the remaining con- var., we have P 4 ·P (2, 1) = 72 permutations.
159
116. 123.
Out of the 6 positions we have to choose 3 for The total sum is 16,665.
the letter "a". This can be done in Cf = 20 ways.
If there is the added restriction that no two
a's can come together, then we have only four 124.
places for them, and we get Cf = 4 ways. If we remove the restriction that 0 does not ap-
pear in the leading position, the sum is 2,666,640.
117. The sum of the numbers with leading 0 is 66,660.
The letters of"fulfi.l" can be permuted in 180ways. Therefore the sum of five-digit numbers without
In these permutations, two f's come together leading 0 is 2,599,980.
in 60 cases, there are two l's in 60 cases, and
both in 24 cases. By the inclusion and exclusion
formula we get 180-60-60 + 24 = 84 admissib- 125.
Since it is possible to write 2k k-digit numbers
le permutations. For the word "murmur" we have
90-30-30-30 + 12 + 12 + 12-6 = 30 ad- using the digits 8 and 9, the total number of
6
missible permutations.
desired numbers is ~ 2k = 126.
118. k=1
5! +C2C1
3 X 2f 51 +Ct 51 Cl 51 440 149.
s 2 aX 31+ 2 X3T2f=
( 2 !) 2 At 11 points of the journey there is a choice bet-
ween two alternatives. The number of ways the
five-digit numbers that can be generated from the journey can be made is 211 = 2,048.
given digits. Of that number, in 3P 3 + 2;~ =
150.
= 24 cases the digit 3 occurs three times in suc- Since the choice at the starting point has been
cession. We get 416 desired numbers. made, there remain 210 = 1,024 possibilities.
143. 151.
The total number of permutations of the given In the same manner, we find that the number of
digits is P (2, 2, 2, 2). From among them, ways is equal to 35 = 243.
P (2, 2, 2, 1) permutations have a given digit
twice in succession, P (2, 2, 1, 1) have 2 given 152.
digits in succession, P (2, 1, 1, 1) have 3 given If p 10-copeck pieces have been chosen, then the
digits and P (1, 1, 1, 1) have 4 given digits toge- 15-copeck pieces can be chosen in 0, 1, ...
ther. By the inclusion and exclusion formula, ... , 20- p ways (or 21 - p ways altogether).
we find that no 2 digits are repeated in Since p varies from 0 to 20, we have 1 + 2 +
P (2, 2, 2, 2)-4P (2, 2, 2, 1)+6P (2, 2, 1, 1) + 3 + . . . + 21 = 231 choices in all.
-4P(2, 1, 1, 1)+P(1, 1, 1, 1)=864 153.
permutations. There are Cf 3 = 1,287 distinct combinations of
the coins, and so there may be 1,286 wrong ans-
144. wers.
Similarly we find that the number of permuta- 154.
tions is
There are 90,000 five-digit numbers, of which
81 71 6! each digit is an even number in 4 X 5' =
(21 )3 -3x (21 )2 +3x 21 -51=2,220 = 2,500 cases, an odd number in 5~ = 3,125 ca-
11-59
162
ses. Digits less than 6 do not appear in 4~ = 1
= 1,024 cases, and greater than 3, in 3 X 44 = For5typesofsumwehave 41 A:P (1, 1, 1, 1, 2)
= 768 cases. All the digits 1, 2, 3, 4, 5, are con- = 10,800 cases, and for 6 types, 61 = 720 cases.
tained in 5! = 120 numbers, and all the digits Note that 6 +
930 +
10,800 23,400 + +
0, 2, 4, 6, 8 are contained in 4 X 41 = 96 num-
bers. ·
+ 10,800 +
720 = 66 •
158.
155. The dice are partitioned into groups according to
It is seen, from the statement of the problem, the sum that appears in a throw. We ~u.st ~here
that distinct throws yield the same sum if they fore find the number of ways of partitiOning n
are obtained by permutations of the dice. The dice into 6 groups. This number is Cn.f. 5 (see
number of distinct sums is therefore C: 6= + page 122).
= 21.
159.
156. Since 1,000,000 = 26 X 56 , any factorization of
We get
way.
c: + 2Ci + 6 = 56 in exactly the same one million into three factors is of the form
1,000,000 = (2a:1 X 5tl 1) (2a2 X 5tl2) (2a: 3 X 5tl 3)
157. where aft a 2 , a 3 , ~it ~ 2 , ~ 3 are nonnegative inte-
One sum will turn up in 6 cases. Two sums can gers such that a1 + a2 T .a3 = .~1 + +
~2 ~a--:
appear in the following three ways: one die is of = 6. Since 6 can be partitiOn(;ld mto 3 nonnegati-
one type, and 5 dice of another type, or two dice ve integers in C~ = 28 ways, the number of
are of one kind, and four dice of a second kind, or factorizations (with regard for the order of the
there are three dice of each kind. In the first in- factors) is 282 = 784.
stance, the type of dice can be chosen in A~ ways,
and any one of the 6 dice may be assigned a sum 160.
of the first kind. This yields 6A~ = 180 cases. The factorizations obtained in Problem 159 fall
In the same way, the version 2 + 4 yields into three classes: either all three factors coinci-
A:P (2, 4) = 450 cases, and the version 3 3+ de or two coincide and the third is distinct, or
yields C£P (3, 3) = 300 cases. Thus, two types all' three are distinct. The first class consists of
of sum are obtained in 180 +450 +300 = the single factorization 1,000,000 = 100 X
= 930 cases. For three types of sum we first X 100 X 100. Let us find the number of factori-
find all partitions of 6 into 3 summands: 6 = zations of the second class. If coincident factors
= 1 + +1 4= 1 + +
2 3= 2 + +
2 2. We
are of the form 2a:.5tl, then we have 2a +
a3 =
accordingly get
= 2~ + ~ 3 = 6. ~ut t_he equatio~ 2a: y= +
= 6 has four solutions m nonnegative mtegers:
Ji! AfP (1, 1, 4) = 1,800, X = 0, y = 6, X = 1, y = 4, X = 2, y = 2;
x = 3, y = 0. Since any a may be combined with
AfP (1, 2, 3)=7,200, any ~. we get 16 variants for 2a X stl. One of
them, namely 22 X 52 , must be discarded as
_!,3. AfP (2, 2, 2) = 1,800 resulting in a factorization of the first class. That
leaves 15 variants. Each leads to three factori-
zations depending on the position of the third
or a total of 10,800 cases when exactly 3 types factor. Hence, the second class consists of 45
of sums occur. factorizations. Disregarding the order of the
The partitions of 6 into 4 summands are: 6 = factors, we get 15 factorizations. Finally, the
+ + + + + +
= 1 1 1 3 = 1 1 2 2. These ver- number of factorizations of the third class is
sions yield 311 AtP (1, 1, 1, 3) = 7,200 and equal to 784 - 1 - 45 = 738. They fall into
groups that differ solely in the order of the fa-
- 1- AtP (1, 1, 2, 2) = 16,200 or a total of 23,400 ctors and that consist of 6 factorizations each.
(2!)2 Therefore, disregarding the order of the factors,
cases when four types of sum appear. we have 1 +15 + 123 = 139 factorizations.
163
161. 171.
Each coin goes into one of two pockets, and so First distribute the apples. Since each gets at
we have 29 ways. most 4 apples, this distribution (to within per-
mutations) can be made in one of the following
162. ways: 6 = 4 + 2 + 0= 4+ 1 + 1= 3+
Arrange the objects in some order and give the + 3 + 0 = 3 + 2 + 1 = 2 + 2 + 2. If the
first n objects to the first person, the second n apples are distributed in the pattern 4 + 2 +
0,
objects to the second, and the remaining objects then we have to choose 2 pieces of fruit out of
to the third. Since the order of the elements in a 6 for the second, and give the rest to the third.
group IS . 1evan t , we get en
. 1rre sn en _(3n)! d
2 n - (n!)S mo es
This can be done in e: ways. Taking into account
the possibility of yermutations of the people, we
of distribution. get 31ef modes o distribution. Using the 4 +
+ + 1 1 pattern, we have to choose 3 pieces of
163. fruit for the second out of 6 (q ways). Since two
As in the preceding problem, we find the number persons have the same number of apples, the num-
ber of permutations of the people equals
o f parn·
2n)!
1 Ions t o b e ( nn!
2 • P (2, 1) = 3. By the 3 + 3 + 0 pattern, we
have to choose one piece of fruit out of 6 for the
164. first person and one piece out of the remaining
(nk)! 5 for the second. Here too we have three permu-
Similarly, we get (k!)nn! • tations of the people. The other patterns arc
considered in the same way. We obtain a total of
165.
30! 30!
6Ci +3GB+ 3qq +6qq + qq = 690
(10!)33! ' (3!)1010! modes of distribution.
166. 172.
Four aces may be split in half in (;!~ 3 = 3 wa'!s, ~~ 9=6+3+0=6+2+1=5+
+4+0=5+2+2=4+3+2=3+
· · 32 cards m
an d the remammg 321) ways. s·mcc
· (161 221
+ +3 3, it follows that, as in the preceding
problem, we have
these partitions may be combined in two ways 6 lC:+Ga+qc:+qc:+C:C¥1
one with the other, we get ~:6~)2! modes of divi- + 3 (qq + qq) + qq = 19,068
sion. modes of distribution.
167. 173.
There are 25 1~ 151 = 945 ways. A pack of cards can be dealt to 13 players in
52! .
168. (4!)13 ways (see Problem 162). If each IS to receive
945. one card of every suit, then for each suit we get
a permutation of 13 cards; since permutations
169. of suits are independent, then by the rule of pro-
91/(31) 4 = 280. duct we have (13!)' ways. In the third case, one
player can choose one card of each suit in 134
170. ways. Then, the remaining 12 cards of each suit
Three fersons can split 6 apples in q ways and
each o the other fruits can go to any one of the
can be divided into 3 groups in (:!~!31 ways, and
three persons; they can be divided in 38 ways. th . . d . (i 21) 4 h
We thus get a total of 38 C: = 20,412 ways of e remammg car s, m (4 l)l2( 3 l)" ways. T ese
dividing the fruit. groups can be dealt to 12 players in 121 ways.
11*
164
Taking into account that a player having all
177.
. can be ch osen m
smts (131 )5
. 13 ways, we get ( !)l There are three possibilities for each pair of
4 2(3!) 4
for the third case. objects: a sample can contain two objects, one,
or none of the pair. Therefore, the number of
samples is 314 = 4,782,969.
174.
Four cards may be drawn from a full pack in 178.
Ct 2 ways. There will be exactly 3 suits in Four black balls can be put into 6 packages in
A:(CJ: 3) 2 Cf 3 = 518,184 cases: we choose the absent C~ ways. We have the same number of ways for
suit and the repeated suit in A~ ways, and then white and blue balls. By the rule of product, we
choose two cards of the repeated suit in q 3 get (C:)3 = 2,000,376 ways.
ways, and one card each of two more suits in
(C} 3)2 ways. There will be exactly two suits in 179.
+
Ci (Cfa) 2 AiCfsCis = 81,120 cases. Actually, In the same manner we obtain C:Cfa = 5,720.
this is possible either if we have two cards each
of two suits or one card of one suit and three of
another. In the first case we have to choose two 180.
suits and two cards each of these suits, and in Depict each partition of the number n into parts
the second, we choose the first and second suits in the form of an array of dots. Adjoining to each
(here the order of the suits is important), and array one column of n dots, we get an array for
then take three cards of the first suit and one card the partition of the number 2n into n parts.
of the second suit.
181.
Choose three arbitrary positive integers from 1
175. to n - 2 and add 2 to the greater of them and 1
Split the 13 cards of each suit using the pattern to the second in magnitude. We obtain three
1 "- 13!
3 + + +
3 3
. •
4. Th1s can be done m 41 (3 !)4 numbers, no two of which follow in succession.
They thus yield the number labels of the chosen
ways. Groups of 4 cards each can be dealt to the objects. Hence the choice can be made in c;_
2
players in 41 ways, and groups of 3 cards of each ways.
suit, in 3! ways. Altogether, we get (3!) 44! ways
of distributing the groups. The cards can be 182.
dealt in
In P (2, 2, 2, 2, 2, 2, 1, 1, 1, 1) = ~~! ways.
( 4! 13!
(3!)4
) 4 41 (31 4- (13!)4
. .) - (4!)3 (3!)12
183.
ways. We can occupy the empty squares with identical
pieces and obtain a permutation of 48 pieces and
176. of the pieces indicated in the problem. There are
64!
Arrange the recipients in some order. Then ar- p (48, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1) = 26481 such
range the 18 objects in order in all ways and divi-
de them into 4 groups of 4 objects each and 1 permutations.
group of 2 objects. Give the 2-object group to
one of the 5 recipients, then give the other groups 184.
to the remaining participants (the first group to Analogously, we get P (32, 8, 8, 2, 2, 2, 2, 2,
the first, the second to the second, etc.). Since 2, 1, 1, 1, 1).
the order of the elements in the groups is imma-
185 .
. I , we ge t 5( X!) 181 mo d es of d'lVlslon.
ter1a . . I n the
4 421 Let p squares be held by white draughtmen and
q squares by black pieces. 15 white pieces can
same way, we get (4181 !) 3(q d . th
3 !) 2 mo es m e secon
d be placed on p squares (so that all squares are
case. occupied) in Cf,- 1 ways, and 15 black pieces can
165
be placed on q squares in Cl.J.- 1 ways. It is possible are another 8 pieces on the 12 noncorner squares
to choose p squares for white and q squares for on the first vertical line and the first horizontal
black in P (p, q, 24 - p - q) ways. The total line. These pieces can be placed in Cf 2 = 495
number of ways is therefore ways. But if the corner squares are vacant, then
the 12 noncorner squares of the first vertical line
~ p (p, q, 24-p-q) C~41CY41 and first horizontal line accommodate 10 pieces,
p,q which can be placed in qg = 66 ways. We thus
have a total of 561 ways of placing the pieces.
where the summation is extended over all p
and q such that 193.
1<p<15, 1<q<15, p+q<24 7 white balls can be placed in 9 pockets in cr5
ways, and 2 black balls in C~ 0 ways. This yields
186. Cf6 X Cfo = 289,575 ways in all.
Combine into one group the cells that pass into
one another in rotations of the board through 194.
90°. It is given that 5 such groups are filled, and Similarly, we have Cf5 (C3) 2 = 521,235 ways.
the total number of groups is 16. We therefore
have Cf8 = 4,368 possible placements. 195.
First choose 9 books for C. This can be done in
187.
Same type of solution as in Problem 186. We
c:1 ways. The remaining 18 books can be divi-
ded between A and B in 218 ways. This gives us
have C!~ placements. a total of 21 BCI 7 ways of distributing the books.
188. 196.
The number of squares is reduced by half and we The 8 persons can be distributed among the floors
have qg p_lacements. in 48 ways. Of this number, no one gets out on a
given floor in 38 cases, on any given two floors
189. in 28 cases, and on any given three floors in one
Put 6 white and 6 black pieces on 16 black squa- case. Using the inclusion and exclusion formula,
res on one half of the board. This can be done in we have 48 - 4 X 38 + 6 X 28 - 4 = 40,824.
161
P (6, 6, 4) = 6T6f4i ways. 197.
The following cases are possible: all three sum-
190. mands are divisible by 3, one summand is, and
On one half of the board choose 12 squares out none is. In the first case, the summands can be
of 16 and place any pieces on them, on the other chosen in C:s ways. In the second case, one sum-
half use symmetric squares and put on pieces of mand yields a remainder of 1, and the other, a
opposite colour. The squares can be chosen in remainder of 2. Since there are 34 numbers from 1
q: ways, and the colour of the pieces occupying to 100 that yield a remainder of 1, and there are
tliese 12 squares can be chosen in 212 ways. We 33 numbers divisible by 3 and yielding 2 as a
obtain a total of 212 Cfi = 7 ,454, 720 ways. remainder, in the second case we have C~ 4 (C!3 ) 2
ways. If all three summands are not divisible
by 3, then they have the remainders 1, 1 and 1,
191. or the remainders 2, 2 and 2. We accordingly
The position of the pieces is determined by which get q, or Cf3 cases. In all, we have 2q 3 + q, +
5 squares out of 7 on the first horizontal line are
occupied by white pieces. We therefore have
+ q, (C! 3 ) 2 = 53,922 choices.
q = 21 ways. 198.
192. The solution is similar to that of Problem 197.
The answer is
The positions are divided into two classes depen-
ding on whether a corner square is occupied or n
3CJ't+(Cf,)3=2" (3n2-3n+2)
not. If the corner squares are taken, then there
166
199. 204.
If p white balls are placed, then the occupied The first column of the partition of 2r +
x into
pockets can be chosen in Ch+t ways. There then r +x nonzero summands contains r +
x ele-
remain n - p +
1 pockets for the black ball; ments. Discarding it, we obtain the array of the
+
also, it need not be placed at all. We get n - p partition of r into nonnegative summands.
+ 2 possibilities.
n
The answer is therefore of the
q q-1 205.
form 2j (n- p + 2) X C~+ 1 = ~ sC~ + 2j C~. Since each can vote for any one of n persons, we
P=O s=1 P=O have nn ways of voting. In the second case, it is
q q-1
necessary to divide n votes among n candidates,
Since 2j sC~ = q2q- 1 and 2j C~ = 2q- 1 (see
which can be done in c;n-=.\
ways.
s=1 v=O
Problem 401a), we get (q + 2) 2q- 1 - 1.
206.
200.
Let the number 2n be divided into three parts
Let us denote a nonempty set of white balls by as required: 2n = a+ b +
c, and a .<;: b .<;:c.
W, and a similar set of black balls by B. From
the statement of the problem it follows that the
Then a =1= 1, otherwise we would have b +
c=
= 2n- 1, and for this reason b < c, which is
balls are arranged in one of the following patterns:
BWBW ... BW or WBWB ... WB, each
impossible since b +
1 > c. Besides, a +
b>
> c, and the numbers a+ band c have the same
pattern accommodating r pairs. But m white
balls can be distributed among r nonempty sets
parity. Hence, a +
b :> c + 2. But then the
numbers a - 1, b - 1, c - 1 form a partition
in c~-_! 1 ways. For the black balls we have C~-:=_ 11 for 2n - 3, and (a - 1) +
(b - 1) > c - 1.
ways, making the total 2c~-_! 1 C~=f ways. In the In this way is established a one-to-one correspon-
dence between the partitions of the numbers
same manner, we conclude that 2r contacts will 2n and 2n- 3.
occur m . crm- 1 cr-1
n- 1 +
cr-1 cr
m- 1 n- 1 cases.
201. 207.
Denote by A (m, n) thll number of ways of collect- This follows from the equality
ing a total of m marks in the cours-e of n examina-
tions (without getting a 2, which is a failing C},+Cf,+Ct, + ... =2n-1
mark). It is then clear that A (30,8) =A (25,7) +
+A (26,7) +A (27,7), etc. Continuing to 208.
reduce m, in a few steps we get the answer: 784.
Let the first person receive x objects of the first
202. kind, y objects of the second kind, and z objects
First choose n objects that remain fixed. This
of the third kind. Then x + +
y z = 3n, and
0 .<;: x, y, z .<;: 2n. It is thus required to find the
can be done in C;!,+n ways. The remaining m number of solutions of the equation x + + y
objects are deranged so that none remains in its + z = 3n in nonnegative integers not exceeding
original position. This can be done in Dm ways 2n. If we lift the restriction that x .<;: 2n, y .<;: 2n,
z .<;: 2n, then the number of solutions is equal
(see page 44). Altogether we get (m+n)! Dm to the number of ways of splitting 3n identical
m!n!
ways. objects among three persons, or C§n+2. Let us
now find the number of solutions in which x >
203. > 2n. It is equal to the total number of solutions
r things can be distributed among n p per- + in nonnegative integers of the equations y + z=
sons in (n +
p)r ways; in (n +
p - 1)r cases a = k, 0 .<;: k < n or 1 + 2 + ... + n =
- 2- . n(n+1)
given person gets no object at all; in (n p - 2)r +
cases two given persons get nothing, etc. Using In the same number of solutions, y > 2n and
the principle of inclusion and exclusion, we arri- z > 2n. Discarding them, we get 3n2 + 3n 1 +
ve at the desired result. solutions.
167
209. 213.
The solution is like that of Problem 208. We get Use x11 x 2 , x 3 to denote the quantity of things of
the first kind, and y 11 y 2 , y 3 , those of the second
2n-1 kind received by A, B and C, respectively. We
cfn+a-4 ~ C~+2=Cfn+3-4C~n+2= then have the equations x1 + .x 2 + x 3 = n and
k=O 1/1 + + Yz 1/3 = n with the restrictions xk +
+ -< -< -<
1111,. n, 1 k m. If these restrictions are
lifted, then we get c~+B solutions to the first
equation and C~+z solutions to the second, ma-
king a total of (CA+ 2) 2 solutions. Here, the num-
210. ber of solutions in which the restriction x1 + y 1 -<
Since the parts are indistinguishable, the solu- -< n is violated is equal to the total number of
tions :r, y, z and 2n- x, 2n- y, 2n- z of the nonne.gative integral solutions of the systems of
equation x + y + z = 3n can be identified. equatwns x2 + +
.x 3 = r, y 2 y 3 = s, where 0 -<
One solution, namely, x = n, 11 = n, z = n, -< r < n, 0 -< s < n and r+ s < n. The system
is identified with itself, and the remaining, Xz + X3 = r, +y2 y 3 = s has (r+ +
1) (s 1)
with solutions different from them. The answer nonnegative integral solutions. Hence the total
is therefore of the form number of solutions of our systems is
3n2+3n +1 n-1 n-s-1
2 ~ ~ (r+i)(s+i)=
s=O r=O
Similarly for the case when we have things of
4 kinds. n-1
= ~ ~ (s+1)(n-s)(n-s+1)=
211. 8=0
Here we have to find the number of integral solu- n-1
tions to the equation x1 + + ... +
x2 Xm =
-< -<
= mn that satisfy the conditions 0 xk 2n, = ~ c;+1C~-s+1 =C!+a
1 -< -<
k -< -<
m. If we lift the restrictions 0 Xk s=O
< 2n, 1 -<
k-< n, we get c:;:.fm-1 solutions.
(see page 36). There are just as many solutions
Let us find the number of solutions for which
> that do not satisfy the conditions x2 + y 2 < n
Zt 2n; it is equal to the total number of solu-
tions of all equations + <
and xa Ya n. Discarding these solutions,
we get
xz+xs+ ... +xm=k
( c!+ 2)z- 3C!+a
where O-<k<mn-2n-1, that is,
mn-2n-1
solutions. For n = 5 there are 231 solutions.
~ cr-t~-2 = c:;~2n+m-2 214.
k=O
9 persons can be seated in 91 ways. Let us find
There are just as many solutions for which :r2 > the number of permutations in which 3 English-
> 2n, etc. Hence, we have to reject CJmcm-1
mn+m-an-2 men are seated together. All such permutations
solutions. In the process, some solutions (namely are obtained from one by reseating the English-
those for which, say, both x1 > 2n and .x2 > 2n) men among themselves (31 ways) and reseating
are discarded twice. Using the inclusion and the 6 Frenchmen and Turks and the companf of 3
exclusion formula, we get the desired result. Englishmen (71 ways). We get a total o 3!7!
permutations. In the same number of permuta-
212. tions we have 3 Frenchmen together and in the
same number 3 Turks together. Furthermore,
In 231 ways. For the solution, see the next in (31) 2 51 permutations both Englishmen and
problem. Frenchmen sit together, and in (3!) 4 permuta-
168
tions the English, French and Turks are togeth- is (2!) 29 X 61. Namely, we can choose seats for
er. Using the inclusion and exclusion formula, the Englishmen in 9 ways, and then combine two
we get Frenchmen and take all possible permutations
9!-3 X 3171+3 (31)251-(3!)4=283,824 of this pair and the remaining 5 rersons. Taking
into account the possibility o interchanging
places (with respect to the Englishmen sitting
215. together and the Frenchmen together), we get
The total number of permutations is 9! Find the the indicated number of permutations. The re-
number of permutations in which two given maining possibilities are considered in similar
Englishmen are together. If we combine them, fashion. Altogether, we have
we get permutations of 8 entities. But, besides,
we can rearrange them among themselves. And 9!-9 X 2! 9 X 71+27 (2!)2 9 X 6!+3 X 3! 9 X 6!
so we have a total of 2181 permutations. Here, -(2!)3 9 X 5!-18 X 3! 2! 9 X 5! +3 (31)2 9 X 4!
two given E:aglishmen can be chosen in q ways,
and we have three nationalities in all. There- +27 X 3! (2!)2 9 X 4! -9 (3!)2 219 X 3!+(3!)3 9 X 2!
fore, the appropriate term in the inclusion and
exclusion formula is equal to 3CJ218!. Now let ways.
us find the number of permutations in which two
given Englishmen sit together and the two given 217.
Frenchmen as well. Combining into a single pair Use F (N) to denote the number of ways of put-
the adjacent compatriots, we get 7 entities to be ting N copecks worth of postage stamps on a
permuted. What is more, the compatriots sitting package. Divide these ways into classes in accor-
together can be permuted among themselves. dance with the value of the last stamp. We get
ThP, total is (2!) 27! permutations. In addition, the recurrence relation
two pairs of compatriots can be chosen in (Ci)8
ways. For this reason, the appropriate term in the F (N)=F (N -5)+F (N -10)+F (N-15)+
inclusion and exclusion formula is (Ci)8 (2!) 2 71.
The following cases- are then considered: sitting +F(N-20)
together are Using this relation and the equality F (5) = 1,
(a) three compatriots, we obtain F (40) = 108.
(b) two of each nationality,
(c) three of one nationality and two of another,
(d) three of one nationality and three of another, 218.
(e) three of one nationality, two of another and Denote by F (nt. ••. , nm; N) the number of
two of the third, ways of paying out a sum of N copecks with the
(f) three of one nationality, three of another and coins n1 , • • • , ~· Then the rec-urrence relation
two of the third,
(g) three of each nationality. F (n11 ••• , nm; N)=F (n11 ••• , nm-t; N)+
Using the principle of inclusion and exclusion, +F (ntt ... , nm; N-nm)
we get
holds (see page 63). Utilizing this relation and
9!-9 X 218!+27 (2!)2 7!+3 X 3! 71-(2!)3 6!- similar relations, we find that F (10, 15, 20, 50;
-18 X 3! 216! +3 (3!)2 5! +27 X 3! (21)2 5!- 100) = 20.
-9 (3!)2 214! + (3!)4
219.
216. Using a recurrence relation, we find that the
problem has 4 solutions.
The solution is similar to that of Problem 215,
but the number of permutations in which the
given compatriots sit together is computed diffe- 220.
rently. Two Englishmen can be seated together The row can contain 3, 2, or 1 black ball. If
in 219 ways, and then all the others can be re- it contains 3 black balls, then the fourth ball
seated in 7! ways. If we take two Englishmen and may be chosen in three ways; then permute the
two Frenchmen, then the number of seating arran- 3 black balls and 1 ball of a different colour in
gements in which these compatriots sit together P (3, 1) = 4 ways. There are twelve ways in all.
169
Similarly, if we take 2 black balls, we get 225.
qp (2, 1, 1) = 36 possibilities, and if we take 1, The number n may be represented as the sum of
then 4! possibilities. It is possible to generate a
total of 12 + 36 + 24 = 72 rows. three positive integers (representations differing
as to the order of the integers are considered di-
n2-3n+2
221. stinct) in c;_1 = 2 ways. Of them, two
The number of such representations is equal to
the number of partitions of n identical balls into n-2
integers are equ~l in - 2- representations for
3 nonempty groups, that is C~_ 1 •
· n-
n an d m 1 · f dd n.
222. even 2- representatiOns or o
-
Let us first find out how many zeros are needed Besides, if n is divisible by 3, we have a repre-
to write down all the numbers from 1 to 999,999. sentation in which all three integers are equal.
The zero comes last in 99,999 numbers (10, 20, ... Applying the principle of inclusion and exclusion,
999,990), it comes second in 99,990 num- we readily see that the number of representations
bers, third in 99,900, etc. In all, we have 99,999+ with pairwise distinct summands is given by the
+ 99,990 +99,900 + 99,000 + 90,000 = following formulas:
= 488,889. The total number of digits is equal
to 9 +2 X 90 + 3 X 900 + 4 X 9,000 + n2-3n+ 2 3 (
2 -2 2 + 2_
n- ) -
+ 5 X 90,000 + 6 X 900,000 = 5,888,889. Since
all the digits, except zero, enter the same num-
ber of times, each of them appears = n2- 6n
2
+ 12 1. f n= 6k·,
5,888,889-4,888,88 9-600
- .
, 000 times n2- 3n+2 -~ (n- 1)=
9 2 2
223.
First choose the positions occupied by the digit 3
(the choices are Cf 0 ). Then place the digits 1 or n2- ;n+2- ~ (n-2)=
2 in the remaining 8 positions; this can be done
in 28 ways. We get a total of 28Cf 0 = "11,520 ways. n2- 6n+8
The sum of the digits of any one of the numbers if n=6k+2,
lies between 8 X 1 + 2 X 3 = 14 and 8 X 2 + 2
+ 2 X 3 = 22. Thus, if the number is divisible n2- ;n+2- ~ (n-1)+2=
by 9, the sum of its digits is 18. Hence, 1's
and 2's have a sum of 12. This sum is obtained
if we take 4 1's and 4 2's. Thus, our number =n 2- 6n+ 9 if n=6k+3.
contains 41's, 42's and 23's. Out of these digits 2
we can form n2- 3n+2 3
10!
2 --2 (n-2)=
P(4, 4, 2)= 414121 =3,150 n2- 6n+8
= 2 if n=6k+4.
different numbers.
n2- 3n+2 3
224. 2 -2(n-1)=
Let the numbers a and b form an inversion in a n2- 6n+5 if n=6k+5-
given permutation. If they change places, we get 2
a new permutation in which they no longer form
an inversion. We have nl permutations in each of If the order of the summands is disregarded,
which there are C;t ways of choosing the numbers we get 6 times fewer representations. It is easy
a and b. In half of the cases, these numbers form to verify that the expressions thus obtained are
inversions. Hence, the number of inversions is n 2 -6n+12 for
simply the greatest integers in 12
n! c2
2 n· appropriate values of n.
170
226. has to be multiplied by two. In all, we get
The number 12n + 5 can be represented as four lC12n+4- 4C:n+2)- 2C~ [C~n+2- 2C~n+d +
summands in Cf2 n+ 4 ways (considering as distinct
the representations differing in the order of the +8 (2n+1)=12n (12n2+3n-1)
summands). The number of representations in
which x = y is equal to the number of solutions representations in which all summands are
of the equation 2x + z + t = 12n + 5 in posi- distinct,
tive integers. Since the equation z + t =
2C~ [C~n+ 2 -2C~n+d-12 (2n+1)=12n(9n+4')
= 12n - 2k + 5 has 12n - 2k + 4 solutions
in positive integers, the total number of such
solutions is representations containing exactly three distinct
6n+1
summands, and 4 (2n +1) representations in
which there are two distinct summands.
~ (12n-2k+4)=(6n+1) (6n+2)=2C0n+2 Partition all representations into classes such
k=l that two ripresentations of one class differ in
The number of solutions in which x = y = z is the order of the summands alone. Then the repre-
equal to the number of solutions of the equation sentations of the first type will fall into classes
3x + t = 12n + 5. that is, 4n + 1. consisting of 24 elements, those of the second
Let us find the number of solutions in which type, into classes consisting of 12 elements, those
there are terms exceeding 6n + 2. Let x = k ;;;;, of the third type, into classes consisting of 4 ele-
ments. Therefore the number of partitions of
;;;;, 6n + 3. Then y + z + t = 12n + 5 - k. But
the number 12n + 5 - k may be represented as the required type is
a sum of three positive integers in Cf2nH-k n
ways. Therefore, there are 2 (12n2+3n-1)+n (9n+4)+2n+1 =
12n+2
~ C12n+4-k =C~n+2 = nt 1 (12n2+9n+2)
k=6n+3
+
solutions for which x ;;;;, 6n 3. Since we could 227.
take any other summand in place of x, we have In the course of our solution of Problem 226 we
Cf2 nH- 4C~n+ 2 solutions in which the summands· found that the number of representations in
do not exceed 6n + 2. which all summands are distinct is equal to
Furthermore, the number of solutions of the 12n (12n2 + 3n - 1). Since now we do not have
.equation 2x + z + t = 12n + 5 in which z ;;;;, regard for the order of the terms, we get
+
;;;;, 6n +
3 is 3n (3n 1) 2qn+P Therefore, the n
'2 (12n 2 + 3n - 1) partitions.
number of solutions in which x = y and all
terms do not exceed 6n + 2 is equal to
2 lC:n+ 2 - 2qn+Il· Since in place of x and y 228.
we can take any other pair of letters, the total A geometric progression is determined by the
number of solutions in which two terms are equal first term and the common ratio q. If the progres-
and all summands do not exceed 6n + 2 is sion is increasing, then the inequality aq2 ~
2C~ IC~n+ 2 - 2C~n+ 11 ~100 must hold, whence it follows that a~ 10q~ .
Finally, the number of solutions of the equa- Hence, the number of increasing three-term pro-
tion 3x + t = 12n + 5 for which t ;;;;, 6n + 3 is
2n. And so the total number of solutions in which .
gresswns w1"th ra t·10 q IS 100 ) . Th e tota I
. E ( =-2
three terms are equal and all terms do not exceed .q
number of progressions is
tin+ 2 is 4 (2n + 1).
If, of all representations, we reject those for
which two summands coincide, then the repre- 2[ E c~o) +E c~O) +E (\0~) + ...
sentations in which three summands coincide will
have been rejected thrice. For this reason, their
number in the inclusion and exclusion formula •.. +E (!~) ]=102
171
(the factor 2 has to do with the fact that one and 234.
the same number triple may be regarded either
as an increasing or a decreasing progression). The desired permutations begin with several
letters a, which are then followed by the letter
229. ~. subsequent letters in any order. If there are k
Denote by F the set of several Frenchmen in starting letters a and one letter fl, then the re-
succession, by T the set of several Turks in suc- maining letters may be permuted in P (p - k,
q - 1, r) ways. Summing from k = 1 to k = p,
-cession. Use E for Englishmen. From the state- we find that the number of required permuta-
ment of the problem it follows that one of the tions is
following patterns is possible: FETEFETEFETEF
or TEFETEFETEFET. In the first type of pat- p p
tern, we have to divide the 7 Frenchmen into 4 ~ (p+q+r-k-1)! crq-j-r-1 k,J
~ cP-h
nonempty groups (this can be done in CB ways), ""-l (p-k)! (q-1)! r! p-h-j-q-j-r-1
the 10 Turks into 3 nonempty groups (Ci ways), k=1 k=1
and then place these groups in order in their But
appropriate places and permute compatriots in
all possible ways. We obtain 6!7!10!C~q seating p
~ cP-k _ 0 p-1
arrangements. In the same way, the second type L.J p-k-j-q-j-r-1- p-j-q-j-r-1
of pattern yields 6! 7! 10! qCB seating arran- 11.=1
gements. In all we get cP-1
W e there f ore h avil Cq-J-r-
T
1 p-J-q+r- 1 permuta-
6! 7! 10! [CfCf +O:CBJ =61711011980
solutions. tions.
230. 235.
As in the preceding problem, we get 517!10! X The numbers expressing the lengths of the bands
X 1,080 solutions. of each colour form a representation of the num-
ber 10 in the form of a sum of integers assuming
231. values from 2 to 10, the order of the integers being
The desired two numbers differ in the factors important. The number of such partitions into
a a, bll, c'V, ij; each of these four factors appears k summands is equal to the coefficient of x 10 in
the expansion of the expression
in one of the numbers and does not appear in the
other. Since 4 factors may be distributed between (x2+x3+ ... +xlO)II= (
x2-x11
i-x
)k =
the two numbers in 24 = 16 ways, the problem
has 16 solutions. If the order of the numbers is =x2k (f-x9)k (1-x)-k
disregarded, we have 8 solutions.
232. =x2k (1-kx9 k~k;;1 >xl8_ ... ) x
The required numbers are of the form GA and GB,
where A and B are divisors of the number X (1+kx+ k~k:-21 ) x2
.aabllc'Vd6. This number has N= (a+1) (~ + 1)x
X ('\' + 1) (6 + 1)1 divisors (see Problem 67). 3+
Therefore, A and" B may be chosen in Ck+t + k(k+1)(k+2)
1X2X3 X •••
ways if we do not distinguish the pairs (GA, GB)
and (GB, GA), and in N 2 ways if such pairs are k(k+1) ... (k+9) 10+ )
distinguished. • •• + 101 X •••
F~k.=-/>-t-F~_2 2 = C~:_\ -t- C~_ 1 =C~= F~k) The given elements may be permuted in(~~~
ways. Now compute the number of permutations.
Thus, the numbers F~k) satisfy the same recur- in which the elements of the given k q-sets occur
together. Choose one of these q-sets. Its elements-
rence relation as the number rAk). may be arranged in succession round a circle in
We now demonstrate that F(n) n = r<nln and qn ways. After this has been done, combine the-
elements of each of the remaining k - 1 sets and
F~~i = r~~ 1 • Note that the numbers 1, 2, ... consider all possible permutations of the new
... , n can be uniquely arranged in increasing k - 1 elements thus obtained and the rema-
order, and therefore r~n) = 1 = c: = F~l . ining ( n - k) q elements. Their number is
From the numbers 1, 2, ... , n + 1 it is also (qn(:~::-i)l and it is easy to see that with
possible, in unique fashion, to choose n numbers
175
each such permutation is associated a specific them. For instance, a total of 18 routes pass
arrangement of the elements round the circle. through EF (Fig. 36) (q = 3 routes go from A
Therefore, the number of permutations in which toE and Cl = 6 routes lead from F to C). There
the given k-sets occur in succession is are 30 routes passing through point E: 3 routes
qn (qn-qk+k-1)1 from A to E and q = 10 routes from E to C.
(q!)n-k • Since the sets themselves can The other segments and points are considered
be chosen in c~ ways, it follows that by the in- analogously.
clusion and exclusion formula we obtain the num- 253.
ber of desired permutations:
+ c: = 20.
[ (qn-1)! Cl (qn-q)l
qn (qJ)n n (q!)n 1 254.
-J--CB (qn- 2q+i)! ••• +(-t)nCn(n-1)'] We are dealing with combinations with repeti-
• n (q!)n 2 n · tions of elements of 4 kinds taken three at a time.
Their number is
250. Cf=Cf=20
Adjoin to each chosen book:the s books follo-
wing it. We must then choose p objects out of 255.
n - ps. This can be done in C~-pa ways.
Cio = Cfz = 220.
251. 256.
If the common difference of the progression is d, Four triangles.
and the number of contestants of the 5th class is
a, then the prizes may be distributed in 257.
A~Ag+aA~+2d ... A~Hd ways. However, if all If no three out of n points lay on one straight
prizes are given to students of the 10th class, line, there would be Ct, triangles with vertices
then they may be distributed in A~~ 5 ,. ways. at these points. But p points lie on one line and
The equality so C~ triangles have to be discarded. This leaves
A dAd Ad Ad _ A6d CJ!, - C~ triangles.
a a+d a+2d• • • a+lid- a+5d
follows from the obvious identity A:'A~+k = 258.
__ Am+k We can take two vertices on one straight line
- n+IL'
and a third on the other. We thus get c~q +
252. + C1C~ = ~q (p + q- 2) triangles.
The solution calls for considering the segments
and intersections of various positions and for 259.
computing the number of routes passing through
Additional
.D c C~ (C1+C~)+q (C~+q)+qC~C~=
=; (p+q) (p+q+r-2)
triangles result.
r 260.
LE The triangles may be of two kinds; either all
three vertices lie on different sides of the square
or two vertices lie on one side of the square and
the third on some other side. In the first case we
A 8 have to choose three sides of the square out of
four (Cf = 4 choices), and then one point each
Fig ..._36. out of n - 1 on each of the three sides. In all
17ti
we have 4 (C,l_1 ) 3 choices. In the second case, Iars dropped from C. There are 3 lines emanating
we have to choose the side with two vertices from C that do not pass through B. Hence, from
(4 choices) and two points out of n - 1 (C~_ 1 B we can drop 3 perpendiculars onto them. These
ways), and then choose one of the remaining three perpendiculars intersect with the perpendicu-
sides (three choices) and a point on it (Ch-1 choi- lars dropped from C at 3 X 6 = 18 points. Each
ces). In the second case we get a total of of the perpendiculars dropped from B onto the
12C},_ 1 C~_ 1 choices. In all there are other three lines passing through C intersects
only 5 perpendiculars dropped from C, since it
4 (Ch- 1)3 + 12Ch_ 1 C~-1 = 2 (n-1) 2 (5n-8) is parallel to one of these perpendiculars, for it
ehoices. is dropped onto the same line. We thus have
another 15 points. Consequently, the perpendi-
261. culars dropped from two points intersect in
c~ points of intersection. 18 + 15 = 33 points. But 10 pairs can be gene-
rated out of 5 points. This would yield 33 X
262. X 10 = 330 points of intersection, but some are
In the general position, n straight lines have C~ coincident points. Namely, any 3 out of 5 given
points form a triangle. The altitudes of this tri-
points of intersection. But p straight lines pas- angle (which are some of our perpendiculars) inter-
sing through point A yield one intersection point sect in a single point, but we counted that point
instead of C~ and q lines passing through point B 3 times. Since there are C~ = 10 such triangles,
yield one point instead of q. This leaves we have to reject 20 points, which leaves 310
C.J - q - q + 2 points of intersection. possible points of intersection.
263.
266.
Let k - 1 straight lines be drawn on a plane.
Draw one more. It is divided, by the points of Any three integers x, y, z that satisfy the ine-
intersection with the earlier drawn lines, into k qualities n + 1 ~ x, y, z ~ 2n can be the sides
parts, each of which corresponds to one new piece of a triangle. Therefore there are C~ = Ct+ 2
of the plane. Therefore, n straight lines divide triangles with such sides. To find the number of
the plane into 1 + 1 + 2 + . . . + n = isosceles triangles, note that for a given base
1 we have n isosceles triangles. Hence, the total
= 2 (n 2 n+ + 2) parts. number of them is n2 • The number of equilateral
triangles is n.
264.
267.
Let k - 1 planes be already drawn. Draw one
more. This plane intersects the earlier drawn We have to find the number of triples of positive
planes along k - 1 straight lines, which divide integers x, y, z such that x ~ y ~ z ~ 2n and
x + y > z. Let there be x = p. Then y assumes
it into ~ (k 2 - k +2) parts. Each of these parts values from p to 2n. When y runs through the
corresponds to a new portion of space. And so n
values from p to 2n - p + 1, every value of y
is associated with p values of z satisfying the
planes divide the space into inequalities y ~ z < y +p, z ~ 2n. But if y
1 ~
n
1
takes on the values from 2n - p + 2 to 2n,
1+ 2 kJ (k2-k+2) =(f (n+1) (n2-n+6) then the number of corresponding values of z
k=1
is 2n - y + 1. For x = p we get a total of
2n
parts.
(2n-y+i)=2pn-
265.
A total of C~ = 10 straight lines are drawn. 4lines 3 3
pass through each point (say point C). Hence, -2P'+2P
6 perpendiculars emanate from this point. Con-
sider any two points (say B and C). The perpen- pairs (y, z) such that x, y, z satisfy the indicated
diculars dropped from B onto the straight lines conditions. From this it follows that the total
passing through C intersect all the perpendicu- number of triangles for which 1 ~ x ~ n and
177
1 ~ y, z ~ 2n is 269.
n Since we take n points of intersection and no
~ (2pn- ~ p2+ ~ p) =; (n+1)2 three lie on a single straight line, it follows that
there are two and only two points of the chosen
p=1 group that lie on each line. And so, in order to
By virtue of Problem 266, there are C)t+ 2 trian- specify such a group, we number the given
gles for which x ~ n + 1. Therefore we have straight lines and on the first choose the point of
intersection with the second line, on the second,
; (n+i) 2 + n(n+1~(n+2) n(n+1)6(4n+5) the point of intersection with the third, ... , on
the nth, the point of intersection with the first
straight line. We obtain the desired group of
triangles in all. points; all groups may be obtained as described
There are 2n - k isosceles triangles with base above. Noting that a cyclic permutation of the
x = 2k and also 2n- k with base 2k 1. Hence, + points and any change in their order of traversal
the total number of isosceles triangles is do not alter the group of points, we find that the
n
~ (2n-k)+ ~ (2n-k)=3n2
n-1
number of groups is ~~ = ~ (n- 1)!.
k=1 k=O
Eliminating them, we get 270.
n(n+1)(4n+5) _ 3 2 n(n-1)(4n-5) We can choose r vertices having a given order
6 n 6 in A~ ways. Since a cyclic permutation of the
triangles. vertices and any change in the order of traversal
1
268. do not alter a polygon, we get 2r A~ polygons.
The solution is similar to that of Problem 267.
The number of triangles with given value x = 271.
= p ~ n - 1 is 2np - ~ p 2 + ~and there are Choose two points on one line and two points on
the other. To them correspond two points of in-
n-1 tersection of the straight lines passing through
~ ( 2 np-~p2 +~)=n(n+1~(n-1) these poi~ts (the intersection point of the diago-
nals of the trapezoid and the intersection point
p=1 of the lateral sides). Since it is possible to choose
triangles for which x < n-1. Now the number C~ pairs of points on the first straight line, and
of triangles for which x >
n is C;\+ 2 and so, in c;. on the second, the number of intersection
all, we have points is 2C~ C~.
n(n+1)(n-1) + n(n+1)(n+2) _
2 6 - 272.
n (n+1) (4n-1) n points determine C~ circles. Of them, C~_ 1
6 pass through a given point and c~-2 through two
triangles. The number of isosceles triangles is given points. And so the straight line passing
n-1 n-1 through two given points has at most 2C~_ 2 +
~ (2n-k-1)+ ~ (2n-k-1)=3n2-3n +1 + (2C~-1 - C~_ 2 ) + 2 points of intersection
k=1 k=O with the circles. Since C! lines pass through n
of scalene triangles, points, we have at most
279. 285.
We have 8!/24 = 1,680 ways of painting the We will demonstrate that there are exactly n
faces. routes passing through each stop. Let l be one
of the routes and let B be a stop located off the
280. route (Fig. 37). By virtue of Condition 1, B can
For a dodecahedron there are 121/60 patterns, be reached by one of the routes to each of the n
and for an icosahedron, 20!/60 colour patterns. stops A 1 , • • • , An of route l. Then, by virtue
of Condition 2, each of the routes passing through
B passes through some one of the stops A it • . •
282. . .. , An (otherwise the change could not be made
We have to find the number of triplets of positive to route l) and only one (otherwise it would be
integers x, y, z such that x ~ y ~ z, x y + + possible to change to route l at two stops). Also,
+ z = 40 and x +
y > z. From these inequali- no two routes passing through B pass through the
ties it follows that z can assume values which same stop of route l (otherwise it would be pos-
satisfy the inequalities 14 ~ z ~ 19. If z = 19, sible, from one of these routes, to change to an-
then x + y = 21, x ~ y ~ 19. Therefore 11 ~ other at two stops: at B and at the stop of route l
12*
180
through which both pass). Whence it follows that Since for each stop we can find a route not pas-
there are just as many routes going through stop sing through it, and on each route there are n
B as there are stops on route l, that is to say, stops, it follows that there are n routes going
exactly n routes. through each stop. Take one of the routes, l.
It remains to prove that there are also exactly There are n - 1 routes different from l passing
n routes that pass through each one of the stops through each stop of this route; by virtue of
Condition 2, no two of these routes coincide
(otherwise they would have two stops in common),
8 and any route appears among those obtained in
this way. Thus, the number of routes different
from l is equal to n (n - 1); in all we have
n (n - 1) + 1 routes.
286.
Suppose there are n stops on one of the routes,
l. From the solution of Problem 285 it is evident
that there are exactly n routes going through any
stop, B, lying outside route l. We will show that
Fig. 37. there are exactly n stops on an arbitrary route
l', which is different from l. By virtue of Condi-
tion 3, l' has at least three stops, and by Condi-
A 17 • • • , An situated on route l. It suffices to tion 2, one of these stops is at the same time a
show that for any one of these stops there is a stop of route l. There are n - 1 stops of route l
route, l', which does not pass through it (as sta- lying outside route l'. We will show that besides,
ted, it has n stops and then, as we know, n routes there is at least one stop outside l' not lying on
pass through it). Since the total number of routes l. Indeed, let At be one of the n - 1 stops of
is at least two, it follows that aside from l there route l outside l', and let Ct be one of the stops
is at least one route l' (Fig. 38) that crosses route of route l' outside l (there are at least 2 such
stops). By virtue of Condition 1, there is a route
l" passing through the stops At and C17 and by
virtue of Condition 3, there is, on this route,
aside from At and C17 at least one stop Bt which
will lie outside l' and l. As we know from the
solution of Problem 285, n routes pass through
stop Bt· Each one of these n ro,p.tes crosses route
l' at one single point. And through each stop
of route l' there is at least one route connecting
it with stop B. Therefore, the number of stops
on route l' is equal to the number of routes pas-
sing through stop B, that is, it is equal to n.
As we saw in the solution of Problem 285, in
this case the number of routes is given by the
formula n (n - 1) + 1. Since, by hypothesis,
this number is 57, we have to solve the equation
n2 - n + 1 = 57. Its solution yields n = 8.
Fig. 38.
287.
l at a unique point, say A1 • Then the stops Az, Yes. Let us consider, say, 10 straight lines on
.•. , An are located outside route l' and so n a plane such that no two lines are parallel and no
routes go through them. Let B be another stop three intersect in one point; we will assume that
on route l'. The route passing through Band A2 the straight lines are autobus routes and the
does not pass through At and therefore exactly n points of intersection are stops. Here, it is pos-
routes pass through At as well. Thus, exactly n sible to go from any stop to any other stop wit-
routes pass through any stop. hout changing if they lie on one line, and with
181
one change if they lie on different lines. Even if adjacent to the given one so that they are not
we drop one of the straight lines, it will still be mutually adjacent either. This can be done in
possible to reach any stop from each stop without
making more than one change en route. But if
c;_ 4 ways (see page 57). Since any one of the
we drop two lines, then one stop (the interse- three vertices ean be taken as the first, we have
ction point of the two lines) will not be serviced n c2 n (n- 4) (n- 5) choices.
by the remaining routes, and it will be impossible 3 n-4 6
to go from this stop to any other stop.
293.
288. Divide all the triangles into two classes: those
A sphere may be in contact with any one of the whose vertices all lie on distinct lines and those
planes on one of two sides and with the given two vertices of which lie on one straight Une.
sphere, either inside or outside. We can therefore
construct 16 distinct spheres.
c:
The number of triangles of the first class is p 8
(we choose three lines on which the vertices lie-
this is done in C~ ways; then on each of the lines
289. we choose one point out of p). The number of
Each of the m straight lines drawn through point
A intersects with 2m lines. And so the lines pas- triangles of the second class is ~ p 2 (p - 1) X
sing through A yield 2m 2 intersection points.
The total number of points of intersection distinct
x n (n- 1) (we choose a straight line on which
there are two. vertices and then two points on
from the given three is 3m2 • this line; we then take a straight line, which has
one vertex, and a point on this line). In all,
290. there are
Denote the points lying in one plane by A 1 , 3 1
... , Am and the others by B 1 , ••• , Bn-m· p3Cn+ 2 p2 (p-1) n (n-1)=
Each plane is determined by a set of three points,
which can include three, two, one or zero points n (n-1) p2 (pn+ p-3)
out of the points At. .. , Am· Accordingly, we 6
find that the number of planes is triangles.
1 + C!tCh-m + c}nc~-m + C~-m 294.
291. Each interior point of intersection of the diago-
nals is uniquely determined by 4 vertices of the
There are n + p points of intersection lying on n-gon-the endpoints of intersecting diagonals.
each of the straight lines passing through A,
m + p passing through B, and m +n through There are C~ such points. Now let us find the
C. Since m lines pass through A, n lines through total number of points of intersection of the
B, and p lines through C, the total number of diagonals. n- 3 diagonals emerge from each
intersection points is n (n-3)
vertex of an n-gon; we have 2 diagonals
1 altogether. Each diagonal AB intersects with all
2 [m (n+p)+n (m+p)+P (m + n)] = mn+mp+np diagonals connecting the vertices distinct from
A and B. And so we have
There are C!'nn+mp+np ways of choosing from
+
them a triple of points, but in mC~-1-P + nC!'n+P n(n-3) 2 (n- 3)+ 1 (n-3) (n-4) +1
+ pC!'n+n cases we get points on a single straight 2 2
line. And so the number of triangles is points of intersection of the diagonal AB with
C~n+mP+np- mC~+p-nC!'n+p- pC!'n+n all other diagonals. Since there are n (n;- 3>
292. diagonals in all, and each point of intersection
is counted twice, we finally get
Arbitrarily choose the first vertex of a triangle.
This is done in n ways. We then have to choose n (n-3) [(n-3) (n-4)+21
another two vertices among the n - 3 points not 8
182
points of intersection of the diagonals. Subtra- coincides with one of the chosen vertices, the
cting from this number the number of interior second class includes all the remaining k-gons.
points of intersection, we find the number of Then divide the k-gons of the first class into s
exterior points of intersection to be subclasses according to which of the vertices
Am, 1 ~ m ~ s, belongs to the k-gon (it is ob-
n (n-3) (n-4) (n~5) vious that these subclasses do not have any ele-
12 ments in common).
Let us find the number of k-gons for which Am
295. is one of the vertices. To do this, discard the ver-
tex Am and the successive s vertices going clock-
Each r-gon is determined by choosing r points wise (not one of them is a vertex of a k-gon).
out of n taken in a specific order; a cyclic permu- Out of the remaining n - s- 1 vertices, we have
tation of the points does not change the r-gon, to choose k - 1 vertices so that after each one
nor does a change in orientation. Therefore, there we have at least s chosen vertices. This can be
1 done in c!=~s- 1 ways (see Problem 250). And so
are 2r A~ r-gons and the total number of poly-
n the number of k-gons with vertex Am is c!=~- 1 ,
nomials generally is ] ;r A~. The number of while the total number of k-gons of Class One is
k-1
8Cn-ks-1·
r=3
n Now let us find the number of k-gons in the second
convex polygons is ~ C~. class. To do this, "cut" the circle between vertices
r=3
A 8 and Af+t· We have to choose k vertices so that
after each chosen vertex there come at least s
remaining vertices (and not a single one of the
296. vertices A 17 • • • , A 8 is chosen). This can be done
m parallel straight lines divide the plane into in c!_ 118 ways. Thus, the total number of k-gons
m + 1 strips. Each new line adds as many pieces
as the number of parts it is divided into by the satisfying the stated condition is sC~-:::_ks- 1 +
already drawn lines. Since we draw another n + c!-ks"
lines, we get
m+1 +(m+2)+ ... +(m+n)= n (2m+ n+1) 300.
2 Each parallelogram is determined by two pairs of
parts. parallel lines. Hence, there are (q+ 2 ) 2 paralle-
297. lograms.
Divide the circles into classes according to the 301.
number of specified points lying on a given circle. Draw a succession of diagonals from the vertices
One circle (namely the given one) contains all A 17 A 2 , • • • , An. Each new diagonal yields as
these points, qq contain two points, qc: con- many new regions as there are pieces into which
tain one point and Cf has no point. Altogether it is split by earlier drawn diagonals; that is to
we have 1 + qq + qq + q = 156 circles. say, one part more than the number of its points
of intersection with earlier drawn diagonals. Sin-
298. ce, in the process, each intersection point is obta-
To every three straight lines there correspond ined once, the total number of new regions is
4 circles tangent to them. And so we have 4Cf 0 = equal to the sum of the number of intersection
= 480 circles. points and the number of diagonals. Since at the
start we had one part, altogether we have
299. i+n(n-3)+ n(n-1)(n-2)(n-3)
2 24
Chooses successive vertices of the n-gon, A 17 • • • n(n-3)(n2-3n+14) + 1
. . . , A 8 an~ .div~de all the k-gons satisfying the
stated condition mto two classes. One class inclu- = 24
des all the k-gons, one of the vertices of which parts (see Problem 294).
183
302. solutions. Since each of the progressions obtained
may be regarded both as an increasing and a dec-
Let n be even, n = 2k. Then we can represent n reasing progression, we get 2n (n - 1) progres-
as the sum of two integers in the following ways: sions. We have 2n 2 progressions for the sequence
n= 1+(2k-1)=2+(2k-2)= ... =k+k of numbers 1, 2, 3, ... , 2n +1.
• • •
• •
.- 321.
Otherwise the population of Moscow would exceed
• - • • -• •
9,300,000.
- -•
• •
•
• - • •
• - 322.
If we choose an odd number of objects, the num-
ber of objects left is even .
• - • 323 .
.
•
. - -.
•
• •
•
The number of ways of changing 1 rouble using
2- and 5-copeck coins is equal to the number of
nonnegative integral solutions of the equation
2x + 5y = 100.
It is clear that y can assume any even value
Fig. 41. from 0 to 20. If we use 5- and 3-copeck pieces,
we have to solve the equation 3x + 5y = 100.
Here, y can only assume the values 2, 5, 8, 11, 14,
And so the total number of words does not exceed 17, and 20, the number of which is less than 21.
16. Fig.' 41 illustrates the 16 words that satisfy
the indicated requirement. 324.
It is necessary to find the number of nonnegative
319. integral solutions to the equation x + +2y
Since p is prime, only one-colour patterns go into + 5z = 20 or, what is the same thing, to the
themselves under rotations of the circle. There inequality 2y + 5z :::;;; 20. Clearly, z can assume
are n such patterns. The remaining patterns (of only the values 0, 1, 2, 3, and 4, to which cor-
which there are nP - n) fall into classes of p respond 11, 8, 6, 3, and 21 possible values of y,
colour patterns in each, patterns of one class making a total of 49 solutions.
going into one another upon rotation of the circle.
Therefore, they yield nP-n ways of painting 325.
p Since 3 = 2 + 1, 4 = 2 +
2, 6 = 5 +
1, 7 =
nP-n
the circle. In all, we have---+ n ways. In +
= 5 + 2, 8 = 5 + 2 1, 9 = 5 2 + 2, we +
p can make up any integral weight from 1 to 9 mg
187
using the indicated weights. In the same way we 333.
make up weights expressed in tens, hundreds,
etc. of milligrams. Under the number of each card write the number
it will have after the indicated shuffle:
326. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
The mean value of the last digit is 2, of the second 9 8 10 7 11 6 12 5 13 4 14 3 15 2 16 1 (*)
and third, 2 and 5, and of the first, 3. The total From this array it is evident that, for instance
number of numbers is 5 X 6 X 6 X 3 = 540. in the first shuffle, 1 goes into 9, in the next one:
Therefore their sum is 540 (3,000 + 250 + 25 + 9 goes into 13, then 13 into 15, 15 into 16, and,
+ 2) = 1,769,580. finally, 16 goes into 1. This can be depicted as a
cycle (1, 9, 13, 15, 16, 1). The whole permutation
327. breaks up into such cycles. Besides the above-
The assertion is obvious for r = 1: after the first indicated cycle, we also have the cycJes (2, 8, 5,
step, the card in the pth position, p ~ n, goes 11, 14, 2), (3, 10, 4, 7, 12, 3) and a cycle consi-
to position 2p, and for p > n, to position 2p - sting of the number 6 alone. Each cycle consists
- 2n - 1. In both cases, th:e number label of of one or 5 distinct numbers, and so all the cards
the new position is the remainder left from divi- will regain their original positions after 5 shuf-
ding 2p by 2n + 1. Let our assertion be proved fles. The other cases are analyzed in similar fas-
hion.
for r, that is, let a card labelled p occupy posi-
tion x in r steps, where 2rp = k (2n + +
1) x.
At the next step it will take up position y, where 334.
2x = l (2n + 1)+y, l = 0 or 1. But then In the first row we can arrange the colours in any
2r+l p = 2k (2n + 1) + 2x = (2k + l) (2n + 1) + y order (24 ways); then in the first column we can
arrange three colours, distinct from the colour
where y < 2r+lp. This means that y is the rema- of the corner square, in any manner (6 ways).
+
inder after dividing 2r+lp by 2n 1. Our asser- Suppose the colours chosen are as shown in the
accompanying table. Since all colours have to be
tion follows by the principle of mathematical
induction. · represented in vertical and horizontal lines, the
second row can have one of the following combina-
tio~s: black, white, blue, red; black, red, blue,
328. white; black, blue, white, red. In the first of these
The answer follows directly from the result of versions, the colour pattern of the cells of the
Problem 327. seco~d vertical column is determined in unique
fashiOn, and there are two remaining possibili-
ties for colouring the remaining 4 cells. Each of
329. the remaining two versions leads only to one pos-
The answer follows from Problem 327. sible pattern. In all we get 41 X 3! x
~ (2 + 1 + 1) = 576 colour pattern possibili·
330. ties.
Indeed, in this case the remainder left after divi-
ding 2xp by 2n + 1 is p. w B R Bl
331.
In fact, after the card labelled 2n there come B w Bl R
2n - 1 cards with even numbers; they will lie
above the card 2n.
R Bl w B
332.
The assertion concerning card No. 8 follows from
the result of Problem 331. The verification of the Bl R B w
others is straight fo:r:ward.
188
335. Applying the binomial theorem, we find this
coefficient to be
Divide the children into triples in some way.
Three nonordered pairs can be chosen from each emm-(l-1)p-1- ctcm+l-n-1
p m-(1-1) (p-1)-n-1 +
triple: (say, from the triple abc we can choose the
pairs ab, ac, be). This mode of partition embraces
a total of 15 pairs, none of which can be found in
+C~C;;!±~/~i)(P~2)-2n-1 + · · ·
any other mode of partition. But out of 15 chil- 339.
dren we can make q 5 = 105 pairs. Therefore
the number of distinct modes of partition cannot Denote by x, y, z the number of books of the
exceed 105:15 = 7. The following table shows first, second and third type received by the first
th~t the value 7 is attained (this means that the participant. By hypothesis, x + + y z = 12,
0:;;;;; x:;;;;; 7, 0:;;;;; y:;;;;; 8, 0:;;;;; z:;;;;; 9. The number
children can be divided up into triples in the
indicated manner in the course of 7 days): of integral solutions to the equation that satisfy
the given inequalities is equal to the coefficient
klo- ino jmo ilm jln ijk kmn of t12 in the expansion of the product
iab jac lad nae kaf mag oah
(1+t+ ... +t7) (1+t+ .. , +tS) (1+t+ ... +t9)
ned mdb kbc ocg mch lee icf
mef keg ieh jfb obe ofd jde This product may be rewritten as
jgh lhf nfg khd idg nhb lbg (1- tS) (1- t9) (1- tlO)
(1- t)3
336.
(n2)1
= (1-t8-t9-tlO+tl7 + ... )X
The number (n!)n~l is equal to the number of X (1+3t+6t2+ 10t3+15t4+ ... + 91tl2+ ... )
ways of choosing from n2 objects n unordered Removing the brackets, we clearly find the coef-
groups of n objects each and is therefore an inte- ficient of t 12 to be 60. And so the distribution can
be accomplished in 60 ways.
ger. Another integer is the number (mn)! it is
(m!)nn!'
the number of ways of splitting mn objects into 340.
n unordered groups of m objects in each group. The number of all n-combinations (with repeti-
tions) of n letters is C'qn_ 1 , hence, they include
Fo r th e same reason, (n!)mm!
(mn)! IS
· an mteger.
· nC¥n-l letters. Since all letters occur the same
But
number of times, each letter occurs C¥n-l times.
th en
[
(mn)! m+
n+l 1
]2 . mtegra
IS
. I because it 341.
(m!) 2 (n!) 2 The sum of the numbers written on a pole is 999 .
Therefore, if both numbers are three-digit num-
is the product of two integers. Since m and n are hers and one is of the form abc, then the other
odd, it follows that has the form 9 - a, 9 - b, 9 - c. But if one is
ntn)! m+ 1 is a ratio- single-digit or two-digit, then the other begins
(m!)_2_(n!)_2_ with the digit 9, and such poles have a, 99 (9 - a)
nal number the square of which is an integer. or ab, 9 (9 - a) (9 - b). Since the poles can only
Hence, the number itself is also an integer. have two distinct digits, it follows that either
a= b = c, or two numbers out of a, b, c coin-
cide, and the third one is the complement of the-
337. se numbers in forming the number 9. The number
See page 48. of numbers of the first type is 10 (111, 222, ...
. . . , 999 and 0). Now each number of the second
338. type is determined by choosing a pair of distinct
This number is equal to the coefficient of xm in digits of a three-digit number which includes
the polynomial both of these digits. The pair of distinct digits
can be chosen in Ofo = 45 ways. To each pair
(xl+xl+l+ ... +xn)P=xlP (1-xn-l+l)p (1-xtP there correspond 6 three-digit numbers (for in-
189
stance, 221, 212, 122, 112, 121, 211). Therefore, But
the total number of numbers of the second kind n n
is 6 X 45 = 270, and we have a total of 280 ~ (p+q+1)P(p, q)=(p+1) ~ P(p,q)
poles with numbers in which only two distinct q=O q=O
digits appear.
n
342. +~ qP (p, q)
q=i
m n
n
The required number is ~ ~ P (p, q)-1.
P=O q=O = (p+ 1) [P (p+ 1, n)+ ~ P (P+ 1, q-1)]
(We omit the empty permutation). Since q=i
n = (p+ 1) [P (P+ 1, n)+P (p+2, n-1)] =
~ P (p, q) = P (p + 1, q), it follows that
= (p+ 1) P (p+2, n)
q=O
m n m And so the sum is
~ ~ P(p, q)-1= ~ P (p+1, n)-1 m m
r=Oq=O P=O ~(p+1)P(p+2,n)= ~ (p+2)P(p+2,n)-
=P (m+1, n+1)-2 P=0 P=O
m
- ~ P(p+2, n)
343.
P=O
By virtue of the preceding problem, the number
of permutations containing exactly k white balls =(n+1) P (m+1, n+2)-P (m+2, n+1)+1
is P (k + 1, n + 1)- P (k, n + 1). Therefore,
m =1+ mn+m+n P(m+2,n+2)
white balls occur ~ k [P (k + 1, n + 1)- m+n+4
k=1
- P (k, n + 1)]
times. This expression can be 345.
Summing the results obtained in Problems 342
transformed as follows:
and 344, we arrive at the desired result.
m m-1
~ kP(k-f-1,n+'1)- ~ (k+1)P(k+1,n+1) 346.
k=1 k=O The total number of pairs that can be formed out
m-1
of 7 persons is q = 21. There are 3 pairs-(a, b),
(a, c) and (b, c) - in each triple (a, b, c). There-
= mP(m+1, n+1)- ~ P (k+1, n+1) fore, in the course of 7 days all the pairs will
k=O appear once each time. Since 21 persons will
= mP (m+1, n+1)-P (m, n+2)+1 dine in the course of 7 days, each friend will
come 3 times, and hence will appear in three
triples.
=1+ mn:;2- 1 P (m+1, n+1) First choose the triples that include the first
friend. This can be done in (216; 31 ways (the num-
The proof of the assertion concerning black .) .~
balls is similar. her of ways of splitting 6 into 3 pairs). When these
triples have been chosen, there remain two pos-
344. sible choices of triples that include the second
guest (say, if the first appears in the triples 1, 2,
The desired number is equal to the sum 3; 1, 4, 5; 1, 6, 7, then the second will appear
either in the triples 2, 4, 6; 2, 5, 7 or in the triples
m n 2, 4, 7; 2, 5, 6). After this, the distribution of
~ ~ (p+q+1)P(p, q) the other guests is deiermined uniquely. Taking
P=0q=0 into account the permutations of triples of guests,
190
we have 350.
( 2 !~! 31 X 2 X 7! = 151,200 ways. The total number of objects in all permutations
is
347. nA~+(n-1) A~- 1 + ... +A~=
q
C~
= 35 triples can be made up out of 7 persons,
= 20 out of 6, q = 10 out of five and Cf = 4
n-1 1
=n! [ n+f!+···+ (n-1)!
J=
out of four. Hence, the total number of ways
of inviting them is A k In 7A ~ 0 cases one friend
is not invited and in 21A io cases, two friends are ~(n-1) n! [ (1+1+ it+···+ (n~ 1 )!)
left out. Applying the inclusion and exclusion
formula, we get the desired result. + n11 ( 1- ;, - ;, - ... n-2 )]
(n-1) I
348.
It is easy to verify that
If one of the friends comes every day, then the
others can form q = 15 pairs. And so the total 1 2 3 n-2 1
number of get-togethers in which one and the
1-2T-3T_4f __ ... (n-1) I (n-1)!
same person participates is 7Ai 5 • There remain Since all objects occur the same number of
,1~ 5 - 7A i 5 modes of invitation.
times, each occurs
349.
N=(n-1) (n-1)! [ ( 1+1+ it+ ...
The permutations can consist of 1, 2, ... , n
objects. Thus, the total number of permutations is
An_J_An-1+ · · +An = n.1--L' in.f
I
+. ···+(n~1)1]+ 1
n . n ·
n! n! times.
On the other hand,
+2f+···+ (n-1)!
(n-1) (n-1)! e=(n-1) (n-1)! x
-
-n.I 1
[2 +21+ 1
··· + (n--1)! J 1 1 1
x [ 1 + 1 +21+···+ (n-1) 1 +nr+
On the other hand,
en. '-1--n.'(2 + _1 1 )
21 +···+ (n-1)! + (n~ 1)! + ··· J
+
[ 1 1
n+1 +(n+1)(n+2)+
=(n-1)(n-1)![1+1+i,+···+ (n~ 1 )!]
1
-r' (n+1)(n+2) (n+3) + · · ·
J (*) 1
+(n- 1) [ n+ 1
n(n+1) +··· J
But for any positive integer n > 2, and so
1 1 N-(n-1) (n-1) I e=
n+1 + (n+1) (n+2) +
=1-(n-1)[!+ n(n1+1) +···]
1
+ (n+1)(n+2)(n+3) +··· -, 1
1 [ 1 1
1 1 1 1 =n: 1-
n+1 -(n+1) (n+2) 1<-
_J 2
< n+1 + (n+1)2 + (n+1)3 +··· =n: Hence, N is the closest integer to (n-1) (n-
Therefore the expression in square brackets in -1)! e.
formula (*) is less than ~. This completes the 351.
proof of our assertion. See page 50.
191
352. This yields a total of
One of the three receives n books. These n books n en ~ (mn) I
can be chosen in elin ways. The remaining 2n e2n 3n· •• mn = (n!)m
books are then distributed to the remaining two ways.
persons. Each of the books goes either to one or
to the other, and so the number of distribution 357.
modes of these books is 22n. Since n books can
be given to any one of three persons, we get We have to prove the inequality
3 X 2 2 nelin ways of distributing them.
<
e~n+re~n-r (ezn) 2
353. It can be rewritten as
The number of distinct orders in which k given (2n+r) (2n+r-1) ... (2n+1) ~
pairs of letters are not upset· is 2k (2n - k)!.
(n+r)(n+r-1) ... (n+1) """
These k pairs may be chosen in e~ ways. Applying
~ 2n(2n-1) ... (2n-r+1)
the principle of inclusion and exclusion, we get
the desired result. """' n(n-1) ... (n-r+1)
This inequality follows from the fact that for
354.
The number of ways of splitting up things so that 0 ~ k <n we have 2n+k < 2 n-k
the k given persons do not receive a single thing n+k n-k ·
is (n + p - k)r. Applying the principle of inclu-
sion and exclusion yields the required result. 358.
Compute the sum of the angles of all resulting
355. triangles. The sum of the angles having a vertex
in one of the interior points is equal to 360°.
r! Ill;. is equal to the number of ways of dividing Since there are 500 such points, they are asso-
n distinct objects into r cells. This number is ciated with angles whose sum is 360° X 500.
equal to the coefficient of xn in the expansion of Now consider the angles whose vertices coincide
(ex - 1)r multiplied by n!. Whence it follows with the vertices of the 1,000-gon. Their sum is
that equal to the sum of the interior angles of the
nl [1-II~+2! II~-3! ITt+ ... ] 1 ,000-gon, or 180° X 998. We have 180° X 1,998
in all. Since the sum of the angles of a triangle
is the coefficient of xn in the expansion of the is 180°, we get, 1,998 triangles.
sum of the series
359.
1 1 Each of the players plays 4 games; 5 games will
(eX--1) _ 2 (eX-1)2+3" (eX-1)3- be played altogether. Suppose that in the first
-! (eX-1)"+ ...
game the pair (a, c) played against the pair (b, d).
Then in the next three games, a will have part-
ners b, d, e, respectively, and will not participate
Since in the fifth. Player e will take part in all games,
except the first, and in the second and third he
1 1 1 will be opposite a. In the second game, the va-
x- 2 x2+"3 x3-Tx"+ . .. =ln (1+x) (*) cant place may be filled either by player c or
player d, and in the third game, by b or c. But if
the sum of this series is equal to In [1 + (ex - in the second game we choose d, then in the third
-1)] = x. Therefore, when n > 1, expression (*) we have to choose c (otherwise c will have passed
is zero. up two games), and then in the fourth game d
will be absent and b and c will be partners. But
356. then in the fifth game, b and e will be partners,
on the one hand, and c and d, on the other. But
In one way from the first cell, in e-qn ways from if in the second game we choose c, then we will
the second, ... , and in ef:n ways from the kth. have to take c in the third as well (otherwise e
192
and c will be partners twice); in the fourth, c and are acquainted (since they are acquaintances of
d, and in the fifth, b and c, will play against d X). And so for any two persons ai, ai there must
and e. Thus, each choice for the players of the be another common acquaintance other than X.
first game determines two possible divisions of This person cannot be acquainted with X, and
the players in subsequent events. Since the order different pairs are associated with different per-
of the subsequent 4 games can be arranged in sons [if somebody were a common acquaintance
24 ways, we get a total of 48 possibilities. For of two distinct J>airs (ai, a1) and (ak, az), then
the first game we can choose the players in 15 he and X would have at least three common
ways (the number of ways of dividing 5 persons acquaintances]. Thus, the number of persons not
into 2 pairs and one reserve player). Each of acquainted with X is not less than the number of
these modes determines 48 possibilities for sub- all couples from among a 11 ••• , am, that is to
sequent events, a total of 720 possibilities. If say, not less than c~.
the order of the games is disregarded we have 6 On the other hand, every person not acquain-
possibilities left. ted with X has exactly two acquaintances in
common with him, from among a11 ••• , ~·
360. naturally. Here, different people are associated
The number of closed polygonal lines is (C~n) 2 with different pairs [if one pair (ai, a1) correspon-
(see page 84). ded to two different persons, then ai and a1
would have more than two common acquaintan-
361. ces, since they are acquainted with X as well].
Each polygonal line is specified by the coordina- From this it follows that the number of people
tes of its vertices. These coordinates form a finite who do not know X does not exceed C~ and so is
sequence of the form 2 m (m -1)
equal to Cm = 2 . But then the total num-
(at. bt), (at ,b2), (a 2 , b2), (a 2 , bg), .•• , (an, bt)
or her n of people present is 1 + m + m (m2-1) .
(at; bt), (a 2 . bt), (a 2, b2), (ag, b2), •.• , (at, bn)
Regarding the equation n = 1 + m+ m (m2-i) as
These sequences are determined by specifying
the permutations (ato . . . , an) and (bto . . . , bn) a quadratic equation in m, we see that it has only
and indicating to which of the two types the se- one positive root, and this means that the num-
quence belongs. Since a cyclic permutation of ber m of acquaintances is the same for all the
the coordinates does not alter the polygonal line, people.
the number of such lines is <;~ 2 • 364.
A verification shows that an interchange of two
362. adjacent letters A and B does not alter the pro-
Divide the rattles into classes, putting in the duct (it suffices to consider the combinations
mth class the rattles for which the smallest num- AABA, BABB and AABB). We can therefore
ber of blue balls between two red balls is m. For assume that first come all the letters A and then
m = 0 we have 4 types of rattles (the third red all the B's. But then the assertion becomes ob-
ball is adjacent to two others or•is separated from vious.
them by one, two, or three blue balls). When
m = 1 we have two red balls separated by a 365.
blue ball. The third red ball can be separated There is one rook on each vertical line and on
from the nearest red one by one, two, or three each horizontal line. Therefore, each of the num-
blue balls. And so there are three kinds of rattles bers a, b, c, d, e, f, g, h and also each of the num-
for m = 1. For m = 2 we have only one kind of bers 1, 2, 3, 4, 5, 6, 7, 8 will appear in the pro-
rattle. The total is 8 types of rattles. duct exactly once. The product is therefore 8!
abcdefgh.
363.
Suppose that someone in the company, call him 366.
X, has m acquaintances a1 , • • • , am. By hypot- Suppose 5 members of the organizing committee
hesis, no two persons from among a 11 ••• , am are assembled. By hypothesis, there must be at
193
least one lock they cannot open, and each of the In particular, for a chain weighing 60 grams, it
other 6 members have a key to this lock. Since is necessary to open two links and obtain pieces
this occurs in the case of any combination of weighing 5, 15 and 38 grams.
5 members, we see the total number of locks to
be equal to Ch = 462. Since there are six keys 368.
to each lock, the total number of keys is 462 X
X 6 = 2, 772, and each member of the committee If when x is divided by 7 we get remainders 0, 1,
has 2,772:11 = 252 keys. 2, 3, 4, 5, 6, then x 2 yields, respectively, there-
If there were n members and the number of mainders 0, 1, 4, 2, 2, 4, 1. Therefore, x 2 + y2 is
members necessary and sufficient to open the divisible by 7 (and all the more so by 49) only
safe were m, then the number of locks would be when x and y are divisible by 7. Therefore, the
c~- 1 , while the number of keys in the hands of
number of pairs (with regard for; order) is
each member of the committee would be [E c·~ 00 ) )2 =:_ 1422 = 20,164. If we disregard
n- m+1 cm-1
n n • order, we get Cf42 = 10,153 pairs.
369.
367.
If the glven number is 10a + b, then, combining
Let us first find out what the largest length of the it with its reversal (digits in reverse order), we
chain is such that after k links- have been opened get 11 (a+ b). Since this is a perfect square, and
it is possible to obtain any weight from 1 to n. 2 ~ a+ b ~ 18, it follows that a+ b = 11.
We consider the optimal arrangement of split We get 8 possibilities: 29, 38, 47, 56, 65, 74, 83,
links. Since the number of split links is k, we can, 92.
using them, obtain any weight from 1 to k. But
we will not be able to obtain the weight k + 1 370.
if we lack one more portion. Clearly, the best
way out is for this part to consist of k+ 1 links, The first three digits of the number are arbitrary,
then we can obtain any weight from 1 to 2k + 1. and the last digit assumes one of two values (de-
After that we will need parts weighing termined by the remainder obtained in dividing
2 (k + 1), 4 (k + 1), ... , 211 (k + 1). They can the sum of the first three digits by 3). Therefore,
be used to yield any weight from 1 to if at some position we specify the digit, then the
n = k + [(k + 1) + 2 (k + 1) + remaining digits may be chosen in 62 X 2 =
+ 4 (k + 1) + •.• + 2" (k + 1)] = k +
= 72 ways. Hence, the sum of the units digits
is equal to 72 (1 + 2 + 3 + 4 + 5 + 6) =
+ (k + 1) (2k+1 - 1) = 2k+1 (k + 1) - 1 = 1,512, and the sum of all numbers is 1,512 +
Thus, if 2kk ~ n < 211.+1 (k + 1), then we can + 15,120 + 151,200 + 1,512,000 = 1,679,832.
get by with k opened links, but not with k - 1
opened links. In particular, since 23 X 3 ~ 371.
~ 60 ~ 24 X 4 - 1, it will be required, in a
The last position can be occupied by one of the
chain of 60 links, to open 3, getting pieces weig- digits
hing 4, 8, 16 and 29 grams, 0, 2, 4. If one of these digits is specified,
Using a two-pan balance, it is necessary to then the second and third places can be taken
adjoin to the k opened links a piece of weight by any one of six digits, and the first position by
2k + 1 (putting it in one pan and the other get any one of the five digits 1, 2, 3, 4, 5. In all we
X 5 X 6 X 6 = 180 possibilities. Hence,
links in the other, we can obtain any weight the 3sum of the units digits is (2 + 4) ·180 =
from k + 1 to 2k, and putting it together with = 1,080. In the same way we find the sum of the
the other links, we get any weight from 2k + 1
to 3k +1). The subsequent pieces must have tens digits to be (1 + 2 + 3 + 4 + 5) 900 =
weight 3 (2k + 1), 9 (2k + 1), ... , 311. (2k + 1). = 13,500, of the hundreds digits, 135,000, and of
Using them, it is possible to obtain any weight obtain the thousands digits, 1,620,000. Altogether we
from 1 to a sum of 1,769,580.
k+[(2k+1)+3 (2k+1)+ .•. +311 (2k+1)] 372.
= ~ [(2k+1) 311.+1-1] The equation x + y = k has k - 1 integral solu-
tions satisfying the condition 1 ~ x, 1 ~ y.
13-59 ~
194
Therefore the inequality I z I+ I y I =;;;; 1,000 has In 2n moves we get a display that breaks up
1,000 into a square with side 4n which contains
4 ~ (k-1)=1,998,000
k=2 •••••
solutions for which I x I =F 0 and I y I =F 0. Be- •••• •• •
sides, it has 3,996 solutions
unknowns is equal to zero,
for which one of the
and one solution is • • • • • • • • •
of the type x = 0, y = 0. There are 2,001,997 • • •• •• ••• ••
solutions altogether.
• • • •• •• ••• • • •
373. • •• • • •• • • • • • •
If this point is adjoined to the vertices of any • • • • • •• •• • •• •
polygon not containing the point A 11 we get a
polygon containing A 1 • This establishes a one-to- • • • •• •• •• • • • •
one correspondence between the set of all poly- • •• •• • • •• • •• •
gons not containing A 1 and a subset of the poly-
gons containing A 1 • Under this correspondence,
•• • • • • •• • • •
there are no polygons corresponding to triangles, • •• •• •• • •
one of whose vertices is A 1 • There are for this
reason more polygons containing A 1•
•• •• •• •
• ••••
374.
In an even number of moves, the knight can reach, Fig. 43.
squares of the same colour it was on originally.
We will find it more convenient to turn the board
45° and depict only the squares of that colour, (4n + 1) 2 points and four trapezoids, each of
replacing each square by its centre point. Then which has
(4n-1)+(4n-3)+ ... +(2n+ 1)= 3n2
• • • points. We obtain a total of
• • • • 0 12n2+ (4n+ 1)2=28n2+8n+ 1
points. Thus, in 2n moves (n > 1), the knight
• • • • • • • can reach any one of 28n2 + 8n + 1 squares.
• 0 • •
• 0 •
375 .
• • • • • • • If we take triples containing one and the same
• • 0 • • element, say a, then they satisfy the required
condition, and their number is C¥, 954 = 1,907·,481.
• • • We will show that it is impossible to choose a
larger number of triples having, pairwise, one
Fig. 42. element in common. Suppose that we choose
N > Cf, 954 such triples and (a, b, c) is one of
them. Since any one of the N - 1 triples left has
Fig. 42 gives us the squares the knight can reach at least one element in common with the chosen
in 2 moves. There are 33 such squares. Each squ- one, then for at least one of the chosen elements
are is the centre of the same kind of figure indi-
cating where the knight will be in two more mo- a, b, c (say a) there will be N; 1 triples contai-
ves. Combining these figures, we get a display
that is shown in Fig. 43. It breaks up into a squ- ning it, N 3 1 > 635,808. There will be at most
are containing 92 = 81 points and four trapezoids,
each containing 7 + 5 = 12 points. This yields 3,906 triples containing one of the elements b
or c besides a. We thus get a triple of he form
a total of 81 + 4 X 12 = 129 points.
195
(a, d, e), where d and e are distinct from band c. (b) the number of sets in the new collection is
In similar fashion we find triples of the form greater than in the original collection;
(a, j, g) and (a, h, j), j and g being different from(c) the smallest number of elements in the sets of
b, c, d, e, and h, j different from b, c, d, the new collection is r + 1.
e, j, g. To do this, take all the sets consisting of r
Any one of the given N triples has at least one elements and adjoin to each one of them, in all
element in common with each of the four triples possible ways, one element not belonging to
(a, b, c), (a, d, e), (a, f, g), (a, h, j). It is clear
them. Leave the remaining sets of our collection
that the element a must be one of these common unchanged. It is clear that after that operation
elements, for otherwise the triple would contain we get a collection in which the smallest number
four distinct elements, which is impossible. Thus, of elements of the sets is equal to r + 1. And no
all triples contain the element a, and for this set of the new collection is a part of another set,
reason their number does not exceed q, 954 , which for if set B contained the new set A', then it
contradicts the assumption. would also contain the set A of the rth class from
which A' was obtained by adjoining one element,
376. but this contradicts the hypothesis. Also note
The given sequence contains 9 + 2 X 90 + 3 X that not a single one of the new sets coincides
X 900 + . . . + 8 X 90,000,000 + 9 digits. with the originally specified sets. For example,
Compute the number of zeros in the sequence let a new set be obtained by adjoining to set A
1, 2, ... , 109. Write down all the numbers an element x. If it coincided with the originally
from 1 to 109 - 1 in the form of nine-digit num- given set B, then this would mean that B con-
bers, appending in front the requisite number of tains A, which runs counter to the assum-
zeros (say, 000,000, 003), and replace the number tion.
109 by 000,000,000. As a result we get 9 X 109 di- It remains to show that the number of new sets
gits, each digit appearing as many times as any is greater than the number of original sets. Note.
other one. We thus have 9 X 108 zeros. But these in this connection, that out of every set A of
zeros include the zeros we appended: 8 X 9 for class r there are 2n - r elements not belonging
one-digit numbers, 7 X 90 for two-digit numbers, to it, and therefore it gives rise to 2n - r new
etc. If they are discarded, we get 9 X 10- 8 X sets. But some of these sets coincide with one
X 9 - 7 X 90 - . . . - 9 X 107 zeros left. It another [for instance, taking the sets (a, b) and
is easy to see that this sum is equal to 2 X 9 + (b, c), we can obtain one and the same set (a, b, c)
+ 3 X 90 + ... + 8 X 9 X 10 7 , which is the by adjoining one element]. But the given set of
r + 1 elements can be obtained from sets con-
number of digits of the first sequence.
taining r elements in only (r + 1) ways. For this
377. reason, if the number of sets of the rth class were
equal to m and if p distinct new sets were obtained
If the sum of the first two digits is k, then for
k ~ 9 we have (k + from them, then m (2n - r) ~ p (r
1) 2 numbers with the indi-· for
+ 1). Since
cated property, and for k > 9, (19 - k) 2 such that r m< <n p, we have 2n- r > r + 1, it follows
numbers. Altogether, we obtain that is that the number of sets has
increased.
2 (12+ ... +92)+ 102=670 numbers. Repeating the device described above, we can
replace all sets containing less than n elements
,by sets composed of n elements if we retain the
378. condition (a) and obtain a greater number of
Denote by Aa the set of subjects in which student sets than originally. In the very same manner, we
a gets marks of 5. All these sets contain at most can replace all sets containing more than n ele-
2n elements, and, by hypothesis, none is a part ments (they are replaced successively by sets obta-
of another one. Partition these sets into classes, ined by rejecting one element). We thus obtain a
putting in the kth class the sets consisting of k collection of sets consisting of n elements and
elements. Let the smallest number of elements containing more sets than the originally given
in the sets of our collection be r. We will show collection. But using 2n elements it is possible
that if r < n, then the given collection of sets to construct only C'¥n sets of n elements each.
can be replaced by another one so that Hence, the number of sets was not greater than
(a) no set of the new collection is a subset of ano- C'¥n, in other words, the school had at most C'¥n
ther set; students.
13*
196
379. 382.
We have 17 = 7 + 5 + 5, and 18 cannot be par-
We will call the first m elements first-grade ele- titioned into a sum of positive multiples of 5 and
ments, the second n elements second-grade ele- 7. For this reason, x17 has the coefficient q 0 q 9 =
ments. Split all permutations of m +
n elements, = 3,420 and xls has the coefficient zero.
taken r at a time, into classes, putting in the
kth class the permutations containing exactly k 383.
elements of the first grade. Then the kth class con-
tains C~ A~A~ 11 permutations. Indeed, we can We have 17 = 2 + 2 + 2 + 2 + 2 + 2 + 2 +
choose the positions of the first-grade elements +3=2+2+2+2+3+ 3+3=2+
+ 3 + 3 + 3 + 3 + 3. And so in the expansion
in C~ways, and then in A!:l ways we can fill these
positions with elements of the first grade, and
of (1 +x2 - x3 ) 1 , 000 the term in xl 7 has the coef-
ficient
in A~-k ways we can fill the remaining r - k
positions with elements of the second grade.
Thus, the number of permutations of m n +
-ci ,oooC~93- c: ,oooc:96 -c1,ootP~99
r and in the expansion of (1-x2+xs)i,OOO the
coefficient
elements taken rat a time is ~ C~A~A::.-k or,
r
k=O -Cl ,oooC~93 + cj ,oooc:96 -C~ ,oooC~99
in accepted notation, ~ C~MkNr-k· It is clear that the second coefficient is greater.
k=O
However this is nothing but the result of remo- 384.
ving brackets in the expression (M +
N)r and a Given that
subsequent replacement of exponents by indices.
Note that the number of permutations ofthe (1 +x+x2)n=ao+ a1x+ a2x2+ .•. + a2nx2n (*)
kth class may be counted in the following way as
well: we choose k elements of the first grade, We will first show that ak=a 2n-k· Put x=..!..
r - k elements of the second grade, and permute y
· these elements in all possible ways. This can be and multiply both sides of the equation by y2n.
done in P (k, r - k) A~A~k = C~A~A~-k This yields
ways. (y2+ Y+ 1)n=aoy2n+a1y2n-1+ ... +a%n (**)
Comparing the expansions (*) and (**), we find
380. that ak=a2n-k•
The exponent 8 can be built up out of the expo- Now replace x by - x. This gives
nents 2 and 3 in the following ways: 8 = 2 + (1-x+x2)n=ao-a 1x+a2x2- ... +a 2nx2n (***)
+ 2 + 2 + 2 = 2 + 3 + 3. This means that if
we denote x2 in terms of y and x3 in terms of z, Multiplying together the expansions (*) and
then the desired coefficient is equal to the sum (***), we get
of the coefficients of y4. and yz 2 in the expansion
of (1 + y - z)9. By the formula for raising a 4n
(1+x2 +x4.)n= ~ (-1)k(aoak-a1ak-1+•·•
polynomial to a power, this coefficient is equal to
p (2, 2, 2, 2, 1) + p (3, 3, 2, 1) = 378. 11=0
... +akao) xll (****)
381. Clearly, the expansion of the left member
We have contains only terms with even powers of x and
therefore the ,coefficient of x2n-1 is zero. But
( 1 +x)"+ ... +< 1 +x)n= (i+x)n+l-(f+x)ll in the right-hand member the coefficient of
X x2n-1 is
1 ~~
n
The two other equalities are obtained similarly (2n-1) en 1 ~ 2n-x-1- en-1 ~ 2n-x
by considering the sums 2n-2 = 1 2n-1 x=1
n-1
2ne 2n-1 en-1
2n+e (1+e)n+82 (1+e2)n, 2n+82 (1+8)n+ 2n 2
+8 (1+e2)n (2n-2) e~n~2- eRn~1 =n+1
199
396. Substituting the values C~+h 2 , CJi+h~> e~+~
and performing the necessary manipulations, we
We have get the required formula.
n ex-1 n
"' ~= (n-1)! ~ x (n+q-x)! 398 .
."-- ex (n+q)! ""-' (n-x)!
X=1 n+q x=1 We know that ck- 11
n-
= ~
n
C~. Since
(1.+x)n=t+ C~x+ ... +C~xk+ ... +e~xn (*)
it follows that
-
n
(n-1)!(q+1)! ~ en-x
n (1 +x)n-t=e~+ ... +ke~xll-1+ ... + ne~xn-1
(n+q)! ."-- n+q-x+1 (**)
X=1 [the reader who is acquainted with differential
_(n+q+i)(n-i)lq!en-1 (n-1)1(q+1)! X calculus can obtain this formula by termwise
- (n+q)l n+q- (n+q)! differentiation of both sides of equality (*)].
Multiplying the expansions(*) and (**),we get
n (1+ x)2n-1=(1+e~x+ ... +~xn) (e~+ ...
.. . +ne~xn-1)
Comparison of coefficients of xn-1 in_ both mem-
bers yields the desired relation.
'397.
We have 399.
n. x-2 n Consider all n combinations, with repetitions,
"' en-2 = (n-2)1 ~ x(x-i)(n+q-x)! of elements of n types. There are e~n- 1 such ele-
."-- ex (n+q)! ."-- (n-x)l ments. Divide all these combinations into classes,
X=i n+q X=1
putting in the kth class those combinations which
Furthermore, using the identity include elements of exactly k distinct types. The
x(x-i)=(n+q-x+1) (n+q-x+2) kth class has c~ e~-=~\ combinations (in c~ ways
+<n+q+1) [n+q-2 (n+q-x+1)] we choose k types of elements appearing in the
combinations of this class, and from the ebments
we find that our sum is equal to of the given k types we can form c~:~ n-combina-
tions with repetitions that include the elements
of all k types). Thus, we have
n
n en ~ cken-k
2n-1 = LJ n n-1
-2 (n+q+1) (q+i)! ~ C~.f-~-x+1 k=1
X=1 Expressing the numbers e~n-1> c!,
c~:~ in terms
n of factorials, we arrive at the desired relation.
+(n+q) (n+q+i) ql ~ e~+:-x] 400.
X=1 The equality to be proved may be written as
(n-2)! q! n-1 follows:
= (n+q)l [(q+1) (q+2) en+q+2 cr e1er-2 +e2cr-4 cr
n+r-1- n n+r-3 n n+r-5- • • · = n
-2 (n+q+1) (q+i) e~+-~+1 + To prove 'it, take all r-combinations, with repe-
titions, of elements of n types and find, in two
+(n+q) (n+q+ 1) e~.f-~1 ways, the number of all such combinations con-
200
sisting solely of the elements of distinct types. 1 1 2
On the one hand, this number is q;. On the other (n+1) (n+2) [(Cn+z+ 2Cn+2+ · · ·
hand, the number of r-combinations, with repe-
titions, of elements of n kinds which at least ... +(n+2) c::j=~)
twice include elements of the given k kinds is
equal to c~:;:~2 1t_1 • Since these k kinds may -(C~+z+ ..• +~:j=~)]
be chosen in C~ ways, we get the desired relati- Applying the results of Problems (a) and (b),
on by applying the principle of inclusion and we find that
exclusion.
S = 1 [2n+l(n+2)-2n+2+ 1J=
n (n+1) (n+2)
401.
_ 2n+ln+1
(a) Put Sn = Ch + 2c;. + 3Cl\_ + ... + nC~.
-(n+1) (n+2)
By virtue of the equality C~ = C~-lt we have
Sn = nC~ + (n- 1) Ch + ... + q~-1 • Ad- (j) Rewrite the sum as
ding, we get
sn-n+1[
__1_ c1n+1- c2tl-j-1+···+<-)
1 n n+1]-
cn+1-
2Sn=n [C~+C!+ ... +C~]=2nn.
1
and so Sn = 2n-1 n. (b) In the same way we esta-
blish that Sn = (n +
1) 2n-l. (c) Sn =
=n+1
= (n- 2) 2n-l + 1. (d) Sn = (n + 1) 2n, (e) since the expression in the square brackets is
Sn = 0. (f) We have equal to 1. (k) If n is odd, then Sn = 0, and if
n = 2k is even, then Sn = (-1)11C~k. To prove
Sn=4(C!+2C!+ ... +nC~)-
this, multiply together the expansions (1 +
x)n
-(C~+C~+ ... +C~)=2n-ln-2n+f and (1 - x)n, and then find the coefficient ofxn.
413.
~ ~
i2=i it=i io=i
~ 1= ~
i2=i
CT +1 =Cf +2 •
2 3 Whence
This number of ways is equal to the c~efficient
<>f xs in the expansion of the expression it is clear that the sum being computed is equal to
n+t
Cn+m'
{1+x+ ... +xP) (1+x+ ... +xq)
(1+x+ ... +xr) 417.
= (1-xP+l) (1-xq+l) (1-xr+l) (1- x)-3 Divide all permutations of m white balls and n
black balls into classes. Include in the class
= (1- xP+1-xq+1-xr+l_ .• . )(1 3x+ 6x2+ ... + (kt. . . . , km) all permutations in which k 1 is a
separate white ball, k 2 pairs, k 3 triples, ... , km
... +c;+ 2xn+ .. . )
successive m white balls. Clearly kt 2k 2 + + ...
<
Since p q+r, it follows that p < s, q < s, ... + mkm = m. We compute the number of
r < s, and this coefficient is of the form permutations of the class (kt. . . . , km)· If n
black balls are in order, then we have n + 1
2 2 2 2 positions for placing the white balls. Of these
Cs+2-Cs-p+1-Cs-q+1-Cs-r+1
positions, kt will be occupied by one white ball,
(s+ 2) (s+ 1) (s- P+ 1) (s- p) k 2 by two, ... , km positions by m white balls
2 2 and n - kt - • . • - km +
1 positions will
remain vacant. Therefore the number of ways
(s-q+1) (s-q) (s-r+1) (s-r) of distributing positions for the white balls,
2 2 that is, the number of permutations of the class
(kt. ••• , km) is equal to P (kt, ... , kw
Remove the brackets and take into account that n - kt - ••. - km + 1). Since the total num-
p + +
q r = 2s. After some manipulations we ber of permutations of m white balls and n black
1
get s2+ +
s 1 - 2 (p2 q2 r2).+ + balls is c:+m' we get the desired relation.
414. 418.
If q + r < p, then q < s, r < s, but p ;;;;;: s and (a) Solving the characteristic equation r 2 -
- 7r + 12 = 0, we find the roots rt = 3, r 2 =
therefore the coefficient is equal to c;+r - = 4. Therefore the general solution is of the form
- c:-q+1 - cLr+1· Whence follows our asser- an = Ct3n +
C24n. (b) In the same way we get
tion. an = Ct2n +
C2 (-S)n. (c) We have an =
204
= C 1 (2 + 3i)n + C 2 (2 - 3i)n, (d) an = 1
Whence cl = Cz = 2 ' an= T[(cos a+
1
= C1 (3i)n + C2 (-3i)n. (e) r1 = r2 = -2. For
this reason, an= (-2)n (C1 + C2 n). (f) The cha- + i sin a)n + (cos a - i sin a)n]. By De Mo-
racteristic equation is r 3 - 9r 2 + 26r - 24 = ivre's formula, an = cos na.
= 0. Its roots are r1 = 2, r 2 = 3, r 3 = 4 and
so an = C12n + Cz3n + Ca4n. (g) r1 = r 2 = 421.
= r 3 = -1. Therefore an = (-1)n(cl + C2 n + This follows from the fact that the characte-
+ C3 n2 ). (h) The characteristic equation has the
form r 4 + 4 = 0. Its roots are r1, 2 = 1 ± i, ristic equation rk - CLrk-i + C~rk- 2 + ...
ra, ~ = -1 ± i. ... + (-1)k = 0 may be written as (r- 1)k =
For this reason, = 0. It has a root r = 1 of multiplicity k. The-
refore, one of the solutions of the recurrence rela-
an=Ct (1+i)n+C 2 (1- i)n+ tion is an = nk (see page 103).
+C3 (-1+i)n+C4 ( -1- i)n
422.
419.
(a) Solving the characteristic equation r 2 - 5r +
+ 6 = 0, we get r1 = 2, r 2 = 3 and therefore
an = C12n + C 2 3n. Putting n = 1 and n = 2, 423.
we get the system of equations We have
2Ct+3Cz=1, 4Ct+9C 2 =-7 (1+x)P= 1+Ci,x+C~x2+ ... +C;xm+ ... +
for finding C1 and C2 • It yields C1 = 5, C2 = -3 +C~xP, (*)
and so an = 5 X 2n - 3n+l.
(b) We have an = 2n (C 1 + C2 n). Putting n = 1, (1 + x)-k-1 = 1- ck+1 x+ c~+2x2- ...
n = 2, we get the system of equations C1 + C2 =
= 1, C1 + 2C 2 = 1, from which we conclude ... +(-1)sC~+ 8 xs+··· (**)
that C1 = 1, C2 = 0 and so an= 2n.
(1+x)P-It-1=1-C~-It-ix+ ...
!+
(c) an= 2 2 [(-1+i Vs)n+(-1-i V3)n]. ... +<-1)n c~-k-ixn+ ...
(d) an=2n+3n-4n. Multiplying together the expansions (*) and (**),
we find the coefficient of xn. It is ~ (-f)n-•x
420. 8