Vilenkin Combinatorial Mathematics

Download as pdf or txt
Download as pdf or txt
You are on page 1of 206

N.

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

Translated from the Russian by George Yankovsky

1\UR ·PUBLISHERS
MOSCOW
UDC 519.1=20

First published 1972


Revised from the 1969 Russian edition

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

THE GENERAL RULES OF COMBINATORICS 9

SUPERSTITIOUS CYCLISTS

"Another eight!" exclaimed the chairman of the


cyclists' club with exasperation as he examined
the twisted wheel of his bicycle. "And why? All
because I was given this blasted No. 008 ticket
when I became a member. Now hardly a month
goes by without one of the wheels smashing into
a figure eight. What I need is a ticket with
a different number. To avoid accusations of
superstition I'll reregister all the members, lea-
ving out the digit eight altogether."
The next day he changed all the tickets. Now
how many members were there in the club if it is
known that all three-digit numbers were used
that did not contain 8? (Say, 000 was used but
not 836.)
To start with, let us determine the number
of one-digit numbers without eight. Clearly,
there are nine such numbers: 0, 1, 2, 3, 4, 5, 6,
7, 9. Now indicate all the two-digit numbers numbers, there would be 94 = 6,561 numbers
lacking the numeral 8. They can be found by without any 8's.
taking all the one-digit numbers that we found In another club, the members were still more
and writing any one of the acceptable nine digits superstitious and they even threw out the num-
after it. This yields nine two-digit numbers ber 0 as being too much like a wheel. They made
for each one-digit number, and since there are do with eight digits: 1, 2, 3, 4, 5, 6, 7, 9. How
many members were there in the club if all ticket
9 one-digit numbers, we get 9 X 9 = 81 two-
digit numbers without any 8's: numbers were three-digit?
00, 01, 02, 03, 04, 05, 06, 07, 09 The problem is similar to the first one, the
10, 11' 12, 13, 14, 15, 16, 17, 19 sole difference being that in place of 9 digits we
20, 21, 22, 23, 24, 25, 26, 27, 29 have 8 altogether. So the club had 83 = 512 mem-
30, 31, 32, 33, 34, 35, 36, 37, 39 bers.
40, 41, 42, 43, 44, 45, 46, 47, 49
50, 51, 52, 53, 54, 55, 56, 57, 59
60, 61' 62, 63, 64, 65, 66, 67, 69 PERMUTATIONS WITH REPETITIONS
70, 71, 72, 73, 74, 75, 76, 77, 79
The problem of the cyclists belongs in the
90, 91, 92, 93, 94, 95, 96, 97, 99
following class of problems. We have objects
Thus, there are 92 = 81 two-digit numbers referring to n different varieties. They are used
without 8. Each one of these numbers can be to make up arrangements of k objects in each
used to adjoin any one of the nine acceptable or, as we shall say in the future, k-arrangements.
digits to. This yields 92 X 9 = 93 = 729 three- The arrangements can contain objects of the
digit numbers. Therefore, the club had 729 regi- same type, and two arrangements will be con-
stered cyclists. If we were to take four-digit sidered distinct if they differ either as to objects
10
or as to the order of the objects. The problem not take any one twice [if (a 11 • • • , aR._1) =1=
is to find the total number of such arrangements. =I= (b 11 • • • , bk_1) or if ak =I= bk, then (a 11 ••
Arrangements of this type are called k-permuta- .•. , ak-1> ak) =I= (b 11 • • • , bk-h bk)l. There-
tions of n distinct thtngs with repettttons. The fore the number of k-permutations of n distinct
number of all such arrangements is denoted objects with repetitions is n times greater than
by A~.* In the first problem of the cyclists, the number of (k -i)-permutations of the same
the number of things (types of elements) was 9 objects with repetitions. Consequently, A~=
{we took all digits except 8), and each permuta- = nA!-1 • But we already have the proof of
tion (each number) contained three elements. A!-1 = nk-1 • Therefore,
In this case, the number of permutations came
AR.=n·nR.-l=nR.
to X:= 93 • It is natural to assume that if the n
number of things is n, and each permutation Thus, equation (i) has been proved for all values
contains k elements, then the number of permu- of k.
tations with repetitions is nR.. Formula (i) occurs in a wide range of problems,
We wish to prove that the number of k-permu- a few of which will occupy us in the forthcoming
tations of n distinct objects with repetitions is sections.
equal to
(1)
NUMBER SYSTEMS
We carry out the proof by means of mathema-
tical induction with respect to k, which is the Besides the decimal number system which we
number of elements in a permutation with commonly use, there are other systems of nume-
a fixed value of n. For k = i the answer is ration such as the binary, ternary, octal, etc.
obvious-each permutation (with repetitions) number systems. In the base-n number system
consists of one element only, and the different we use n digits. Let us calculate how many
permutations are obtained by taking distinct natural numbers can be written in a base-n
objects. But since the number of types is n, system of numeration by using exactly k digits
the number of permutations is n. Thus, A1 = n, (for the sake of convenience, we will regard 0
. accor d with formula (i).
m n as a natural number). If we allow for numbers
beginning with zero, then every k-digit number
Now assume that we have the proof for .411.-1 = in a base-n number system may be regarded
= n11 - 1 and we consider k-permutations n with as a permutation, with repetitions, consisting
repetitions. We obtain all such permutations of k digits of n distinct types. Using formula (1)
as follows. Let us take any (k -i)-permutation we find that the number of numbers thus repre-
(with repetitions) (a 11 • • • , aR._ 1) and adjoin sented is nR..
to it the element ak of one of the available n However, the natural numbers do not have
objects. We get some k-permutation (a 11 • • • representations beginning with zero. We will
•.• , ak-11 ak)· It is now clear that out of each thus have to subtract from the value of nR. the
(k- i)-permutation we get as many k-permuta-
number of numbers whose base-n representation
tions as there are distinct objects, that is, n per- begins with zero. Discarding the first digit (zero)
mutations. It is obvious that in this manner we in these numbers, we get a (k- 1)-digit number
will not miss a single k-permutation and will (which possibly also begins with zero). By for-
* A permutation of n things taken r at a time ~n also
mula (i), there will be nk- 1 such numbers.
be symbolized as n P r or P (n, r) [Translator]. Hence, the total number of k-digit numbers in
11
a base-n system of numeration is equal to sign, like E ( •) whereas others use all five signs,
n"- nl&-1 = nl&-1 (n-1) like zero, 0 ( - - - - -).
Why the number 5? Couldn't we make do with
For example, in the decimal system there are a smaller number of dots and dashes, say four,
103 X 9 = 9,000 four-digit numbers: out of to transmit all our communications? The answer
10,000 numbers between 0 and 9,999, we discard is no, and the reason becomes clear if we apply
one thousand, namely, those from 0 to 999. the formula for the number of permutations with
There is another way to derive our formula. repetitions. From formula (1) it follows that
In a k-digit number represented in a base-n num-
A~ = 2. In other words, using one character,
ber system, the first digit can be any one of the
it is possible to transmit only two letters (E.
digits 1, 2, ... , n -1; the second digit and
and T-). Using two characters, it is possible to
succeeding digits, any one of the digits
transmit 21 = 4 letters, three yield 23 = 8 letters
0, 1, 2, ... , n -1. We thus have n -1 candi-
and four, 24 = 16. Thus, the total number of
dates for position one, and n candidates for
letters that can be transmitted by means of four
each of the remaining k -1 positions. From this
characters is
it is easy to see that the desired total number
is (n- 1) nl&-1,

Taking an alphabet of 26 letters, and also nume-


SECRET LOCK rals and marks of punctuation we see that symbols
made up of four characters do not suffice. But
Safes and storage lockers make use of secret if we take combinations of 5, then we get 32 sym-
locks, called combination locks, that open up bols in addition to the 30 obtained from four.
only when a specific combination of numbers or These 62 symbols are quite sufficient for tele-
letters is dialled. Suppose a dial has 12 letters graph communications.
and the combination has 5 letters. How many failing There is also a five-digit code for telegraph
attempts can be made by a person who does not communications that makes use of five symbols
know the combination? for every letter. Instead of the dash-and-dot
Using formula (1), we find the total number of system, use is made of alternating current flow
combinations to be or of sending current signals and noncurrent
125 = 248,832 signals. This code yields exactly 26 = 32 com-
binations, which is enough for all the letters.
which means that 248,831 attempts can be fai- Numerals and punctuation utilize the same com-
lures. Incidentally, safes are frequently made to binations, and so a telegraph apparatus opera-
give a warning signal at the first failure to dial ting on the five-digit code has a special device
the right combination. for shifting from letters to numerals and back
again.

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.

be chosen in n1 ways. Each of the chosen elements


(At. Bu), . , (A1o Btn) can be combined with any one of the n 2 types
(A 2 , Bzt), . , (Az, Bzn) of second elements, yielding n1 n2 pairs. Each
pair can be combined with any one of the n3
types of third elements, thus yielding n 1n 2 n3 tri-
ples. Continuing in this fashion, we finally get
the k-tuple n1n2 ••• nk of arrangements of the
desired type.
Ato •.. , Am indicate m ways of choosing A In the problem of the cyclists, we had to choose
and Bu, .•. , Bin denote n ways of choosing B, three elements (the hundreds digit, the tens
provided A has been chosen the ith way. It is digit and the units digit). At each stage we could
clear that this table contains all ways of choosing choose one of nine permissible digits, and so we
the pair (A , B) and consists of mn elements. got 9 X 9 X 9 = 729 numbers. Here is a harder
If the choices of B are independent of how problem.
object A is chosen, then in place of Table 1 we Signs are being made which consist of a geo-
get the following simpler table. metrical figure (a circle, square, triangle or hexa-
gon), a letter and a number. How many signs
Table 2 can be made?
As a first step we can choose a geometric figure.
(A1o Bi), (Ato Bz), . , (At. Bn) This can be done in four ways (we have a total
(A 2 , B 1), (A 2 , B 2), . , (A 2 , Bn) of four figures). Then we can choose one of 32 let-
ters (Russian alphabet), and finally, one of
10 numerals. This brings the total to 4 X 32 X
X 10 = 1,280 combinations .
15
DOMINO PROBLEM segments illustrating the various choices that
can be made in the first stage (here, each segment
A more complicated combinatorial problem is corresponds to a single element). The choices in
that in which the number of choices after each the second stage are made from the endpoints
stage depend& on the elements chosen in the of each of the line segments, if the given ele-
preceding stages, an instance of which is the ment was chosen in the first stage, etc.
following.
In how many ways can two dominoes be chosen
out of 28 pieces so that they can be put together
(that is, so that some number occurs on both
pieces)?
First choose one piece. This can be done in
28 ways. In 7 cases, the chosen piece will be
a "double", i.e. one of the type 00, 11, 22, 33, 44,
55, 66, and in 21 cases the piece will have diffe-
rent numbers (say, 05, 13, etc.). In the first
instance, the second piece may be chosen in
6 ways (for example, if at the first stage the
piece 11 was chosen, then in the second stage,
w~ can take one of the pieces with 01, 12, 13, 14,
15, 16). Now in the second instance, the second
piece may be chosen in 12 ways (for piece 35 we
can take pieces 03, 13, 23, 33, 34, 36, 05, 15, 25,
45, 55, 56). By the rule of product, we get
Fig. 2.
7 X 6 = 42 choices in the first case, and
21 X 12 = 252 choices in the second case.
Hence, by the rule of sum, we get 42 + 252 = This construction yields a tree, an examination
= 294 ways of choosing a pair. of which immediately gives the number of solu-
In the above discussion we took into account tions to our problem.
the order in which the pieces were chosen, so each By way of illustration let us take the problem
pair of pieces appeared twice (for instance, of staffing a multi-seated spaceship where the
01 and 16 the first time and 16 and 01 the second problem comes up of psychological compatibility
time). If the order of choice of the pieces is dis- of the crew in an extended space mission. People
regarded, then the number of choices is cut by that are suitable in every respect when taken
one half: we have 147 choices. separately may not fit into the pattern of a crew
for prolonged space exploration. Suppose our
problem is to make up a crew of three: commander,
THE CREW OF A SPACESHIP engineer, and physician. We have four candida-
tes, a 11 a2 , a3 and a, for the commander, three
For cases when at each stage the number of candidates for the engineer (b11 b 2 and b 3 ) and
possible choices depends on which elements were three for the doctor (c11 c2 and c3). A preliminary
chosen earlier, it is convenient to depict the checkup has disclosed that commander a 1 is psycho-
process of building combinations in the form logically compatible with engineers b1 and b3
of a tree, Starting from one point, draw line and with doctors c2 and c3 , commander a 2 with
16
engineers b1 and b2 and all doctors, commander numbers of positions of black in which it can
a 3 with engineers b1 and b2 and doctors c17 c 3 , be taken. For instance, if white is on square ai,
commander a~ with all engineers and with doc- then there is only one position where black is
tor c2 • Also, engineer b1 does not get along with under attack. Now if white is on square c3,
doctor c3 , engineer b2 with doctor c1 and engi- then the number of desired positions for black
neer b3 with doctor c2 • Given these conditions,
in how many ways can a crew be made up?
The conditions are illustrated in the tree
in Fig. 2. We see that there are only 10 permis-
.sible combinations (if there were no compatibi-
lity restrictions, then the number of combina-
tions would, by the rule of product, be 36 =
= 4 X 3 X 3).

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

indicated. Combining them, we get 87. Thus,


the sought-for arrangement is possible in 87 ways. HOW MANY PEOPLE DON'T KNOW
It is clear that there are exactly the same FOREIGN LANGUAGES?
number of positions in which black can take
white, but there are fewer positions in which The method applied in solving the foregoing
both men can take one another. For instance, problem can often be used in dealing with com-
if white stands on the edge of the board, black binatorial problems. Here is one.
A research institution has a staff of 67: 47 know
cannot take it no matter where black is posiiio-
Spanish, 95 German and 29 both languages. How
ned. Therefore, assign 0 to all squares along
the edges of the board. In the same manner, we many employees at this institution know neither
find numbers that correspond to the other black Spanish nor German?
squares. They are shown in Fig. 4b. Adding To solve this problem, we partition the entire
up these numbers, we find that the desired arran- staff into parts having no elements in common.
gement is possible in 50 different ways. The first part consists of those who know Spanish
Finally, let us find the number of positions only, the second, those who know German only,
of white and black in which neither can take the the third, those who know both languages, and
other. The problem can be solved in the same the fourth part, those who know neither language
way by placing white on each of the black squares simply," replied the physicist. "Fill the teakettle with
water, light the gas and put the water on to boil."
and counting the possible ways of positioning "Right," said the mathematician. "Now solve this
black so that not one of the pieces could take problem: the gas is burning and the teakettle has water
in it. How do you boil the water?"
the other. However, it is simpler to make use "That's no problem at all," replied the physicist. "Just
put the teakettle on the range."
of the "teakettle principle" * and reduce the prob- "No," said the mathematician firmly. "You turn off
the gas, pour out the water and we arrive at our first
* The story goes that a mathematician once asked a problem, which we know how to solve."
physicist: "You have an empty teakettle and an unlit Now, when a new problem is reduced to an already
gas range. How do you go about boiling water?" "Very solved one, we speak or applying the "teakettle principle".
2-59
18
(Fig. 5). What we know is that Part Three con- way, some find themselves in both lists and are
sists of 23 persons, but since 47 know Spanish, "subtracted" twice; these are precisely the poly-
there are 47 - 23 = 24 persons who know only glots with a knowledge of both languages. Adding
Spanish. In the same way, we find that 35 - 23 = on these, we obtain the number of persons who
= 12 scientists know only German. From this never studied either language.
Let us complicate the problem by adding
another language-French. Suppose there are:
20 scientific workers with French as their foreign
language, then 12 with Spanish and French,
11 with German and French, and 5 polyglots
8 that handle all three languages. It is then clear
(Q) that those who know Spanish and French (no Ger-
man) number 12 - 5 = 7, whereas 11 - 5 = 6.
know only German and French. This leaves 2 who
read French (20- 7- 6- 5 = 2). These wor-
kers are among the 8 persons who have no com-
mand of Spanish or German. Hence, the number
of researchers here who cannot work in any one:
of the three languages is 8 - 2 = 6.
We can write down the answer as follows:
6= 8-2 = 67-47- 35+23- (20-7 -6- 5) =
=67-47-35+23-20+(12-5)+(11-5)+5=
(b) -67-47-35-20+23+12+11-5

Fig. 5. Now the law is perfectly clear.· From the total


number of workers we first subtract those who
have a knowledge of one foreign language (and,
we conclude that the total number of persons
possibly, other languages). In this process, some
knowing one of these two languages is equal
of them are "subtracted" twice since they know
to 23 + 24 + 12 = 59. And sipce there are 67
two languages. Therefore, we add the numbers 23,
in all, only 67 - 59 = 8 workers remain who
12, and 11 which indicate how many employees
know neither language. In this institution,
read two languages (and, possibly, a third lan-
8 know neither Spanish nor German.
guage). But those with three languages are
We can write the answer in the form
rejected three times and then added three times.
8=67-(23+24+12) And since they have to be subtracted, we reject 5.
But we get 24 by subtracting 23 from 47, and
12 by subtracting 23 from 35. Therefore,
THE PRINCIPLE OF INCLUSION
8= 67- 23-(47- 23)- (35-23) = AND EXCLUSION
=67-47-35+23
The foregoing examples enable us to state
Here is the regularity: we subtract from the a general law. Let there be N objects some of
total number of scientific workers those who know which have properties a:11 a:2 , ••• , etn. Each
Spanish and those who know German. In this object can either have none of these
19
properties, or one or several. Let us de- is equal to n-1:
note by N (aio ai, .•. , ak) the number N (aia~ ... a~_ 1 ) = N- N (a1) -- ... - N (an-r)+
of objects having properties ai, ai, ... , ak
+ N (a1a2) + · · · + N (an-2Cln-t)-
(and, possibly, certain other properties). If
we wish to emphasize that only objects devoid - N (a1a2a3)- .. · - N (an-3an-2Cln-t) +
of a certain property are taken, this property +, .. + ( -1)n-lN (a1a2 ... Cln-1) (3)
will be indicated by a dash. Say, N (a 1 a 2 a~)
By hypothesis, this formula holds true for any
indicates the number of objects having proper-
collection. In particular, it is true for the collec-
ties a 1 and a 2, but devoid of property a 4 (the
tion N (CXn) of elements having the property Cln·
question of the other properties remains open).
For this collection, formula (3) takes the form
The number of objects not possessing a single
one of the indicated properties is denoted, by N(aia~ ... a~_ 1 an)=N(an)-N(atan)-
this rule, by N (a~a; ..• a~). The general
- · .. - N (an-tan)+ N (a1a2an) + ... +
law consists in the fact that
+N (an-2Cln-t!Xn)-N (ata2a3an)-
N(aia~ ... a~)=N-N(at)-N(a 2 )- ... - - ... + ( -f)n-l N (a1a2 ... an-ran) (4)
-N (an) +N (atat)+N (ataa)+ ... + (the restriction is indicated that in each case
+ N (atan)+ ... + N (an-ian)- N (a1a2a3)- we take only those objects having the property CXn)·
- ... - N (an-2Cln-1an) + .. ·+ Let us subtract (4) from (3). On the right
+ (-f)n N (ata 2 ... an) (2)
we get what we desire: the right-hand side of
formula (2). The left-hand member is the diffe-
Here, the algebraic sum is extended to all com- rence
binations of properties a1o a 2, ... , CXn (without N(aia~ ... a~_ 1 )-N(aia2 ... a~_ 1 an) (5)
regard for their order), the + sign l:leing used
if the number of properties accounted for is even But N (a~a; ... a~_ 1 ) is the number of objects
and the - sign if that number is odd. For inst- ~ot possessing the properties a1o a 2, ... , an_1
ance, N (a1a 3 a 6a 8 ) enters with a+ sign while and, possibly, possessing the property Cln· Now,
N (a 3a 4 a 10 ) ,enters with a - sign. Formula (2) N (a~a; ... a~-1 CXn) denotes the number of
defines what is known as the principle of inclusion objects that do not possess the properties
and exclusion (the inclusion and exclusion formula): a1o a2, ... , CXn-1 but definitely possess the
first, all objects with at least one of the proper- property Cln· This means that the difference (5)
ties a 1, a 2, ... , CXn are excluded, then all is just equal to the number of objects that do not
objects having at least two of these properties possess a single one of the properties (a1o a 2,
are included, then those having at least three · .. , !Xn-1o an)· In other words,
are excluded, etc. N (aia~ ... a~_ 1 ) -N (aia~ ... a~_ 1 an) =
Let us prove formula (2). The proof is by
induction on the number of properties. For one =N (aia~ ... a~-~~)
property the formula is obvious. Each object Thus, after subtraction, the left-hand member
either has this property or does not. Therefore, of formula (2) also appears on the left. The for-
mula is thus proved for the case when the number
N(a')=N-N (a)
of properties is equal to n.
Now suppose that formula (2) has been pro- Thus, the relation (2) holds true for n proper-
ved for the case when the number of properties ties if it holds for n - 1 properties (for n = 1
2*
20
it has already been proved). It follows that the
relation holds for any set of properties. THE SIEVE OF ERATO STHEN ES
· Formula (2) may be represented symbol ically One of the greates t mysteries of mathem atics
as follows: is the distribu tion of the prime numbers among
N(a'W ... ro')=N(1-a)(1-~) ... (1-ro) (6) all the natural numbers. There are cases where
two primes occur every other number (say, 17
After removing the brackets, the product
and 19, 29 and 31), and then there are cases
Na~ ... A has to be written as N (a~ . .. 11.). For
where a million composite number s occur in an
exampl e, in place of N a~&o we write N (a~&o).
unbroken sequence. Today, mathem aticians
know a good deal about how many primes occur
among the first N natural numbers. In these
WHER E'S THE MISTAKE? comput ations, there is a very useful method that
The class preside nt reports as follows: "Our goes back to the ancient Greek scholar Eratost he-
class has 45 student s, of which 25 are boys. nes (third century B.C.) who lived in Alexan-
Thirty student s get marks of "good" and "excel- dria.
lent" (of this number , 16 are boys). A total Eratost henes was a versatil e man engaged in
of 28 student s go in for athletic s, of which number a wide range of problems. He excelled in mathe-
18 are boys and 17 are student s with marks matics, astrono my and many other fields. True,
of "good" and "excell ent". Fifteen boys get good such breadth led to a certain superfic iality.
and excellent marks and also go in for athletic s." Contemporaries referred somewhat ironica lly to
A couple of days later, the home-room teacher, Eratost henes as "Beta" -alway s second best
who, ironical ly, was the mathem atics instruct or, (the second mathem atician after Euclid, the
summoned the class preside nt and stated that second astronomer after Hipparchus, etc.).
his report contain ed an error. Let us try to find In mathem atics, Eratost henes wanted to know
out what the mistake was. To do this, we com- how to find all the prime numbers from among
pute the number of girls who do not engage ia the natural number s up to N (Eratos thenes con-
athletic s and get passing marks (3's) or even sidered 1 to be prime; today, mathem aticians
failing marks (2's). Denote membership in the consider 1 to be a special type not belonging
set of boys by CXt. student s getting good marks either to the primes or to composite numbers).
(4' sand 5's) by a 2 and those who go in for athle- Here is how he went about it. First of all, he
tics by a 3 • We find N (a;a~a~). By hypothe sis, we crossed out all number s divisibl e by 2 (excluding
the number 2 itself). Then he took the first of the
have
remaini ng number s (namely, 3). It is clear that
N (a1)=25, N (a2)=30, N (aa)=28 , this number is prime. Then he crossed out all
N (cx 1a 2) = 16, number s divisibl e by 3 that follow it. The first
N (a1a 3)=18, N (a2a 3)=17, N (a1a2aa )=15 remaini ng number is 5. Then he deleted all
By the princip le of inclusio n and exclusion, successive number s divisibl e by 5, and so on.
we find that The number s that remain after all deletions are
primes. Since writing was done on wax tablets
N (aia~a3)=45-25-30-28+16+18+ 17-
in those days and the crossing out was done by
-15= -2 punchin g the figures, a tablet took on the appea-
But the answer can only be positive! So the rance of a sieve. Whence the method of Eratost he-
report definitely contain s an inconsi stency and nes for finding prime number s came to be known
is incorre ct. as the "sieve of Eratosthenes".
21
Let us compute the number of numbers that by n and take the integral part of the resulting
remain in the first hundred after deleting by the quotient. Therefore,
Eratosthenes method, dividing by 2, 3, and 5. N (a1}=50, N (az)=33, N (a3)=20,
In other words: how many numbers are there N (a1a2) = 16,
among the first hundred that are not divisible
N (tttet3)=10, N (a 2a3)=6, N (ata2a3)=3
by 2, 3 or 5? This problem can be solved by the
principle of inclusion and exclusion. and, hence,
Denote by a 1 the property of a number to be N (aiaia~)=26
divisible by 2, by a 2 the property of divisibility
by 3, and by a 3 the property of divisibility by 5. Thus, 26 numbers between 1 and 100 are not
Then a 1a 2 signifies that a number is divisible divisible by 2, 3, or 5. These numbers remain
by 6, a 1a 8 means that it is divisible by 10, and after the first three stages in the Eratosthenes
a 2 a 3 , that it is divisible by 15. Finally, a 1aaa3 process. In addition, we will also have the num-
signifies that a number is divisible by 30. Our bers 2, 3, and 5 themselves. There will thus be
task is to find the numbers from 1 to 100 that 32 numbers· left altogether.
are not divisible either ·by 2, 3 or 5, that is, After three stages in the elimination process
such as do not possess a single one of the pro- of the sieve of Eratosthenes there will remain
perties a 1 , a 2 , a 3 • By formula (2) we have 269 numbers out of the first thousand. This fol-
N (aiaia~) =100-N (ttt)-N (a2)-N (a3)+ lows from tlw fact that in this case
+N (etttt2)+N (a1a3)+N (a 2a3)-N (ettttzet3} N (ad= 500, N (a2) = 333, N (a3) = 200,
However, in. order to find the numbers up to N (a1a 2) = 166, N (etta<)= 100, N (aza3) = 66,
N that are divisible by n, we have to divide N N = (ttttt 2a3) = 33
CHAPTER II

PERMUTATIONS AND COMBINATIONS 22


We have considered some general rules for PERMUTATIONS WITHOUT REPETITIONS
solving combinatorial problems of a broad variety
of types. However, as in geometry, it is not The above problem belongs to the class of
always convenient to reduce the solution of combinatorial problems concerning permutations
problems to axioms; it is preferable to take without repetitions. The general statement of the
advantage of theorems. It is often better to use problem is this:
ready-made formulas instead of solving by gene- There are n distinct objects. How many k-arran-
ral rules. The point is that certain types of gements can be made out of them? Two arran-
problems occur much more often than others. gements are considered distinct if they differ
The combination types that occur in such pro- even by a single element or have a different order.
blems are called permutations and combina- Such arrangements are termed permutattons
tions. without repetitions and are symbolized by A~.
Special formulas have been derived for such In building k-permutations out of n distinct
combinatorial problems. One such formula is things without repetitions, we have to make k
already familiar: at the beginning of Chapter I choices. To start, we can choose any one of the n
it was demonstrated that the number of k-per- objects available. Once this choice has been
mutations of n distinct objects with repetitions made, the second step is to choose from the n-1
is equal to nk. Let us now find out how many remaining objects, since the choice already made
such permutations can be formed if we do not cannot be repeated (recall that in contrast to the
allow for repetitions, that is to say, if all the case of permutations with repetitions there is only
elements in the permutations are distinct. First one thing of each type here). In the same way,
let us examine the following problem. for the third step we have a choice of n-2 free
objects, at the fourth stage we have n-3 objects,
... , at the kth stage we have n- k + 1 objects.
FOOTBALL CHAMPIONSHIP Therefore, by the rule of product we find that
the number of k-arrangements of n objects
In the USSR football championship, Group without repetitions is expressed as follows:
One of Class A consists of 17 teams that aspire (1)
A!=n(n-1) ... (n-k+1)
to gold, silver and bronze medals. In how many
ways can the medals be distributed?
This problem is solved by means of the rule
of product. Any one of the 17 teams can get the A SCIENCE CLUB
gold medal. We thus have 17 possibilities. But
if some one team gets the gold medal, then there Let us apply this newly derived formula to the
remain 16 aspirants for the silver medal, since following problem. A science club consists of
the same team cannot get both medals. 25 members. The task at hand is to elect a presi-
After first place with the gold medal has been dent, a vice president, scientific secretary and
settled, there remain 16 possibilities for ~he treasurer. In how many ways can thts choice be
silver medal. In the same way, the bronze medal made if each member of the club can occupy only
can go to any one of the remaining 15 teams one post at a time?
after the gold and silver medals have been awar- Here we have to find the number of permuta-
ded. By the rule of product we find that the tions (without repetitions) of 25 elements taken
medals can be distributed in 4,080 ways four at a time. The point is that there is a diffe-
(17 X 16 X 15 = 4,080). rence in who heads the club and what persons
23
occupy the subsidiary posts (say, a choice of In the future we will encounter 01. Though it
Ivanov as president, Tatarinov as vice presi- might seem that 01 should be equal to zero, we
dent, Timoshenko as scientific secretary and agree to consider 01 equal to unity (01 = 1).
Alekseyev as treasurer differs from Timoshenko The point is that factorials have the obvious
as president, Ivanov as vice president, Tatarinov property
as scientific secretary and Alekseyev as treasu- n!=n (n-1)1
rer). The answer is therefore contained in the
formula This equality holds true for n > 1. It is natu-
ral to define 01 so that it should remain true for
A~6 = 25 X 24 X 23 X 22 = 303,600 the case n = 1 as well, that is so that 11 = 1 X 0!.
But then we have to set 01 = 1.
It will also be noted that formula (1), the
number of permutations without repetitions,
PERMUTATIONS OF N ELEMENTS
can be written as
When constructing permutations of n ele- k nl
ments without repetitions taking k at a time, An= (n-k)l (3)
we obtained arrangements that differed both as Indeed, in (3) all the factors (1, 2, 3, ... , n- k)
to elements and as to their order. But if we take enter both the numerator and the denominator.
arrangements involving all n elements, then Cancelling, we find that A~= n (n - 1 , •. ,
they can differ solely in the order of the ele-
ments. Such arrangements are called permu-
... (n- k + 1), in accordance with formula (1).
tations of n elements, or, briefly, n-permuta-
tions.
THE PROBLEM OF THE ROOKS
In other words, n-permutations are permuta-
tions of n elements without repetitions in which How many ways are there of placing 8 rooks
all elements participate. We can also say that on a chessboard so that they do not take each other?
permutations of n elements are all possible It is clear that only one rook can occupy each
n-arrangements, each one of which contains all rank (row) and file (column). Let us take one such
the elements once and all of which differ solely position and use a 1 to denote the number of the
in the order of the elements. The number of occupied square on the first rank, a 2 to denote the
n-permutations is denoted by Pn. The formula position on the second rank, ... , as the position
for Pn is readily obtained from the formula for on the eighth rank. Then (a1 , a 2 , ••• , as) will
the number of permutations without repetitions. be a certain permutation of the numbers 1,
Namely, 2, ... , 8 (it is clear that among the numbers
a 1 , a 2 , • • • , as there is no pair alike, for then
Pn=A~=n (n-1) ... 2 X 1 (2)
two rooks would be occupying the same file).
Thus, to find out how many permutations there Conversely, if a1 , a 2 , ••• , a 8 is a certain per-
are of n elements, multiply together all the natu- mutation of the numbers 1, 2, .•. , 8, then
ral numbers from 1 to n. This product is denoted to it corresponds a certain nontaking arrangement
by n! (read: n-factorial). ·We thus have of the rooks. Fig. 6 shows one arrangement of the
rooks corresponding to the permutation
Pn = n! = 1 X 2 X ..• X n 7 5 4 6 1 3 2 8. Thus, the number of desired
arrangements of rooks is equal to the number of
We agree that 11 = 1. permutations of the numbers 1, 2, •.. , 8,
24
which is P 8 • But
LINGUISTIC PROBLEMS
P 8 =81=1·2·3·4·5·6·7·8=40,320
One of the problems of linguistics is decipher-
These rooks can therefore be positioned as requi-
ing inscriptions in unknown languages. Suppose
red in 40,320 ways.
we have a text written with the aid of 26 unknown
The same proof is used to demonstrate that
signs, each one depicting one of 26 sounds.
there are nl ways of positioning n nontaking rooks
In how many ways can the sounds be correlated
on an n by n chessboard.
with the written symbols?
Let us arrange the written symbols in a certain
order. Then each correlation will yield a certain
permutation of sounds. Using 26 sounds, we can
form P 26 = 261 permutations. This number is
roughly equal to 4 X 1026 • It is clearly impossible
to verify all these possibilities. It is even beyond
the capabilities of an electronic computer.
Attempts are therefore made to reduce the number
of possibilities. It is frequently possible to
separate the vowels from the consonants (one
more often encounters vowel-consonant combina-
tions than vowel-vowel or consonant-consonant
combinations; observing combinations of sym-
Fig. 6. bols that occur more often than others, it is
possible to separate the vowels from the conso-
The result would be quite different if the rooks nants). Suppose we have been able to find 7 sym-
differed in some way, say, by colour or by some bols for vowels and 19 symbols for consonants;
other label. Suppose the rooks are numbered. Let us now find out how many times the number
Then from each arrangement of non-numbered of possibilities has been reduced. The 7 vowels
rooks we get nl arrangements of numbered rooks. can be permuted in 7! ways and the 19 consonants
They are obtained by permuting the n rooks in 191 ways. The total number of combinations
in all possible ways for the same occupied squares. is equal to 71 X 191. Which means the work
There would then be (n!) 2 ways of positioning has been reduced 26!/71 X 19! ~ 650,000 times.
nontaking rooks. This is of course a gain, but 71 X 19! is still an
We also arrive at the same conclusion by enormous number.
applying the rule of product directly. The first The next step is to compute the frequency of
rook can be placed on any one of n2 squares. occurrence of the individual symbols. Comparing
Crossing out the rank and file of this rook, we this frequency with that of letters in related
have an n - 1 by n-1 board left (n - 1 ranks languages, one can conjecture as to the signifi-
and n - 1 files) with a total of (n - 1) 2 squares. cance of certain symbols. Other symbols aro
This means that the second rook can be placed found by comparing the given text with the
in (n- 1)2 ways. In the same manner, the same text in another language (the kings of old
third rook can be positioned in (n - 2) 2 ways, delighted in describlng their heroic deeds in
etc. Altogether we have several languages).
n2 (n-1)2 •.• 12=(nl)2 Suppose that in this way 4 vowels and 13 con-
ways of placing the rooks. sonants have been identified. What are the remain-
25
ing possibilities? Obviously, 31 • 6! = 4,320. is just 720. But a necklace can also be turned
Now this number of combinations can be handled upside down in addition to being moved round
by electronic computers. the circle (Fig. 7). So the answer is 720: 2 = 360.
Cryptologists meet similar difficulties in de-
coding operations.
PERMUTATIONS WITH REPETITIONS
ROUND DANCE
Up to now we have been permuting objects
Seven glrls form for a round dance. In how that are pairwise distinct. But if some of the
many different ways can they stand In the circle? objects being permuted are identical, then we
If they stood in one place, the result would obtain fewer permutations, some of them coincid-
be 7! = 5,040 permutations. But since the ing with one another.
dancing girls circle all the time, their position Let us illustratewith the word "part"; permut-
relative to surrounding objects is not essential, ing, we obtain 24 different permutations:
the only important thing being their mutual part rapt ptra rtpa
arrangement. For this reason, we consider the patr ptar ratp rtap
permutations appearing as the dancers move prat rpat rpta prta
round the circle to be the same. However, from trap tpar aptr artp
each permutation we can obtain another six by tarp atrp atpr tapr
means of rotation, so the number 5,040 has to aprt arpt trpa tpra
be divided by 7. This yields 5,040 : 7 = 720
distinct permutations of girls in a round If we take the word "papa" instead, then in
dance. all the permutations written out above we will
have to replace "r" by "p" and "t" by "a". Some
of our 24 permutations will be the same. For
example, in the first row of permutations, we get
one word, "papa". All four permutations in the
second row give "paap". Generally, all 24 per-
mutations split up into foursomes, in which the
replacements (''r" by "p", "t" by "a") all yield
the same result. In the table, these permutations
stand in one row. Therefore, the number of dis-
tinct permutations that can be produced using
Fig. 7. the word "papa" is 24: 4 = 6. They are
papa, paap, ppaa, apap, aapp, appa
Generally, if we consider permutations of n
objects in a circular arrangement and regard as Stated generally, we have the following pro-
identical those positions that go into one another blem:
in a rotation, then the number of distinct permu- There are k elements of different types. How
tations is equal to (n - 1)1. many permutations can be made out of n 1 elements
Now let's see how many necklaces we can of the first type, n 2 elements of the second type, •.• ,nk
make out of 7 distinct beads. By analogy with elements of the kth type?
the problem that was just solved, it might be The number of elements in each permutation
imagined that the number of distinct necklaces is equal to n = n1 n2 + + ...
+nk. Thus, if
26
all the elements were distinct, then the number ANAGRAMS
of permutations would be n!. But since some
of them are the same, there is a smaller nlfmber Prior to the 17th century there were hardly
of permutations. Indeed, take, for instance, the any scholarly journals. Scholars learned about
permutation the work of their colleagues from books and from
private communications (letters). This created
aa ... a bb ... b . . . XX . . . X (4) great difficulties in the publication of new results
'--v-' '--v-' '--v-'
n1 n2 nk because book printing often took many years,
while to write about a discovery in a private
where we have all elements of the first type, then letter might be quite a risk: go and prove that
all elements of the second type, ... , finally, the idea was yours and not that of a colleague
all elements of the kth type. The elements of type who had spoken out on the basis of your letter
one can be permuted in n1 1 ways. But since all to him. Or it might easily happen that the addres-
these elements are the same, such permutations see had been working on the same problem, had
are useless. In the same way, it is pointless to found a solution and your letter had added nothing
generate the n 2 1 permutations of the elements to it, in fact he himself had been on the verge
of type two ... , nkl permutations of the kth type. of writing to you a similar communication.
For example, in the permutation "ppaa'' we Priority quarrels were a matter of constant
change nothing by interchanging the first and concern to scholars in those days, as witness
second elements or the third and fourth ele- the prolonged wrangling at the end of the 17th cen-
ments. tury over the question of priority regarding the
The permutations of the elements of type one, discovery of differential and integral calculus
type two, etc., can be effected independently. by Newton and Leibniz, or over who first stated
Therefore (by the rule of product) the elements the law of universal gravitation between Newton
of permutation (4) can be permuted in n1 1n2 ! ... and Hooke, and so on .
• . . nkl ways so that it remains unchanged. In ancient Greece, Archimedes even had to
The same holds true for any other arrangement resort to guile. When some scholars of Alexandria
of elements. Thus, the set of all nl permutations took the credit for his results (which they learned
splits up into parts consisting of n1ln2l ... nkl from his letters), he wrote a final letter in which
identical permutations each. Hence, the number he gave the remarkable formulas for the areas
of distinct permutations with repetitions that and volumes of certain figures. The Alexandrians
can be generated from given elements is again said that these formulas were familiar
and that Archimedes had not added anything
(5) new. This time, however, Archimedes caught
them unawares, for the formulas given in his
letter were erroneous.
where, if you recall, n = n1 n2 + + ... + nk.
So as to ensure priority and not allow for
Using formula (5), it is easy to state the number
premature announcement of new results, scholars
of permutations that can be obtained from the word
were used to stating them in the form of brief
"Mississippi". A total of 11 letters: one m, four
phrases with the letters transposed. In that form
i's, four s's, and two p's. By formula (5) we
they reached other scholars. Such texts with
have the number of permutations:
transposed letters are called anagrams. For
11! example, 'rebate' is an anagram of 'beater'.
p (4, 4, 2, 1)
41 X 41 X 2! X 1! = 34 ' 650 Finally, when a book came out with a detailed
27
description of the new result, the anagram was permutations. This enormous number is about
decoded. Anagrams were also used in political equal to 1060.
quarrels. For instance, after the murder of the To run through all these permutations, an
French king Henry III, an anagram was made electronic computer doing one million operations
up out of the name of the murderer frere Jacques per second would be hard at work during the
Clement: C'est l'enfer qui m'a cree (I w~s,created entire lifetime of the solar system and more.
by hell). The king's opponents retorted with In a certain sense, it is easier for a human being
the name of Henri de Valois made into the to solve this problem than for a machine. The
anagram Vilain Herodes (Herode the villain). point is that the human investigator does not
When Christian Huygens (1629-1695) discovered take all permutations, but only those which yield
the ring of Saturn, he composed the anagram meaningful words, he will also take account
aaaaaaa, ccccc, d, eeeee, g, h, iiiiiii, lll, mm, of grammatical rules, etc., all of which drasti-
nnnnnnnnn, oooo, pp, q, rr, s, ttttt, uuuuu cally reduce the number of attempts. Most
important of all, he usually has a rough idea of
When the letters are rearranged in the proper the problems on which his correspondent is enga-
order, we get the following text: ged. Still and all, it is a tremendous undertaking.
"Annulo cingitur tenui, plano, nusquam cohae-
rente, ad eclipticam inclinato"
("Surrounded by a thin flat ring not suspended
COMBINATIONS
anywhere, inclined to the ecliptic)
However, anagrams were not always enough We are not always interested in the order in
to keep the secret. When Huygens discovered which the elements (objects) are arranged. For
the first satellite of Saturn (Titan) and found example, in the semifinals of a chess tournament
its period of revolution about the planet to be in the USSR with 20 participants, where only
15 days, he composed an anagram and sent it to three enter the finals, the order in which these
his colleagues. Now one of them, Wallis, a grea:t three come is not essential-the main thing
hand at decoding cryptic messages, figured it out is to be in the finals. There have been cases
and composed a counter-anagram which he sent when the champion of the Soviet Union has come
to Huygens. When the two scholars exchanged up from a lower position in the semifinals.
codes of their anagrams, it appeared as if Wallis The same thing happens in football. In the
had made the same discovery prior to Huygens. championship of the USSR, four teams at the
Only later did Wallis admit that it was all end of the group of 17 that make up the top
a joke just to demonstrate the uselessness of league move into the lower league. There is little
anagrams in cryptography. Huygens did not consolation in the fact that a team occupies
see the point and was embittered .... 14th place instead of 17th place, since they all
Let us compute the number of permutations leave the top league.
needed to reach the true meaning of the first When we are not interested in the order of the
anagram of Huygens. It contains 7 letters a, elements of a set but only in their composition,
5 c's, 1 d, 5 e's, 1 g, 1 h, 7 i's, 3 l's, 2 m's, we speak of combinations. Thus, k-combinations
9 n's, 4 o's, 2 p's, 1 q, 2 r's, 1 s, 5 t's, and of n elements are all possible k-arrangements
5 u's, making a total of 61 letters. By for- made up of these elements such as differ in com-
mula (5) we thus get position but not in the order of the elements.
61! The number of k-combinations that can be
7! 5! 1! 5! 1! 11 7! 3! 2! 9! 4! 2! 1! 2! 1! 5! 5! generated out of n elements is denoted by c~.
28
In other words,

1ij th pLace, C~=P (k, n-k) {7)

... 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

c:4 = 8 ~~61 = 4,328,284,968


ways.
In exactly the same way, we can prove that
an m by n chessboard (m ranks, or rows, n files,
()r columns) can accommodate k rooks in
ck = (mn)!
mn k! (mn- k)l
ways.
Now if instead of k identical rooks we take k
distinct chessmen, then it all depends on which
piece is placed where. And so instead of combi-
nations, we obtain permutations, and the answer
is given by the formula
Ak = (mn)!
mn (mn-k)l
mes more, and if there were five digits on the
winning ticket (quinto), then the winner
GENOESE LOTTERY
was paid 1,000,000 times the cost of the
A few centuries ago, the so-called Genoese ticket.
(or number) lottery was all the rage (it is even Many tried to get rich fast by playing terno
played in some countries today). In a nutshell or ambo, but almost nobody won-the lottery
it is this. Players buy tickets numbered from 1 was calculated to leave the winnings with the
to 90. Tickets with two, three, four and five organizers.
numbers are also sold. On the day of drawings, To :find out why this is so, let us try to compute
five counters are drawn from a bag containing the ratio of "lucky" outcomes to the total number
counters numbered 1 to 90. Winners are those of outcomes for different ways of playing the
whose ticket numbers coincide with the drawn game. The total number of outcomes of the
numbers. For example, if a ticket has the num- lottery is given immediately by formula (6).
bers 8, 21, 49 and the numbers drawn are 3, 8, 21, Five counters are extracted from a bag holding
37, 49, this is a win, but if the drawn numbers 90 counters, the order playing no role whatsoever.
are 3, 7, 21, 49, 63, the ticket is a loser because What we have is combinations of 90 elements
the number 8 is missing. taken 5 at a time, the n'Umber of which is
In the old days, if a player in the lottery C5 -~- 90x89x88x87x86
bought a ticket with one number (simplum), 90 - 5! 85! - 1X2X3X4 X5
he got 15 times the cost of the ticket, if it had
two numbers (ambo), he got 270 times more, Suppose a player buys a ticket with one number.
if three numbers (terno), it was 5,500 times grea- In how many cases does he win? To win, one
ter, if four numbers (quaterno) he won 75,000 ti- of the numbers drawn from the bag must coin-
30
cide with the number of the ticket. The other And the ratio of the number of "lucky" out-
four numbers are irrelevant. But these four comes to the total number is
numbers are drawn from the remaining 89 num- C~ 8 4X5 2
bers. Therefore, the number of favourable com- CBo 90 X 89 = 801
binations is given by
This time, only two out of 801 outcomes win.
C' _ 89 X 88 X 87 X 86 But since the winnings are only 270 times the
89 - 1 x 2x3x4 price of the ticket, it follows that out of every
801 ambo tickets, the price of 261 tickets is
From this we see that the ratio of the number pocketed by the owners of the lottery. It is
of favourable combinations to the total number clear that playing ambo offers still less of a
of combinations is chance to the player than playing simplum.
C39 5 1 The situation is much worse when we come
CBo =w=18 to terno, quaterno and quinto. In terno, the
ratio of the number of favourable outcomes
This means, speaking roughly, that a player to the total number of outcomes is
will win once out of 18 times. In other words, 3x4x5 1
he pays for 18 tickets and wins 15 times 90x 89x88 11,748
the cost of one ticket, and the price of three
tickets will be pocketed by the owners of the In quaterno, it is
lottery. Cle 2X3X4X5 1
This does not mean, of course, that a player CBo 90 X 89 X 88 X 87 511,038
wins exactly once out of every 18 tries. It may In quinto, it is
happen that 20 or 30 games will be played bet-
1 1X2X3X4X5 1
ween two winnings; on the other hand, it also
may happen that he wins twice in a row. What CBo 90 X 89 X 88 X 87 X 86 43,949,268
we are talking about is the average number of The winnings are, respectively, only 5,500,
winnings over a large interval of time or given 75,000, and 1,000,000 times greater. The reader
a large number of players. If this were not so, can easily calculate how much players lose
we might make the mistake of the doctor who under these conditions.
told his patient that one out of ten survives
the particular illness from which his patient
was suffering, and that since the last 9 whom the
BUYING CAKES
doctor had treated had died, he would definitely
live. A confectionary sells four types of cakes: napo-
Now let us compute the chances when playing leon, eclair, shortbread and cream puffs. In how
ambo. Here we need two numbers to coincide many ways is it possible to buy 7 cakes?
with those drawn from the bag, the remaining This is a somewhat different problem from
three can be any numbers. Since they can be those we have already solved. It is not a problem
chosen from the remaining 88 numbers, the involving permutations with repetitions because
number of "lucky" outcomes when playing ambo the order in which the cakes are arranged in the
is given by the formula box is immaterial. It is therefore closer to the
88X87X86 combination type. But here too there is a diffe-
qa= 1 x2x3 rence. The combinations may involve repeated
31
elements (say, we could buy 7 eclairs). Such the number label 7 + 3 = 10), and the smallest
problems have to do with combination with number label is 1 (which is the designation
repetitions. of the first napoleon). Not a single number
To solve our problem, let us label each pur- label is repeated. Conversely, to every increasing
chase by means of zeros and units. First, write sequence of 7 numbers from 1 to 10 there cor-
the number of units indicating the number of responds a purchase. For instance, the sequence
napoleons bought. Then, to separate napoleons 2, 3, 4, 5, 7' 8, 9 indicates a purchase of 4 eclairs
from eclairs, write a zero, then units to indicate and 3 shortbreads. To see this, subtract the
the number of eclairs, then again a zero (if no numbers 1, 2, 3, 4, 5, 6, 7 from the given number
eclairs are bought, there will be two zeros in labels. We thus obtain the numbers 1, 1, 1, 1, 2,
5uccession). This is followed by units to indicate 2, 2, which is 4 units and 3 twos. But we added 1
the number of shortbreads, again a zero, and, to the number labels of the eclairs and 2 to the
finally, units to indicate the purchase of cream labels of the shortbreads, which means that we
puffs. For instance, if we buy 3 napoleons, have 4 eclairs and 3 shortbreads.
1 eclair, 2 shortbreads and 1 cream puff, then We only get increasing sequences of numbers
we have the following notation: 1110101101. in this case, and, consequently, each sequence
But if we buy 2 napoleons and 5 shortbreads, is completely determined by its composition.
then we write 1100111110. Different purchases Therefore, the number of such 7-sequences is
clearly are associated with different combina- equal to the number of 7-combinations of 10 num-
tions of 7 units and 3 zeros. Conversely, to each bers (from 1 to 10). And the number of these
combination of 7 units and 3 zeros there cor- combinations is given by
responds a definite purchase. For example,
a purchase of 3 eclairs and 4 shortbreads cor- q 0 = 7~0! 1 = 120
responds to the combination 0111011110.
Thus, the number of distinct purchases is which is the same result as that obtained ear-
equal to the number of permutations with repe- lier.
titions that can be made up out of 7 units and
3 zeros. As we pointed out on page 26, this num- COMBINATIONS WITH REPETITIONS
ber is
101 Above we mentioned that this was a type of
p (7, 3)= 71 3! 120
problem that involves combinations with repe-
We could arrive at the same result by a diffe- titions. Such problems are stated generally as
rent approach. Arrange the cakes in each purchase follow. There are n distinct types. How many
in the following order: napoleons, eclairs, short- k-combinations of them can be made up if the
breads and ·cream puffs, and then number them. order of the elements in the combinations is
But add 1 to the number labels of the eclairs, disregarded (in other words, distinct combina-
2 to the number labels of the shortbreads and 3 tions must differ in at least one object)?
to the number labels of the cream puffs (do not In general form, this problem can be solved
add anything to the number labels of the napo- in exactly the same way as the cake problem.
leons). For example, suppose we buy 2 napoleons, Namely, label each combination by means of
3 eclairs, 1 shortbread and 1 cream puff. These zeros and ones: for each type write as many
cakes will then have the designations, or number units as there are objects of the given type in the
labels 1, 2, 4, 5, 6, 8, 10. It is clear that the combination, and separate the distinct types
biggest number is 10 (the last cream puff gets by means of zeros (if objects of a specific type
32
are absent in the combination, then there will The remaining k - r positions can be filled
be two or more zeros in succession). We then by any elements, which, under the conditions
obtain as many ones as there are objects in the of the problem, belong to n types. Therefore,
combination, that is k, while the number of there are just as many combinations of the
zeros will be 1 less than the number of types desired type as there are combinations (with
of objects, that is to say, n.- 1. We thus get repetitions) of elements of n types containing
permutations, with repetitions, made up of k k - r elements each, that is,
ones and n. - 1 zeros. Here, to different com- (jk-r_ck-T
n - n+k-r-1
binations correspond distinct permutations with
'l"epetitions, and each permutation with repeti- In particular, if n ~ k and it is required that
tions has its specific combination. Thus, the at least one element of each of the n types enter
into k-combinations with repetitions, then there
number c~ of k-combinations (with repetitions)
of elements of n types is equal to the number will be c~=1 combinations.
of P (k, n - 1) permutations of n - 1 zeros
and k ones (with repetitions). But
THE FOOTBALL CHAMPIONSHIP
P(k _ 1)= (k+n-1}1 AGAIN
'n kl (n-1)1
And so We have analyzed problems involving permu-
_/t_(k+n-1)! 1!. tations and combinations. In many cases we
0 n - kl (n-1)1 = 0 n+k-1 have to deal with combinations of a variety
This same formula may be proved in a different of types. Consider the following problem.
manner. In each combination, arrange the ele- Let us call two outcomes of the Soviet football
ments according to type (first, all elements championship coincident in the main if the hol-
of the first type, then all elements of the second ders of gold, silver and bronze medals coincide
type, and so on). Then number all elements in and also if the four teams leaving the top league
the combination, but add 1 to Type Two ele- coincide. Find the number of noncoincident-in-the-
ments, 2 to Type Three elements, etc. Then from main outcomes of a championship (with 17 parti-
each combination with repetitions we get a com- cipating teams, as usual).
bination, without repetitions, consisting of the As we have already seen, the medals can
numbers 1, 2, ... , n + k - 1, each combina- be distributed in A~7 = 17 X 16 X 15 ways
tion involving k elements. Whence it again fol- (see page 22). This leaves 14 teams, of
lows that which 4 leave the top league. Since the order
of the leaving teams is immaterial, this opera-
(8)
tion can take place in c:, = 4 ~~~~ ways. By the
In some problems, we have combinations with rule of product we find that the number of non-
repetitions with a supplementary restriction: coincident-in-the-main outcomes of the cham-
they must include elements of r fixed types, pionship is equal to
where r ~ n. These problems can easily be 171
A 17
3
X C14=
4 17 X 16 X 15 X 41141
101 = 41101 =
reduced to the problem already solved. To
ensure the presence of elements of the given r =4,084,080
types, let us from the very beginning take one We can obtain the same result by a different
element of each such type. In this way there approach. The total number of distinct outcomes
will be r positions occupied in a k-combination. of the championship (rejecting cases when two
33
teams occupy the same position) is equal to convenient to make direct use of the formula
P 17 = 171 But permutations of teams occupying Jt_ nl
places 4 to 13, and also permutations of teams en- kl (n-k)l (9)
{)Ccupying places 14 to 17 result in a coincident-
in-the-main outcome. The number of such per- However, it is often possible to obtain a proof
mutations is 101 X 4!. Hence, the number of using combinatorial arguments: compute the
. . .outcomes 1s
. g1ven
. by the f ormu1a 171 number of combinations of a given type and
d 1stmct_ 10141 partition these combinations into disjoint classes
Suppose we wish to telegraph the results of the (that is, classes without common elements).
championship in a telegram consisting of k We then find out how many combinations there
dots and dashes. What is the least number of are in each class. Combining the numbers obtai-
symbols needed? We already know that it is pos- ned, we again get the number of all combinations
sible to construct 211. distinct combinations out of a given type. This yields the desired relation.
of k dots and dashes. Therefore, the minimal Let us begin with the simplest relation:
number of elements (characters) needed to
(10)
transmit the required information must be such
as to satisfy the following inequality: This follows directly from formula (9). The
211. >- 4,084,080 point is that if we replace k by n - k, then n - k
will be replaced by n - (n - k) = k and as
Solving it, we find that k ;;;;. 22. And so to trans- a result the factors in the denominator will
mit the results of the championship by means be interchanged. However, (10) can easily be
of dots and dashes we need at least 22 characters. proved without resorting to any explicit type
Calculations of this kind are of course not of number of combinations. If we choose some
needed in such mundane matters as the outcome k-combination from n distinct elements, then
of a championship, but it is easy to imagine there remains the complementary combination
a case where the transmission of information of n - k elements, the combination comple-
involves considerable engineering difficulties mentary to the (n - k)-combination being the
(Say, in transmitting a photograph from a space original k-combination. Thus, k-combinations
vehicle) and every element is practically worth and (n - k)-combinations constitute mutually
its weight in gold. Then we have to consider complementary pairs, and so the number of
various possibilities of such a transmission these combinations is the same. Hence, C~ = c~-h
and choose the optimal ones. Problems of this The relation
nature are studied in a special division of mathe-
matics called information theory. (11)

can be proved in just as simple a fashion. To do


PROPERTIES OF COMBINATIONS this, form k-combinations out of n elements
a1o .•• , an-t. an and partition them into two
(The end of this chapter may be skipped in classes. The first will contain combinations
a first reading, but the equations that are proved involving the element an, while the second wiH
here, C~ = c~-R. and C~ = C~::-11 + C~_ 1 , will be contain combinations which do not involve this
used frequently in the sequel.) element. If we drop element an from any combi-
The numbers C~ possess a wide range of remar- nation of the first class, there will remain a
kable properties, which may be demonstrated (k- i)-combination made up of the elements
in a variety of ways. In some cases it is more ah • • • , ~Jn-i· There are C~::-11 such combinations.

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)

12+22+ ... + m2 = m (m+1) (m+2) If m < i


n, then C;:'C;::= will be the last
3 term in the sum. It is more convenient to write
_ m(m+1) _ m(m+1)(2m+1) (20) this equality with c! replaced by c~-k in
2 - 6
each summand. We then get
In exactly the same way, from (9) we conclude
that ~- 1 c~_ 1 + c~- 2 c;,._ 1 + ... + c~c~-:::..\ =
cn-1 (23)
(21) = m+n-1
Herre, in each term on the left the sum of the
It is left to the reader to obtain in this fashion superscripts is equal to n - 1, the sum of the
formulas for the sums of higher powers of the
natural numbers.
subscripts is n + m - 1. The subscripts are
constant and the superscripts vary. Another way
It is possible to classify m-combinations (with of writing this equation is
repetitions) of elements of n types by taking
as the basis the number of distinct elements cOpemn-p +C1cm-1 p n-p =enm
p n-p + ... + cmcO (23')
which enter into a given combination. In other
words, the first class will involve combinations We will now derive a similar formula in which
consisting of the same elements, the second class the subscripts in the summation vary too. To do
will be made up of elements of two types, ... , this, take p distinct vowels and n - p distinct
the nth class will consist of elements of all n consonants and form all possible m-combinations
types (naturally, if m < n, there will only of them with repetitions. Split these combina-
be m classes). tions into classes, referring to the kth class such
Let us compute the number of combinations combinations as contain k vowels and m - k con-
in each class. We can take two stages to choose sonants. Compute the number of combinations
the combinations that belong to the kth class. in the kth class. Each combination of this class
Let us first choose precisely the k types that is partitioned into a k-combination (with repe-
enter into a combination. Since the total number titions) made up of p vowels, and an (m - k)-com-
of types is equal to n, this choice can be made bination (with repetitions) made up of n - p
in C~ ways. After the types have been chosen, consonants. Thus, the kth class includes
k
C k+P-1 m-k
we have to form those m-combinations (with C m+n-p-k-1 combinations. Consequent-
repetitions) of elements of these k types in which ly, the total number of combinations under
all the k types are represented. But we have consideration is equal to
proved (see page 32) that the number of such com- cOp-1 emm+n-p-1 + c1cm-1
p m+n-p-2+ · · • +
binations with repetitions is equal to cm-k =
cll-1 m-1 em CO
m-1· __j_
T m+p-1 n-p-1
3*
36
On the other hand, these combinations yield to composition, that is, as to the number of ele-
all possible m-combinations (with repetitions) ments of the first, second, ... , qth type. Thus,
of elements of n distinct types and therefore each class is characterized by natural numbers
their number is equal to c::+n-l· We arrive at (m17 m2 , • • • , mq) satisfying the inequalities
the identity 0 .;:;;;; mi .;:;;;; ni. It consists of m1 elements of the
first type, m2 elements of the second type, ...
c~_ 1 c~+n-P- 1 +C!c~+~-P- 2 + ... + ••. , mq elements of the qth type, and
+ c~+P-1 c~-p-1 = c~+n-1 (24) m, + m2 + ... + mq = m. We shall denote
such a class by A (m17 • • • , mq).
Let us rewrite this identity so that, in summing, From the rule of product it follows that class
only the subscripts vary. This requires applying A (m17 • • • , mq) includes c:'c:;,2 • •• C'!/:l com-
to all terms the identity C~ = C~-q· We get binations. Summing the number of combinations
(2-1cn-p-1 p m+n-p-2 -+
+CP-1cn-p-1 over all classes, we obtain the identity
P-1 m+n-P-1
p-1 cn-p-1_ ~ cm,cmz cmq- em
n1 na • • • nq - n (27)
+ • · • +cm+p-1 nn-1
n-p-1-'-'m+n-1
L.J

This formula may be rewritten as follows (we where n = n1 + + ...


n2 + nq and the sum-
replace p by p+1, n by n+2, andmbym-n): mation is extended over all possible combina-
tions of the natural numbers (m17 m2 , • • • , mq),
c~c~;:_PP + c~+ 1 ~-:_PP_ 1 + ... + c~-n+P C:=~ = where m1 + m2 + ... + mq = m.
If we take combinations with repetitions,
=~~\ (24') we get a similar identity,
We see that when summing, the superscripts 2} c~,1+m1-1 - ~z\mz-1 •••
remain fixed and the subscripts vary, the sum
of the superscripts being equal to n and that ••• cmq
nqi-mq-1 = emn+m-1 (28)
of the subscripts, m.
Note a particular case of the earlier obtained where, again, n = n1 + n 2 + ... + nq and the
formula (23'). If we put n - p = m in it, we get summation is over the same combinations of
numbers (m17 m 2 , • • • , mq)·
c~c~ + c!cin + ... + c;c~ = c;+m (25) Another property of combinations is establi-
shed thus. We have the identity
In particular, for p = m we have
(29)
(C~)2+(C!)2+ ... + (C~)2=C~P (26)

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

COMBINATORIAL PROBLEMS WITH RESTRICTIONS 39


Up to now we have considered problems in since 4.5 : 0.5 = 9, there are 10 places where the
which the order of the elements in combinations step can be made. We thus have to pick 5 places
was not restricted by any additional conditions. out of 10. This can be done in
Either (as in permutations) any order was per-
missible, or (as in combinations) the order was
disregarded completely. We shall now examine
some problems in which the order of the ele-
ways.
ments is restricted. Generally, if there are to be k steps, and the
length A C accommodates n steps, then the stair-
LIONS AND TIGERS way can be built in C~+l ways.
This problem is much like the animal-trainer
A trainer of wild animals has to take 5 lions problem in that the trainer did not want two
and 4 tigers out into the circus ring so that no tiger
follows another one. In how many ways can he
handle the job?
First line up the lions so that there are gaps
between each pair. This can be done in 51 = r---f---1,-1
I
= 120 ways. There are four gaps. Adjoining A
the two positions in front and in back, we get
a total of 6 positions for placing the tigers, Fig. 8.
no two following one another. Since the order
of the tigers is essential, the number of ways
tigers together, and the builder cannot allow
of placing them is equal to the number of 4-per-
for steps of double height. But there is an essen-
mutations of 6, or A! = 360. Combining each tial difference between the problems. The trainer
arrangement of the lions with one arrangement had to bear in mind the order in which the tigers
of the tigers, we get 120 X 360 = 43,200 ways
marched: it is one thing to have tiger Shah come
of leading the animals into the ring.
out first, and quite a different matter if tiger
If the animal trainer had n lions and k tigers, he
could solve the problem in PnA~+t =t' (n+ 1)!
n-k+1)!
Akbar does. It makes no difference to the car-
penter, since the rises are all the same. Besides,
the animal trainer had to take into account the
ways. This is only possible provided k ~ n + 1,
otherwise two tigers will come together. order of the lions as well, while all positions
permitting a rise are the same for the carpenter.
The stairway builder thus has fewer choices
BUILDING A STAIRWAY than the animal trainer. If the stairway were
1.2 metres in height and 2.5 metres in length,
The job is to build a stairway from point A to then there would be 4 steps and 6 sites for placing
point B (Fig. 8). The distance from A to C is them, and the answer would be C! = 15, whereas
4.5 metres, from C to B, 1.5 metres. Each step the animal trainer would, in precisely the same
is 30 em high and the width is an integral multiple situation, have 43,200 possibilities. This is
of 50 em. In how many ways can the stairway be because he could permute 5 lions in 51 = 120 ways
built? and 4 tigers in 41 = 24 ways, making a total
From the conditions of the problem it is evi- of 120 X 24 = 2,880 ways and 15 X 2,880 =
dent that the stairway must have 5 steps, and, = 43,200.
40
The stairway problem can be stated thus:
In how many ways can n zeros and k ones be
placed so that no two ones come together?
Each stairway can be labelled with a sequence
of zeros and ones: a zero denoting the place
where the polygonal line goes to the right and
a one where it goes up. To illustrate, take the
stairway in Fig. 8 and label it. We get the sequen-
ce 100101001010010. Here, no two ones are
adjacent because there are no double-height
steps in the stairway. And so the number of
sequences of n zeros and k ones in which no two
ones occur in succession is equal to the number
of stairways, that is C!+r

A BOOKSHELF PROBLEM

A bookshelf has 12 books. In how many ways


can 5 books be selected so that no two of them stand
side by side? In how many ways can this be done without includ-
This problem reduces to the one just solved. ing enemy knights?
Label each choice of books by a sequence of zeros This problem resembles the bookshelf problem,
and units, namely, mark each remaining book but differs in that the knights are in a circular
with a 0 and each removed book with a 1. This arrangement, not a linear arrangement. True,
yields a sequence of 5 units and 7 zeros. And it is easy to reduce the case to one in which the
since we are not allowed to take two adjacent knights occur linearly. To do this, take a knight,
books, the sequence will not have two units in say Lancelot. All chosen combinations of knights
succession. But the number of sequences made fall into two classes, one set of combinations
up of 5 units and 7 zeros, in which no two units including Lancelot, the other excluding him.
appear in succession, is equal to c:
= 56.
Generally, if a bookshelf accommodates n
Let us compute the number of combinations
in each of the classes.
books and k books are removed so that no two If Lancelot sets out to liberate the princess,
are adjacent on the shelf, then this can be done then neither the man on his left nor the man on
in C!-kH ways. From this we see that the problem his right can participate. There remain 9 knights
is solvable only when 2k - 1 ~ n. from which 4 are to accompany Lancelot. Since
the knights next to Lancelot do not participate,
our sole concern is to see that there are no enemies
among the 4 knights, that is, that no two sit
KING ARTHUR'S ROUND TABLE together. But by excluding Lancelot and the two
knights on each side of him, we break the circle
Tweh-e knights are seated at the Round Table. of knights and we can assume what we have to be
Each one is hostile to his neighbours. Five knights a linear arrangement instead of a circular one.
are to be selected to release the enchanted princess. Now it is possible to choose 4 knights out of 9 in
41
the desired fashion in c:= 15 ways. Which
means there are 15 combinations in the first class.
Now we consider the number of combinations
that enter into the second class. Since Lancelot
does not participate, he is excluded. This breaks
the circle of knights and their interrelationships,
leaving 11 knights in a line. We have to choose
5 men for the mission, none of whom sit side
by side. This can be done in C~ = 21 ways.
Thus, the total number of ways is equal to
15+21=36.
Generally, if there are n knights at the Round
Table and we have to choose k knights so that no
two of them sit next to one another, then the problem
k-1
can be so l ved in Cn-k-1 + k
Cn-k ways.
This assertion is proved in exactly the same
way. All combinations of knights are partitioned
into two classes depending on whether Lancelot
does or does not participate. There will be
c!:L 1 combinations in which he does participa- cases she could produce complete confusion (not
te, and c!-k combinations in which he does not. a single person gets his own papers).
It is easy to verify that This problem can be stated as follows. We take
all permutations of 5 numbers 1, 2, 3, 4, 5. How
c~<-1
n-k-1
+Ckn-k-
__ n_ ck
n-k n-k
many cases do we have in which not a single number
occupies its original position? The solution is
For example, when n=12, k=5, we get carried out on the basis of the principle of inclu-
sion and exclusion (see page 18). Denote by (a)
12 5 12 the property of a permutation such that the
7 xc 7 =-.,x21=36
number a is in its original position, and by N a..
denote the number of permutations with this
property. In the same way, denote by N a.(J the
SHE'S GOT A DATE number of permutations having properties (a)
and (~) at the same time, that is such that both,
That's the title of a film in which two pleasure a and ~ occupy their original positions. The
seekers arrive at a resort town without any iden- notations N a.13Y• etc. have the same meaning.
tification papers. The papers are then sent by Finally, denote by N< 0 > the number of permuta-
mail, but the girl at the post office has a date tions that do not have a single one of the proper-
and by mistake switches the two envelopes. ties (1), (2,) (3), (4), (5), that is to say, permuta-
It's lucky there aren't five envelopes involved tions in which not a single number occupies its
or there would be five grumpy fellows spending original position. By the principle of inclusion
the night on park benches. and exclusion, we have
True, that is not exactly so because she might, N<O>=N-Nt-N 2 -Na-N4-N5+Nt2+ ...
just accidentally, put some of the papers in the +N45-N12s- ·. · -Na45+Nt,za4+ ...
right envelopes. Let us now compute in how many · ·· + N z,345- N 12,345 (1)
42
where N = P 5 is the total number of permuta- papers. This could occur in
tions of 5 elements (see page 19).
This problem is simplified by the fact that P 4 - GiP3+ GiP2- CfFt + GtPo= 9
the properties (1), (2), (3), (4), (5) are all of ways. But since any one of the addressees could
equal status. It is therefore clear that N 1 = be the lucky one, the total number of ways in
= N2 = ... = N 5 • In the same way, we which precisely one person gets the letter addres-
have N1 2 = N 23 = ... = N, 5 because it is sed to him is equal to 5 X 9 = 45.
all the same whether 1 and 2 or 3 and 4 remain Check for yourself that precisely two persons
fixed. But the number of pairs that can be chosen get their papers in 20 cases, three in 10 cases,
from the numbers 1, 2, 3, 4, 5 is equal to c; four in 0 cases and five in 1 case. The result for
{properties (1, 2) and (2, 1) coincide, and so we four is due to the fact that if four receive their
are not interested in the order of the numbers letters, then the fifth letter is correctly addressed
chosen in a pair l. too.
Also, we have C! triples,c: quadruples and C!
quintuples. And so we can rewrite formula (1) as
To summarize, 120 distinct permutations of
5 elements break up into 44 permutations in
which not a single element remains fixed, 45 per-
N<O> = N- qNw + qN<2>- qN<3> +
mutations in which exactly one element remains
+ctN<4>-qN<5> (2) fixed, 20 permutations in which two elements
For brevity, we use N<h> to denote the number remain fixed, 10 permutations in which three
<>f permutations in which the given k numbers elements remain fixed, and 1 permutation in
remain fixed. To complete the solution, we have which all elements occupy their original positions.
yet to find the values of N<h>, k = 1, 2, 3, 4, 5.
Use N< 1> to denote the number of permutations
in which a given number, say 1, remains fixed. A SESSION IN TELEPATHY
But if the number 1 remains fixed, the other
numbers can be permuted in P ~ = 24 ways. Some believe that it is possible to read a per-
Hence, N< 1> = P~. Also, if numbers 1 and 2 son's thoughts at a distance. To verify this we
remain fixed, then the other three numbers can conduct experiments. In ~:~orne room a person
be permuted in P 3 = 6 ways. Thus, N< 2 > = picks up so-called Zener figures (Fig. 9) in a certain
= P 3 = 6. Similarly, we find that sequence. The telepathist has to guess the order
in which these figures are picked up.
N< 3>=P 2 =2, N<4>=Pt=1 and N<5>=P 0 =1
We assume that the figures were picked up
Substituting the values of N<l>, N<2>, N<3>, N<4>, without repetition. Then the total number of
N<5> thus obtained into formula (2), we get possible permutations of these figures is 5! = 120.
N<O> = P5- qp4 + qPa- CfP2+ GtPt- qPo In one session, only one of these permutations
is utilized. The telepathist names a different
=120-5 X 24+10 X 6-10 X 2+5 X 1-1 X 1 =44
permutation of the figures, and his success is the
Consequently, in 44 cases out of 120 not a single greater, the larger the number of figures he gues-
addressee would have received his identification ses. From the computations carried out on pages 41
papers. to 42, it follows that random guessing would
Using the same approach, we can find out in produce approximately the following results:
how many cases exactly one addressee would get not a single figure would be guessed in 44 cases
his papers. If this lucky fellow were the first out of 120, one figure in 45 cases, two in 20 cases,
Qne, then all the other 4 would have the wrong three in 10 cases and all five figures in one case.
43
Let us see whether there is any change in average
correct guessing if repetitions are allowed for.
In this case we have permutations with repeti-
tions. But the number of such permutations
of n elements in which not a single element is in
its "proper" position, is equal to (n- 1)n.
Indeed, any element (except the first) can occupy
the first position; the second position can he
occupied by any element except the second one,
etc. In other words, there are n - 1 candidates
for every position. By the rule of product, we
conclude that the total number of possible com-
binations is (n - 1)n.
Let us find out in how many cases exactly one
element occupies its proper position. If it does
(say the first), then there are another n - 1 posi-
tions to be occupied, with n - 1 candidates
aspiring to each position (all elements with
the exception of the rightful owner, so to say).
Hence, the number of permutations in which
the first and only the first element is in its proper
On the average, random guessing turns up the fol-
position is (n - 1)n-1 • But since any one of the
lowing number of correctly chosen figures:
n elements can occupy its proper position, the
45+20x2+10x3+5 =i number of permutations where precisely one ele-
120
ment has not been displaced is equal to
which is to say, one figure is guessed out of five. n (n- 1)n-1 • In exactly the same way, we prove
For n distinct figures, one out of n will, on the that the number of permutations in which exactly k
elements have not been displaced is c~ (n -1)n-k,
For example, in the case of five distinct ele-

DO ments we get the following result: the number of


permutations with repetitions in which all ele-
ments have been displaced (deranged) is equal
to 46 = 1,024; there are 5 X 4' =1 ,280 permu-

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
~

the caravan turns around, the lame camel is the


leader". In exactly the same way we can prove that th&
First, label the camels in the original order number of permutations of n numbers 1, 2, 3, ...
from the end to the beginning with the numbers 1, •.. , n that do not contain a single one of the
2, 3, 4, 5, 6, 7, 8, 9. The last camel gets No. 1, pairs (1, 2), (2, 3), ... , (n- 1, n) is given by
47
the formula (2, 3), ... , (n- 1, n), the permutations reject
En =Pn- C!_ 1Pn-1 + c;_ Pn-2-CL 1Pn-a+ ...
1
the pair (n, 1) as well. Arguing in the same fashion~
we find that the answer is given by the formula
... + (-1)n-1 c~:~P 1
n-1 n-2 n-3
Fn =Pn- C!Pn-t + C!Pn-2-· ..
=-(n-1)! [ n--1,-+-2!_ _ _
3!-+ .... +(-1)kC!Pn-k+ ... +(-1)n-1c:-1p1=

•.. +
(-1)n-1
(n-1)!
J (10)
1 1 (-1)n-1]
=n! [ 1-11+2!- ... + (n- 1)! = nDn-1

Let us express the result in terms of subfac- (13)•


torials. To do this, split each summand in the Indeed, in this case the number of forbidden
right-hand member into two:· pairs is n, while there is no permutation includ-
( -1)k (n- k) (-1)kn (-1)k-1 ing all n pairs, because if, say, a permutation:
k! k! + (k-1)! includes tho pairs (1, 2), (2, 3), ... , (n- 1, n)~
then the first element is 1 and the last is n,
We get
and so the pair (n, 1) does not occur in the per-
1 1 mutation. That is why the last term in (13) is
En=n! [ 1-11+2!- ...
(-1)n- 1 c~- 1 P 1 and not (-1)n C~P 0 = (-1)n.

... +
(-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 ({-)

such permutations. ~·. l-2s+1 cs[~-s ~+s-1-1]


L.. l- s+ 1 l m-k-l- m+k-l
After the first part of the permutation has pas.. s=O
sed, the cashier will have l - 2s 50-copeck pieces.
The second part of the permutation consists k-m+1 ~ (23)
= k+1 m+k
of k - l + s letters f and m - s letters r. The
number of permutations under which this part (Here, C? is zero for p < 0.) The reader will
of the line moves without stopping is computed find it easy to derive similar relations establishing
from formula (17) (see page 50), in which it is various methods of partitioning permutations
necessary to replace q by l - 2s, m by m- sand into classes.
k by k - l + s. From this formula it follows that
the second part of the permutation can be chosen
. em-s
m m+k-l ways. B y th e rue
m+k-l - cm+s-1-t 1 of * E (~) denotes the greatest integer in~·
CHAPTER IV

THE COMBINATORICS OF PARTITIONS 54


In the preceding problems involving permuta- DOMINOES
tions and combinations of given elements we con-
structed various combinations and computed In a game of dominoes, 4 players split 28 pieces
the number of such combinations under certain equally. In how many ways can this be done?
restrictions. We were hardly ever interested The pieces (men) can be divided as follows.
in the fate of the elements that remained after First put all 28 pieces in a row. The first player
choosing the combinations. The problems we are then takes the first 7, the second the next 7, the
about to investigate are of a different nature. third the following 7, and the fourth player takes
Here the elements are separated into two or more the remaining 7. This is clearly a way to obtain
gro.ups and we have to find all possible ways of all possible partitions of the pieces.
such partitioning. Since the number of permutations of 28 ele-
A variety of cases arise. At times, the order ments is 28!, it might appear that the total
of the elements in the groups plays an essential number of all ways of splitting up the dominoe3
role: say, when signal flags are hung on mar,;ts, is equal to 281. This is not so because for the
the order in which the flags are arranged is essen- first player it is immaterial whether he picks
tial-and not only what flag is on which mast. up a double 6 first or a 3 : 4 domino; he is only
In other cases, the order of the elements in thr interested in the final result. For this reason,
groups is completely irrelevant. When a dominn any permutation of the first 7 pieces is of no
player takes pieces from a pile, the order in consequence. The same goes for any permutation
which he draws them is immaterial; the impor- of the next batch of 7 pieces, the third batch and
tant thing is the final result. the last batch as well. By the rule of product,
Problems also vary as to the role played by the we have (71) 4 permutations of the pieces that
order of the groups themselves. In dominoes, the do not alter the result of the partition.
players sit in a specific order; both how the Thus, 28! permutations of the dominoes are
pieces are distributed and who gets which pieces divided into groups of (71) 4 permutations in
are of importance. If I am putting photographs each group; permutations of any one group lead
into ide.1tical envelopes to send to a friend, the to the same distlibution of the pieces. Hence, the
distribution of photos among the envelopes is : 'd'mg the p1eces
. . (281
number of ways of d 1v1 1s 7 l)' .
important but not the order of the envelopes
themselves because they will be mixed up at This number is approximately equal to 4.7 X
the post-office in any case. X 1015 •
Another factor of importance is whether we The same result may ba obtained by a different
distinguish the elements among themselves or approach. The first player selects 7 pieces out
not, and whether we distinguish between the of 28. Since the order of the pieces is immaterial,
groups into which the elements fall. Finally, he has C~ 8 choices. Then the second player chooses
in some problems there will be empty groups 7 pieces out of the remaining 21 pieces. He can
(not containing a single element), in others such do that in C~ 1 ways. The third player chooses
groups will be inadmissible. All this gives rise from 14 dominoes and so has c~, opportunities
to a variety of combinatorial problems involving of choice. Finally, the fourth player takes C~,
partitions. which is the only choice left.
By the rule of product, we find that the total
number of possibilities is
28! 211 141 28!
q,CIICI,Ci= 21! 7! X 14! 7! X 7! 71 = (7!) 4
55
The proof is exactly the same for the case This formula cropped up earlier when we were
~hen in the card game of preference, 32 cards are solving what appeared to be quite a different
dealt to three players, each getting 10, and two problem:
cards for the widow. The number of distinct There are k distinct types of objects. How many
deals is distinct permutations can be made up out of n 1
objects of the first type, n 2 objects of the second
321 type, ... , nk objects of the kth type?
2, 753,294,408,504,640
10! 101 10! 2! Here too, the answer was given by the formula
nl
The reader may ask whether it is worth wasting P (nh n 2, ••• , nk) =
n 11• n 2 1•••• nk.1
time on the study of card games. If so, he will
do well to recall that the study" of games of chance where n = n1 + + ... +
n2 nk (see page 26).
served as the impetus to the initial development To see how these problems are related, number
of combinatorial mathematics and the theory all n positions that our objects can occupy.
of probability. Such outstanding mathematicians Each permutation is associated with a distribu-
as Pascal, Bernoulli, Euler and Chebyshev shar- tion of the number labels of the places into k
pened the ideas and methods of combinatorics classes. The first class contains the labels of those
and probability theory on problems involving positions occupied by objects of type one, the
coin tossing, dice and cards. Many of the ideas second class, the labels of positions of objects
of the theory of games (a division of mathematics of type two, etc. We have thus established a cor-
which finds wide application in economics and respondence between permutations with repeti-
military affairs) originated in studies of the tions and the placing of number labels of posi-
most elementary models of card games. tions into "cells''. Naturally, the formulas for
solving both problems are the same.

PLACING OBJECTS INTO CELLS


A BOUQUET OF FLOWERS
Problems involving dominoes and preference
are in the class of combinatorial problems that In the problem of placing objects into cells
deal with placing objects into cells. The general we considered as known the quantity of objects
statement of such problems is: going into each cell (for instance, the number
Given n distinct objects and k cells, place into the of pieces that each player takes). In most problems
first cell n 1 objects, into the second n 2 objects, . •. involving the division of objects, these numbers
+ +
• . . , into the kth cell, nk objects, where n 1 n2 are not indicated .
+ ... + nk = n. In how many ways can such Two girls have picked 10 bluebells, 15 bachelor's
buttons and 14 forget-me-nots. In how many ways
a distribution be accomplished?
In the domino problem, the players were cells can they divide the flowers?
and the pieces were the objects. Reasoning in the It is clear that the bluebells can be divided
same fashion, we get the answer in the general in 11 ways: the first girl can either take no blue-
form: the number of distinct ways of placing bells at all, or 1 or two etc. up to 10 bluebells.
objects into cells is In the same way, the bachelor's buttons can be
divided in 16 ways, the forget-me-nots in 15 ways.
Since the flowers of each kind can be divided
(1)
independently of the flowers of another kind,
56
we get, by the rule of product, 11 X 16 X 15 = the prime factors will be distributed between N 1
= 2,640 ways of dividing up the flowers. and N 2 • If factor Pi appears in N 1 a total of m1
True, there will be some very unfair divisions, times, j = 1, ... , k, then the factorization is
lik0 when one of the girls gets no flowers at all. of the form
Let us therefore introduce a restriction, say
that each of the girls is to receive at least 3 flowers N=(pf! ... P:k)(lr-mt ... p;k-mk)
of each kind. Then the bluebells can only be Thus, the factorization of N into two factors
divided in five ways, the first girl taking 3, 4, 5, 6 reduces to dividing n1 elements of one kind, n 2 ele-
or 7 flowers; the bachelor's buttons in 10 ways, ments of a second kind, ... , and nk elements
the forget-me-nots in 9 ways. In this case, the of a kth kind into two parts. Now, formula (2)
flowers can be divided in 5 X 10 X 9 = 450 di- shows that this can be done in (n 1 +1) ..•
fferent ways.
Generally, if we have n1 objects of one kind,
. .. (nk + 1) ways. Hence, the number of divi-

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)

ways. In particular, if all the objects are distinct PICKING APPLES


and their number is k, then n1 = n2 = ...
. . . = nk = 1 and so there are 2k modes of distri- Three boys picked 40 apples. In how many ways
bution. can they divide them if all the apples are conside-
But if a restriction is imposed that each of red to be the same (that is, we are only interested
the participants in the distribution is to get at in the number that each boy gets and not in the
least s1 objects of the first kind, s2 of the second quality of the apples, etc.)?
kind, ... , sk of the kth kind, then the total We solve this problem by adding two identical
number of ways of dividing the objects is given pears and then permuting the 40 apples and
by the formula 2 pears in all possible ways. Using the formula
for permutations with repetitions, we get
(nt-2st+1) (n 2 -2sd 1) ... (nk-2sk+1) (3)
42!
We leave it to the reader to prove these asser- P (40, 2) = Ci2 = 401 21 = 861
tions.
permutations. But each permutation is associated
with its mode of dividing the apples. The first
THE NUMBER-OF-DIVISORS PROBLEM boy gets all the apples from the first to the first
pear, the second boy gets the apples lying between
Formula (2) derived above enables us to solve the first and second pear, and the third boy
the following problem which appears in the takes the apples that follow the second pear.
theory of numbers. The various permutations correspond to different
Find the number of divisors of a natural num- ways of dividing the apples, of which there are
ber N. To do this, factor N into prime factors: thus 861 ways. True, it may turn out tHat one
N -- Pn1 nk wh ere Pt. ... , Pk are d'1st'met
n2 ••• P11.
1 P2 (or even two) of the boys will get no apples at
prime numbers. For instance, 360 = 2a X 32 X 5. all. For instance, this will happen if one of the
When N is factored into two factors, N = N 1N 2 , pears comes at the beginning of a permutation,
57
then the first boy loses out; if this occurs at the Now if each one of the kids gets at least one
end, the third boy doesn't get any apples. And mushroom of each kind, then we have
if the two pears come together, the second boy
qq 4 C~= 1,070,160
is the complete loser. Now figure out what happens
if both pears come at the beginning or at the end. When n distinct objects are divided among k
In exactly the same way we prove that n identi- persons without restrictions, then each object
cal objects can be partitioned in may be delivered in k ways (by giving it to one
of the participants). The number of solutions is
P (n, k-1)=~+k- 1 =C!:t-L 1 (4)
therefore kn.
ways among k persons. By way of illustration, 8 different cakes can
Now suppose, for the sake of equity, it is be divided among 5 persons in 58 = 390,625 ways.
agreed that each participant gets at least r objects.
Here, we begin by giving r objects to each person.
There will then remain n - kr objects which MAILING PHOTOGRAPHS
can now be distributed in arbitrary fashion,
which, as we have alr ady seen, can be done in I want to send a friend of mine 8 different photo-
k-1 k-1 graphs. In how many ways can I do it if I use-
Cn-kr+k-1 = Cn-k(r-1)-1 ways.
In particular, if each of the k participants is to 5 different envelopes?
receive at least one object, then the problem is solved This problem is similar to the one discussed
in c~:-11 ways. at the end of the preceding section. The answer
The latter result may be derived differently. would seem to be 58 = 390,625. But we will
Let us arrange the given n objects in a row. There not accept empty envelopes, and so a fresh restric-
will then be n - 1 gaps. If arbitrary k - 1 of tion is imposed-there must be no empty enve-
these gaps are filled by separating barriers, then lopes. To take into account this restriction, let
all objects will be divided into k nonempty parts. us apply the principle of inclusion and exclusion
Then the first part is given to the first person, (the answer C~:-l is wrong because the photographs.
the second to the second person, etc. Since it is are different).
possible to place k - 1 barriers in n - 1 gaps Let us first find out in how many cases a given
in C~:-11 ways, the number of modes of division set of r envelopes are empty (the others may
is c~:-/- be empty or may contain photographs). In this
case, the photos are placed without restriction
into 5 - r envelopes and, by what has been
HUNTING MUSHROOMS proved above, the number of such distributions.
is (5- r) 8 •
If objects of different kinds are being divided, But we can choose r envelopes out of five
then we have to find the number of modes of in C~ ways. Whence, using the principle of
division for each kind, and then multiply the inclusion and exclusion, we conclude that the
numbers. Solve the following problem. number of distributions (no envelopes empty) is.
In how many ways is it possible to divide 10 mea-
5B-q X 4B+CiX 38-q X 2B+ct X 18= 126,020
dow mushrooms, 15 fairy-rings and 8 chanterelles
among 4 children? In the very same way we can prove that if we
Using the results of the preceding section, we are sending n different photographs in k distinct
see that the answer looks like this envelopes, not a single envelope being empty,
C13Cf8Cf1 =41,771,040 then the number of modes of distribution is
58
.expressed by the formula modes is C~:tL 1 ). Suppose this mode consists
kn-q (k-i)n+q (k-2)n- ... +(-i)k-1 X in arranging n1 flags on the first mast, n 2 flags
on the second, ... , nk flags on the kth, where
X c~- 1 X 1n (5)
n1 n2+ + ... + nk = n. Then we take the
The reader should be able to handle the follo- first n 1 flags of the given permutation and hang
wing problem. them on the first mast in the order obtained; then
There are n 1 objects of one kind, n 2 objects of the next n 2 flags on the second mast, etc. Clearly,
a second kind, ... , n 8 objects of an sth kind. if we use all permutations of n flags and all modes
In hew many ways can they be distributed to k per- of distributing n identical flags among k masts,
-sons so that each person gets at least one object? we will get all ways of solving this problem.
The answer is By the rule of product, we find the number of
ways of arranging the flags to be
c"-1 c"-1
nt+k-1 n2+1<-1 •••
c"-1 c1c~<-2
n +1<-1- h nt+k-2 X (n+k-1)! n
8
'c"-1
n. n+k-1 (k-1)! =An+k-1 (7)
c"-2
X n2+h-2 •· •
c"-2
n 8 +k-2
+C2c~<-3
k nt+k-3 X Generally, if we have n distinct things, then the
Xc"-3
n2+k-8· · c"-3
n 8 +k-3-·•· + (- 1),._1 c"-1
k (6) number of ways of distributing them into k distinct
boxes, with regard for order of arrangement in the
For example, if we divide 8 apples, 10 fpears boxes, is A~+k-t·
.and 7 oranl!"es among 4 children, each receiving The same result can be attained in a different
.at least one item, then the division is possible in manner. Add to the n things being distributed
k - 1 identical balls and consider all possible
.CftCfaCfo- ClCfoq2q + qqqtq- Cf = permutations of the resulting n + k - 1 objects.
=5,464,800 Each permutatioiJ determines one of the distri-
ways. bution modes. Namely, the first box receives all
objects in a permutation up to the first added
ball (if the first object in the permutation is one
of the added balls, then the first box remains
FLAGS ON MASTS
empty). Then put in the second box all objects
between the first and second ball, ... , in the
Up to now we have not considered the order kth box, all objects following the (k - 1)th ball.
in which the elements of each part are arranged. We then obviously have all distributions of the
Some problems require that the order of the objects having the indicated properties. However,
.elements be taken into account. the number of permutations of n distinct objects
There are n distinct signal flags and k masts and k - 1 identical balls is
to attach them to. The meaning of a signal depends
en the order in which the flags are arranged. In (n+k-1)!
-how many ways can they be arranged if all flags
p~ k-i)= 1! ... 1l(k-1)!
.are used but some of the masts may be empty? n times
Each mode of hanging the flags can be accom-
plished in two stages. In the first stage, we per- =A~-k-1
mute the given n flags in all possible ways. The solution is similar in the problem where
This can be done in nl ways. Then we take one every mast must have at least one flag (or, what
..of the modes of distribution of n identical flags 's the same thing, each box must contain at
.among k masts (recall that the number of such least one object). Using the formula derived on
59
page 57, we find that in this case we have n! of the molecules of a given gas have such and
C~::-11
modes of distribution. This same result such a velocity for a given temperature? Here,
may also be obtained by choosing division points the set of all possible states is distributed over
among n - 1 gaps. a large number k of tiny cells (phase states) so t~t
each of the n particles lands in a cell.
The question of what particles obey what sta-
TOTAL NUMBER OF SIGNALS tistics depends on the particle type. In the clas-
sical statistical physics developed by Max~ell
Up to now we assumed that all flags have to be and Boltzmann, the particles are considered
used for the transmission of a signal. But some to be distinguishable. Molecules obey this sta-
signals may require only a portion of the flags tistics. We know that n distinct particles can be
and some of the masts may be empty. Let us find distributed into k cells in kn ways. If for a given
the total number of signals that can be transmitted energy, all these kn ways are of equal probability,
by means of n signal flags hung on k masts. ·then we speak of the Maxwell-Boltzmann statistics.
Partition the signals into classes according It turns out that not all physical entities
to the number of flags participating in a signal. obey this statistics. Photons, atomic nuclei and
By formula (7), using s given flags we can trans- atoms containing an even number of elementary
mit A~+k- 1 signals (the number of masts is k). particles obey a different statistics developed
But there are C~ ways of choosing s flags out of n. by Einstein and Bose (of India). In the Bose-
Therefore the number of signals in the sth class Einstein statistics, the particles are indistingui-
is C~A~+k- 1 • Hence the total number of signals shable. Therefore, the only important thing is
is given by the formula how many particles reside in a cell and not the
type of particles there. This problem is similar
C~AL 1 +C~A~+c;Ai~ 1 + ... +C:A!+k- 1 (8) to the apple-dividing problem (see page 56).
For example, using 6 distinct flags on 3 masts, We already know that in such an approach, we
we can transmit have c!+L1 = c~+k-1 distinct modes of par-
1+ C~A~+ CiA!+ OlAf+ C:A3+ CiA~+ GgA: = titioning the elements. In the Bose-Einstein
=42,079 statistics, all these modes are considered to be of
equal probability.
signals. However, many particles, such as, for example,
If no masts are allowed to be empty, then in electrons, protons and neutrons, do not obey
"Place of (8) we have the Bose-Einstein statistics. Here, a single cell
c!c~:1kl+c!+ 1 c~- 1 (k+1)1+c!+2c~+1 x accommodates at most one particle and distinct
distributions satisfying this condition have the
X (k+2)1+ ... +0:C!:1n! (9) same probability. In this case there can be C~ dis-
ways. tinct distributions. This statistics is called
the Fermi-Dirac statistics.

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).

• • • • • • The foregoing reasoning shows that if N is not


3n2+n
, then It. has an equal
• • • •
• • • • .
(~',
''
' ' ',...._.)
• • • •
• • • • •
a number of the form --2
number of partitions into an even and into an
odd number of distinct summands. If N = 3n 22± n
Fig. 17 b. and n is even, then there remains one array that
does not allow for the transformation and has
trapezoid, all the rows in the newly obtained ar- an even number of rows. And so there will be one
ray will have unequal length. Finally, the new more partition into an even number of summands
array contains as many dots as the original one,
but the parity of the number of rows has changed: than into an odd number. But if N = 3n2 n :=
the new array contains one more row. The same and n is odd, then there will be one more parti-
operation can be performed on arrays consisting tion into an odd number of summands. The proof
of one trapezoid if n ~ m- 2. Fig. 17b is an of the theorem is complete.
CHAPTER V

COMBINATORICS AND CHESS 70


WANDERING ABOUT TOWN No matter what route he takes, it is obvious
that he will pass through k + n intersections
Fig. 19 is a portion of the city plan of Canberra, (counting A but not B).
Australia. Here, there are n X k rectangular city At each intersection he can go either to the
blocks separated by n - 1 "horizontal" and k - 1 right or upwards. All intersections accordingly
"vertical" streets. A person is moving from A to divide into two classes. Label with 0 those inter-
sections where he goes rightwards and with 1
those where he goes upwards. Since the number
of intersections of the first class must be k, and of
the second clliss, n (otherwise he will not reach
B), we obtain a permutation of k zeros and n
ones. Conversely, each such permutation repre-
sents a route. In Fig. 19 we have a route associa-
ted with the permutation 0110001100.
But the number of permutations of k zeros and
n ones is

(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

rules of checkers (draughts), this piece can reach


any square in the region bounded by the straight Here, the intersection of the kth vertical and the
lines AB and AC. Again write down in each nth horizontal yields the number C~ (the extreme
square the number of ways of reaching it.
We see that these numbers actually coincide with * Tartaglia was a remarkable mathematician. Besides
the arithmetic triangle, he discovered a formula for sol-
the numbers of the arithmetic square, only they ving cubic equations. He mentioned this formula to ano-
are arranged differently, and no wonder: all we ther Italian mathematician G. Cardano, who promised
not to divulge the secret. But Cardano soon published
have to do is turn the board through 45° and our the solution in his algebra, and so the formula for sol-
ving cubic equations is unfairly called the "Cardano for-
piece will move along horizontal and vertical mula".
73
lines, it will be recalled, have zero numbers). Table 6
Each number of the triangle is equal to the sum
of the number above it and the number of the 0 1 -5 15 -35 70 -126
preceding row upward left. To illustrate, take 0 1 -4 10 -20 35 -56
4: in the fourth row above it is 1, upward to the 0 1 -3 6 -10 15 -21
left, 3, and so 4 = 1 + 3. 0 1 -2 3 --4 5 -6
Other peculiarities of the arithmetic triangle 0 1 -1 1 -1 1 -1
are: all elements above the principal diagonal are
equal to zero, and the zeroth column consists of units. 0 0 0 0 0 0
1
The numbers in the nth row of the arithmetic 0 1 1 0 0 0 0
triangle, that is the numbers c~ for fixed n, 0 1 2 1 0 0 0
are coefficients in the binomial expansion of 0 1 3 3 1 0 0
(1 + x)n in powers of x. They are therefore also
0 1 4 6 4 1 0
called binomial coefficients, which will be discus-
0 1 5 10 10 5 1
sed in more detail in Chapter VII.

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)

As Table 6 shows us, the generalization of the


symbol C~ to negative values of k is trivial: for
k < 0 we have C! = 0 (also see page 114). Also,
C! = 0, if 0 ~ n < k.

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.

will differ from that obtained earlier when the


chessboard was only bounded by a single straight
line (see page 72), since now the piece cannot
-cross the vertical boundary. The opportunities
for reaching some square are therefore fewer now:
the checker piece must not go too far to the left.
For example, the piece can reach squares
along the boundary only from one square and Fig. 24.
not from two, as was the case on page 72, where
it was stated that the number written in each black To summarize, then, we have to find the number
square is equal to the sum of the two numbers of sequences of k zeros and m ones possessing the
written on the neighbouring black squares of following property: preceding each position in
the preceding horizontal line. For this law to the sequence there are at least as many ones as
hold now too, it is necessary to draw another there are zeros. But we solved this problem on
vertical line to the left of the boundary and write page 50 (there we were dealing with the letters
zero in each black square (it is impossible to r and f instead of zeros and ones). It was shown
reach these squares). there that the number of such sequences is equal
Let us compute the number of ways of reaching m-k+1 h •
a certain square, bearing in mind the restriction. to m+t cm+k· That IS the number to be
78
written at the intersection of the (m + k)th to the sum of two numbers: the one directly above
horizontal line and the (m - k)th vertical line. it and the one to the left of it. It differs from the
Now put piece on the qth square of the zeroth arithmetic square, however, in that the diagonal
horizontal line (contrary to checker rules, this of the pentagon positioned q liues above the prin-
square may be white too). Now our piece has q cipal diagonal consists of zeros (in this the penta-
reserve routes to the left. This case corresponds gon resembles the arithmetic triangle considered
to the problem examined on page 50, where the on page 72).
cashier put in a supply of q 50-copeck pieces. Let us now take a chessboard bounded by tw()
Utilizing the answer we obtained there, we con- perpendicular rays and draw two lines (instead
clude that if a checker reaches a square in k moves
leftwards and m moves rightwards, 0 ~ k ~ m +
+ q, then the number of distinct ways of rea- f I ., 0 0
1 ~'t
. th'IS square IS
ch mg · ckm+k - ck-q+t
m+k . 1n F'Ig. 24 f z 4 1'4 0
3 .,
we have a table generated for q = 3. f 3 fj tO t4 ~4..
f 4 10 20 34 lt8
THE ARITHMETIC PENTAGON
Fig. 25.
Rotate the chessboard through 45°. Then the
checker will move along vertical and horizontal
straight lines and the boundary will be inclined of one) parallel to the principal diagonal: q line~
to them at a 45° angle. The problem of the checker above it and s lines below it. We will consider
in the corner then takes the following form. both lines as forbidden for the rook; in each squar&
Starting from the corner, in how many ways can
write the number of ways the rook can reach
a rook reach the square (m, k) moving along the
shortest route and not crossing the diagonal of the
chessboard (the rook can take up a position on the I I I 1 ~~ .. 0 0
diagonal, however)?
From what was proved above it follows that
I 2 3 4 5 ~5 . i"-20
0

for k ~ m, the number of ways is equal to 1 3 6 10 15 20 "..


m-k+ick m+kandfor k >m, Itiszero.
· · However, 't 20 55
'*
m+i fO J5 75
if we translate the diagonal a total of q squares 0 '~,., 14 34 ou 124 IUD
rightwards, then the answer will be as follows:
0 0 14, 48 ff7 241 MD
for 0 ~ k ~ m + q, the number of ways is equal
+ ··
m+k , an d f or k > m q, It IS zero.
t o C km+k - ck-q-t
If the chessboard is finite, then the nonzero Fig. 26.
numbers of this array fill a pentagon (Fig. 25).
It is called an arithmetic pentagon. This same it. The resulting array is an arithmetic hexagon
term is used for the array obtained on an infinite (see Fig. 26 depicting such an array for q = 4,
board bounded by two perpendicular rays. s= 3).
The basic property of the arithmetic pentagon We can interpret the arithmetic hexagon as
coincides with that of the arithmetic square: follows. Take a chessboard bounded by a segment
each number of the arithmetic pentagon is equal of length s + q squares and two rays perpendicu-
79
lar to it; put a checker on a square distant s of zeros and units is 2n. This is the proof of rela-
squares from one corner and q squares from the tion (9).
other. Write in each square the number of ways On page 71 we gave geometric proof of the rela-
our piece can reach it. Turning the array through tions
45°, we obtain an arithmetic hexagon.
C!=C!-d-C!:~ and C!=c:-k
This method can be applied to solve more com-
GEOMETRIC PROOF OF PROPERTIES plicated equations as well. In Fig. 28 we draw
OF COMBINATIONS
B(k,n)
In Chapter II we proved some of the properties
of combinations. Here we shall pictorialize these Os n;
properties with more vivid geometrical arguments.
·Let us first demonstrate how the relation
(9)

can be derived. To do this we consider all routes


leading from point A (0, 0) to a point of the
type Bk (k, n - k), 0 < <k n (Fig. 27).
m

Fig. 28.

a vertical straight line with abscissa m, 0 -<


m -<k. Every route leading from A (0, 0) t()
B (k, n) crosses this line, some, in part, passing
along it. Partition the set of all routes from A
to B into classes, the sth class including routes
for which the last common point with the·
straight line x = m is D 8 (m, s).
Now let us compute the number of routes con-
necting A and B that belong to the sth class.
Fig. 27. Every such route consists of the section leading
from A to D 8 , the section from D 8 (m, s) to
These routes split up into classes according to D~ (m + 1, s) (D 8 , you remember, is the last
the point Bk, 0 -< -<
k n, at which they termi- point of the straight line x = m on this route!}
nate. There are P (k, n - k) = C! routes leading and the section from D~ (m + 1, s) to the point
to Bk. Our job is to compute the total number of B (k, n). By formula (1), there are P (m, s) routes
pathways under consideration. Each such route between A (0, 0) and D 8 (m, s), whereas there
has length n. It can be labelled by ann-sequence are P (k - m - 1, n - s) routes from D~ (m +
of zeros and ones, associating zeros with hori- + 1, s) to B (k, n) (in order to go from D~ to B
zontal segments of the route and ones with verti- we have to traverse k - m - 1 unit segments-
cal segments. Now the number of all n-sequences to the right and n - s unit segments upwards).
80
By the rule of product, the total number of mulas (27), (28), on page 36], we would have to
routes in the sth class is appeal to multidimensional geometry. We shall
P(m, s)P(k-m-1, n-s) not go into this question further here.
It may be noted that the relations between
Now the number of such routes from A to B is the numbers C~ that were derived on pages 51-53
P (k, n) and so, by the rule of sum, we find
also admit of a geometrical interpretation. Here,
that it is necessary to take a board with a line drawn
P(k, n)=P(m, O)P(k-m-1, n)+ parallel to the principal diagonal and consider
+P (m, 1)P (k-m-1, n-1)+ ... + only those routes that do not cross this line
+P(m, n)P(k-m-1, 0) (they may, however, have common points with
it). Partitioning the set of these routes into
This equality can be written as follows: classes in a variety of ways, we arrive at the
ck cmck-m-1
n+k= m n+k-m-1
+Cm ck-m-1
m+1 n+k-m-2
+ · •· formulas derived in Chapter III.
The problem of the line (queue) at the ticket
+ em ck-m-1 (10)
•· · m+n k-m-1 office admits of a very simple geometric solution.
(cf. (24) on page 36]. The movement of the line can be depicted gra-
In particular, for m = k-1, we get phically by associating every 50-copeck coin
with a horizontal segment and every rouble with
k
C n+k ck-1+ck-1+
= k-1 k
-+ck-1
· • · • k+s-1 •• •
+ a vertical segment. From the statement of the
•· •
ck-1+
k+n-1
(11) problem it is clear that this graph must not cross
the principal diagonal. The manipulations we
Note that the relations (10) and (11) can be deri- carried out in the solution (adding one person
ved by repeated use of the relation C~ = with a 50-copeck coin and then replacing such
= c~-1 + c~=l· coins with roubles and roubles with the 50-co-
The reader can prove by himself (using geomet- peck pieces} take on a very simple geometrical
rical reasoning) formula (23) on page 35: meaning: they reduce to reflecting the graph of
the movement of the line into a straight line
e~+k =~+11.-.C~ +e~+L.C!+ ··· parallel to the principal diagonal and one unit
+ e n-m em+
n+k-s s •••
+en-s cs
n+k-s s
(12) of length distant from it. We leave it to the rea-
der to translate into geometrical language the
where 0 -'( s -'( k, 0 -'( s -<. n. reasoning used in solving this problem.
To do this, draw a straight line through the
points D (k - s, n) and E (k, n - s) and split
the set of all routes from A (0, 0) to B (k, n) RANDOM WALKS
into classes according to the point of this line
that they pass through. Formula (12) differs The above-considered problems on the move-
from (23) on page 35 in notation alone. ments of chess men are closely related to the
This same geometrical approach can be used problem of random walks which is so important
to prove a whole range of relations for the num- in physics. Consider the following problem which
bers C~+k· This is done by partitioning the was offered at the Eighth Moscow Mathematics
routes leading from A (0, 0) to B (k, n) into Olympiad in 1945.
classes in various ways. We have a grid of roads (Fig. 29). 2N people
In order to prove in similar fashion the relations start out from point A. Half of them proceed in
between the numbers P (nh ••.. , nk) [see for- the direction l, the other half in the direction m.
81
At the first intersection, half of each group proceed
Hence, a total of k! (:~kl) persons will reach point
in the direction l, the other half in the direction m.
Such splitting occurs at each intersection. Where Bk (k, N - k). This number is equal to the kth
will the people be after traversing N sections and number of the Nth row of the arithmetic triangle.
how many will there be at each intersection?
Since the total number of sections traversed
by each person is N, it is obvious that they will BROWNIAN MOTION
We can cast the foregoing problem in what is
B0 W,NJ essentially an equivalent form.
A total of 2N persons start out from point 0 on

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-

particles at poi~t Bk { k - ~} · sas of the resulting line by a factor of N(m 2 - 1>


12
. As we have already noted, the numbers C~ and all ordinates by a factor of N1~m2-1).
amN Then
'
are elements of the Nth row of the arithmetic
if N is great, we get a step curve that differs but
triangle. Diffusion of a different nature is descri-
slightly from the graph of the function
bed by the numbers of the Nth row of an m-arit-
hmetic triangle. Namely, let there be mN par- x2
1 --2-
ticles at the start at point 0. They are divided y=--e
into m equal parts and placed at m points on the V2n
~traight line Ox, the distance between adjacent
This is the famous Gaussian function introduced
.points being unity and the points themselves
into probability theory by the great German mat-
being symmetric about the point 0. After that,
hematician Karl Gauss. It plays an important
each part splits up in exactly the same way
role not only in problems of diffusion of gases,
(naturally, if the subdividing portion resides at
but in the theory of heat conduction, the theory
B, then the particles are placed at m poinis sym-
of errors, and elsewhere.
metric about point B). After the lapse of N sta-
ges, the particles will be located at points Bk
with coordinates k - m;- 1 N, where k = 0,
THE QUEEN'S REALM
1, ... , (m - 1) N, and there will be Cm (N,
k) particles at the point Bk. Let us again return to the random walk along
When the values of N are large, computing the x-axis. Now, to the left of 0 is a realm such
the number of particles at each point becomes that he who enters never returns (like the Queen
too complicated. But, as often happens in mathe- of Shamakha who played such a fateful role in
matics, as the law of distribution becomes ever the life of Czar Dadon and his sons). We too
more complex, it begins to approach a simple assume that those who move off to the left of the
limiting regularity, and this regularity descri- axis remain there. The problem is to determine
bes the particle distribution the more precisely, how many persons remain in the quean's realm
the greater the number of particles (the more and where the remainder of the group are
complex the exact regularity). after N hours following their emergence from
In the theory of probability it is proved that point 0.
It turns out that this problem can be reduced
for large values of Non a line-segment [ x - ; , to the earlier O!le about the line of people at a
x + ; J, where a is small compared to N, there
ticket office. Consider the movements of some
person starting out from 0. These movements can
83
be specified by a sequence of 1 's and -1 's: a move- N~E(~)-1
2 persons lost in the quet>n's
ment to the right represents 1, to the left, -1. 2N - eN
If this sequence involves k ones, then the person realm.
has moved k times to the right and N - k times Now if the realm of the queen started to the
to the left. This should have gotten him to the left of point 0 1 (with abscissa :- ~ ) instead of
point Bk ( k - ~) (it will be recalled that each 0, then the result would be different. Namely,
step is equal to 1 / 2 unit of length). But this only there would be e~-k - e~-k-q- 1 per-
happens if our walker steers clear of the queen's
realm. If at some point of time the number of sons at the points Bk(k-~), k>- N ;-q,;}he others
movements to the left is greater than to the right, would be lost in the queen's realm. This follows
he is lost. immediately from the results of the problem on
If instead of movements leftwards and right- page 50.
wards, we consider the line at the ticket office
with roubles and 50-copeck pieces, we can say
that landing in the queen's realm is equivalent
to the ticket line coming to a halt. Hence, the ABSORBING BARRIERS

number of persons arriving at point Bk ( k - ~)


We have already pointed out that random-
is equal to the number of cases when the line in walk problems are very important in physics,
which there are k people with 50-copeck pieces representing the most elementary models of
and N - k holders of roubles moves along with- particle diffusion. The problem in the preceding
out any interruptions. Now we know that this section can also be interpreted physically in a
number is different from zero only if k >-
N - k.
very simple way: there is a wall to the left of
In that case (see page 50) it is
point 0 that absorbs all particles. If the wall
adjoins the point 0, then we have the case exami-
ned at the beginning. If it is q/2 units of length
N! (2k-N +1) away from point 0, then we get the problem ana-
= (N-k)! (k+1)!
lyzed at the end of last section.
In the days when combinatorial mathematics
Thus, 2N persons start out from point 0 and and probability theory found most of their pra-
N-k N-k-1 ctical applications in the theory of games of chance,
after N hours of walking, a tota I of eN -eN the problem of random walks with absorbing
. N
persons reach point Bk ( k - 2 ), where 2k >-
N. barriers was formulated differently. There, it was
It is now easy to compute the number who get the ruin problem. Picture a coin tossing contest
lost in the queen's realm. To do this, first add the between two players. After each trial, the loser
pays the winner one rouble. The player who
numbers N-k -
eN
N-k-1
eN
f rom k \'2 +
= E fN) loses all his money is ruined. That's the end.
+1 [where E ( ~) is the greatest integer of ~ J The aim was to determine the probability of
various outcomes if one player started out with
-N-E (N)
- -1 p roubles and the other with q roubles. The con-
to N. We find that eN 2 persons did not nection between this problem and the problem
get into the queen's realm, and since there were of particle diffusion in a domain bounded on two
2N persons at the starting pointO, there must be sides by absorbing barriers is obvious.
6*
84
RANDOM WALKS ON the set X may be chosen in C~ ways, and the
AN INFINITE PLANE +
set Yin C iV k ways, which,by the rule of product,
Up to now we have considered either the wan- yields C~C iV+ k ways of choosing the sets X and
oderings of a rook that can move only up or to the
right, or, what is essentially the same thing, ran- Y. Consequently, the total number T of ways of
·dom walks along an infinite straight line. Now getting from point 0 (0, 0), to point A (p, q)
let us investigate the case when the rook moves is equal to Ck Cp
N N
+k '
in any direction over an infinite chessboard.
To put it differently, we solve the following
problem:
A rook starts out on square 0 (0, 0) of an infinite
chessboard. In how many ways can it reach square
A (p, q) in N moves (we agree that one move THE GENERAL PROBLEM
advances the rook to an adjacent square)? OF THE ROOKS
For reasons of symmetry, it suffices to consider
the case when p :>- 0, q :>- 0. If the rook were to We now take up a new cycle of combinatorial
take the shortest route, it would reach the problems on the chessboard. These problems
square A (p, q) in p+ q moves. So the inequality involve counting the number of ways of placing
N :>- p+ q must hold. two chesspieces (kings, queens, and so forth)
The difference between an N-move route and so that they can take one another. This clearly
the shortest route lies in the fact that the rook also indicates the number of ways of placing these
makes several self-cancelling moves. It is obvious pieces so that they are in nontaking positions:
that the number of such moves has to be even. the total number of arrangements of two pieces
We call this 2k. Let us denote by X the set of is computed at once by the formula for permuta-
moves the rook makes to the left and down, and tions.
by Y the set of moves to the right and down. Kno- A few problems of this kind have already been
wing the sets X and Y, we have the entire route solved, on page 2 3 we analyzed the problem of
of the rook: the moves common to both sets are 8 rooks on an ordinary chessboard. Let us genera-
downward moves, those belonging to X but not lize this problem to an m by n chessboard (that
to Y are moves to the left, and the moves belon- is, one with m ranks, or horizontal lines, or rows,
ging to Y but not to X are. moves to the right. and n files, or vertical lines, or columns). We want
Finally, the moves that do not belong to either to find out in how many ways we can place k
X or Y are upward moves. nontaking rooks on an m by n chessboard.
Thus, counting the number of opportunities of To make this problem solvable it is clearly
reaching point A (p, q) reduces to counting the necessary that the conditions k <: m and k <: n
number of ways of choosing the sets X and Y. hold, otherwise there will be two rooks on one
But any move down or to the left refers to some rank or on one file. Suppose these conditions are
pair of self-cancelling moves, and so there are met. Then we can position the rooks in two stages.
k elements in the set X. Every move to the left First choose the ranks on which the rooks will
corresponds to a move to the right that cancels stand. Since the total number of ranks is m, and
it. Besides, there are another p moves to the right we have to choose k ranks, the choice can be made
that are not cancelled by moves to the left. And in C~ ways. The same for the files, which will
-so the set Y contains p + k elements. Hence, be occupied by the rooks; this can be done in
85
C~ ways. Since the choice of files does not depend case when n rooks occupy an n by n chessboard.
on the choice of ranks, we get, by the rule of We will now show that
product, C~C~ ways of choosing the lines on
(14)
which the rooks stand.
This however is not the end. The point is that Let the chessboard consist of 2n rows and 2n
k ranks and k files intersect in k• squares. By columns. The rook in the first column can occupy
shifting these squares (if necessary) we obtain any one of the 2n squares of that column. By
11 new chessboard made up of k ranks and k hypothesis, this determines the position of the
files. But we already know that on such a chess- rook in the last column, it must be symmetric
board we can place k rooks in kl ways (for non- with the first rook about the centre of the board.
taking rooks). Therefore the total number of Cross out the first and last columns and rows occu-
required positions of the rooks is pied by rooks (since the number of rows is even,
k k nl m! the discarded rooks cannot occupy one and the
CmCnkl= k! (n-k)l (m-k)! (13) same row). We get a board consisting of 2n-2.
columns and 2n-2 rows. It is clear that each
For example, we can place 3 rooks on an ordi- symmetric arrangement of the rooks on the new
nary chessboard in board is associated with a symmetric arrangement
8181 of the rooks on the original board. Whence it
315151 = 17 •696 follows that G~ = 2nG~_2 (recall again that the
ways. first rook could occupy any one of the 2n squares
Fork= m = n, formula (13) yields nl in accord of the first column).
with what was said on page 24. Using formula (14), we get G~ = 2nnl.
If we removed the restriction that the rooks Now let us consider a chessboard of 2n + 1
are nontaking, then the answer would be diffe- columns and 2n + 1 rows. Here there is a square
rent. Namely, we would have had to choose any without any symmetric ones-this is the centre
k squares out of m X n squares, and this can be square of the board. It must have a rook. Dele-
done in ting the central column and the central row, we
get a symmetric arrangement for 2n rooks on
k (mn)!
cmn = kl (mn- k)!
a 2n X 2n board. We get the equality

ways. And if the k rooks were distinct, then (15)


we would have to multiply the answers by kl Let us now examine a somewhat more involved
problem concerning arrangements that remain
invariant under a rotation of the board through
SYMMETRIC ARRANGEMENTS 90° (Fig. 30 depicts one such arrangement on an
8 by 8 board). Suppose a board has 4n columns
Now let us complicate the problem of the rooks and 4n rows and the number of rooks is also 4n.
and require that they be nontaking and, what is In this case the rook in the first column can occu-
more, stand symmetrically on the chessboard. PY any one of the squares except the corner ones,
Here a host of problems arise depending on the that is, any one of 4n -2 squares (one cannot put
type of symmetry restriction. a rook on a corner square because then after a ro-
The simplest is the case when the rooks are tation through 90° we would have two rooks cap-
symmetric about the centre of the chessboard. turing each other). To this rook correspond an-
Denote by Gn the number of solutions for the other three rooks standing in the last row, the last
86
column and the first row (they are obtained from reason, the total number of rooks must be either
the chosen one by rotations through 90°, 180° of the form 4n (when the board has no central
and 270°). Deleting the rows and columns occu- square) or 4n +
1. We have thus proved that
pied by these rooks, we get on a (4n-4) by (4n-4) R4n+2 = R4n+a = 0.
board a rook placement with the same symmetry. Finally, let us find the number of arrangements
And so we have the equality of n rooks symmetric about the diagonal passing
through the lower left corner square. Denote the
R4n=(4n-2) R4n-4
number of solutions by Qn for an n by n board.
where Rn is the number of solutions of the Then we have the relation
problem for n by n boards. It is now clear that
(18)
R4n=2n(2n-1)(2n-3) ... 1 (16)
Indeed, the rook in the first row is either in
The number of solutions of the problem for the lower left-hand corner, or it is not. In the
a (4n+ 1) by (4n + 1) board is the same as for former case, cross out the first column and the
first row and obtain a symmetric placement of.
n - 1 rooks on an (n - 1) by (n - 1) board.
There are Qn-t such arrangements. In the latter
case, the given rook will be found to have
another rook symmetric to it relative to the chosen
diagonal. Delete the columns and rows in which·
these rooks stand. This yields a symmetric pla-
cement of n - ·2 rooks on the (n - 2) by (n - 2)
board. Since there are Qn-z such placements,
and we can put a rook in the n - 1 square of
the first column, we get (n - 1) Qn-z ways. Hence
follows the relation (18).
We have the equality

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

F(n)=C~+ 1 +C!+C!_.-t+···+C~-v+t (2)

- 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

integer of a byE (a); thus, p = E (nt 1 ) J.


Indeed, F (n) is the number of n-sequences of
0 and 1, in which no two ones come together.
We will now derive an expression for these.num-
Now the number of such sequences in which
bers in terms of C~. To do this we establish
there are exactly k ones and n - k zeros is
a link between the Fibonacci numbers and the
equal to C~-k+t (see page 40). Since the inequa~
following combinatorial problem.
lity k -<. n - k + 1 must hold .here, it follows
Find the number of n-sequences (consisting of
zeros and ones) in which no two ones are consecutive.
To establish this connection, let us take any
that k varies_ from 0 to E ( nt 1 ) . Using the

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 •

multiplied together. In each case of multiplica-


tion, we can adjoin the number <Ln +1 in 4 ways:
by multiplying it into the first factor either PROBLEMS INVOLVING POLYGONS
as multiplicand or multiplier and also into the
second factor either as multiplicand or multi- In certain areas of quantum chemistry, pro-
plier. But since there are n - 1 multiplications blems like the following crop up.
to which we can adjoin <ln+t• we obtain a total A regular 2n-gon is inscribed in a circle. In
of 4n - 4 modes. Adding in the two ways men- how many ways can the vertices be joined in pairs
tioned earlier, we get 4n - 2 ways of adjoining so tftat the resulting line segments do not inter-
an+t to each of the Ill (n) ways of multiplying sect?
together the numbers a1 , • • • , <Ln· This implies For n = 1, there is only one mode of connection
that (here, the diameter is taken to be a "regular
Ill (n+1)=(4n-2) Ill (n)
But «11(1)=1. And so
«ll(n)=2X6 ... (4n-6)=2n-lx1x3 ... (2n-3)
This coincides with the earlier obtained answer
since
«ll(n)=2n-1X1X3 ... (2n-3)=
_ (2n-2)! Fig. 31.
- (n-1)!

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

we have F (n) = Tn for all n. Thus, in a 2n-


gon there are Tn = n ~ 1 C~n ways of drawing
DIFFICULTIES OF A MAJORDOMO

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

From this we find that C1 = -C2 =


1
Vs and
(n +2) rjl+l = 2 (n + 1) rjl+l- nrr+l

Hence nrf-1 is a solution of our relation.


therefore Now we already know two solutions / 1 (n) =
= rf-1 and / 2 (n) = nrf-1 of the given relation.
Its general solution is written thus:

At first glance it seems remarkable that this


f (n) = C1rf-1+ C2nrf-1 = rf-1 (C1 + C2n)
expression assumes integral values for all the Now, by choosing C1 and C2 we can satisfy any
natural values of n. initial conditions.
Linear recurrence relations with constant coef-
ficients, the order of the relations exceeding two,
THE CASE OF EQUAL ROOTS are solved in the same manner. Let the relation
OF A CHARACTERISTIC EQUATION have the form

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

COMBINATORICS AND SERIES 104


The method of recurrence relations permits get an infinite series:
solving many combinatorial problems. But in
1-j-x-j-x2-j- ... -j-xn+ ...
a large number of cases the recurrence relations
are hard to set up and still more difficult to solve. Generally, if I (x) and <p (x) are two polynomials:
At times these difficulties are overcome through
the use of generating functions. Since the concept I (x)=ao+ ... +anxn, <p (x)=bo+ ... -l-bmxm
of a generating function is connected with infini- and the constant term b0 of <p (x) is different
te power series, we will have to investigate these from zero, b0 =FO, then division of I (x) by <p (x)
series first. yields the infinite series
co-J-ctx+ ... -j-ckxll-j-... (1)
For example, if we take polynomials f (x) =
DIVIDING POLYNOMIALS =6z3-2x2-j-x-j-3
The reader of course knows how to divide poly- and <p (x) = x2-x+ 1, the new mode of division
nomials. If we have two polynomials I (x) and yields
3+4.1: - x2-j- z3-j-2x4-j- ...
<p (x), then there always exist the polynomials
1-x-j-x2l3+x- 2x2-j-6x3
q (x) (quotient) and r (x) (remainder) such that
I (x) = <p (x) q (x)+ r (x), the degree of r (x) =t= 3 ± 3x + 3x2
being less than the degree of <p (x) or r (x) = 0. 4.1:- 5x2 +6x3
Here, 1 (x) is called the dividend, and <p (x) the ± 4x ± 4.1;2 =t= 4x3
divisor. But if we want the division to be exact, -x2+2x3
then we have to admit, for the quotient, not only ± x2 =t= x3 ± x4
polynomials but also infinite power series. To x3+ x4
obtain the quotient, we have to arrange the poly- =t= x3 ± x4 =t=x5
nomials in increasing powers of x and divide 2x4-x5
beginning with the lower terms. Consider, by
way of illustration, the division of 1 by 1 - x.
The situatio.q will be the same in all cases when
We have
bo =I= 0 and r (x) =1= 0. Only when I (x) is exactly
1-j-x-j-x2-j- ... divisible by <p (x) does the series (1) terminate
1-xl1 to yield a polynomial.
=t=1±x
X
ALGEBRAIC FRACTIONS
=t=x±x2
AND POWER SERIES
x2
=t= x2 ± xs When we divided the polynomial 1 (x) by the
xs polynomial <p (x), we got an infinite power series.
The question arises as to how this series is rela-
The division process will clearly never end
(as for instance when we convert ! into a nonter- ted to the algebraic fraction l((x) , that is, what
cpx)
meaning can be attached to the notation
minating decimal). Arguing by induction, it is
easy to see that all coefficients of the quotient I (x)
-,-=co+ctx+ ... +cnxn+ ... (2)
are equal to unity. And so for the quotient we <p x)
105
Let us consider, for instance, the expansion We have thus encountered two cases. To dis-
1 tinguish them, we introduce the concepts of
1 _x """'1+x+x 2 + ... +xn+... (3) convergence and divergence of a number series.
We do not use the equal sign because we do not Suppose we have an infinite number series
know what meaning the sum of an infinite num- a1+a2+···+an+··· (4)
ber of terms on the right has. To find out, let u.s
We say that it converges to the number b if the
try to substitute various values of x into both
difference b - (a 1 + a 2 + ... + ~) tends to
members of relation (3). To begin with, set x =
1 zero as n increases without bound. In other words,
10
= 10 . Then the left member becomes g , the no matter what number e > 0 we take, the devia-
right turns into an infinite number series: tion of the sum a1 + . . . + an from b, from
some number N onwards, is less than e:
1+0.1+0.01+ 0 0 0 +0.000 0 0 0 01+ 0 0 0

!b-(a!+ ... +an)l<e if n>N


Since we are not able to add an infinite number
of terms, let us try first one, then two, then three, In this case, the number b is termed the sum
etc. summands. This operation yields the sums: of the infinite series a 1 + ... +an+... and we·
1, 1.1, 1.11, ... , 1.111 ... 1, . . . . It is clear write
'-..----" b=a 1 + ... +an+···
n units
that as n increases, these sums approach the If no number b exists to which the given series
10 (4) approaches, then the series is termed diver-
value 9 = 1.11, ... , which the left member gent.
The investigation carried out above shows
assumes in (3) for x = /0 • that
The picture is the same if in place of x we sub- 10
9~ 1 +0.1+0.01+ ... +0.00 ... 01+ ... ,
stitute the number ~ into both sides of (3).
The left-hand member becomes 2, the right-hand 2 = 1 ',1+1
2 4+ .. 1
·+-zn+ ..•
member turns into an infinite number series 1 +
1 1 1
+ 2 + 4 + 8 + · · · + 2n +
1
Ta-
whereas the series 1 + 4 + 16 + ... + 4n +
king, in succession, one, two, three, four, ...
+ ... diverges.
A more detailed investigation shows that if
2' 1 ~
terms, we get the numbers 1 ' 1 _!_ 4' 1 2_
8 ' ... , I x I < 1, then the series 1 + x + . . . + xn +
1
2 - 2 n . Clearly, as n increases, these
... converges to 1 -=-x, and if I xI >1, then it
diverges.
numbers tend to the number 2.
To prove this assertion, it suffices to note that
However, if we take x = 4, then the left-
1 1-xn+l
hand member of (3) becomes - 3 , and the 1+x+ .•. + xn 1-x
right-hand member yields the series 1 + 4 +
+ 42 + . . . + 4n + . . . . If we add the terms and that as n-+ oo the expression xn+I tends tO'
of this series in succession, we get the sums 1, 5, zero if I x I < 1 and to infinity if I x I :;;,:. 1. For
21, 85, . . . . These sums increase without bound x = + 1 we get the divergent number series
1 1 + 1 + . . . + 1 + . . . and 1 - 1 + . . •
and do not approach the number - 3 .
...+1-1+ . . . .
106
Thus, if J xI< 1, then In other words, there is always an interval
1 I xI < r in which the following equality holds
-1--=1+x+ ... +xn+ ... (5) true:
-x
f (x) n
It will be noticed that (5) is the familiar for- cp(x) =co+c1x+ ... +cnx + ... (7)
mula for the sum of an infinitely decreasing geo-
metric progression. Not only algebraic fractions, but also many
We have thus figured out the meaning of the other functions can be expanded in power series.
notation In mathematical analysis, for example, proof is
1 given that
-1 --=1+x+
X
... +xn+ ... x3 x5
sinx=x-3f+5T-. · • (8)
1t shows that for values of x lying in some inter- and
val, namely for I x I < 1, the series on the right
1 (9)
·COnverges to 1 _ x . We say that for I x I < 1

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!.+ ...

... +C~xn (28) . .. -t-(-1)1<C!+ ... -t-(-1)nG~


Equation (28) is generally referred to as the In other words, the sum of the values C~ with
binomial formula. If we put a= 1, then we get even k is equal to the sum of the values c!
with
odd k:
(1-t-x)n=C\\. +Chx+ ... +C~x"+ ... +C~xn (29)
+
C\\, + C~ -t-C~ + ... + c~m+ ... = Ch +Ci!. + ...
We see that (1 + x)n is the generating function +Ctm+l+... (32}
of the numbers C!, k = 0, 1, ... , n.
Using this generating function, it is compara- Both sums are finite and terminate when 2m
tively easy to prove a large range of properties (or 2m + 1) exceeds n.
of the numbers C! which were obtained earlier A curious re!!ult is obtained if we put x = i,
by means of rather ingenious reasoning. n = 4m in (29). A simple computation shows that
Let us first prove that (1+ i) 4 = - 4. And so (1 + i)'m = (-4)m.
We thus obtain the equation
c~+l =C!+c~- 1 (30) ( -4)m=C2m+Clmi+Cfmi 2 +Cfmi 3 +Cfmi 4 + ..•
For this, all we need to do is multiply both ···+Ciilli4m
+
members of (29) by 1 x to get =C~m+Clmi-·Cfm-Cfmi+Ctm+ ... +Cillf
Separating the real part and the imaginary parts,
(1-t-x)n+l=(C\\.+Chx+ ... +C!xk+ ... + we arrive at the identities
+ C~xn) (1 + x) Clm-Cfm+C~m- ... -c:m- 1 =0 (33)
Again expand the left member by the binomial C~m -Cfm + Cfm + ... + Ciill = ( -4)m (34}
theorem. Here, n is replaced by n + 1 in the Find out for yourself what identities result if we
binomial formula. And so the coefficient of xk put n = 4m + 1, 4m + 2, 4m + 3.
will he C~+i· In the right member, the term con- Another proof made simple by the generating
taining xk appears twice when we remove the function is that of
brackets: when multiplying C!xk by 1 and c:.+m=C\\,C~+C~P~+ ... +C~C~k+ ...
C!-1xk-1 by x. Therefore, the coefficient of xk
in the right member is of the form C! + C!-1 •
... +c~c:;n (35}
But the polynomial should he the same on the (here, we put Cfnk = 0 for s- k < 0; for this
left and on the right, and so the coefficients of reason, k actually varies from 0 to the smallest
xk on the left and right must he the same. This of the numbers m, n). To prove this, we have
proves that C!+i = C! + c~-1. to take the expansions
On page 33 we proved this equality with the (1-t-x)n=C~+C~x+ ... +C~xk+ ... +C~xn
aid of combinatorial arguments. On that same and
page we had to use rather complicated reasoning (1-t-x)m=C\h+Cfnx+ ..• +C~xs+ . .. +Cmxm
to prove that
and multiply the left and right members of
(31) these equations. We then find that

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}

Remove the brackets in the right-hand member.


-t- 2 ~~~ 6 xo.2s- ... ]=5.4775 ... This yields a power series, and from (57) it follows
that all coefficients of this series (except the
However, we will not be interested in using constant term) are zero. From this we have the
these formulas in the extraction of roots; we will identity
examine the relationships among the binomial
coefficients that follow from the expansions
Cl!.-1
2k-2
+ 21 c1 c~t-2 + 1 cscl!.-3
2k-4 3
2
+
2k-6 ... 4

obtained. To obtain these relations, square both 1 k-1 1 1!.


sides of (53). By the rule for multiplying power · · · +7e c2k-2 =2 C2" (58)
series we see that the coefficient of zk on the right which holds for k 1. >
is of the form Finally, note that
( -1) 71 [ 1 1!.-1
2 1!.-2 "
~ C2~t+C2C21t-2 + 0 4C2k-4 + · · · +C2k_
k J 1
(1+x) 2 (1+x)-1=(1+x)-2
1

This implies that


On the left, we get 1 1
( 1 +2x- 2x2s qxz+ ...
_ _!_ 1
[(1+x) 2 ]2= 1+x (-1)k-1 k 1
•.. + kX 22k-1
C2;;_2xk+. ••) X
But we know that
X (1-x+xZ-x3+ ... +(-1)"'x"+ ... )
1
-1-_!_Cl _1_ z 2
1 +x =1-x+x2- ... +(-1)"'x"+ ... - 22 2x + 24 C4x - •••
Comparing the coefficients of the powers xk in (-1)1!. k
both members of the equation, we arrive at the
... +- - c2kxl!.+ .••
22k
8*
116
Removing brackets in both members and com- (if n< m-1, then we assume that lln+i = ...
paring the coefficients of xk in both members, ... =am-!= 0). From then on, all the relations
we arrive at the identity are of the same type:
1 1
1 - 2 X 22 q- 3 X 24 OJ- ' .. bocm+k+btcm+k-1 + ... +bmck=O, k=O, 1, ...
(62)
1 ch-t 1 ch (59)
k X 22h-2 2h-2 = 22k-l 2h The point is that there are no terms in f (x) con-
taining xm, xm+l and so on. Thus, the coefficients
c0, c1, ••• , ck, ••• of the series (60) satisfy
GENERATING FUNCTIONS the recurrence relation (62). The coefficients of
AND RECURRENCE this relation depend solely on the denominator
RELATIONS of the fraction, the numerator being necessary
to find the first terms c0 , c1o ••• , cm-l of the
We have already mentioned the fact that the recurrence sequence.
theory of generating functions is closely bound Conversely, if we have the recurrence relation
up with recurrence relations. Let us go back once (62) and the terms c0 , c1 , • • • , cm-b then the
again to the division of polynomials. Let first thing to do is to use the formulas (61) to com-
f(x)=a 0+a1x+ ... +anxn
pute the values of a 0 , • • • , am-t· Then the
generating function of the sequence of numbers
and co, c1 , • • • , ck, ... is the algebraic fraction
q>(x)=bo+btx+ ... +bmxm
f (x) ao+a1x+ ... +am_ 1xm-l
be two polynomials, b0 =1= 0. Besides, we assume (63)
c:p(x)= bo+btx+ ... +bmxm
that n < m, that is that the algebraic fraction
; ~:~ is proper (otherwise we can always extract It would appear, at first glance, that we gained
but little in replacing the recurrence relation
the integral part).
by the generating function, since we still have
We know that if
to divide the numerator by the denominator,
I (x) which leads to the very same recurrence relation
c:p(x) =co+c1x+ ... +ckx
11
+ ... (60)
(62). The point, however, is that the fraction (63)
then admits certain algebraic manipulation, and this
will facilitate our finding the numbers ck.
ao+atx+ ... +anxn=(bo+btx+ ...
. . . +bmxm) (co+ctx+ ... +ckxk+ .. . )
Remove the brackets on the right and compare
the coefficients of like powers of x on the left DECOMPOSITION INTO
and on the right. PARTIAL FRACTIONS
First we get m relations of the type
We will now show how it is possible, using
boco=ao, algebraic manipulations of the generating fun-
+
b0c1 b1c0 = ah ction, to solve recurrence relations. Suppose the
boc2 +b 1c 1 +b 2 c0 =a 2 , (61) denominator of the fraction (63) has been decom-
posed into linear factors:
c:p(x)=bm(x-a 1)r ••• (x-ak)s
117
Note that this requires first solving the equa- Reducing to a common denominator, we find
tion b0 + ... + bmxm = 0, that is, the chara-
that
cteristic equation of the relation (62). x3-2x2+6x+1 =A (x+1) (x-2) (x+2)
It is then clear that the fraction (63) was obtai- +B (x-1) (x-2) (x+2)
ned via reduction to a common denominator of
+C(x-1) (x+1) (x+2)+D (x-1) (x+1) (x-2)
the following partial fractions:
This equality should hold for all values of x.
Au A12
But for x = 1 all the terms in the right-hand
(x-at}T ' (x-a:J)r-1 ' ... ,
member, except the first, vanish, and we get
-6A = 6. Therefore A = -1. In the same way,
setting x = -1, x = 2, x = -2, we find B =
4 13 9
= - 3' C = 12 ' D = 4
In other words, Thus
ao+ ... +am-1xm-1 Au +
bm (x-a1)T ... (x-ak) 8 (x-a:1)r ··· x3-2x2+6x 1 + 1
x4-5xll+4 - x-1 -
... + ----.:.!...:.._.:.._.+
At, r-1 Ak1
... + (x-ct.k)• + ... 4 13 9
x-a1
3(x+1) + 12(x-2) + 4(x+2) (65 )
... + Ak, s-1 ( 64 )
x-a~~.
For fractions of the type (x~ a)r , the Sl'lries
The only unknowns here are the coefficients expansion is obtained by the binomial formula.
Au, ... , Ak, s-t· To find these coefficients we For instance,
have to multiply both sides of (64) by the deno-
minator (x- a:1f ... (x- ak) 8 , remove the 13 13( x)-1
1- 2
brackets and compare the coefficients of like po-
12(x-2) =-24
wers of x. We find the desired coefficients from
the resulting system of equations.
13 r x x2
= -24L 1 +2+w+ ... +Tn"+ ...
xn J
It is sometimes possible to get around solving
Applying such an expansion to all fractions in
the system of equations. Say, let it be required (65), we get
to decompose the fraction
x3-2x2+6x+1
x3-2x2+6x+1 x4-5x2+4 (1+x+ x2+ ... +xn+ .. . )
x'-5x2+4
4
Since - 3 (1-x+x2- ... +(-f)nxn+ ... )
x4-5x2+4=(x2-1) (x2-4) 13 { x x2 xn )
=(x-1) (x+1) (x-2) (x+2)
-24 1 +2+w+ .. ·+2n+· ..
9 ( x x2 (-1)nxn )
it follows that this decomposition must be of + s 1 - 2 + 2 2 - ... + 2n + ...
the form
x3-2x2+6x+1 A Grouping terms with like powers of x, we
(x-1) (x+1) (x-2) (x+2) = x-1 + find that the coefficient of xn is expressed by
I B c D 4 13 9 (-1)n
1 x+1 + x-2 + x+2 Cn= 1 - 3 (- 1)n- 24X2n -J- 8X2n
118
We already know that the problem of the ex- in a power series. But x2-5x+6=(x-2) (x-3)
pansion of an algebraic fraction in a power series and so
is equivalent to the problem of solving some recur- 1-7x 1-7x
rence relation for given initial conditions. It x2-5x+6 (x-2) (x-3) _
is thus possible, by means of a partial-fraction
decomposition and a subsequent power-series =-A-+_B_
x-2 x-3
expansion of the resulting partial fractions, to
solve linear recurrence relations with constant Clearing fractions, we get
coefficients. 1-7x=A (x-3) +B (x-2)
To summarize, then, if we have a recurrence
relation (62) and the values c0 , • • • , cm_1 , Putting x = 3, we get B = - 20, and putting
it is first necessary, using (61), to find the values x = 2, we get A= 13. Hence,
of a 0 , • • • , Um-1 • They yield the coefficients of 1-7x 13 20
the polynomial in the numerator of the fraction: x2-5x+6 = x - 2 - x-3

=-~(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

By way of illustration, let us solve the recur-


rence relation
(66) ON A SINGLE NONLINEAR
RECURRENCE RELATION
given the initial conditions c0 = 1, c1 = -2.
Here, b0 =1, b1 =-5, b2 =6. From (61) we get In the solution of the problem of the partition
of a sequence we arrived at the recurrence rela-
a0 = b0c0 = 1, a1 =boct +btco= -7 tion
For this reason, the numerator of the fraction
f (x) k
where T 0 = 1 (see page 92). This equation was
c:p (x) =co+ctx+ ... +ckx
solved in a very artificial way: we reduced the
is equal to 1-7x. The denominator of this problem to that of the ticket-office line (see page
fraction is obtained directly from (60). It is of 52) which we knew how to solve. But the line
the form x2-5x+6. Hence, to find the solution (queue) problem was itself rather awkward.
we have to expand the fraction We shall now demonstrate how to solve (67)
directly. First form the generating function
1-7x
(68)
119
Put GENERATING FUNCTIONS
F (x) =xf (x) = Tox+ Ttx + ... 2 AND PARTITIONS OF
... +Tnxn+l+... (69) INTEGERS
and square F (x). This yields In Chapter IV we solved a variety of combina-
F2 (x) = T~x2+(ToTt + TtTo) x3 + ... torial problems involving partitions of integers.
These problems have very simple solutions when
... +(ToTn-t+ ... +Tn-tTo) xn+l+ . ..
generating functions are employed. Denote by
But by the recurrence relation (67), On the number of ways of partitioning for n
ToTn-1 + ··· +
Tn-tTo= T n and form the series
Hence, ao+atx+ .. . +anxn+ ...
F2 (x)=Ttx2+T 2 x3+ ... +Tnxn+l+ ... In many cases it is possible to form an algeb-
The series thus obtained is nothing but F (x)- raic expression f (x) such that after removing
-T0 x; since T0 =1, it is equal to F(x)-x. brackets the term xn is repeated exactly On times.
Thus, Then
~W=FW-x ~ f (x) =ao+atx+ ... +anxn+ ...
For the function F (x) we get the quadratic and, hence, f (x) is the generating function of the
equation (70), which yields sequence ao, ah ••. , On• • • • •
F(x) = 1 - \r=4x To illustrate, suppose we are considering the
parttttons of N into parts, each of which is equal
to one of the numbers n 1 , • • • , nk. The terms must
We choose the minus sign in front of the radi-
not be repeated tn the sum and their order is of no
cal since otherwise, for x = 0, we would have
tmportance.
F (0) = 2, and from the expansion (69) we see
We first form the expression
that F (0) = 0.
By (54) we get (1+xn1)(1+xn2) ••• (1+xnk) (72)
1 Removing brackets, we get summands of the
-- 2 2
V1-4x=(1-4x) =~ 1-2x- 2 qx2 form xm1, ••. , xms, where mh ••. , m 8 are
some of the numbers nto •.. , nk. Therefore,
-23 qxa- ... --2-C~nxn+l- ... xN occurs in the sum as many times as there are
n+1
ways of partitioning N into parts in the required
Thus,
F(x) =+ [ 1- ( 1-2x- ...
fashion.
For example, if it is required to find the num-
ber of ways of paying 78 copecks by using at most
... - n!1 C~nxn+l_. •.) J one coin of each denomination, then we have to
form the expression
-- x +ClsX 2+ ••• +
+n-1-1c nsnX n+l+ ••• (71) (1 + x) (1 + x2) (1 + x3) (1 + x5) X
X (1 + xlO) (1 + xl5) (1 +x20) (1 +x50) (73)
Comparing formulas (69) and (71), we get Tn =
= n !
1 C~n. This is in to tal agreement with the
Remove the brackets and find the coefficient of
x7B. -~
solution obtained earlier by a combinatorial Now let us use generating functions to solve
method (see page 92). the following problem.
120
In how many ways can we pay 29 copecks using Continuing the divi-sion, we get the desired coeffi-
9- and 5-copeck pieces? cient of x29•
The task is to find the number of ways of par- The general problem is:
titioning 29 into the summands 3 and 5, the order To find the number of ways to partition a num-
of the integers being irrelevant. In other words, ber N into parts equal, respectively, to a, b, . .• , m,
we have to find the number of nonnegative solu- the order of the summands being disregarded.
tions of the equation 3m+ 5n = 29. In this case, the generating function looks like
To do this, we form the expression
f (x)= (1+xa+x2a+ ... +xta+ .. . ) X
f (x)=(1+x3+x8+ ... +xSm+ ... ) x
X (1+xb+x2b+ ... +x•b+ •. . ) x
X (1+x5+xlO+ ... +x5n+ .. . ) (74)
X (1+xm+x2m+ ... +xqm+ .. . )
The exponents on x in the first bracket run through
all nonnegative multiples of 3, in the second 1
(75)
bracket, through all nonnegative multiples of 5.
It is evident that after the brackets are removed, For instance, in the problem of getting
xN will occur with a coefficient equal to the num-
change for a ten-copeck piece (see page 64), we
ber of solutions of the equation 3m+ 5n = N. have to form the generating function
In particular, the coefficient of x29 supplies the
answer. 1
Instead of removing the brackets, you can f (x)= (1-x) (1-x2) (f-xS) (1-x5)
take advantage of the formula for an infinite
geometric progression. Then (74) appears as Multiplying together the expressions in the de-
nominator of the fraction, we get
1 1 1
f(x)= 1--x3 1-x5 1-x3-x5+x8 1
f (x) 1- x -x2 + x7 -x9- xlO+ zll
Now divide the numerator by the denominator
by the rule for division of polynomials (only Performing the division, we get
1-x-x2+z4+z7-z9-zlO+x111+x+2x2+3x3+6x4+ ...
1
x+x2-x4- z7+x9+xlO-x11
2x2+z3- x4-x5- x7-z8+x9+2xlO_zl2
3x3+3x4-x5-2z6-x7-z8- x9 +2xl0+2x11+xl2-2xl3
6x4+2x5
this time arrange the polynomials in ascending The coefficient of x10 contains the answer to our
powers of x instead of descending powers). The question.
beginning of the division process looks like this: It is of course rather complicated to carry out
the division in the ordinary way. There is a
different approach. Write the result of the divi-
1-x3-z5+x81+x3+x5+z6+z8+ ... sion in the form of an infinite series with undeter-
11 mined coefficients:
1
x6+x8+xlO_x11-xl3 1-x-x2+z7-z9-zlO+xll
x8+x9+xlO-xl3_z14 +A2x2+ ... +Anxn+ . ..
121
Multiply both sides by the denominator. Then and by the formula of the Newton series (see
the coefficient of xn on the right will turn out page 112),
to be (1-x)-4=1+4x+10x2+20x3+ ...
An- An-1- An-2 + An-4 + An-7- An-9- ... +
4X5 ... (n+3) N-+
1X2 ... n x ...
- An-10 + An-11 Therefore
But on the left the coefficient of xn, n::;:,. 1, f (x)= x12 (1-4x3+ 6x6-4x9+ x12) x
is zero. Thus for n::;:,. 1 the coefficients An must
X (1+4x+10x2+ 20x3+35x4+56x5+ ... )
satisfy the recurrence relation
Multiplying together these expansions term-by-
An= An-1 + An-2- An-4- An-7 + An-9 +
term, we find that the coefficient of x17 in the
+ An-10- An-11 expansion is equal to 16, which means the par-
titions can be done in 16 ways.
The initial conditions are An= 0 for n < 0 Generally, if we have to find the number of
and A 0 = 1. Using these conditions, it is easy ways of partitioning a number N into k summands
to find all the coefficients An in succession. which assume the values n1o ••• , n 8 , with
By way of illustration, let us consider the regard for the order of the terms, then the gene-
entrance-exams problem on page 61. There the rating function is of the form
task was to find the number of ways of represen-
ting the number 17 as a sum of 4 integers assu- (76)
ming the values 3, 4, and 5, the order of the
The problem is simplified if the numbers n1o
terms playing a role. Here, for the generating
... , n 8 form an arithmetic progression: in this
function we have to take (x 3 + x4 + x5) 4, This
case xn1, ... , xns form a geometric progression,
is because when the brackets are removed in the
and this enables us to simplify the expression
expression f (x) = (x 3 + x 4 + x5) 4, each term
for f (x).
xN will occur as many times as there are ways of
For example, let us find the number of ways of
partitioning N into a sum of 4 integers that assu-
obtaining 25 points in throwing 7 dice. Here we
me the values 3, 4, 5. There will also be terms
have to form the generating function
that are obtained from each other via a permuta-
tion of the integers in the exponent (say, x3x4x5x3 (77)
and x4x3x3x5).
In the expression (x3 + x4 + x6)4 = xl2 (1 + By the formula for the sum of a geometric
+ + x x2 ) 4 the brackets may be removed by progression, this function may be written as
using, say, the multinomial theorem. But there x7 (1-x6)7
is an easier way. We note that 1 + + x xz = f(x)= (1 -x)? =x7(f-x6)7(1-x)-7
1-xs
= - 1- - . Therefore, f (x) can be written as Now expand (1-x6)7 by the binomial theorem,
-x
and (1- x)-7 by the formula for the Newton
f (x) series. We get
f (x) = x7 (1-7x6+ 21xl2_ 35xl8+
But by the binomial theorem we have + 35x24_ 21x30+ 7x36_ x42) (1 + 7x + 28x2 +
(1-x3)4= 1-4x3+ 6x6-4x9 +x12 +84x3+210x4+462x5+ .•. )
122
Multiplying these expansions, we can easily n indistinguishable things into r indistinguishab-
compute the coefficient of x1 ~, which is the answer le groups, no group empty, by Ilh. Then we have
to our problem. the recurrence formula
The other problems that we discussed in Chap-
ter IV can also be solved in similar fashion with Ill;,= II:;_:..\+ II~:..~-1 + Ilf.:..\r-1 + ...
the aid of generating functions. The equation
+
rrr. = rr:;.:..\ rr:;,_r
holds. For n- r < r we have Ilh = Ilh~1·
SUMMARY OF Along with partitions, we consider orderings
THE COMBINATORICS of elements in which the order of the groups is
OF PARTITIONS significant, and also the order of the elements in
1. The number of ways of partitioning n dis- the groups. For ordering, the following assertions
tinct things into r distinguishable groups, empty hold true:
groups allowed, is rn. 9. If n distinct things are ordered into r dis-
2. The number of ways of partitioning n dis- tinguishable groups, empty groups allowed, then
tinct things into r distinguishable groups, all the number of orderings is
groups nonempty, is equal to the coefficient, r(r+1) ... (r+n-1)
multiplied by nl, of xn in the power-series expan-
sion of the function (e=- 1)r. This number can 10. If n distinct things are ordered into r
be written in the form distinguishable groups, all groups nonempty, the
number of orderings is
nl cr-1 = n! (n-1)1
n-l (n-r)l (r-1)1
3. If in the same problem the groups are indi-
stinguishable, then there will be rl fewer ways. If the groups are indistinguishable, however,
4. The number of ways of partitioning n indi- and, hence, the order plays no role, then the
stinguishable things into r distinguishable groups, number of orderings is ;; c~~ 1·
all groups nonempty, is C~~ 1 •
11. Suppose n distinct elements are used to
5. The number of ways of partitioning n indis-
form, in all possible ways, r ordered groups (not
tinguishable things into r distinguishable groups,
all elements need be taken, empty groups are
empty cells admissible, is Ch-:fr-1•
allowed, the order of the groups is taken into
6. The number of ways of partitioning n indi-
account). The number of such groups is
stinguishable things into r distinguishable groups,
each group containing at least q things, is
Ch~1-r(q-1) • nl
[ 1 r r (r+1)
nr+ 11 (n-1)1 + 21 (n-2)1 + ...
J
7. The number of ways of partitioning n indis-
tinguishable things into r distinguishable groups, This expression is the coefficient, multiplied by
the number of elements in each group lying bet- nl, of xn in the power-series expansion of the
ween q and q + s - 1, q ~ x ~ q + s - 1, function ix (1 - x)-r.
12. If, in the same problem, empty groups are
is equal to the coefficient of xn_rq in the power-
. . . (1-zs)r
series expansiOn of the functiOn -- •
forbidden, then the answer is equal to the coeffi-
cient, multiplied by nl, of xn-r in the expansion
1-x
8. Denote the number of ways of partitioning of the function e= (1 - x)-r in powers of x.
COMBINATORIAL PROBLEMS 123
1. 11.
There are five roads leadmg from city A to city Choose one word of each gender out of 12 masculi-
B, and three from B to C. How many routes pas- ne words, 9 feminine and 10 neuter. In how many
sing through B lead from A to C? ways can this choice be made?
2. 12.
Two sport clubs with 100 fencers each have to There are 6 pairs of gloves of different sizes. In
send one fencer each to a competition. In how how many ways can you choose one glove for the
many ways can this choice be made? left hand and one for the right without taking a
pair?
3.
There are five types of envelopes without postage 13.
stamps and four types of postage stamps of the Choose one textbook each out of 3 algebras, 7 geo-
same value. In how many ways can we choose metries and 7 trigonometry books. In how many
an envelope with a postage stamp? ways can this be done?

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

objects in one, n in another and p in the third? 73.


In how many ways is it possible to form 6 words
65. out of 32 letters if in the 6 words taken together
There are m + n different books on a bookshelf,
each letter is used once and only once?
of which m are in black bindings and n in red.
How many permutations are there of these books 74.
in which the black books occupy the first m In how many ways can we choose 12 persons out
places? How many positions are there in which of 17 if two given persons of these 17 cannot be
all books in black bindings are together? chosen together?
127
75. 84.
How many different bracelets can be made using Three boys and two girls choose jobs. The town
5 identical emeralds, six identical rubies and has three factories requiring workers in foundry
seven identical sapphires (a bracelet consists of shops (only men required), two weaving factories
all 18 stones)? (only women), and two factories employing both
men and women. In how many ways can they
76. take jobs at these factories?
In how many ways is it possible to choose three
stones for a ring from the same number of pre- 85.
cious stones? How many 5-letter words can be made out of 33
letters if repetitions are permitted, but no two
77. adjacent letters can be the same (for example,
Three students share a room. They have 4 cups, "press" would be excluded)?
5 saucers and 6 spoons (all distinct). In how many
ways can they set the table for tea, each recei- 86.
ving one cup, one saucer and one spoon? At a mathematics contest, the prizes are three
copies of one book, 2 copies of another and 1 copy
78. of a third. In how many ways can they be awar-
The husband has 12 acquaintances: 5 women and ded if there are 20 participants and none receives
7 men, and the wife has 12: 7 women and 5 men. two books? The same, but none receives two
In how many ways can they get together in a copies of the same book (he may however get
company of 6 men and 6 women so that the hus- two or three different books).
band invites 6 persons and the wife 6?
79. 87.
A boat accommodates four persons on each side. Dominoes from (0, 0) to (n, n) are taken. Show
In how many ways can a crew be made up if that the number of dominoes with the sum n-r
there are 31 candidates, 10 of whom want to be is equal to the number of dominoes with the
on the port side, 12 on the starboard side, and 9 sum n + r and this number is equal to
are indifferent? ! (2n- 2r + 3). Find the total number of all
80. the dominoes.
An urn contains counters with the numbers 1, 2,
3, ... , 10. Three counters are drawn. In how 88.
many cases will the sum they form be 9? At In how many ways can 7 men and 7 women be
least 9? seated at a circular table so that no two women
come together?
81.
In how many ways can you choose six eards out 89.
of a full pack of 52 and have all four suits pre-
sent? In how many ways can six horses be chosen out
of 16 for a team so that there are 3 horses out
82. of the sextuplet ABCA'B'C', but not a single
A chorus group consists of 10 persons. In how one of the pairs AA', BB', CC'?
many ways can you choose 6 participants each
time during three days so that the groups differ? 90.
In how many ways, using 9 consonants and 7
83. vowels, is it possible to make words with 4 dis-
A person has 6 friends and invites 3 in the course tinct consonants and 3 distinct vowels? How
of 20 days (the company is never the same). many of these words do not have 2 adjacent con-
In how many ways can he do this? sonants?
128
91. 99.
In a department of a research institution, each In how many ways can the letters of the Rus-
<>f the employees knows at least one foreign lan- sian word "lOmiTep" be permuted so that the
guage. Six know Spanish, six German, and seven vowels are in alphabetic order (namely, 'e',
French. Four know Spanish and German, three 'H', 'ro')?
know German and French, and two know French
and Spanish. One person knows all three langua- 100.
ges. How many are there employed in the depart- In now many ways can the letters of the Russian
ment? How many know only Spanish? How many word "rrepemeeK" be permuted so that four e's
<>nly French? do not come together?

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)?

Fig. 35. 159.


In how many distinct ways is it possible to repre-
can the journey be made without traversing any sent the number 1,000,000 in the form of a pro-
part of a high road in the direction towards Lon- duct of three factors? Representations differing·
don or any part twice? as to order of the factors are considered distinct.

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)

ways among n + p persons so that a given n 211.


receive at least one object each.
Prove that if there are m kinds of objects, 2n
of each kind, then the number of ways of divi-
204. ding them into two equal parts is given by
Prove that the number of partitions of the num- the formula
ber 2r + x into r + x nonzero parts is the same cm-1 c1 cm-1
as that of the number of partitions of r into non- mn+m-1- m mn+m-2n-2
negative summands. 2 cm-1
+c m mn+m-4n-3- • ••
205. • • • ±C~C~;.l.m-1-x(2n+t>=F · · •
A society of n members elects one member as a 212.
representative of the society. In how many ways In how many ways can five white -halls, five black
can the voting take place if each votes for one balls and five red balls be placed intp three diffe-
person (including, possibly, for himself)? The rent boxes, five balls in each box?
same, provided that only the number of votes
obtained by each candidate are taken into acco-
unt, and not the names of his supporters. 213.
If there are three kinds of things, n of each
kind, then they can be distributed among three
206. persons A , B, C in
Prove that the number of ways of splitting up
2n indistinguishable objects into three indistin- c!+ 2 c;+ 2 -3C!+ 3 = ~ (n+1)(n+2) (n2+3n+4)
guishable parts so that the sum of any two is
greater than the third is equal to the number of ways so that each gets n objects.
ways of partitioning 2n-3 objects in that fas-
hion. 214.
In how many ways can 3 Englishmen, 3 French-
207. men and 3 Turks be seated in a row so that no
Prove that an odd number of objects can be cho- three compatriots sit together?
sen from n objects in 2n- 1 ways.
215.
The same, provided that no two compatriots sit
208. together.
Prove that the number of ways in which two
persons can divide 2n objects of one kind, 2n 216.
objects of another kind, and 2n objects of a third In how many ways can 3 Englishmen, 3 French-
kind so that each receives 3n objects is equal to men and 3 Turks be seated at a circular table so
3n2 + 3n + 1. that no two compatriots sit together?

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~,

(c) a,.-nar-t+Cfta, ._2 - ••• +(fYCJ;.ao=O if r is (b) Ch+C~+Clt+··· =


not a multiple of 3,
1
_.!_ (2n+2
-3 cos
(n-2)
3
:rt) '
(d) ao+a 2 +a4 + .•. =2(3n+1),
(c) C~+C~+C~+ ... =
1
at+as+a5 + .•• =2 (3n-f)
= ; ( 2n+2 cos (n-t-; 2 ) ;n; ) ,

385. (d) C~+C~+Ct+ ... =


Find the number of distinct terms in the ex-
pansion of
(xt +xz+ ..• +xn)3
which are obtained after raising to the power.
392.
386.
Find the coefficient of xli in the expansion of
Prove that for n :;;;,. 2 and I x I < 1 we have
(i+x)n+ (1-x)n<:2n
(1+x+x2+ .•• +xn-1)11
393.
387.
Prove that
Prove that for m > n,
[ cr+t_cr] cr-1
n+1 n n-1 = r
"
~ n (n-1) ... (n-x+i)
(cr)s-cr+tcr 1 m (m-1) .. . (m-x+ 1)
n n+1 n-1 x=O
147
and 400.
Pro¥e that
(n+r-1)! n (n+r-3)1
r! -T (r-2)1 +
394. + n (n-1) (n+r-5)! _ n! (n-1)1
Prove that 1X2 (r-4)! · · · - r! (n-r)!
m m(m+1) +m(m+1) ... (m+n-1)_
T+!Xr+··· 1x2 ... n - 401.
-.!!:.+n(n+1)+ Compute the following sums:
-1 1X2 ...
(a) Ch+2C~+3Ci'. + ... +nC~,
n(n+1) ... (n+m+1)
... + 1 X 2 ... m (b) C\i+2Ch+3C~+ ... +(n+1)C:l,
(c) C~+2Ci'.+3Ch+ ... +(n-1)C~,
395.
Prove that (d) C\',--j-3Ch+5C~+ ... +(2n-1) C~,
(e) C\',-2C},+3Ch- .. ·. +(-1)n(n+1) C~,
(f) 3Ch+7C;+11Ci'.+ ... +(4n-1) C~,
(g) Ch- 2Ch + 3C~- ... + ( -f)n-1 nC~,
396.
co Cl C2 en
Prove that
(h) -f-+-f-+--f-+ ... + n+1'
ch c~
(. C\i+ 3 c:t
I) 2 + 4 + ... + n+2'
co Cl C2 . C""
397. (.i) --[---f-+--f-- ... -j-(-1)n n-+1'
Prove that
(k) (C\',)2- (Ch)2+ (Ct)2- ... +( -1)n (C~)~

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

1 1 1 (1-4x)- 2 = 1 +Y1x+ Y 2x2+ ...


[(n-1)!]2+ 1! 2! [{n-2)!]2+ Express Y n in terms of the binomial coefficients.
1 1 (2n-1)! 1
+ 2! 31 [(n-3)1]2+''' = [n! (n 1)!]2 Find the expansion of (1-4x)2.
10•
148
(b) For any m and n = km .the number Un is
404. divisible by Um·
Prove that the numbers Y n satisfy the relations: (c) Two successive terms of the Fibonacci sequen-
1 1 ce are relatively prime.
(a) Yn+2Y1Yn-1+3Y2Yn-2+···
408.
1 1
···+ n+1 Yn=2 Yn+i> Find the largest common divisor of the 1,000th
and 770th terms of the Fibonacci sequence.
(b) YoYn+YtYn-t+Y2Yn-2+ ... +YnYo=4n,
409.
( ) YoYn + YtYn-t + Y2Yn-2 +
Is there a number ending in four zeros among
c 1 (n+ 1) 2X n 3 (n-1) · · ·
the first 100,000,001 terms of the Fibonacci
YnYo Yn+l sequence?
·· ·+ (n+1) X 1 n+2
410.
405. Eight numbers are taken in succession from the
In the numerical triangle Fibonacci sequence. Prove that their sum is not
in the sequence.
1
1 1 1 411.
1 23 21 Prove that
13676 3 1
(a) u2+u4+ • · · +u2n= U2n+i-1,
(b) Ut + U3 + ... + U2n-1 = U2n•
each number is equal to the sum of the numbers
located in the preceding row above that number (c) uf+ui+···+u;=unun+h
and above the adjacent numbers to the right and (d) u~+l = UnUn+ 2+ ( -1)n,
to the left (if some of these numbers are absent,
they are taken to be zero). Prove that in every (e) Uj U2 + U2U3 + · . • + U2n-1 U2n = U~m
row, beginning with the third, there is an even
number.
(f) UtUz+ Uzu3+ •.. + UznU2n+1 = uin+l-1,
(g) nut+(n-1) u 2+ (n-2) u3+ •.. +2un-t+
406. +un= Un+4-(n+3),
The first row of the numerical triangle
(h ) u3 + u6 + ... + U3n = U3n+2-1
2 '
0 1 2 3 . . . . . . . . . . . . 1957 1958
1 3 5 . . . . . . . . . . . . . 3915 (i) u3n = u~+l + u~- u~_ 1 .
consists of the numbers 0, 1, ... , 1958. The ele- 412.
ments of each subsequent row consist of the sums Prove that any natural number N can be repre-
of the elements of the preceding row on the left sented as a sum of Fibonacci numbers, each num-
and on the right of the given number. Prove that ber entering the sum at most once and no two
the element of the last row of the triangle is divi- successive numbers entering together.
sible by 1958.
413.
407. Let p :.> q :.> r be integers such that p < q+r
Consider the Fibonacci sequence of numbers and p + q + r = 2s. There are p black, q white
lln:u 0 = 0, u 1 = 1, u 2 = 1, ua = 2, u4 = 3, and r red balls. Show that the number of ways
u5 = 5, etc. (we began it with the terms 0 and of dividing these balls between two persons so
1, and not 1 and 2, as in Chapter VI). Prove that that each gets s balls is
(a) For any m and n we have 1
s2+s+ 1- 2 (p2+q2 r2) +
iln+m= Un-tum+ UnUm+!
149
1
414. az= -2,
If q + r < p, then the answer in the preceding
(d) an+3- 9an+2 + 26an+1- 24an = 0, a 1 =1,
problem is increased by ; (p - s) (p - s - 1).
a 2 = -3, aa= -29
415. 420.
There are pq + r distinct objects, where 0 r< -< Find a sequence such that a1=cos a, a2 =cos 2a
< p. They are divided among p persons as equ- and
ally as possible (all receive either q or q + 1
objects). Show that the number of ways of making an+z- 2 cos a an+i +an= 0
such a division is equal to
C" (pq+r)l 421.
p (q + 1)r (qi)P Prove that a sequence with the general term
~ = nk satisfies the relation
416.
Compute the sum
an+k- C~an+k-t + C~an+~-z- . .. +( -1 )I< C~~ = 0
m in iz it 422.
~ ~ ... ~ ~ 1 Find a sequence such that
in=i in-1=1 i1=1 io=l
~+2 + 2an+1- San= 2n
417.
423.
Prove the identity From the identity (1 + x)P (1 + xrk-1=(1+x)P-k-l
C~m=~P(k!o ... , km, n-kf- ... -km+1) infer that
where the summation is extended over all nonne- ~ ( -1) 8 c~+Sc~-s = c~-k-1 (here and henceforth
gative integral solutions of the equation 8=0
k1 + 2kz + . . . + mkm = m. the sum is extended over nonnegative integral
values of s for which the left member of the
418. equality is defined).
Find the general solution of the recurrence rela-
tions: 424.
From the identity (1-x)-m-1 (1-x)-q-1=
(a) an+2-7an+1 +12an=0, = (1- x)-m-q-2 infer that
(b) an+z+3an+t-10an=0, ~em
L..J
cq
p-s q-s =
cp-m
p+q+l
(c) an+ 2 -4~+1+13an=0, 8=0
(d) an+z+9an=0,
(e) an+z+4~+1 +4an = 0, 425.
From the identity (1 + x)n= (1- x2)n (1- x)-n
(f) ~+3- 9an+Z + 26an+1- 24an = 0, infer that
(g) ~+3 + 3an+2 + 3an+1 +an= 0, ~ (-1)•C~+k-2sc~+1 =C!+t
(h) ~+4+4an=0 8=0

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

~ (-1)•cw-·c~={ (-1)'; cff


433.
From the relation if m is even,
8=0 0 if m is odd,
( 1-!) m (1-x)-11-1
~ ( -1 )8 C~+m-sC~+B =

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

~ (-1)8 [Cfn]ll={ (-1)'; C~


435.
From the equation if m is even,
( 1-x)-11(1-xh)11=(1+x+ ... +xh-1)11 s=O 0 if m is odd.
infer that
439.
~ { 0 if m>hn-1, Denote the expression
."-! (- 1 ) 8 C1:i!shC~= 1 if m=hn-1
8=0 a (a+1) (a+2) ... (a+n-1)
436. by (a)11 . Prove that
From the identity 1 n
(1-x)-11-1 (1-xh)11= <1 +x+ · · · +xh-l)1l (a+b) 11 = ~ C~(a+m)11-m(b-m+f)m
1-x m=O
SOLUTIONS AND ANSWERS 152
1. 15.
By the rule of product, we get 5 X 3 = 15 routes.
You can buy one more set containing the novels
2. War and Peace and Fathers and Sons and one
By the same rule, we have 1002 = 10,000 choi- copy of Crime and Punishment. We thus add
ces. 3 X 3 = 9 ways, bringing the total to 143 ways.

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

25; 20. Since the order of the colours plays no role, we


have Cf = 10 ways.
8.
480; 437. 19.
Here, the order of the colours is important; and
9. so we have Af = 60 ways. If one of the bands is
1,024; 4,032. red, then we have 3 X Af = 36 ways.
10. 20.
We choose the white square in 32 ways and cross A~ = 20 dictionaries.
out the corresponding row and column. There
remain 24 black squares on the board. In all 21.
there are 32 X 24 = 768 choices. Afo- A:= 70.
11.
By the rule of product, ther(are 12 X 9 X 10 = 22.
= 1,080 ways. We obtain permutations (with repetitions) of 13
cards four at a time. In all, 134 = 28,561 ways.
12. If no pairs are allowed, we have permutations
without repetitions: in all, Al 3 = 17,160.
In 6 X 5 = 30 ways.
23.
13. Since it suffices to draw one black and one white
3 X 7 X 7 = 147. card, we have 132 = 169 choices.
14. 24.
Either buy one copy of each novel or a set con- A child receives either one, two or three names,
taining two novels and one copy of the third all different. The total is 300 + 300 X
novel. By the rules of sum and product, we get
6 X 3 X 4 + 5 X 4 + 7 X 6 = 134 ways.
X 299 +
300 X 299 X 298 = 26,820,600 dis-
tinct names.
153
25. 32.
Neighbours are preserved in cyclic permutations The choice of seats for the men and for the women
and in symmetric reflection. In the case of 4 can be made in two ways. Then the men can be
persons, we have 2 X 4 = 8 transformations seated in their chosen places in 5! ways. There
that preserve the relation of being neighbours. are just as many ways for seating the women.
Since the total number of permutations of 4 per- We get a total of 2 (51) 2 = 28,800 ways.
sons is 4! = 24, we have 24/8 = 3 distinct se-
ating arrangements. If there are 7 persons at the 33.
table, we have 7!/14 = 360 ways; generally, in We get 10 times fewer ways than in the preceding
the case of n persons, (n - 1)1/2 ways. The num- problem, or 2,880 ways.
ber of ways in which 2 given persons are together
is twice the number of seating arrangements of
6 persons (since the people can change places). 34.
Hence, it is 51= 120. In exactly the same man- The total number of ways of drawing 10 cards is
ner, the number of ways for a given person to q~. The number of ways in which not a single
have two given neighbours is 41 = 24. ace is drawn is qg. Therefore, at least one ace
will appear in C!g - qg cases. Exactly one ace
26. in ClC:s cases, at least two aces in qg - qg-
4C~ 9 cases, and exactly two aces in C~C~ 8 cases
One boy plays for one team, two for the other. (we choose two aces in C~ ways and another 8
The boys can be made into teams in 3 ways. cases out of 48 in C~ 8 ways).
Then 3 girls out of 5 have to be chosen for the
first team. This is done in q = 10 ways. In 35.
all, by the rule of product, we have 3 X 10 =
= 30 ways of forming teams. 3m signals (see Problem 27).
36.
27. Denote each set of teeth by a sequence of zeros
The number of ways of partitioning n distinct and ones (a zero indicates no tooth at a given site,
objects into k groups is kn. In our case we have a one indicates the presence of a tooth). There
3 6 = 729 ways. are 232 such sequences. Since each inhabitant
has his own sequence, the number of inhabitants
28. cannot exceed 2 2.
By the rule of product, 7 X 9 = 63 ways.
37.
29. First choose those passengers, of three, who are
indifferent, and will be facing the front. This
The first can choose his books for exchanging can be done in 3 ways. On each row of seats there
in c~ = 21 ways, the second in c~ = 36 ways. are 51 ways of reseating the passengers. Hence,
In all, 21 X 36 = 756 ways for exchanging we get a total of 3 (51) 2 = 43,200 ways.
books.

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

There are three combinations containing all three


letters "t", "a", "r" and 3 combinations containing 126.
two distinct letters each. We have a total of 6 6
combinations. The number of distinct four-digit Similarly, we obtain ~ 3k = 1,092.
numbers that can be generated out of the digits k=1
of the number 123,123 is 3P (2, 1, 1) +
+ 3P (2, 2) = 54. 127.
Since 0 cannot be the leading digit, we get
119. 5
By the inclusion and exclusion formula, we get 2 ~ 3k = 728 numbers.
that the digits 1, 2, 3, 4, contain 10 6-4 X 96 + k=1
+ 6 X 88 - 4 X + 78 68 = 23,160 numbers.
The digits 1, 2, 3, 4 alone generate 4 + 48 + 128.
47-4
+ 43 + 4' + 4~ + 48 = - 3 - = 5,460 numbers. Each digit is repeated 41 = 16 times in each
place. Therefore the sum of the digits in the ones
120. place is 16 (1 + + +
2 3 4) = 160, in the tens
Each digit appears in each order (digit place) place, 1,600, in the hundreds place, 16,000.
6 times (PJ4). Therefore, combining the digits The total sum is 17,760.
of the ones place, we obtain the sum 6 (1 + +
2
+ +3 4) = 60, of the tens place, 600, etc. 129.
In all, we have 60 +600 +6,000 +
60,000 =
In the first case, the sum is 3,999,960. In the.
= 66,660.
second case, each digit is repeated Aft times in
121. each place, and we get the sum of the digits in
Here, the total number of permutations is 12, the
the ones flace: At (1 + + ... +
2
The tota sum is 839,991,600.
9)=75,600.
digits 1 and 5 appearing in each place 3 times,
the digit 2, 6 times each. Thus, the sum of the
digits in the ones place is 3 X 1 +
3 X 5 + 130.
+ 6 X 2 = 30. The total sum is therefore Either 3 or 9 occupies the last place, and the-
30 + 300 + 3,000 + 30,000 = 33,330. remaining digits can be permuted in 31 ways.
We get a total of 12 odd numbers. In exactly the
122. same way, the number of even numbers is found
Analogously, we find the sum to be 11,110. to be 12.
160
exclusion formula we have
131.
The positions for odd digits can be chosen in 1,000-E c·~OO) -E c·~OO)+E (\0500)=686
c: = 20 ways. Each position can be occupied by
one of 5 digits (either even or odd). We get
20 X 56 numbers in all. But 10 X 5~ of them have numbers that are not divisible by 5 or by 7.
leading zero. That leaves 20 X 56 - 10 X M =
= 281,250 numbers. 137.
Proceeding in the same way, we find the total
number of desired numbers to be 228.
132.
q X 56 = 312,500 numbers. 138.
The number of numbers without the digit g is
133. 72g. Therefore, the digit g appears in 1,000 -
- 72g = 271 numbers. The digit g appears
One out of g digits can occupy the leading posi- exactly twice in 27 numbers (Ogg,gog,ggo,1gg,
tion, any one of 10 digits can go into the 2nd, etc.). Zero appears in one single-digit number,
3rd, 4th and 5th positions, and any one of 5 g two-digit numbers and 171 three-digit numbers,
digits, into the last (it must be even). We get a making a total of 181 numbers. Zero appears
total of g x 104 X 5 = 450,000 numbers. If all twice in g numbers. Both digits, 0 and g, appear
numbers from 1 to ggg,ggg are taken, we get in 36 numbers (if the third digit is different from
4gg,ggg numbers. 0 and g, then we have 2 X 2 X 8 versions, and
if it is equal to 0 or g, we have another 4 versions).
134. The digits 8 and g appear in 54 numbers. The
number of n-digit numbers not containing two
Discarding zeros, we see that the remaining digits
yield one of the following sequences: 3; 2, 1; 1, 2;
identical digits in succession is gn for n > 1
and ·10 for n = 1. Hence, the number of such
1, 1, 1. It remains to arrange the zeros so that the numbers from 0 to ggg,ggg is 10 + g2 + ga +
first digit is nonzero. This can be done in one way + g4 + go+ go= 5g7,871.
for 3, in g ways for 2, 1 and 1, 2 (according to the
number of zeros between these digits), and in 13g,
q ways for 1, 1, 1, making a total of 1 + 9 +
+ 45 = 55 numbers. If all numbers from 1 to A four-digit number can consist either of four
g,ggg,ggg,ggg are taken, then we have to choose distinct digits (1, 2, 3, 5) or of two identical and
places for digits different from zero. For 3 this two distinct digits (1, 1, 2, 3; 1, 1, 2, 5; 1, 1, 3, 5;
oean be done in C\ 0 ways, for 2, 1 and 1, 2, in Cfo 1, 2, 3, 3; 1, 3, 3, 5; 2, 3, 3, 5) or, finally, of two
ways, and for 1, 1, 1, in C£0 ways. The total is pairs of the same digits (1, 1, 3, 3). The total
Clo + 2Cf 0 + Cfo = 340 numbers. number of such numbers is thus
P 4+6P(2, 1, 1)+P(2, 2)=24+6X 12+6=102
135.
Any one of g digits 1, 2, ... , g (zero cannot lead) 140.
can take first place, any one of the nine remaining As in the preceding problem, we get
digits can occupy the second place, any of 8 di- 2P (2, 1, 1, 1)+3P (3, 1, 1)+2P (2, 2, 1)+
gits the third, etc. We get g X gl numbers in all.
+ 3P (4, 1) = 255
136. 141.
The number of numbers from 0 to ggg that are
A six-digit number can have one, two or three
divisible by 5 is E (~~ 00 ), where E (x) is the pairs of the same digits. One pair can be chosen
in C~ ways. The number of permutations of 4
largest integer in x. In the same way, there are distinct and 2 identical digits is P (2, 1, 1, 1, 1) =
Ec·~00 ) numbers divisible by 7, and Ec ·~~0 ) = 61/21 = 360. Of them, there are two identical
digits in succession in 51 = 120 permutations.
numbers divisible by 35. By the inclusion and Hence, in this case we get 5 (360- 120) =
161
= 1,200 six-digit numbers. Two pairs of the same 145.
digits can be chosen in q = 10 ways, after which
two more digits can be chosen in q = 3 ways. Again, in the same way, we get
The total number of permutations of these digits __!Q!__ ~ ,_
is equal toP (2, 2, 1, 1)= 180, and in 2 X ~; =
( )
31 2 2x +6.-88,080
31
= 120 of them there is at least one pair of the 146.
same digits in succession, and in 41 = 24 per- Similarly, we get 20,040.
mutations there are two such pairs. By the inclu-
sion and exclusion formula we find that this case
yields the 10 X 3 (180- 120 + 24) = 2,520 147.
numbers we need. In similar fashion, we find If one number is chosen, then the second can be
that three pairs of identical digits have the chosen in 10 ways (since the fact that it is even
is already known). Taking into account the pos-
q ( ( 2~~3 ( 2~ra +3x ~:- 3!) =300
sibility of interchanging these two numbers, we
-3x
get 20 X 10 = 100 choices.
2
numbers we need. We get a total of 4,020 num-
bers. 148.
Either all three chosen numbers are even, or one
142. is even and two are odd. We therefore get Cf6 +
In all, there are + ChCf 6 = 2,030 choices.

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 •••

233. From this we immediately find that for k = 1


There are Clo combinations in which all letters the desired coefficient is equal to 1, for k = 2,
are distinct, CloCiu combinations in which two it is 7, for k = 3 it is 15, for k = 4 it is 10, and
letters coincide, and so forth. We have a total of for k = 5, it is equal to 1. Since the number of
bands of each colour for a given mode of pain-
C~o + CloCfu + CfoCfs + Cfo = 146,400 ting is the same, and the lengths of the bands of
combinations. different colours may be combined in arbitrary
172
fashion, we get f3 + 7s + 15s + 10s + 1a = and
= 4,720 ways of painting. (A3)2- qA~ (A~)2 +qAi (A~)2- CBAB (Af)2
We now lift the restriction that the last colour
is blue. If the painting ends in red, then it occurs +qA& (Ag)2-GgA3 (Al)2+GgA~
once more than blue and white. Then the number
of ways is equal to 1 + 7 X 12 + 15 X 72 + 239.
+ 10 X 15 2 + 1 X 102 = 3,093. Likewise, if the From the statement of the problem it follows that
last colour is white, then the number of painting the same letters of the expression a2 ~ 2 1'2 enter
patterns is '1 2 + 72 X 1 + 152 X 7 + 102 X pairwise into the permutations. We therefore
X 15 + 1• X 10 = 3,135, making a total of get permutations of 3 elements a = a 2 , b = ~~.
10,948 ways. c = 1'2 , which are 6 in number. The same occurs
If no single band is less than 3 em, then the in the case of lermutations of the letters of the
problem reduces to counting the number of repre- expression a3 ~ 1'3 • Identical letters also occur in
sentations of 10 as a sum of k positive integers pairs in the permutations of the letters of the
assuming values from 3 to 10. For k= 1 we have expression a4 ~4.y4 • For the time being, put a 2 = a~o
one representation, for k=2, five representations, a 2 = a2; ~~ = bb ~ 2 =b2, and 1'2 = c1, 1'2 = ca-
for k = 3, three representations. And so the (we temporarily disregard the fact that actually
painting ends in blue 13 + 53 + 33 = 153 times, a1 = a 2 , b1 = b2 and c1 = c 2). Then we have
in red 1 + 5 X 12 + 3 X 52 = 81 times, and permutations of the 6 elements, a~o a 2 , bit b2 ,
in white, 12 + 52 X 1 + 32 X 5 = 71 times. c1 , c2 , the number of which is 720. But these per-
mutations fall into groups of permutations which
236. differ as to the permutations of the elements a 1
Since I dined with all six friends once and with and a 2 , b1 and b2 , c1 and c2 • Each group includes
every five, twice, it follows that I dined with 8 permutations, and all these permutations cor-
every five friends once in the absence of the sixth. respond to one and the same permutation of the
But then I dined three times with every four (two letters of the expression a4 ~'1'4 • Thus, the num-
dinners in a group of five and one in a group of ber of permutations of the letters of this expres-
six), four times with every three and five times . . 720
SIOn I S g =
90 .
with every two. At all these dinners I met each
one of my friends 7 times, which means that I Finally, consider the permutations of the let-
dined out once together with each friend. Each ters of the expression a5 ~5 'f. If we temporarily
friend was absent at 6 dinners (at 5 dinners as a put a 2 = a1, a 3 = a2, ~~ = bit ~ 3 = b2, 1'2 = cit
couple and at one dinner as a group of five). And
since I dined 8 times without one of my friends,
r = c2 then each admissible permutation of the
letters of the expression a~~5 ~ is a permutation
I dined twice alone. of the letters ait a 2 , bit b2 , c1 , c2 • However, some
permutations of the letters ait a2 , b1, b2 , cit c2
237. yield one and the same permutation of the letters
The 12 students can line up to each examiner in a, ~.I'· For examgle, a 1a 2b1c2b2c1 and a 2 a 1b1c2 b2c1
12! ways, to the two examiners in (121) 2 ways. give us a6 ~ 21'3 ~ 31' . This occurs if some pair of
Then, in Cl 2 X 111 cases at least one student will letters (ait a 2), (bit b2), or (c1, c 2) come together.
be answering the questions of both examiners, The letters a 1 and a 2 stand together in 2 X 5!
in Cf2 X 10! cases this will be the fate of two permutations, and also the letters (bit b2 ) and
students, etc. Applying the inclusion and exclu- (c1 , c2 ). The letters of both pairs (a 1 , a 2 ) and
sion formula, we find that the number of reasonab- (b1 , b2 ) stand together in (21) 241 permutations
le ways of distribution is [just as the pairs (ait a 2), (cit c2) or (b1, b 2),
1 1 1
(12!)2 [ 1-1+21-3!+4!-···+ 12! =
1 J (cit c 2)]. Finally, all three pairs stand in succession
in (21) 3 31 = 48 permutations. By the inclusion
and exclusion formula, we find that in 61 - 6 X
= 121 X 176,214,841 X 5! + 3 (21) 2 X 41 - (21) 3 3! = 240 permuta-
tions not a single pair of letters stand together; in
238. 3 [2 X 5!- 2 (2!)2 41 + (2!)3 3!] = 288
Similarly, we get the answers permutations exactly one of the pairs of letters
(6!)2 [1-1+ i,- i, +···+ :, ]=190,800 (at. a2 ), (b1, b2 ), (cit c2) stand together, and in
3 [(2!)2 4!- (2!)3 3!] = 144
173
permutations exactly two such pairs of letters interval n - 2 and place in them p - 1 "divi-
£tand together. Whence it follows that the desi- ders" so that no two dividers are adjacent. Accor-
red number of permutations of the letters a, ding to the results of page 57, this can be done in
f3, y is C~=~- 1 ways. Altogether we have n!C~=~- 1 ways.
288 144 48 In the same way, we can divide m Frenchmen into
240+y+ (2!)2 + (2!)3 =426 s groups of the indicated type in m!c:,.-_!8 _ 1 ways.
These modes can be combined in the following
(if the letters a1 and a 2 are together, then their manner:
permutation does not alter the order of the let- (a) p groups of Englishmen and p - 1 groups of
ters a, ~. ')'). Frenchmen,
(b) p groups of Englishmen and p g~;oups of Fren-
240. chmen, the English leading,
First let us divide the players of each country (c) p groups of Englishmen and p groups of Fren-
into ordered pairs. For each country, this can be chmen, the French leading,
done in ~ = 12 ways (the order of the pairs them-
(d) p groups of Englishmen and p + 1 groups of
Frenchmen. Hence, the total number of modes is
-selves is inessential). We then have 12n modes of given by the formula
partition in all. The pairs may be permuted in m! n! [2 (C)h_ 2 C~- 2 + Cfn-sCh-s+C~-4C~-4 + ... )
(2n)! ways. And so the total number of admissible
permutations is equal to 12n (2n)!. + (Cfn-2 C~-s + Cfn-sC~-4 + ... )
+ (Cfn_sC\!.-2 + c~-4Ch-s + ... )I
241.
The first horizontal line may be painted in 8! Removing the brackets in the formula on page
ways. Each subsequent horizontal line must be 136, we get the same result.
painted so that the colour of each square differs 244.
from that of the one under it. This can be done in
First find the number of numbers without
r 1 1
8! L1-1+2T-3T+
1 = 14,833
••• +8T J the digit 0. The three digits in a number can be
chosen in C~ = 84 ways. Out of three digits we
can generate 36 six-digit numbers, out of two,
ways. By the rule of product we find the total 26 , and out of one, 16 • By the inclusion and ex-
number of ways of painting to be 81 (14,833) 7 • clusion formula, there are
242. 3•-q26+q16=540
A sample (including possibly 0, 1, ... , n things) six-digit numbers which have all the three digits
<>f n distinct things can be obtained in 2n ways. that we chose. Therefore the total number of
After this sample has been taken, adjoin the mis- six-digit numbers that have exactly three non-
sing things of the number n identical things. We zero digits is equal to 84 X 540 = 45,360.
thus get 2n choices. The number of permutations If a zero appears in the number, we have to
choose another two digits in it. This can be
of all 2n things is equal to ( 2 ~)! • done in C~ = 36 ways. Suppose the chosen digits
n.
are 0, 1 and 2. Then the first digit of the number
243. must be either 1 or 2. If, say, the first is 1, then
In every admissible permutation, both the Eng- the other five digits can be any one of 0, 1 or 2,
lishmen and the Frenchmen occur in groups con- provided that 0 and 2 occur. By the inclusion and
sisting of at least two men. Here, the number of exclusion formula, we find that these five digits
groups of Frenchmen differs from the number of may be chosen in
groups of Englishmen by no more than 1. We 35-Cl25+f6=180
compute the number of ways of partitioning n
Englishmen into p ordered groups so that each ways. But then the total number of six-digit
group contains at least two men. To do this, ar- numbers made up of the digits 0, 1, 2 and con-
range them in some order (nl ways), and then taining all these digits is equal to 2 X 180 =
take thP aecond, the third, ... , etc. up to the 360, and the total number of six-digit numbers
174
made up of three digits, of which zero is one di- in accord with the indicated conditions. And so,
git, is equal to 36 X 360 = 12,960. We get likewise, fm?1 = 1 = C~ = F<n'f1 • From what
45,360 + 12,960 =58,320 numbers in all. has been proved, it follows that for all values of
n and k we have the equality
245. <"> _- F<k>
rn n_ - c<k>
N
As in Problem 244, we find
c: [km-q (k-f)m-t-c: (k-2)m- ... + where, it will be recalled, N=E ( ntk)
-f- ( -1)k-1C~- 1 tm] -f- (k-1) c:- 1[km-1_
21r.7.
-cL 1 (k-nm-1-t-CL 1 (k-2)m-I- ... The given elements may be permuted in
... + (-f)k-2 c~=~1m-1] (2n)!
p (2, 2, ... ' 2) = 21i""'"
246. ways. Let us find the number of permutations in
We denote the number of permutations of this which the elements of the given k pairs occur
kind by r~">. These permutations fall into two together. In such permutations, we can combine-
the adjacent elements of one and the same pair.
classes. In tho first class are those that begin We then get a permutation of k distinct elements
with 1, in the second, all the rest. If the permu- and of elements belonging to n - k pairs. There-
tation begins with 1, then subtract 1 from all
the numbers in it and discard the zerp in the are (2n-k)!
n k
2 sueh permu t a t"10ns. s·mce k paus
.
leading position (for example, 14,589 first goes
into 03,478 and then into 3,478). This yields a may be chosen in c~ ways, it follows, by the in-
(k - i)-permutation of the same type but con- clusion and exclusion formula, that in
sisting of the numbers 1, 2, .. . ,n- 1. Therefore
the number of permutations of the first class (2n)! -Cl (2n-1)! -f-C2 (2n-2)!
2n n 2n-1 n 2n-2
is r~~/>. Every permutation of the second class
begins with a number greater than 1. Subtract ... -f-(-f)n CJ'tn!
the number 2 from all numbers of such a permu-
tation. We get a k-permutation of that same type permutations no two identical elements come-
which includes the numbers 1, 2, ... , (n- 2). together.
Therefore the number of permutations of the
second class is r~~ 2 • Thus, the following recur- 248.
rence relation holds true: Just as in the preceding problem, we get
(qn)! -Cl (qn-q-f-1)! -f-C 2 (qn-2q-f-2)! __ ..•
r~> = r~.=-l >+ r~"-!. 2 (qf)n n (q!)n-1 n (qf)n 2
Set (It)
Fn It
=CN, where N=E { -n+
2-
k) . We have 249.

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

n(n+1)6(4n-1) 3n2+3n-1=! (n-1)X c~ [2Cf._s + 2C~- 1 - ch-2 + 2]

X (n-2) (4n-3) points of intersection.


1.2-59
178
273. = E ( n+a-1}
2 +
= m k -1 and, consequently,
Each intersection line is determined by two pla- (m - k) 2 quadrilaterals, and for even values of
nes, and each plane, by three given points. The
straight lines fall into classes according to the
number of points (of those specifying the first
a, a= 2k, we have s = E ( n+a-1}
2 = m k -1 +
plane) that enter into the number of points spe- and, hence, (m - k - 1) (m - k) quadrilaterals.
cifying the second plane. All the points are di- Summing with respect to a, we get the total
number of quadrilaterals:
stinct in ~ C!c:,_ 3 cases (choose three points out
m m
of n and another three points out of the remaining
n - 3, the order of choice being irrelevant). ~ (m-k)2+ ~ (m-k)(m-k+1)=
If one point appears in both triples, then we get k=1 k=1
~ C~C~_ 3 choices, and if two points occur in both m (m-1) (4m-5) n (n-2) (2n-5)
= 6 24
triples, then~ C~C~_ 3 choices. In all we have
The case when n is odd is considered in similar
1 fashion.
2 c~ (c~-s + 3C~-s + 3C~_ 3 ) = If it is assumed that the quadrilaterals have
identical sides, then a, b, c, d must satisfy th&
_ n (n-1) (n-2) (n-3) (n2+2)
-- 72
+
relations a :s:;; b :s:;; d :s:;; n, a :s:;; c and a c=
+
= b d, whence it follows that b :s:;; atn and
straight lines. Of this number,
2b- a :s:;;c :s:;;n. If we put E (atn} = s, then
_!_ cscs _ n (n-1) (n-2) (n- 3) (n-4) (n- 5)
2 n n-s- 72 the number of quadrilaterals with a given value
of a is (n - s +
1) (s - a +
1).
do not pass through a single given point. n(n+2)(2n+5)
For an even value of n, we get 24
274. . (n+1)(2n2+7n+3)
quadrilaterals ' and for odd n ' 24 .
Denote the sides of a quadrilateral by a, b, c, d.
Without loss of generality, we can assume that a
is the smallest side, c the side opposite to it, and 275.
that b < d. Then a < b < d and a < c. Besi- The number of circles drawn is C~, with C~-t
des, since the quadrilaterals are circumscribed circles passing through a given point, and C~-2
about circles, it follows that a +
c = b + d. circles passing through two given points. Take
Whence a + c > 2b. Therefore, for given va- one of these circles drawn through the points
lues of a and b, the length of c can assume values A, B, C. We have C~- 3C~_ 1 + 3C~_ 2 - 1
from 2b - a + 1 to n and the inequality
circles not passing through a single one of these
2b - a :s:;; n - 1 must hold.
a+n-1 points. The chosen circle intersects each of
We have thus proved that b :s:;; 2 and them in two points. Furthermore, we have
3 (C;_ 1 - 2C~_ 2 +
1) circles passing through
that 2b- a+ 1 :s:;; c :s:;; n. Denote E (a+;- 1 ) one of the points A, B, C and not passing through
two of them. They yield one intersection point
by s. Then for a given value of a we have each that is different from A, B, C. The other
s circles intersect with the chosen one in two of
~ (n+a-2b)=(s-a) (n-s-1) the points A, B, C. Thus, the given circle yields
b=a+i
2 (C~ -3C~_ 1 +3C~- 2 -1)+ 3 (Ct.- 1 - 2CA,_ 2+ 1)
quadrilaterals.
Let n be an even number, n = 2m. Then for (n-3) (n-4) (2n-1)
odd values of a, a= 2k- 1, we have s = 6
179
intersection points different from A, B, C. Alto- ~ y ~ 19, and we have 9 triangles with z = 19.
gether we get In exactly the same way, we find that the num-
ber of triangles for which z = 18, 17, 16, 15, 14
..!.cs (n-3) (n-4) (2n-1) 5 (2n-1) c• is equal, respectively, to 8, 6, 5, 3, 2, making
2 n 6 3 n 33 triangles in all. In the same way we find the
number of triangles with perimeter 43 to be 44.
points of intersection that differ from the given
points. Appending these n points, we find that 283.
the greatest number of intersection points is Take a triangle with perimeter 4n. Let its sides
be equal to x, y, z. Adding 1 to the lengths of
5 (2n-1) c•n + these sides, we get the numbers x +1, y +1,
3 n
z+ 1, which are the lengths of the sides of a
triangle with perimeter 43. But besides we have
276. triangles with sides (1, 2n + 1, 2n + 1),
Adding the plane k +
1 to the earlier drawn (2, 2n, 2n + 1), ... , (n + 1, n + 1, 2n + 1),
k (k = 1, 2, ... ) planes, we get 2k new parts, which cannot be obtained in the manner just
and the total is 2 + 2 + 4 + 6 + described .
... + 2 (n - 1) = n2 - n + 2.
284.
277. Let N = 12n. We have to find the number of
The total number of ways of painting 6 faces in triplets of the positive integers x, y, z such that
6 different colours is 6! = 720. Divide these x ~ y ~ z, x + y + z = 12n and x + y > z.
modes into classes consisting of patterns that From these inequalities it follows that 4n ~
can be brought to coincidence via motions. The ~ z ~ 6n - 1. Here, if z = 2k, then x + y =
cube can be brought ~o coincidence with itself = 12n - 2k and the number of integral solutions
in 24 ways (a face into which a fixed face of the of this equation such that x ~ y ~ z = 2k is
cube goes can be chosen in 6 ways; there then 3k- 6n + 1. But if z = 2k + 1, then we have
remain 4 rotations of the cube under which the 3k - 6n + 2 solutions. The number of trian-
given face goes into itself). For this reason, each gles is therefore
class consists of 24 patterns, and the number of 3n-1 3n-1
geometrically distinct ways of painting the cube
is 720/24 = 30. ~ (3k-6n+1)+ ~ (3k-6n+2)=3n2
k=2n k=2n
278. The remaining cases are analyzed analogously.
The solution is obtained along the same lines as When passing from N to N +
3, arguments
that of Problem 277. The number of ways of similar to those used in Problem 282 may be
painting the faces is 4!/12 = 2. applied.

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.

But the card labelled 1 can be drawn in only one 305.


way, the card labelled 2, in two ways, etc. And We prove the assertion by means of induction with
two cards with the number k > 1 can be chosen respect to the number s of curves. If s = 1, then
in C~ ways. Therefore, altogether we have it is obvious since there are no points of interse-
ction and the number of regions is 1. Let the
1 (2k -1) + 2 (2k- 2) + ... assertion be already proved for s curves. Take a
system of s curves having nr intersection points
···+(k-1){k+1)+ k(k; 1) of multiplicity r, r = 2, 3, ... (a point is of
multiplicity r if r curves intersect in it). Then
k-1 they bound 1 + n2 + ... + rnr+1 + ... clo-
= ~ s(2k-s)+ k(k;- 1 ) 2k (k2-1) sed regions. Draw the curve s +
1 and let it have
3 kr intersection points of multiplicity r with the
•=1 earlier drawn curves, r = 2, 3, ... , altogether
n(n2-4) a total of k 2 + k 3 + ... + kr+ 1 + ... points of
12 intersection. These points of intersection divide
it into k 2 + k 3 + ... + kr+l + ... parts. Each
ways of obtaining the sum n = 2k. But if n is part of the drawn curve corresponds to one new
odd, n=2k-1, then region, and so the number of regions is now
n=1+(2k-2)=2+(2k-3)= ... =(k-1)+k, (1 + nz + ... + rnr+t + : .. ) +
and the number of ways is +(kz+k3+ . .. +kr+t+ •. . ) (*)
k-1
But if the new curve has passed through a point
~ s (2 k- s- 1) = k (k-1~ (2k-1) n
-(n2-1) (multiplicity r) of intersection of the earlier drawn
12 curves, this point now becomes an intersection
s=1
point of multiplicity r + 1.
303. Denote by n~ the number of intersection points
of multiplicity r in the new system of curves. It is
Split the samples into classes according to the
number of identical objects in each. The number
clear that n~+i = nr+ 1 - kr+ 1 +kr (from the
earlier points of intersection of multiplicity
of samples containing k identical objects is r+ 1 we must subtract kr+l points which had
C2;! 1. Therefore, the total number of samples is multiplicity r + 1 and increased it, and we must
add kr points that had multiplicity r and increa-
C~n+1 +C~;~1 + ··· +Cgn+1 = sed it). But then
2n+1 1+ n~+2n;+ ... +rn~+ 1 = 1 + (n 2 -k3+kz)+
~ ~ c~n+1 = 22n +2(n3- k 4 + k3) + ... + r(nr+t-kr+t +kr)+ ...
k=O
= (1+nz+2n3+ ... + rnr+t +. · .)+
304. + (kz+k3+ ... +kr+t + ... )
If the first term of the progression is a and its
common difference is d, then the third term is We have thus proved that 1 + n~ + 2n; + ...
a +2d. By hypothesis, a +
2d :;:;; 2n. This ine- ... + rn~+ 1+ ... is equal to the number of
quality has 2n - 2d solutions for a given d. regions for the new system of curves [see formu-
In all, we get la (*)]. By virtue of the principle of mathemati-
cal induction, the assertion holds true for any
(2n-2)+(2n-4)+ ... +2= n (n-1) number of curves.
184
306. third one on one diagonal of a face with some one
of these two vertices, or three vertices lie pair-
The straight lines of the first pencil split the pla- wise on one diagonal of a face, see Fig. 39).
ne into 2m parts. The first line of the second pen- With four white vertices, there are 7 patterns (all
cil intersects all m lines of the first pencil and four vertices lie on one face, or three vertices
yields m + 1 new parts. All the other lines of the A, B, C lie on one face, and the fourth lies on one
second pencil have m + 1 points of intersection edge with vertex A, or with vertex B, or with
with the earlier drawn lines. And so we have a
total of
2m+m+1+(n-1) (m+2)=nm+2n+2m-1
parts.
307.
No, for otherwise the number of connections would
. 77x15
be equal to the fraction - 2- A=?lf[?l~rfel
ltjf lL!} 1l:J) J2.:j)
308.
The sum of the coefficients is equal to the value
of the expression for x = y = z = 1. Substitu-
ting these values, we find the sum to be -1.
309.
The maximal number of balls among which there
are no 15 alike is 74 (10 white balls, 10 black,
12 yellow, and 14 red, green and blue each). But Fig. 39.
if we take 75 balls, there will be 15 balls of one
colour among them. vertex C, or is diametrically opposite to vertex
B; or two vertices lie on one edge and the other
310. two lie on the edge diametrically opposite to it,
Classify the colour patterns according to the num- or there is not a single edge with identically
ber of white faces. There is a unique way of pain- coloured ends). The cases of 5, 6, 7, and 8 white
ting so that no face is white and one pattern that vertices reduce to the earlier analyzed cases by
contains one white face. For the case of two white interchanging the colours. Altogether we get
faces, there are two colour patterns: either the 1+1+ 3+3'-l-7+3 +3 + 1 +1 = 23
white faces have a common edge or are opposite. colour patterns.
For three white faces, we again have two patterns:
either there are two opposite white faces or all 312.
white faces adjoin one and the same corner. A cube has 11 developments (Fig. 40). The first
The cases of 4, 5 and 6 white faces reduce to ear- six solutions yield those developments in which
lier considered cases by interchanging the colours. four faces of the cube are located in one strip
We obtain a total of 1 + 1 + 2 + 2 + 2 + 1 + of the development. The four succeeding develop-
+ 1 = 10 ways of painting the object. ments are those which have three faces in one
strip but no fourth faces. And, finally, in the
311. last solution there are no three faces in any one
We now paint the vertices of a cube. There is strip.
one pattern without white vertices, one pattern
with one white vertex, 3 with two white vertices 313.
(the white vertices lie on one edge, on one diago- There are only 4 ways of painting it. For the
nal of the face or on one diagonal of the cube), proof, see Hugo Steinhaus's Sto Zadach (One
3 patterns with three white vertices (three verti- Hundred Problems), Panstwowe Wydawnictwo
ces lie on one face or two lie on one edge, and the Nauk owe (Poland), Problem No. 40.
185
s: for s = 1 it has already been demonstrated.
314. Let it already be proved for s < m, and n =
See Steinhaus's book, Problem No. 44 (in Problem
313). = 2k, + 211 • + . . . + 2km. Then after the
(n - 2km)th step we get 2m-1 particles located
315. at points with coordinates ±2k, ± 2k• ± ...
We will first prove that after the lapse of 2n units
of time there are only two particles left, located ... ± 2km-1. The distance between the nearest
k +1
respectively at points with coordinates 2n and particles is not less than 2 m-i . Therefore,
-2n. When n = 1, this assertion is obvious.
Assume that it has been proved for n = k. Du- in the course of 2km-1 - 1 steps, particles gene-
ring the subsequent 2k - 1 steps these particles rated by various "centres" do not interact, and
after 2km steps each centre yields two particles
at a distance of ±2km from it. In other words,
we obtain particles at points of the form
±2k, ± ... ± 211m. The proof is complete.
316.
To decode the word, it suffices to indicate the
gaps (blanks) between characters which are ini-
tial for letters coded with two characters. These
blanks have to be chosen from among 11, no two
being adjacent (we have a total of 13 blanks if
we include the initial and terminal ones, but from
the statement of the problem it is clear that we
cannot take either the terminal blank or the one
preceding it). If the word contains p "binary,.
letters, then we have to choose p blanks. This
can be done in Cf2 _P ways. We therefore_ get
q2 + Ch + qo+ q+ ca+ q+ c: = 233
ways of reading:,the given word.
Fig. 40. 317.,
The number of p-digit numbers without any ones
is 8 X 9P-1 • Hence between 1 and 10,000,000
do not interact, and, by the induction hypothe- there are
sis, each of them will yield (after 2k steps) only
two particles distant leftwards and rightwards 8 (1 + 9+92+93+94+95+9°)= 97-1 =4,782,96S
2k. In other words, we get one particle at point numbers whose representations do not contain 1.
211+1 and two at point 0, and one at point -2k+I. This is less than half of 10 7•
The particles at point 0 annihilate each other,
leaving two particles, which proves our asser- 318.
tion. Let us consider the first three characters of each
Thus, after 128 steps there remain two particles word. These signs form at most 23 = 8 combina-
at points with coordinates 128 and -128. After tions. We will show that each combination of these
129 steps we get four particles at points 129, characters is associated with at most two words.
127, -127, and -129. In other words, we will show that if three words
+
If n = 211 • 2k• + ... + 2ks, k1 > k 2 > ... have the first three characters in common, then
... > k 8 , then we get 28 particles whose coordi- at least two of them have another two charac-
nates are of the form ±211 • ±2k• ± ... ± 2ks ters in common. Indeed, construct a table con-
(any combinations of signs are admissible). sisting of the last four characters of each of
This assertion is easily proved _by induction on these three words. In each column there are at
186
least two coincident characters. Since the num- solving this problem, we proved the so-called
ber of pairs composed of three words is 3 and lesser theorem of Fermat: if p is prime, then for
the number of columns is four, it follows that any integer n, the number nP - n is divisible
-coincidence will occur in two columns for at by p.
least two words. But this means that the words
have another two coincident characters, making 320.
a total of 5 coincident characters, which is a Since 1 is the least of the given numbers, it must
contradiction. occupy the corner; 2 must stand next to it in the
Thus, to every combination of the first three same vertical or horizontal line. Then the num-
-characters there correspond at most two words. bers 1, 2, ... , n will occur on a single vertical
line or horizontal line. The smallest of the rema-
ining numbers is n + 1. It must occupy a posi-
. . .-
• • • • • • •

tion next to 1. Continuing to reason in this fashi-
on, we see that the numbers are arranged in a
unique manner. But to begin with we can put 1

. .. -.. -.. -..


in any one of the corners of the board and we can
choose either a horizontal line or a vertical line
for the sequence 1, 2, ... , n. We thus get 8 ar-
rangements .

• • •
• •
.- 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

CVttl - -(aoa2n-1-a1a2n-2+a2a2n-a- · •• -a2n-iao)


· And so the coefficient of xm is CJ:'+l if
m < k, and cv:;l if m;;;;:. k. = -(aoa1-a1a2+a2a3- ••. -a2n-1a2n)
197
This completes the proof of equality (a). And so the coefficient of xk is equal to k + 1 if
Note now that the expansion(****) can be rep- 0 ~ k ~ n - 1, and to 2n - k - 1 if n ~
ll'Sented, by formula (*), as ~ k ~ 2n - 2. The answer may be written as
(1-tx2-tx4)n=ao-ta1x2-tazX4+ ... +aanx4n follows: n - 1 n - k - 1 I •
It follows from this that the coefficient of x2n 387.
in this expansion. is equal to an. On the other
hand, by formula (****), it is equal to .
S mce cr+l n+1 crn• cr-
n+1=r+1 n--; n cr-1
n-1• the le-
ft
aoaan- a1a2n-1 + a2a2n-2- ... + a2nao = hand member of the equality may be written as
=2aft-2af-t2a~- ... -t(-1)~ ~ (n+1_ 1 ) (CT-1)2 n(n-r)
Whence immediately follows equality (b). r r+1 n-l r (r-t1)
r
Rewrite equality (*) as ( n2 (n-t1)n)(cr- 1 )2 n(n-r)
(1-x3)n=(1-x)n (a 0 -ta1x+a 2x2+ ... +a 2nxBn) r2 (r+ 1) r n-1 r2 (r+ 1)
From this it follows that 388.
1-C~xa+C~xe- ... -t(-1)n c::xsn The number of permutations, with repetitions, of
+
=(1- Chx C~x2- ... -t(-1)nC:xn) n elements taken 3 at a time is n3 • Divide these
permutations into classes, putting in the kth
X (ao+a1x-ta 2x 2+ ... -ta 2 nxBn) class the permutations containing exactly k
If r is not divisible by 3, then the coefficient distinct types of elements. The number of permu-
of xr in the left-hand member is zero. But in tations of the first class is equal to ch. that of
the right-hand member the coefficient of xr is the second class is 6C~ (there are n choices of an
equal to element that appears twice in a permutation,
n - 1 choices of an element that appears once,
ar- Char-i+ C~ar-2- . .. + (- 1)T Ch.ao and after that, three permutations of these ele-
This means that this expression is zero if r is ments), while the number of permutations of the
third class is equal to Aft = 6Cft. In all, we have
not divisible by 3, and is (-1)kC~ if r = 3k. C~ + 6C~ + 6Cft permutations. Whence follows
This proves relation (c). the first relation. To prove the second relation,
Assuming x = 1 in the expansion (*), we get divide into classes (in similar fashion) the per-
a 0 -ta1-ta2-t ... +a~n=3n mutations with repetitions containing at least
one element of a fixed type. We see that
Putting x = 1 in the expansion (**), we have
(n+ 1)3- nS = 1 -t6Ch + 6q
a0 -a1 -ta2- ... -ta271 =1
whence follows the relation we wish to prove.
Adding and subtracting these equations, we arrive
at relations (d). 389.
385.
The proof is exactly the same as that of Problem
We have Ch terms of the form x&, 2C~ terms of 388, but here we consider permutations, with
the form x'xk, j =F k, and Cft of the form xixixk, repetitions, of elements of n types taken 4 at a
i =F j, i =F k, j =F k, making a total of C~ + time.
+ 2C~ + C~ terms.
390.
386. Consider the equality
We have
(~:~:1: ( 1 + . lf3) n { 2n . . 2n ) n
(1-tx+ ... +xn-1)2= =(xn-1)2X -2 '2 = cos 3 -t,sm 3 =
X (x-1)-2=(x2n-2zn+1) (1+2x-t3x2+ ... 2nn . . 2nn
••. -tmxm-1+ •.. ) =COS 3-tJsm- 3-
198
By the binomial theorem we have Equality (d) is derived analogously from a con-
sideration of the expression (1 + i)n.
( 2!)n {1+e~ (- i v'3>+e~ (-i V3)2+
392.
We have
+CJU-i VS>s+ ... }=
(-1)n ,/0 E (~)
=~{1-3Ct+9e~- ... - i v3X (1+x)n+(1-x)n=2 ~ e!11x2k
k=O
X [eh-3C~+ ... ]}
The coefficients of this polynomial are positive.
Equating the real and imaginary parts of both Therefore, the polynomial assumes its greatest
members of the resulting equality, we obtain value for x = 1. This value is equal to 2n.
the required relations.
393.
391. We have
Consider the identity n
(1+x)n=e~+ehx+e~xz+e~x3+ ... +e~xn ~ n! (m-x)!
and in it set successively x=1, 8, 82, where ~ ml(n-x)!
=0
8 =cos 2: + i sin 2: and therefore 82 + e + 1 = 0. m+1
This yields m-n+1
and
2n = e~ + eh + e~ + ... + e~.
n cxer I r n
(1+8)n=e~+eh8+e~82+ .•. +~en, ~ ~- n. en ~ (x+r)! (2n-x-r)l
~ ex+r - (2n)! ~ xl (n-x)!
(1 +82)n=e~ +Ch82+e~8'+ ... +~82n =0 2n =0
But 1+e"+e2"=0 if k is not divisible by 3, n
and 1+8"+82"=3 if k is divisible by 3. Hence - (nl) 2 ~ er ~-r (n!) 2 en+1 2n+1
- (2n)! ~ x+r 2n-x-r= (2n)l 2n+1 = n+ 1
2n +C1+8)n+ (1+e2)n=3 (e~+e~ +e~+ .. . ) =0
Since 394.
1 + 8 = -82 = - (cos 2; + i sin 2: ) = The sum in the left-hand member reduces to
n

=cos 3:rc+ zsm


.. :rc , ~ e~+"- 1 = e::+n -1
3 k=i
The sum in the right member has the same
f+ 8Q=
n :n; • • :n; value.
-8=COS--ZSln-
3 3
it follows that 395.
We have
n:rc
2n+(1+8)n+(f +82)n=2n+2 cos 3 n cx-1 n
~_!!:.::..!.. (n-1)! ~ x (2n-x-1)!
Whence it follows that ~ ex (2n-1)1 ~ (n-x)!
X=i 2n-1
e~+efi+C~+ ... = i( 2n+2 cos n;) 2n
n
~ en-1
X=1

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.

(g) We have C~=C~-=:._~ +C~_ 1 • Therefore 402.


Sn=C~-t +C!_ 1-2 (C!_ 1 +C~_ 1 ) The largest coefficient in the first expansion is
the coefficient of a3b3c4 (or a3b4c3, a 4 b3c3). It is
+3 (C~_ 1 +C!_ 1 )- ... +(-1)n-lnC~=~ equal toP (3, 3, 4) =4,200. In the second expan-
sion the largest coefficient is the coefficient
P (4, 4, 3, 3) of a3b3c4d4.
_co c1 +C2n-1
- n-1- n-1 - · · · + ( - 1)n-l cn-1
n- 1
This sum is equal to 1 for n = 1 and to 0 for 403.
n >
1. (h) This sum is The binomial formula yields

Sn= n~ [C!+ 1 +C~+ 1 + ...


1 +C~:til= 1
-2
(1-4x) =1+
2n+1-1
n+1 + ~ (-{-) (-{) ... (-{--n+ 1 ) (-4x)n
. . (k+2) (k+1) 1t+2 .
It_
(1) Smce Cn-(n-j- 1)(n+ 2)cn+2 , 1t follows """' nl
n=1
that the sum is (*)

1 2 3 And so the coefficient Y n of xn is equal to


Sn (n+ 1) (n+2) (Cn+2 +2Cn+2 + ...
y _ 1X3 ... (2n-1)X2n = (2n)! =Cn
•.. +(n+1) c~+~) n- nl (n!)2 2n
201
1 Since
2 (1-4x)-1=Jj:Ax+42z2+ ... +4nxn+ ••.
For (1-4x) we have, by the binomial theo-
rem, the expansion the desired equality follows immediately.
1 (c) Square the expansion (**).
(1-4x) 2 =1+ 405.
oo ~ ( _ ~) (- ~) ••• ( - ~ -n+1) -Denote the even numbers by the letter E and the-
odd numbers by 0. The first 4 elements of the·
+~ n! third row have the notation OEOE, the fourth,
OOEO, the fifth, OEEE, the sixth, OOOE, and
n=i
the seventh, OEOE. The cycle then repeats (the-
first 4 elements of each row are determined by
the first four elements of the preceding row). The-
n=i re will therefore be at least one even number in.
But every row.
Yn c:n (2n)! 406.
1-2n = - 2n-1 = (n!)2(2n-1) We will show that each row of the triangle is an:
arithmetic progression, and the sum of elements.
= -~ (2n-2)! = -~ y equidistant from the ends is divisible by 1,958.
n [(n-1)!]2 n n- 1 We will argue by induction with respect to the
Therefore number of the row. For the first row, the asser-
1 00 tion is obvious. Let it be proved for the nth row.
(1-4x)2 =1-2 ~ Y~- 1 xn (**) We take three adjacent elements a, a + d, a + 2d'
of the nth row. In the row n + 1 they correspond
n=1 to the elements 2a + d, 2a + 3d, the difference·
where we set Yo= 1. of which is equal to 2d. Hence, we have a progres-
sion in the (n + 1)th row with common diffe-
404. rence 2d. To find the sum of elements of this row
equidistant from the ends, it suffices to find the·
(a) Multiply together the expansions (*) and (**)· sum of the first and last elements. But if the first.
This yields two elements of the nth row are equal to a and
00 00 b, and its last two elemel\ts are equal to c and
1 = ( 1+ ~ Y nxn) ( 1- 2 ~ y ~- 1 xn)
d, then the sum of the first element and last ele-
ment of the (n + 1)th row is equal to (a+ b) +
n=i n=i + (c + d) = 2 (a + d) and for this reason, by
00 the induction hypothesis, is divisible by 1,958.
Hence, for any row, the sum of the first and last
= 1+ ~ [ Y n- 2 ( Y n-1 + ~ Y n-2Y1 + • • · elements is divisible by 1,958, but then this.
n=i property is also possessed by the sum of the two
elements of the penultimate row, that is the last.
... + ! Y n-1) J xn element of the array.
407.
Whence follows the desired equality.
(b) Square the expansion (*) to get (a) We prove the equality by induction with res-
pect to n + m. Let equality (a) be proved for
00
all k and s such that k + s < n + m. We then
(1-4x)-1=(1+ ~ Ynxn) 2 have
n=1 Un+m = Un+m-1 + Un+m-2 = Un-1Um-1 +UnUm+
=1+(Y0Y1+YtYo) x+ + Un-1Um-2+ UnUm-1
+ (YoY2+ Y1Y1 + Y2Yo) x2 + ... = Un-1 (Um-1 + um-2) + Un (um + Um-d =
+ (YoYn + YtYn-1 + ••. + YnYo) xn+ ••• = Un-fUm + UnUm+t (*)
202
:Since for m + n = 1 the equality (*) is verified Hence, the sum of these numbers is equal to
~irectly, it holds true for arbitrary m and n. 21un +
33un+l· But Un+s = 13un +
21un+~>
(b) We carry out the proof by means of induction Un+9= 21un +
34un+l· From the inequality
-on k. For k = 1 the assertion is trivial. Let it be Un+s < 21un + 33un+l < Un+9 it is clear that
proved that ukm is divisible by Um· By(*) we have 21un +
33un+l is not a Fibonacci number.
+
Uck+1lm = Ukm+m = Ukm-fUm UkmUm+1
411 .
.and therefore u (k+!)m is also divisible by um•
By induction we infer that all unm are divisible Assertion (a) is proved by induction. For n = 1
by Um· it is obvious. Let it hold for n,
(c) Let un and un+l be divisible by k =1= 1. Then
.also un-1 = un+! - un would be divisible by k. u2+ u4+ ••. + u2n= u2n+t-1
Continuing this reasoning, we would find that
u 1 = 1 is divisible by k, but this is impossible.
+
Add Uzn+z to both sides. Since u 2n+ 2 u 2n+! =
= Uzn+3• we get Uz u 4 + + ... + u2n+ 2 =
= u2n+a- 1, which proves our assertion. (b) is
408.
We will denote the largest common divisor of the proved in exactly the same manner.
numbers a and b by (a, b). From the equality Assertion (c) is also proved by means of mathe-
um+n = Un-!Um + unum+! it follows that
matical inductioft.
To prove assertion (d) note that
·(um+n• un) is a divisor of un_ 1um and, since un
.and un-i are relatively prime, a divisor of um. 2 2 2
un+1- UnUn+2= un+i-un- Unltn+1
Conversely, (um, un) is a divisor of Um+n· There-
fore, (um, un) = (um+n• un)· But then if n = = Un+i (un+1- un)- u;;_=un-fUn+i- u;.
= km + q, it follows that (um, un) = (um, uq)·
Applying the Euclidean algorithm, we see that And so u;+ 1 - UnUn+2 =
•(um, un) = u <m. n>· In particular, (ul,ooo• u77 0 ) =
= u1o =55. = ( -f)n [u~- uou2] = ( -1)n.
409. Assertion (e) and (f) will be proved together.
Consider the sequence composed of the last four For n = 1 they are obvious. Let them be proved
.digits of the Fibonacci numbers. Since the for n = k. By (d), we then have
number of four-digit numbers of the form
·()000, 0001, ... , 9999 is equal to 104, the num- UfU2+ U2U3+ • • • + U2kU2k+1 + U2k+iU2k+2
ber of pairs of such numbers is equal to 108. = u~k+i -1 + Uzk+fU2k+2 = u2k+fU2k+3-1 = u~k+2
Hence, there will be two pairs (um, um+!) and
~un, un+ 1), n > m, among the first 100,000,001 and
Fibonacci numbers such that um and un and also
um+! and un+ 1 have the same last. four digits. UfU2 + • • • + U2k+fU2k+2 + U2k+2U2k+3
But then the numbers un - um and un+! - um+!
terminate in four zeros. Since
= u~k+2 + U2k+2U2k+a= u2k+2u2k+4 = u~k+3 -1
Un-1- Um-1 = (un+1- Um+i)- (un-Um) Hence, these assertions are also true for n =
it follows that un-! - um-! also terminates in +
= k 1, and thus for all n.
four zeros. Continuing to reduce the index and In proving (g), note that by virtue of (a) and
taking into account that u 0 = 0, we find that the (b), u 1 + + ... +
u2 un+! = un+a - 1. The-
number un-m terminates in four zeros. refore, if (g) holds, then
410. (n+1) u1+nu2+ •.. +2un+un+1
Suppose the numbers un, un+~> un+2• ••. , un+7 = Un+4-(n+3)+ Un+a-1 = Un+s-(n+4)
have been chosen; let us express them in terms Since equation (g) is true for n= 1, it is also
-of un and un+ 1 : true for all n.
+ +
.ltn+2 = Un Un+h Un+3 = Un 2un+1, Relation (h) follows readily from the fact
+
Un+4 = 2un 3un+h that
+ +
Un+5 = 3Un 5Un+t. Un+6 = 5Un 8un+h uan+2-1
2
+ u3n+3 = uan+s-1
2
Un+7 =Sun+ 13un+1
203
To prove (i), put m = n in the formula un+m = 415.
= + UnUm+t· We find that u2n =
un-tUm
All objects may be permuted in (pq r)l ways. +
= + unun+t = u~+t - u~-t· The proof
un_1 un Then we choose r persons out of p that get q + 1
is the same for u n+t = u~ + ~+t· Putting m =
2 objects (c; ways) and distribute the objects to
= 2n here, we have +
1 objects, respe-
them in order, giving q or q
.U3n= Un-1U2n + UnU2n+1 ctively. Since the result does not depend on the
2 2 (2 2) order of the elements in the groups, it follows
=Un-1 (un+1-un-1)+Un un+un+1 = that C~ (pq + r)l must be divided by (q!)P-r x
3
= un+i + un-
3 3
un-1 ((q + 1)1)r = (qi)P (q + 1)r.
416.
412. i2 it
it
Let un:::;;: N < Un+t· Then 0:::;;: N-Un< un-1 Since ~ 1=it=Cft• then ~ ~ 1
.and so there is an s < n - 1 such that u 8 :::;;: io=i it=i io=1
:::;;: N - un < Us+t· But then 0 :::;;: N - un -
- Us < u8 _t and s - 1 < n _.. 2. In a few steps i2
we find N = un Us + +
up + ... +
ur; the = ~ eft= CT +1•
2 Furthermore, we have
successive indices n, s, p, . . . , r differ from one it=1
.another by at least 2. ia i2 it ia

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

The characteristic equation is of the form r 2 - 2r x C~+~-sC~= ~ (-1)•C~+sc~-s. Whence im-


cos a+ 1 = 0. Its roots are r1, 2 = cos a ± i . B
sin a. Therefore an= C1 (cos a+ i sin a)n + mediately follows the required identity. The
+ C 2 (cos a- i sin a)n. Putting n = 1, 2, we remaining identities up to Problem 438 inclusive
get the system of equations are proved in the same way.

{ (Ct+C 2)cosa+(Ct-C2) i sina=cosa, 439.


(Ct + C2) cos 2a + (Ct- C2) i sin 2a =cos 2a The proof is by induction with respect to n.
INDEX 205

Absorbing barriers 83 Convergence


Alexandria 20, 26 interval of 106
Algebraic fractions 104 of number series 105
Al-Kashi 72, 112 Crew of spaceship 15
Alternating sums of combinations 37 Czar Dadon 82
Ambo 29
Amino acids 13
Anagrams 26 Decomposition into partial fractions 116
Application of the theory of recurrence relations to Derangements 44
problems of transmitting information 103 general problem of H
Archimedes 26 Diagonal, principal 71
Arithmetic hexagon 78 Difficulties of a majordomo 94
Arithmetic pentagon 78 Diffusion 82
Arithmetic square 70, 71, 72 Dirac (see Fermi-Dirac statistics)
Arithmetic triangle 72, 73, 74 Divergence of number series 105
Arrangements, k- 9, 22 Divergent series 105
ArraY(s) Dividend 104
of dots 65 Dividing polynomials 104
dual 67 Divisor 104
normal 66 DNA 13
self-dual 67 Domino problem 15
Dominoes 54
Dual arrays 67
Barriers, absorbing 83
Base-m number system 75
Base-n system of numeration 11 E (the number) 106
Bernoulli, Jakob 7, 55 Einstein, A. 59
Binomial coefficients 73 Electronic digital computer 1~
Binomial theorem 110 Entrance-exams problem 61
Boltzmann, L. 59 Equation
Bookshelf problem 40 characteristic 101
Bose 59 equal roots of 102
Bose-Einstein statistics 59 Eratosthenes 20
Bouquet of flowers 55 sieve of 20
BrQwnian motion 81 Euclid 20
Building a stairway 39 Euler, L. 7, 55, 67-68
Buying cakes 30 Euler's formula 67
Buying candy 63 Euler's theorem 66, 68
Exclusion (see principle of, Formula ofJ ,
Extended arithmetic triangle 73
Cakes, buying 30 Extracting square roots 114
Candy, buying 63
Caravan in the desert 46 Factorial 23
Cardano, G. 72 Factorization 56
Cardano formula 72 Fermat, P. 7
Change, ~etting 64 Fermi-Dirac statistics 59
Characteristic equation 101 Fibonacci 89
equal roots of 102 Fibonacci numbers 89, 91, 101
Chebyshev, P. 55 Figurate numbers 71, 72
Checker in the comer 77 Figures, Zener 42
Checkerboard problems 16 Flags on masts 58
Chess 70ff Football championship 22
Chess king 74 Football championship again 32
Coefficients, binomial 73 Formula, Cardano 72
Combinations 22, 27 Euler's 67
alternating sums of 37 inclusion and exclusion 19, 37
new properties of 51 Fractions, algebraic 104
properties of 33 partial, decomposition into 116
geometric proof of 79 Functions, Gaussian 82
with repetitions 31 generating 109, 116, 119
Combinatorial mathematics 7
Combinatorial problems of information theory 61
Combinatorial problems with restrictions 39ff Gambling 7
Combinatorics 7 Games of chance 7
and chess 70ff Gauss, K. 82
general rules of 9ft, 13ff Gaussian function 82
of partitions, summary of 122 General problem of postage stamps 61
and series 104ff General problem of the rooks 84
Composite numbers 20 General rules of combinatorics 13ff
Computer Generalized arithmetic triangle 74, 75
electronic digital 12 Generating functions 109, 116, 119
"Strela" i2 and partitions of integers 119
-206
Genetic code 13 figurate 71
Genoese lottery 29 multiplying and diViding 92
Geometric proof of properties or combinations 79 prime 20
Getting change 64 pyramidal 72
Greatest integer (in) 53 triangular 71
Number-of-divisors problem 56
Number lottery 29
Henry III 27 Number "one" 32
Hexagon, arithmetic 78 Number series 105
Hipparchus 20 convergenre of 105
Hooke, R. 26 divergence of 105
How many people don't know foreign languages 17 Number systems 10
Hunting mushrooms 57 base-m 75
Huygens, Christian 27 Numerical triangle 148

Inclusion (see Principle of, Formula of)


Infinite series 105 Olympiad, Moscow Mathematics 80
sum or 105 Omar Khayyam 72, 11!!
Information theory 33 One 32
[ntegers, partitioning 65 Operations on power series 107
partitions of 59 Order of recurrence relations 99
generating functions and 119
Interval of convergence 106
Partial fractions, decomposition into 116
Particle statistics 59
King Arthur's Round Table 40 Partitioning integers 65
Knights, two 87 Partitions
combinatorics of (summary) 122
of integers 59, 119
Lancelot (10 , generating functions and 119
Languages (How many people don t know foreign langu- process of successive 91
ages) 17 Pascal, B. 7, 55, 72, 112,
Leibniz, G. W. 7, 27 Pascal's triangle 72
Liber abaci 89 . Paying money 62
Linear recurrence relations with constant coefl'ic1ents 100 Pentagon, arithmetic 78
Linguistic problems 24 Permutations 22
Lions and tigers 39 of n elements 23
Lottery\ Genoese 29 with repetitions 9ff, 22, 25
numoer 29 without repetitions 22
Lotto 7 Photographs, mailing 57
Lucky trolleybus tickets 96 Picking apples 56
Placing objects into cells 55
Mailing packages 60 Polygons, problems involVing 93
Polynomials, dividing 10(1
Mailing photographs 57 Postage stamps, general problem of 61
Majordomo, difficulties of (flrst solution) 94 Power series 107
Majordomo problem, alternative solution of 98 operations on 107
third solution 103 sum of 107
Mathematics, combinatorial 7 use of to prove identities 108
Maxwell, G. C. 59 Prime numbers 20
Maxwell-Boltzmann statistics 59 Principal diagonal 71
Mere, Chevalier de 7 Principle, teakettle 17
Merry-go-round 47 of inclusion and exclusion 18, 19, 37
Money, paying 62 particular case of 37
Morse code 11 Probl~m des menages 96
Motion, Brownian 81 Problem(s)
Multinomial theorem 111 bookshelf 40
Multiplying and dividing numbers 92 checkerboard 16
Mushrooms, hunting 57 combinatorial (of information theory) 61
combinatorial (with restrictions) 39ff
derangements (general) 44
New properties of combinations 51 des menages (probl~m des menages) 9 6
Newton. Sir Isaac 26, 112 domino 15
Newton's binomial theorem 109 entrance-exams 61
Newton's series 112 general (of the rooks) 84
Nicomedes 71 involving polygons 93
Nonlinear recurrence relation 118 linguistic 24
Number(s) majordomo, flrst solution 95
Cm (k, n), properties of 75 alternative solution 98
composite 20 third solution 103
e 106 number-of-divisors 56
Fibonacci 89, 91, 101 of points 7
207
postage stamps (general) 61 Solitaire 7
rabbit 89 Solution of recurrence relations 99, 100
of the rooks 23, 28 general 100
general 84 Spaceship, crew of 15
of the two ranks 51 Square, arithmetic 70, 71, 72
Product, rule of 13, 14 Square roots, extracting 114
of a series 107 Standing in line at a ticket office 48
Properties Statistics
of combinations 33 Bose-Einstein 59
ot the numbers Cm (11., n) 75 Fermi-Dirac 59
Pyramidal numbers 72 Maxwell-Boltzmann 59
Pythagoras 71 particle 59
Subfactorials H
Sum
Quaterno 29 of an Infinite series 105
Queen of Shamakha 82 of a power series 107
Queen's realm 82 rule of 13
Quinto 29 Summary of combinatorics of partitions 122
Quotient 10~ Superstitious cyclists 9
Symmetric arrangements 85
System of numeration (see number system)
Rabbit problem 89 base-n 11
Random walks 80
on an infinite plane 84
Recurrence relations 89ff, 116 Tables, recurrence 97
application to information transmission 103 Tartaglia, N. 7, 72
linear (with constant coefficients) 100 Teakettle principle 17
nonlinear 118 Telepathy, session in 42
order of 99 Temo 29
solution of 99, 100 Theorem
general 100 binomial 110
Recurrence tables 97 Euler's 66, 68
Relations, recurrence 89ft, 116 multinomial 111
Remainder 104 Newton's binomial 109
Riordan, John 8 Vieta's 102
Rooks, problem of 23, 28 Theory of games 55
Roots, square, extracting 114 Titan 27
Round dance 25 Total number of signals 59
Rule of product 13, 14 Triangle
Rule of sum 13 arithmetic 141, 72, 73
extended arithmetic 73
generalized arithmetic 7~, 75
Saturn, ring of 27 numerical 148
Science club 22 Pascal's 72
Secret lock 11 Triangular numbers 71
Self-dual arrays 67
Semaphore 11
Series 104ff Using power series to prove identities 10S:
divergent 105
infinite 105
sum of 105 Vieta's theorem 102
Newton's 112
number 105
convergence of Ul5 Wallis, J. 27
divergence of 105 Wandering about town 70
power 104 Where's the mistake 20
operations on 107 Whitworth, W. A. 8
sum of 107 Wigwag code 11
use of to prove identities 108
product of 107
Session in telepathy 42 Yaglom, A. M. 8
She's got a date U Yaglom, L. M. 8
Sieve of Eratosthenes 20
Signals, total number of 59
Simplum 29 Zener figures 42

You might also like