0 ratings0% found this document useful (0 votes) 379 views205 pagesMIR Vilenkin N Combinatorial Mathematics For Recreation 1972 PDF
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
N. VILENKIN
COMBINATORIAL
MATHEMATICS
FOR
RECREATION
Translated from the Russian by George Yankovsky
MIR PUBLISHERS
Moscow‘UDC 519.1=20
First published 1972
Revised from the 1969 Russian edition
Ha asraniicxom ssuKeCONTENTS 5
preface... 2. eee eee ees © 7 A bookshelf problem... ...... 40
Sanerent a renlonnenarte ores King Arthur's Round Table... . . 40
OF COMBINATORICS She's got a date... .. eee ee
Superstitious cyclists... 2... g A session in telepathy... ..... . 4B
Permutations with repetitions... .. | 9 General problem of derangements... . 44
Number systems........... 10 Subfactorials . pe
Secret lock. ..----... 2. 41 Caravan in the deserts) 1) 48
Morse code... ........... ‘1 Merry-goround ...., 2.2... 6.
Wigwag code... ss... .. ff Standing in line ata ticket office... . 48
Electronic digital computer... . 42 The problem of the two ranks... .. 54
Genetic code... .......... 43 New properties of combinations... . Sf
General rules of combinatorics... . 13 uaprER IV, THE COMBINATORICS
Domino problem ........... 45 oF PARTITIONS
‘The crew of a spaceship... ..... 15 ;
Checkerboard problems... .. . eRe ee cS
How many people don't kxow foreign Placing objects into cells... 6... 55
i 5 17 A bouquet of flowers... . cee
anguages! vee ww ee - The number-of-divisors problem... . 56
The principle of inclusion and exclusion 18 icing apples 3
Where's the mistake? ..... 2... 20 ee
‘The sieve of Eratosthenes Oe eine pia ey
ve Mailing photographs . 2... 2... ST
CHAPTER IT, PERMUTATIONS AND COMBINATIONS Flags on masts... ......... 58
Football championship ........ 22 Total number of signals... ..... 59
Permutations without repetitions... . 22 Particle statistics... ....--. 59
A science club. ........... 22 Partitions of integers... ...... 59
Permutations of nelements . . .. . . - 23 Mailing packages... .. 1... 60
The problem of the rooks |... ... 23 General problem of postage stamps... 6
Linguistic problems. ......... 24 Combinatorial problems of information
Round dance... .......... 25 theory. ....... pe ee OL
Permutations with repetitions... . , 25 Entrance-exams problem... ... . . ot
Anagrams . 2... 2... ee eee 26 Paying money. ........- 62
Combinations ............ 27 Buyingeandy..... 2... .- + 68
Genoese lottery ............ 29 Getting change ...........-. 64
Buying cakes... .......... 80 Partitioning integers... . tee 68
Combinations with repetitions sees. Bf Arrays of dots. . 2... 1 we + 6
The football championship again... . 32 Dual arrays » 1.1... eos or
Properties of combinations... . . 33 Euler’s formula, .-..- ~~ vee 87
A particular case of the principle of CEAPTERtT Tome meronce into
pectasion [ena kexeitsioe a ae 37 Wandering abouttown......... 70
Alternating sums of combinations... . 37 THe arithmetic square ss ee
CHAPTER IIT. COMBINATORIAL PROBLEMS WITH Figurate numbers... ........ 74
RESTRICTIONS ‘The arithmetic triangle... ..... 72
Lions and tigers. .......... 39 The extended arithmetic triangle... . 73
Building a stairway. ......... 39 Thechessking............ %‘Tho generalized arithmetic triangle . . .
Generalized arithmetic triangles and a
base-m number system . . .
Some properties of the numbers Cp, (k, n)
‘A checker in the corner .
‘The arithmetic pentagon... ....
Geometric proof of properties of combina-
tions . . .
Random walks .........---
Brownian motion... ... bees
‘The queen's realm... .....-
Absorbing barriers 5... 2... oe
Random walks on an infinite plane . . .
‘The general problem of the rocks . . . .
Symmetric arrangements .......
Two knights...
CHAPTER VI. RECURRENCE RELATIONS
Fibonacci numbers... 2... -
An alternative prof .........
The process of successive partitions . . .
Multiplying and dividing numbers . . .
Problems involving polygons... ..
Difficulties of a majordomo .
Lucky trolleybus tickets... ... .
Recurrence tables... .......-
Alternative solution of the majordomo
problem... ee. eee eee eee
Solution of recurrence relations . . . . .
Linear recurrence relations with constant
coefficients
1B
cs
7
8
19
8t
BRLSE
87
89
1
ot
92.
93
94
96
97
98
99
100
The case of equal roots of a characteristic
equation
Application of the theory ‘of recurrence
relations to problems of transmitting infor-
mation . .
A third solution to the majordomo problem
CHAPTER VII. COMBINATORICS AND SERIES
Dividing polynomials .
Algebraic fractions and power series . . .
Operations on power series . :
Using power series to prove identities . .
Generating functions. ........
Newton’s binomial theorem... . . .
The multinomial theorem... . . _
Newton's series... 2... eu ee
Extracting square roots... .. 04.
Generating functions and recurrence rela-
tions . .
Decomposition into partial fractions . . .
On a single nonlinear recurrence relation
Generating functions and partitions of
integers.
Summary of the combinatorics of parti-
tims 2... ee.
Combinatorial Problems... .....
Solutions and Answers. .......
Index 2... ee
102
103
103
104
104
107
108
109
4109
14h
112
114
146
116
118
119
122,
123
152
205PREFACE
Specialists in a broad range of fields have to
deal with problems that involve combinations
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
objects is called combinatorial mathematics (com-
Binatorics).
This branch of mathomatics has its origin
in the 46th century, in the gambling games that
played such a large part in high society in those
times. Whole fortunes, from gold and precious
stones to pedigreed horses, castles and estates,
were won'or lost in a game of cards or dice. All
manner of lotteries were in vogue. It is quite
natural that jthe first combinatorial problems
had to do mainly with gambling, such as in
how many ways can a certain sum in throws of two
or three dice be scored, or in how many ways is
it possible to get two kings in a card game. These
and other problems in games of chance gave
the initial impetus to develop combinatorial
mathematics and the burgeoning theory of pro-
bability.
One of the first to enumerate the various com-
binations ‘achieved in games of dice was the
Italian mathematician Tartaglia. He drew up
a table illustrating the number of ways r dice
can fall. It was not taken into account, however,
that the same sum can be obtained in different
ways (say, 1+ 34+4=4+2+4 2).
In the 17th century, the French scholars Pascal
and Fermat made a theoretical investigation
into the problems of combinatorics. Again, the
starting point was in the form of problems of
games of chance, particularly the so-called prob-
lem of points in determining the division of the
stakes of an interrupted game of chance. This
problem was posed to Pascal by his friend the
Chevalier de Méré, an ardent gambler. Roughly,
the problem was this: a match of coin tossing
to six winning games is interrupted when one
player has won five tosses and the other four
tosses. How are the stakes to be divided? It was
clear that a division of 5 to 4 would not be fair.
Applying methods of combinatorics, Pascal solved
the problem for the general case when one player
has r games left to win and the other one has s
games. An alternative solution was given by
Fermat.
Further advances in the theory of combinations
were connected with the names of Jakob
Bernoulli, Leibniz and Euler. However, in
these studies the main role was played by appli-
cations to various games (lotto, solitaire, etc.).
During recent years, combinatorial mathematics
has seen extensive developments associated with
greater interest in problems of discrete mathe-
matics, Combinatorial methods are employedin solving transport problems, in particul
scheduling; the scheduling of production facili-
ties and of the sale of goods. Links have beon
established between combinatorics and problems
of linear programming, statistics, ete. Combinato-
rial methods are used in coding and decoding
and in the solution of other problems of infor-
mation theory.
The combinatorial approach also plays a signi-
ficant role in purely mathematical problems such
as the theory of groups and their representations,
in the study of the foundations of geometry,
nonassociative algebras, and elsewhere.
In the present book, the aim has been to set
forth a variety of combinatorial problems in
popular form and understandable language.
At the same time, an attempt is m&de to present
some rather involved combinatorial problems
and to give the reader an idea of the methods
of recurrence relations and generating functions.
The first chapter is devoted to the general
rules of combinatorics, the rules of sum and
product. In the second chapter we investigate
permutations and combinations. This traditio-
nally grade-school material is accompanied by
8
an analysis of some amusing examples. In the
third chapter, a study is made of combinatorial
problems in which certain restrictions are imposed
on the combinations. Chapter IV considers
problems involving partitions of numbers into
integers and contains a description of certain
geometrical methods in combinatorics. Chapter V
is devoted to random-walk problems and to
a variety of modifications of the arithmetic
triangle, Chapter VI takes up recurrence rela-
tions, and Chapter VII discusses generating
functions and, in particular, the binomial for-
mula.
‘The last section of the book is devoted to com-
binatorial problems of which there are over 400.
‘This material has been taken from a variety
of sources, including Whitworth's Choice and
Chance (London, 1901), John Riordan’s An
Introduction to Combinatorial Analysis (New York,
1958), an interesting book by A. M. Yaglom and
I. M. Yaglom entitled Nonelementary Problems in
an Elementary Ezposition (Moscow, 1954), and
various collections of problems given at mathe-
matical olympiads in the USSR.CHAPTER I
THE GENERAL RULES OF COMBINATORICS
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
lacking the numeral 8. They can be found by
taking all the ono-digit numbers that we found
and writing any one of the acceptable nine digits
after it. This yields nine two-digit numbers
for each one-digit number, and since there are
9 one-digit numbers, we get 9 X 9= 81 two-
digit numbers without any 8's:
00, 01, 02, 03, 04, 05, 06, 07, 09
40, 41, 412, 13, 44, 15, 16, 17, 19
20, 21, 22, 23, 24, 25, 26, 27, 29
30, 31, 32, 33, 34, 35, 36, 37, 39
40, 41, 42, 43, 44, 45, 46, 47, 49
50, 54, 52, 53, 54, 55, 56, 57, 59
60, 61, 62, 63, 64, 65, 66, 67, 69
70, 71, 72, 73, 74, 75, 76, 77, 79
90, 91, 92, 93, 94, 95, 96, 97, 99
Thus, there are 9*= 81 two-digit numbers
without 8. Each one of these numbers can be
used to adjoin any one of the nine acceptable
digits to. This yields 9? x 9 = 93 = 729 three-
digit numbers. Therefore, the club had 729 regi-
stered cyclists. If we were to take four-digit
635
K& 2%
2%
“& a
numbers, there would be 9!= 6,561 numbers
without any 8's.
In another club, the members were still more
superstitious and they even threw out the num-
ber 0 as being too much like a wheel. They made
do with eight digits: 1, 2, 3, 4, 5, 6, 7, 9. How
‘many members were there in the club if all ticket
numbers were three-digit?
The problem is similar to the first one, the
sole difference being that in place of 9 digits we
have 8 altogether. So the club had 8° = 512 mem-
bers.
PERMUTATIONS WITH REPETITIONS
The problem of the cyclists belongs in the
following class of problems. We have objects
referring to n different varieties. They are used
to make up arrangements of k objects in each
or, as we shall say in the future, k-arrangements.
The arrangements can contain objects of the
same type, and two arrangements will be con-
sidered distinct if they differ either as to objects40
‘or as to the order of the objects. The problem
is to find the total number of such arrangements.
Arrangements of this type are called k-permuta-
tions of n distinct things with repetitions. The
number of all such arrangements is denoted
by 4k* In the first problem of the cyclists,
‘the number of things (types of elements) was 9
{we took all digits except 8), and each permuta-
tion (each number) contained three elements.
In this caso, the number of permutations came
to 43= 9%. It is natural to assume that if the
number of things is n, and cach permutation
contains k elements, then the number of permu-
tations with repetitions isn".
‘We wish to prove that the number of k-permu-
tations of n distinct objects with repetitions is
equal to
Akon (4)
‘We carry out the proof by means of mathema-
tical induction with respect to &, which is the
number of elements in a permutation with
a fixed value of n. For k= 1 the answer is
obvious—each permutation (with repetitions)
consists of one element only, and the different
permutations are obtained by taking distinct
objects. But since the number of types is n,
the number of permutations is n. Thus, At
in accord with formula (1).
Now assume that we have the proof for Ak-! =
= n"1 and we consider k-permutations with
repetitions. We obtain all such permutations
as follows. Let us take any (k —1)-permutation
(with repetitions) (a, ..., ay) and adjoin
to it the element a of one of the available n
objects. We get some k-permutation (a,,...
+++ Ghats aq). It is now clear that out of each
(k —1)-permutation we get as many k-permuta-
tions as there are distinct objects, that is, n per-
mutations. It is obvious that in this manner we
will not miss a single k-permutation and will
* A permutation of n things taken r at a time
be symbolized as ,P, or P (my 1) yn aise
Translatort.
not take any one twice [if (a, ...) p14) #
F (bt, ++ oy Ops) OF if ay ~ bp, then (ay, ..
fees Oyaty My) Fay vey Opts By) ‘There-
fore the number of k-permutations of n distinct
objects with repetitions is n times greater than
the number of ( —1)-permutations of the same
objects with repetitions. Consequently, 4% =
= ndh-1, But we already have the proof of
Ak-1 = nh-1, Therefore,
AR = n-nb-l nk
Thus, equation (1) has been proved for all values
of ke
Formula (1) occurs in a wide range of problems,
a few of which will occupy us in the forthcoming
sections.
NUMBER SYSTEMS
Besides the decimal number system which we
commonly use, there are other systems of nume-
ration such as the binary, ternary, octal, ete.
number systems. In the base-n number system
we use n digits. Let us calculate how many
natural numbers can be written in a baso-n
system of numeration by using exactly k digits
(ior the sake of convenience, we will regard 0
as a natural number). If we allow for numbers
beginning with zero, then every i-digit number
in a base-n number system may be regarded
as a permutation, with repetitions, consisting
of k digits of n distinct types. Using formula (1)
wo find that the number of numbers thus repre-
sented is n*.
However, the natural numbers do not have
representations beginning with zero. We will
thus have to subtract from the value of n* the
number of numbers whose base-n representation
begins with zero. Discarding the first digit (zero)
in these numbers, we get a (k — 4)-digit number
(which possibly also begins with zero). By for-
mula (1), there will be n®1 such numbers.
Hence, the total number of k-digit numbers in44
a base-n system of numeration is equal to
nk (n—1)
nh— nb
For example, in the decimal system there are
10% X 9= 9,000 four-digit numbers: out of
10,000 numbers between 0 and 9,999, we discard
one thousand, namely, those from 0 to 999,
There is another way to derive our formula,
In a k-digit number represented in a base-n num-
ber system, the first digit can be any one of the
digits 1, 2,..., n—4; the socond digit and
succeeding digits, any one of the digits
0,4, 2, . +4, n—4. We thus have n—1 candi-
dates for position one, and n candidates for
each of the remaining k—1 positions. From this
it is easy to see that the desired total number
is (n— 4) nk,
SECRET LOCK
Safes and storage lockers make use of secret
locks, called combination locks, that open up
only when a specific combination of numbers or
letters is dialled. Suppose a dial has 12 letters
and the combination has 5 letters. How many failing
attempts can be made by a person who does not
know the combination?
Using formula (1), we find the total number of
combinations to be
125 = 248,832
which means that 248,831 attempts can be fai-
lures, Incidentally, safes are frequently made to
give a warning signal at the first failure to dial
the right combination.
MORSE CODE
‘The Morse code is used in telograph communica-
tions. In this code, the letters, numbers and
punctuation marks are represented by dots and
dashes. Some characters require only a single
sign, like Z (+) whereas others use all five signs,
like zero, 0 (— ———— ).
‘Why the number 5? Couldn’t we make do with
a smaller number of dots and dashes, say four,
to transmit all our communications? The answer
is no, and the reason becomes clear if we apply
the formula for the number of permutations with
repetitions. From formula (1) it follows that
A} = 2. In other words, using one character,
it is possible to transmit only two letters (E+
and T—). Using two characters, it is possible to
transmit 24 = 4 letters, three yield 2° = 8 letters
and four, 24= 16, Thus, the total number of
letters that can be transmitted by means of four
characters is
24+44+8416=30
Taking an alphabet of 26 letters, and also nume-
rals and marks of punctuation we see that symbols
made up of four characters do not suffice. But
if we take combinations of 5, then we get 32 sym-
bols in addition to the 30 obtained from four.
‘Those 62 symbols ar quite sufficient for tele-
graph communications.
There is also a five-digit code for telegraph
communications that makes use of five symbols
for every letter. Instead of the dash-and-dot
system, uso is made of alternating current flow
or of sending current signals and noncurrent
signals. This code yields exactly 2°= 32 com-
binations, which is enough for all the letters.
Numerals and punctuation utilize the same com-
binations, and so a telegraph apparatus opera-
ting on the five-digit code has a special device
for shifting from letters to numerals and back
again,
WIGWAG CODE
The navy has a visual signalling system by
flags, called a somaphore. Each letter is repre-
sented by two flags in a specific arrangement.||
INTERVAL,
3
<
% Ike lar
A
NUMERALS FOUN
)
$l. 8,
I
ERROR (REPEATER
sever
E 5} jy
For the most part, an individual letter is dis
played by a pattern of one flag on each side of
the signal-man. But some of the letters (say
H, 0, X) require both flags on one side. The
reason is obvious if we examine the formula
for permutations with repetitions. The point
is that each flag has a total of five positions:
straight down, inclined down, horizontal, incli-
ned up and straight up. Since we have two flags,
the total number of combinations of the basic
positions comes to A? = 5?= 25. One position
has to be omitted (both flags down) since it serves
to separate words. This yields 24 combinations,
which is not sufficient to transmit all letters of the
alphabet. That is why some letters have patterns
with both flags on one side.
ELECTRONIC DIGITAL COMPUTER
Electronic computers are capable of handling
an enormous range of problems. A single machine
can decipher inscriptions in an unknown language,
perform the design computations for a dam,
and process the trajectory data of a space vehicle.
How does one account for such versatility?
Mainly the reason is that all these problems
reduce to computations involving numbers.
How does such a machine handle so many pro-
blems involving so many numerical data? How
many combinations of numbers is a computer
capable of processing?
Let us illustrate this case with a relatively
small computer called “Strela” (Arrow). This413
machine has an immediate-access memory of
2,048 storage cells, each one of which can accom-
modate 43 binary digits. Each digit is either
a 0 or a 4. Altogether we have 43 x 2,048 >
> 87,000 distinct positions, and two ways
40 or 1) the cells can be filled. Using formula (1),
we find that the “Strela” can be in any one of more
than 287.0 distinct states. This enormous num-
ber is far beyond the limits of our imagination.
Suffice it to say that the number of neutrons
packed side by side in a sphere the radius of
which is equal to the distance to the most distant
‘stellar systems does not exceed 25%,
If we used just one memory cell, it would
take nine years for a typist pool of 100,000 wor-
ers to type out all the numbers that this single
cell can accommodate (we assume they work
-a seven-hour day and do one 43-digit number in
40 seconds).
GENETIC CODE
Breaking the genetic code has been one of the
most remarkable achievements of twentieth
century biology. Biologists now know how gene-
tic (hereditary) information is passed on to the
next generation. This information is recorded
in the form of gigantic molecules of desoxyri-
bonueleie acid (DNA). The various molecules
of DNA differ in the order in which four nitro-
genous bases are arranged: adenine, thymine,
guanine, and cytosine. These bases determine
‘the order in which the proteins of the organism
are built up out of roughly twenty amino acids,
-each amino acid being in the form of a code made
up of three nitrogenous bases.
It is easy to seo where the number 3 came from.
Using combinations of two bases, we could code
only 4 = 16 amino acids, which is not enough.
Using three bases, we get 4° = 64 combinations,
which is far and away sufficient to encode
some twenty amino acids, The intriguing ques-
‘tion is how nature takes advantage of so much
redundant information—the number of com-
binations is 64 while the number of amino acids
is only one third that.
A single chromosome contains several tens of
millions of nitrogenous bases. The number of
distinct combinations which they can form is
simply horrendous—it is equal to 4%, where
is the number of bases in the chromosome; go
back to formula (1). A minute portion of these
combinations has been sufficient to ensure the
extraordinary diversity of all living nature over
the entire span of life here on the planet Earth.
Note of course that only a very small fraction
of the theoretically possible combinations lead
to viable organisms.
GENERAL RULES OF COMBINATORICS
As we shall soon see, combinatorial problems
offer a multiplicity of types. But most of them
can be solved with the aid of two basic rules:
the rule of sum and therule of product.
It is often possible to partition the combinations
under study into several classes, one combination
appearing in one and only one class. It is then
clear that the total number of combinations is
equal to the sum of the numbers of combinations
in all classes, This assertion goes by the name of
the rule of sum. It is sometimes formulated thus:
If a certain object A can be chosen in m ways
and another object B can be chosen in n ways, then
the cholce of “either A or B” can be accomplished
in m+n ways.
When employing the rule of sum in this latter
formulation, take care to see that no choice
of A should coincide with any choice of B (or,
as we put it at the beginning, that no combina-
tion should appear in two classes at once). If
there are such coincidences, then the rule of sum
breaks down, and all we have is m-+n—k
choices, where & is the number of coincidences.
The second rule, called the rule of product, is
somewhat more complicated. When making upcombinations of two objects, it is often known
in how many ways the first object can be chosen
and in how many ways the second one, the
number of ways of choosing the second object
being independent of how the first object was
chosen. Suppose the first object can be chosen
in m ways, the second in n ways. Then the pair
can be chosen in mn ways, To put it differently:
If an object A can be chosen in m ways and if,
after every such choice, an object B can be chosen
in n ways, then the choice of the pair (A, B) in that
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
(At, Buys.
(Ao, Bas),
++ (At, Bin)
+ + ++ (Ass Bon)
Ai, «+1 Am indicate m ways of choosing A
and Bit, . » »» Bin denote n ways of choosing B,
provided A has been chosen the ith way. It is
clear that this table contains all ways of choosing
the pair (A, B) and consists of mn elements.
If the choices of B are independent of how
object A is chosen, then in place of Table 1 we
get the following simpler table.
Table 2
» (At, Bn)
(At, Bi), (As, Bz),
+1 (Ay Bn)
(Az, By), (Az, Ba);
(Am, B1), (Ams Bz),
+ + ey (Ams Bn)
14
It may, of course, happen that we need com-
binations of more than two elements (objects).
Then we arrive at the following problem.
How many k-arrangements can be made if the
first element can be one of ny distinct objects, the
second, one of ng distinct objects, and the kth, one
of nq distinct objects. Here, two arrangements are
considered distinct if at least one position is occu-
pled by different elements.
This problem is solved in the same way as the
problem of the cyclists. The first element may
Fig. 4.
be chosen in m, ways. Each of the chosen elements
can be combined with any one of the nz types
of second elements, yielding rng pairs. Each
pair can be combined with any one of the n3
types of third elements, thus yielding nngng tri-
ples. Continuing in this fashion, we finally get
the k-tuple mnz ... my of arrangements of the
desired type.
In the problem of the cyclists, we had to choose
three elements (the hundreds digit, the tens
digit and the units digit). At each stage we could
choose one of nine permissible digits, and so we
got 9X 9 x 9= 729 numbers. Here is a harder
problem.
Signs are being made which consist of a geo-
metrical figure (a circle, square, triangle or hexa-
gon), a letter and a number. How many signs
can be made?
Asa first step we can choose a geometric figure,
This can be done in four ways (we have a total
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 40 = 4,280 combinations.DOMINO PROBLEM
‘A more complicated combinatorial problem is
that in which the number of choices after each
stage depends on the elements chosen in the
preceding stages, an instance of which is the
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 24 cases the piece will have diffe-
rent nuimperg (say?"ua/ “13, ete.) ant cue aitse
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,
we 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
7X 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—=
= 294 ways of choosing a pair.
In the above discussion we took into account
the order in which the pieces were chosen, so each
pair of pieces appeared twice (for instance,
Of and 16 the first time and 16 and 01 the second
time). If the order of choice of the pieces is dis-
regarded, then the number of choices is cut by
one half: we have 147 choices.
THE CREW OF A SPACESHIP
For cases when at each stage the number of
possible choices depends on which elements were
chosen earlier, it is convenient to depict the
process of building combinations in the form
of a tree, Starting from one point, draw line
15
segments illustrating the various choices that
can be made in the first stage (here, each sogment.
corresponds to a single element). The choices in
the second stage are made from the endpoints
of each of the line segments, if the given ele-
ment was chosen in the first stage, etc.
Fig. 2.
This construction yields a tree, an examination
of which immediately gives the number of solu-
tions to our problem.
By way of illustration let us take the problem
of staffing a multi-seated spaceship where the
problem comes up of psychological compatibility
of the crew in an extended space mission. People
that are suitable in every respect when taken
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,
engineer, and physician. We have four candida-
tes, a1, ag, az and a for the commander, three
candidates for the engineer (bj, bz and bs) and
three for the doctor (c,, cz and ¢3). A preliminary
checkup has disclosed that commander a, is psycho-
logically compatible with engineers b, and bs
and with doctors cy and cs, commander a, with16
engineers 6, and d, and all doctors, commander
a3 with engineers b, and b, and doctors ¢, ¢s,
commander a, with all engineers and with doc-
tor ¢:. Also, engineer 6, does not get along with
doctor 3, engineer b, with doctor e, and engi-
neer b with doctor ¢. Given these conditions,
in how many ways can a crew be made up?
The conditions are illustrated in the tree
in Fig. 2. We seo 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 =
=4X3X 3).
CHECKERBOARD PROBLEMS
Solve the following problem.
In how many ways can two checkers (or draughts)
(white and black) be placed on a checkerboard
so that the white can take the black?
Y
Fig. 3.
By the rules of the game, the pieces are placed
on black squares and one checker takes another
by jumping over it and occupying the next square
(Fig. 3). If the piece reaches the last row, it beco-
mes a king and can take all men on the same
diagonal except those on the end squares.
This problem is complicated by the fact that
for different positions of white there are different
numbers of positions of black in which it can
be taken. For instance, if white is on square af,
then there is only one position where black is
under attack. Now if white is on square ¢3,
then the number of desired positions for black
GEG G
MV 2: by v
yy Yn ey
by
4 VA Ve
3 4) 4:
i Bb
fy (by by Y
(a)
0, YA Ve
Gs
Zz VA i Ved
| (4 Z
is w
ey
iY,
w,
is 4, Finally, if white has become a king on
square 48, then there are 6 positions in which
black is under attack by the king.
It is therefore simpler to indicate for each
position of white the number of possible positions
of black and add the results obtained. Fig. 4a
shows a checkerboard with the appropriate figuresoS
indicated. Combining them, we get 87. Thus,
the sought-for arrangement is possible in 87 ways.
It is clear that there are exactly the same
number of positions in which black can take
white, but there are fewer positions in which
both men can take one another. For instance,
if white stands on the edge of the board, black
cannot take it no matter where black is positio-
ned. Therefore, assign 0 to all squares along
the edges of the board. In the same manner, we
find numbers that correspond to the other black
squares. They are shown in Fig. 4b. Adding
up these numbers, we find that the desired arran-
gement is possible in 50 different ways.
Finally, let us find the number of positions
of white and black in which neither can take the
other. The problem can be solved in the same
way by placing white on each of the black squares
and counting the possible ways of positioning
black so that not one of the pieces could take
the other. However, it is siinpler to make use
of the “teakettle principle” * and reduce the prob-
% The story goes that a mathematician once asked a
physicist: “You have an empty teakettle and an uniit
gas range. How do you go about boiling water?” «Very
259
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
2X 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 scon 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 4-50 = 868
HOW MANY PEOPLE DON'T KNOW
FOREIGN LANGUAGES?
The method applied in solving the foregoing
problem can often be used in dealing with com-
binatorial problems. Here is one,
A research institution has a staff of 67: 47 know
Spanish, 35 German and 28 both languages. How
many employees at this institution know netther
Spanish nor German?
To solve this problem, we partition the entire
staff into parts having no elements in common.
The first part consists of those who know Spanish
only, the second, those who know German only,
the third, those who know both languages, and
the fourth part, those who know neither language
Simply,” replied the physicist. “Fill the teakettle, with
‘water light the gaa and put the water on to. boll.>
“Right,” sald’ the mathematician, “Now solve this
problem: the gas is burning and the teakettle has water
Init How do you boil the waver?”
“That's no problem at all,” replied the physicist. “Just
put the teakettle on the range.
“No,” ‘sald the ‘mathematician firmly, “You turn off
‘the ga’, pour out the water and we arrive at or Arst
problem, which we know ow to solve.”
Now, ‘when a new problem is reduced to an. already
solved one, we speak of applying the “teakettle principle”.(Fig. 5). What we know is that Part Three con-
sists of 23 persons, but since 47 know Spanish,
there are 47 — 23 = 24 persons who know only
Spanish, In the same way, we find that 35 — 23
= 12 scientists know only German. From this
(b)
Fig. 5.
we conclude that the total number of persons
Knowing one of these two languages is equal
to 23 -+ 24-+ 12= 59, And since there are 67
in all, only 67 — 59= 8 workers remain who
know neither language. In this institution,
8 know neither Spanish nor German.
‘We can write the answer in the form
8=67—(23-+24-+12)
But we get 24 by subtracting 23 from 47, and
42 by subtracting 23 from 35. Therefore,
8=67—23— (47 — 23) — (35 —23)
= 67-47 354.23
Here is the regularity: we subtract from the
total number of scientific workers those who know
Spanish and those who know German. In this
18
way, some find themselves in both lists and are
“subtracted” twice; these are precisely the poly-
glots with a knowledge of both languages. Adding
on these, we obtain the number of persons who
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,
44 with German and French, and 5 polyglots
that handle all three languages. It is then clear
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-4 23— (20—7—6— 5)
7 — 47 — 35+ 23— 20+ (12—5) 4+ (11-5) + 5
=67—47— 3520-4 23-4124 1—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,
possibly, other languages). In this process, some
of them are “subtracted” twice since they know
two languages. Therefore, we add the numbers 23,
12, and 11 which indicate how many employees
read two languages (and, possibly, a third lan-
guage). But those with three languages are
rejected three times and then added three times.
And since they have to be subtracted, we reject 5.
THE PRINCIPLE OF INCLUSION
AND EXCLUSION
The foregoing examples enable us to state
a general law. Let there be N objects some of
which have properties a4, 2, ++, Gn. Each
object can cither have none of these19
properties, or one or several. Let us de-
note by NW (aj, aj, +++ o) the number
of objects having properties ay, aj, .. 5 ay
(and, possibly, certain other properties). If
we wish to emphasize that only objects devoid
of a certain property are taken, this property
will be indicated by a dash. Say, N (aa20,)
indicates the number of objects having proper-
ties aq and a2, but devoid of property a, (the
question of the other properties remains open).
The number of objects not possessing a single
‘one of the indicated properties is denoted, by
this rule, by N (aja, ... ay). The general
law consists in the fact that
N (jog «ef, = N—N (a4) —N (2)... —
= (cin) +N (o404)-+N (cute) +--+
EN (@y¢tn) + +++ +N (Gtn10n)—N (ceyg0t3) —
FN (Gn-20n-1%m) + ++ +
+ (=A)"N (atcte on) (2)
Here, the algebraic sum is extended to all com-
binations of properties a, a2, a (without
regard for their order), the + sign heing used
if the number of properties accounted for is even
and the — sign if that number is odd. For inst-
ance, N (ayogaects) enters with a+ sign while
NV (cigaucqo) enters with a — sign. Formula (2)
defines what is known as the principle of inclusion
and exclusion (the inclusion and exclusion formula)’
first, all objects with at least one of the proper-
ties a4, a2, .+ +; Om are excluded, then all
objects having at least two of these properties
are included, then those having at least three
are excluded, ete.
Let us prove formula (2). The proof is by
induction on the number of properties. For one
property the formula is obvious. Each object
either has this property or does not. Therefore,
N(@)=N—=N (a)
Now suppose that formula (2) has been pro-
ved for the case when the number of properties
is equal to n—4:
N (ae... fy) = NN (cy) —
EN (G4ct2) + 6. EN (Gtn-2%m—1) —
=N (xpetq09) — 62 = (Cen ttn2in-t) +
ee (—A)POEN (aryete « nt) (3)
—N Gna)
By hypothesis, this formula holds true for any
collection. In particular, it is true for the collec-
tion V (@) of elements having the property ap.
For this collection, formula (3) takes the form
N (ijetg «+. Oth, 40tn) = N (en) —N (ct4tm) —
TN (@nt0n) +N (cereta0tn) + «2 +
EN (Cin20n-10%m) — N (cegotgetgetn) —
eee b (AEN (eee. Gtn-icin) (4)
(the restriction is indicated that in each case
we take only those objects having the property a).
Let us subtract (4) from (3). On the right
we get what we desire: the right-hand side of
formula (2). The left-hand member is the diffe-
rence
N (ahah. hy) —N (ia. 0h 40m) (8)
But N (aja, ... ons) is the number of objects
got possessing the properties a4, cay...) pat
and, possibly, possessing the property a). Now,
N (ajay... Gn-t Gm) denotes the number of
objects that do not possess the properties
G4, Gay ++ +y On-t Dut definitely possess the
property a. This means that the difference (5)
is just equal to the number of objects that do not
possess a single one of the properties (a, ca, .. +
+41 Gy-ty On)» In other words,
N (cheesy) IN (ag. th gn) =
=N (ajog... 0h yah)
Thus, after subtraction, the left-hand member
of formula (2) also appears on the left. The for-
mula is thus proved for the case when the number
of properties is equal to n.
Thus, the relation (2) holds true for n proper-
ties if it holds for n —1 properties (for n= 4
oeit has already been proved). It follows that the
telation holds for any set of properties.
Formula (2) may be represented symbolically
as follows:
N(@B'...0)=N (1a) (1B)... (1-0) (6)
After removing the brackets, the product
Naf ... A has to be written as N (aB.. . 2). For
example, in place of NV afb we write V (aba).
WHERE'S THE MISTAKE? 5
The class president reports as follows: “Our
class has 45 students, of which 25 are boys.
‘Thirty students get marks of “good” and “excel
lent” (of this number, 16 are boys). A total
of 28 students go in for athletics, of which number
18 are boys and 17 are students with marks
of “good” and “excellent”. Fifteen boys get good
and excellent marks and also go in for athletics.”
‘A couple of days later, the home-room teacher,
who, ironically, was the mathematics instructor,
summoned the class president and stated that
his report contained an error. Let us try to find
out what the mistake was. To do this, we com-
pute the number of girls who do not engage ia
athletics and get passing marks (3’s) or even
failing marks (2's). Denote membership in the
set of boys by 4, students getting good marks
(4 s and 5's) by a and those who go in for athle-
tics by as. We find WV (ajaza1). By hypothesis, we
have
N (a4) =25, N (a) =30, N (as) =28,
N (exa2) = 16,
N (@4e4s) = 18, N (centes) =17, N (oegotgots) = 15
By the principle of inclusion and exclusion,
we find that
NN (xjexgees) = 45 —25—30—28 16-4 18-4 17—
—15=—2
But the answer can only be positive! So the
report definitely contains an inconsistency and
is incorrect.
20
THE SIEVE OF ERATOSTHENES
eres
One of the greatest mysteries of mathematics
is the distribution of the prime numbers among
all the natural numbers. There are cases where
two primes occur every other number (say, 17
and 19, 29 and 31), and then there are cases
where a million composite numbers occur in an
unbroken sequence. Today, mathematicians
know a good deal about how many primes occur
among the first N natural numbers. In these
computations, there is a very useful method that
goes back to the ancient Greek scholar Eratosthe-
nes (third century B.C.) who lived in Alexan-
dria.
Eratosthenes was a versatile man engaged in
a wide range of problems. He excelled in mathe-
matics, astronomy and many other fields. True,
such breadth led to a certain superficiality.
Contemporaries referred somewhat ironically to
Eratosthenes as “Beta”—always second best
(the second mathematician after Euclid, the
second astronomer after Hipparchus, ete.).
In mathematics, Eratosthenes wanted to know
how to find all the prime numbers from among
the natural numbers up to V (Eratosthenes con-
sidered 1 to be prime; today, mathematicians
consider 1 to be a special type not belonging
either to the primes or to composite numbers).
Here is how he went about it. First of all, he
crossed out all numbers divisible by 2 (excluding
the number 2 itself). Then he took the first of the
remaining numbers (namely, 3). It is clear that
this number is prime. Then he crossed out all
numbers divisible by 3 that follow it. The first
remaining number is 5. Then he deleted all
successive numbers divisible by 5, and so on.
The numbers that remain after all deletions are
Primes. Since writing was done on wax tablets
in those days and the crossing out was done by
Punching the figures, a tablet took on the appea-
Tanee of a sieve. Whence the method of Eratosthe-
nes for finding prime numbers came to be known
as the “sieve of Eratosthenes”.Let us compute the number of numbers that
remain in the first hundred after deleting by the
Eratosthenes method, dividing by 2, 3, and 5.
In other words: how many numbers are there
among the first hundred that are not divisible
by 2, 3 or 5? This problem can be solved by the
principle of inclusion and exclusion.
Denote by a the property of a number to be
divisible by 2, by ag the property of divisibility
by 3, and by aa the property of divisibility by 5.
Then cya signifies that a number is divisible
by 6, cys moans that it is divisible by 10, and
cats, that it is divisible by 15. Finally, aa2¢3
signifies that a number is divisible by 30. Our
task is to find the numbers from 4 to 100 that
are not divisible either -by 2, 3 or 5, that is,
such as do not possess a single one of the pro-
perties a4, ct, a3. By formula (2) we have
NN (aejogers) = 100—N (cx) —V (eta) —N (2s) +
EN (ctgeta) +N (gets) +N (e202) —N (cxrcraces)
However, in, order to find the numbers up to
NV that are divisible by n, we have to divide N
24
by n and take the integral part of the resulting
quotient. Therefore,
N (es) =50, N (cz) = 33, N (ces) =20,
N (ayo) = 16,
IN (cestg) = 10, (ceg0ta) = 6, N (cycegeg) = 3
and, hence,
N (cxjexgors) = 26
‘Thus, 26 numbers between 4 and 100 are not
divisible by 2, 3, or 5. These numbers remain
after the first three stages in the Eratosthenes
process. In addition, we will also have the num-
bers 2, 3, and 5 themselves, There will thus be
32 numbers left altogether.
After three stages in the elimination process
of the sieve of Eratosthenes there will remain
269 numbers out of the first thousand. This fol-
lows from the fact that in this case
NV (4) =500, N (2) =333, N (3) =200,
N (cio) = 166, N (cty%g) = 100, V (age) =
N= (a4¢a043) = 33CHAPTER IL
PERMUTATIONS AND COMBINATIONS
We have considered some general rules for
solving combinatorial problems of a broad variety
of types. However, as in geometry, it is not
always convenient to reduce the solution of
problems to axioms; it is preferable to take
advantage of theorems. It is often better to use
ready-made formulas instead of solving by gene-
ral rules, The point is that certain types of
problems occur much more often than others.
The combination types that occur in such pro-
blems are called permutations and combina-
tions,
Special formulas have been derived for such
combinatorial problems. One such formula is
already familiar: at the beginning of Chapter I
it was demonstrated that the number of k-per-
mutations of n distinct objects with repetitions
is equal to n, Let us now find out how many
such permutations can be formed if we do not
allow for repetitions, that is to say, if all the
elements in the permutations are distinct. First
let us examine the following problem.
FOOTBALL CHAMPIONSHIP
In the USSR football champtonship, Group
One of Class A consists of 17 teams that aspire
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 47 teams can get the
gold medal. We thus have 17 possibilities. But
if some one team gets the gold medal, then there
remain 16 aspirants for the silver medal, since
the same team cannot get both medals.
After first place with the gold medal has been
settled, there remain 16 possibilities for the
silver medal. In the same way, the bronze medal
can goto any one of the remaining 15 teams
after the gold and silver medals have been awar-
ded. By the rule of product we find that the
medals can be distributed in 4,080 ways
(17 X 16 x 15 = 4,080).
22
PERMUTATIONS WITHOUT REPETITIONS
The above problem belongs to the class of
combinatorial problems concerning permutations
without repetitions. The general statement of the
problem is this:
There are n distinct objects. How many k-arran-
gements can be made out of them? Two arran-
gements are considered distinct if they differ
even by a single element or have a different order.
Such arrangements are termed permutations
without repetitions and are symbolized by Ak.
In building &-permutations out of n distinct
things without repetitions, we have to make k
choices. To start, we can choose any one of the n
objects available. Once this choice has been
made, the second step is to choose from the n—1
remaining objects, since the choice already made
cannot be repeated (recall that in contrast to the
case of permutations with repetitions there is only
one thing of each type here). In the same way,
for the third step we have a choice of n—2 free
objects, at the fourth stage we have n—3 objects,
+, at the th stoge we have n—k-+1 objects.
Therefore, by the rule of product we find that
the number of k-arrangements of n objects
without repetitions is expressed as follows:
Aban(n—1)... (n—k+1) (fy
A SCIENCE CLUB
Let us apply this newly derived formula to the
following problem. A science club consists of
25 members. The task at hand ts to elect a presi-
dent, a vice president, scientific secretary and
treasurer. In how many ways can this choice be
made if each member of the club can occupy only
one post at a time?
Here we have to find the number of permuta-
tions (without repetitions) of 25 elements taken
four at a time. The point is that there is a diffe-
rence in who heads the club and what persons23
occupy the subsidiary posts (say, a choice of
Ivanov as president, Tatarinov as vice presi-
dent, Timoshenko as scientific secretary and
Alekseyey as treasurer differs from Timoshenko
as president, Ivanov as vice president, Tatarinov
as scientific secretary and Alekseyev as treasu-
rer). The answer is therefore contained in the
formula
Aly =25 x 24 x 23 x 22 = 303,600
PERMUTATIONS OF N ELEMENTS
When constructing permutations of n ele-
ments without repetitions taking k at a time,
we obtained arrangements that differed both as
to elements and as to their order. But if we take
arrangements involving all n elements, then
they can differ solely in the order of the ele-
ments, Such arrangements are called permu-
tations of n elements, or, briefly, n-permuta-
tions.
In other words, n-permutations are permuta-
tions of n elements without repetitions in which
all elements participate. We can also say that
permutations of n elements are all possible
rearrangements, each one of which contains all
the elements once and all of which differ solely
in the order of the elements. The number of
n-permutations is denoted by P,. The formula
for P, is readily obtained from the formula for
the number of permutations without repetitions,
Namely,
Py=AR=n(n—1)...2%4 2)
‘Thus, to find out how many permutations there
are of n elements, multiply together all the natu-
ral numbers from 1 to n. This product is denoted
by nl (read: n-factorial),-We thus have
Prama1x2x... Xm
We agree that 4
4.
In the future we will encounter 0!, Though it
might seem that O! should be equal to zero, we
agree to consider 0! equal to unity (0! = 1).
The point is that factorials have the obvious
property
n(n—)!
This equality holds true for n > 4. It is natu-
ral to define 0! so that it should remain true for
the caso n = 4 as well, that isso that {1= 1 x Ol.
But then we have to set 0! = 1.
It will also be noted that formula (1), the
number of permutations without repetitions,
can be written as
at
1
A= Gl 8)
Indeed, in (8) all the factors (1, 2, 3, . 4 m— A)
enter both the numerator and the denominator.
Cancelling, we find that AX=n(n—1,..,
- +. (1 —k + 1), in accordance with formula (1).
THE PROBLEM OF THE ROOKS
How many ways are there of placing 8 rooks
ona chessboard so that they do not take each other?
It is clear that only one rook can occupy each
rank (row) and file (column). Let us take one such
position and use a, to denote the number of the
‘occupied square on the first rank, a, to denote the
position on the second rank, . . ., ag the position
on the eighth rank. Then (a1, a2, - « «, a3) will
be a certain permutation of the numbers 4,
2, ..., 8 (it is clear that among the numbers
4, az, ++, ag there is no pair alike, for then
two rooks would be occupying the same file).
Conversely, if a1, dz, «+, ay is a certain per-
mutation of the numbers 1, 2,..., 8, then
to it corresponds a certain nontaking arrangement
of the rooks. Fig. 6 shows one arrangement of the
rooks corresponding to the permutation
75461328, Thus, the number of desired
arrangements of rooks is equal to the number of
permutations of the numbers 1, 2,..., 8,24
which is Ps. But
Py=81=1.2-3-4-5-6-7-8— 40,320
‘These rooks can therefore be positioned as requi-
red in 40,320 ways.
The same proof is used to demonstrate that
there are n\ ways of positioning n nontaking rooks
on an n by n chessboard.
a
Fig. 6.
‘The result would be quite different if the rooks
differed in some way, say, by colour or by some
other label. Suppose the rooks are numbered.
‘Then from each arrangement of non-numbered
rooks wo get nl arrangemonts of numbered rooks.
They are obtained by permuting the n rooks
in all possible ways for the samo occupied squares.
There would then be (nl)? ways of positioning
nontaking rooks.
We also arrive at the same conclusion by
applying the rule of product directly. The first
rook can be placed on any one of n* squares.
Crossing out the rank and file of this rook, we
have an n— 1 by n—1 board left (n — 4 ranks
and n —1 files) with a total of (n — 4) * squares.
This means that the second rook can be placed
in (n—4)® ways. In the same manner, the
third rook can be positioned in (n — 2)? ways,
etc. Altogether we have
ne (nt)... 2=(al)?
ways of placing the rooks.
LINGUISTIC PROBLEMS
One of the problems of linguistics is decipher-
ing inscriptions in unknown languages. Suppose
we havea text written with the aid of 26 unknown
signs, each one depicting one of 26 sounds.
In how many ways can the sounds be correlated
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 P2g= 26! permutations. This number is
roughly equal to 4 x 10%, 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-
bols that occur more often than others, it is
possible to separate the vowels from the conso-
nants). Suppose we have been able to find 7 sym-
bols for vowels and 19 symbols for consonants:
Let us now find out how many times the number
of possibilities has been reduced. The 7 vowels
can be permuted in 7! ways and the 19 consonants
in 191 ways. The total number of combinations
is equal to 7! x 491. Which means the work
has been reduced 261/7! x 19! = 650,000 times.
This is of course a gain, but 7! x 49! is still an
enormous number.
The next step is to compute the frequency of
‘occurrence of the individual symbols. Comparing
this frequency with that of letters in related
languages, one can conjecture as to the signifi-
cance of certain symbols. Other symbols are
found by comparing the given text with the
same text in another language (the kings of old
delighted in describing their heroic deeds in
several languages).
Suppose that in this way 4 vowels and 13 con-
sonants have een identified. What are the remain-25
ing possibilities? Obviously, 31 - 6! = 4,320.
Now this number of combinations can be handled
by electronic computers.
Cryptologists meet similar difficulties in de-
coding operations.
ROUND DANCE
Seven girls form for a round dance, In how
many different ways can they stand tn the circle?
If they stood in one place, the result would
be 7!= 5,040 permutations. But since the
dancing girls circle all the time, their position
relative to surrounding objects is not essential,
the only important thing being their mutual
arrangement. For this reason, we consider the
permutations appearing as the dancers move
round the circle to be the same. However, from
each permutation we can obtain another six by
means of rotation, so the number 5,040 has to
be divided by 7. This yields 5,040: 7= 720
distinct permutations of girls in a round
dance.
Fig. 7.
Generally, if we consider permutations of n
objects in a circular arrangement and regard as
identical those positions that go into one another
in a rotation, then the number of distinet permu-
tations is equal to (n— 1)!.
Now let's see how many necklaces we can
make out of 7 distinct beads. By analogy with
the problem that was just solved, it might be
imagined that the number of distinct necklaces
is just 720. But a necklace can also be turned
upside down in addition to being moved round
the cirele (Fig. 7). So the answer is 720 : 2— 360.
PERMUTATIONS WITH REPETITIONS
Up to now we have been permuting objects
that are pairwise distinct. But if some of the
objects being permuted are identical, then wo
obtain fewer permutations, some of them coincid-
ing with one another.
Let us illustrate with the word “part”; permut-
ing, we obtain 24 different permutations:
part rapt pra rtpa
patr ptar ratp rtap
prat rpat rpta prta
trap tpar aptr artp
tarp atrp atpr —tapr
aprt arpt trpa_tpra
If we take the word “papa” instead, then in
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
the word “papa” is 24:4= 6. They are
Papa, Paap, ppaa, apap, aapp, appa
Stated generally, we have the following pro-
blem:
There are k elements of different types. How
many permutations can be made out of n, elements
of the first type, nz elements of the second type, . . ..ny
elements of the kth type?
The number of elements in each permutation
is equal to n= my-+ net... -+tnq. Thus, if