Notation and Abbreviation
N = {1,2,3,...}, (p.5)
N* = {0,1,2,3,...}, (p.104)
Ni = {1,2,3,...,k}, (p.62)
Ni = {0,1,2,3,...,k}, (p91)
Zz = {...,-2,-1,0,1,2,3,...}, (p.3)
R = the set of real numbers, (p.187)
(AP) : Addition Principle, (p.1)
(BP) : Bijection Principle, (p.27)
(CP) : Complementation Principle, (p.16)
(IP) : Injection Principle, (p.27)
(MP) : Multiplication Principle, (p.4)
(PP) : Pigeonhole Principle, (p.120)
(GPP) : Generalized Pigeonhole Principle, (p.133)
(PIE) : Principle of Inclusion and Exclusion, (p.146)
(GPIE) : Generalized Principle of Inclusion and Exclusion,
(p.150)
(RP) : Reflection Principle, (p.91)
LHS : Left hand side, (p.192)
RHS : Right hand side, (p.151)
o : if and only if, (p.79)
iff : if and only if, (p.95)
viialb
a fb
Lz]
fz]
a=b (mod m)
HCF
LCM
Isl
a(r,n)
S(r,n)
P(rsriy..-
Ta)
Notation and Abbreviation
a divides 6, (p.94)
a does not divide 6, (p.94)
the largest integer less than or equal to x (p.94)
the smallest integer greater than or equal to z
(p.124)
a is congruent to b modulo m, i.e. m|(a — b) (p.94)
highest common factor, (p.113)
Lowest common multiple, (p.147)
the number of elements in the finite set S, (p.2)
Stirling number of the first kind
the number of ways to arrange r distinct objects
around n identical circles such that each circle has
at least one object, (p.25)
Stirling number of the second kind
the number of ways of distributing r distinct objects
into n identical boxes such that no box is empty,
(p.47)
t
the rth Bell number = > S(r,n), (p.50)
the number of r-element subsets of an n-element set
!
Aer (p.17)
the a of r-permutations of n distinct objects
ce aoe?
(#277), @37
r!
rial ral? P34Dn
D(n,r,k)
P(X)
v(n)
R(p, 9)
R(pi,.--, Pn)
(osrnvtn)
11,125 009m,
»(n)
MO
IMO
APMO
AIME
Notation and Abbreviation ix
the number of r-circular permutations of n distinct
objects
= (p18)
the number of derangements of Nj, (p.160)
the number of r-permutations of Nj, that have ex-
actly k fixed points, (p.160)
the power set of X, (p.28)
the Euler y-function, (p.160)
the smallest natural number “n” such that for any
colouring of the edges of an n-clique by 2 colours:
blue or red (one colour for each edge), there exists
either a “blue p-clique” or a “red q-clique”, (p.132)
the smallest natural number “n” such that for any
colouring of the edges of an n-clique by k colours:
colour 1, colour 2, ..., colour k, there exist a colour
i(i=1,2,...,k) and a pj-clique in the resulting con-
figuration such that all edges in the p;-clique are
coloured by colour i, (p.136)
!
aio , (p.96)
the number of different partitions of n, (p.196)
Mathematical Olympiad
International Mathematical Olympiad
Asian Pacific Mathematics Olympiad
American Invitational Mathematics ExaminationContents
Notation and Abbreviation . .
Contents
1. Permutations and Combinations
1.1. Two Basic Counting Principles
1.2. Permutations
1.3. Circular Permutations
1.4. Combinations ....
1.5. The Injection and Bijection Principles ............. 7
1.6. Arrangements and Selections with Repetitions ........ 32
1.7. Distribution Problems ...............--.0000. 40
Exercise 1
2. Binomial Coefficients and Multinomial Coefficients .... 69
2.1. Introduction ©... 2... eee
2.2. The Binomial Theorem
2.3. Combinatorial Identities .
2.4. The Pascal’s Triangle ....
2.5. Chu Shih-Chieh’s Identity . . .
2.6. Shortest Routes in a Rectangular Grid” ausiee a . 85
2.7. Some Properties of Binomial Coefficients ........... 93
2.8. Multinomial Coefficients and the Multinomial Theorem . . 96
WGXORCIRG Desist itt sese ste ceeces eet tei ics 102
3. The Pigeonhole Principle and Ramsey Numbers .... . . 119
3.1. Introduction... 2.6... ee 119
3.2. The Pigeonhole Principle .................-54% 119
O37 |More Examples sien coe 122
3.4. Ramsey Type Problems and Ramsey Numbers ........ 129
3.5. Bounds for Ramsey Numbers ..............--0- 132
PExercasels cect sient testa tenrteare aera eee aene 137xii
4,
Contents
The Principle of Inclusion and Exclusion .
4.1. Introduction
4.2. The Principle ... .
4.3. A Generalization .. .
- 145
4.4. Integer Solutions and Shor Routes ..........--- 153
4.5. Surjective Mappings and Stirling Numbers of the Second
Raa Se re ieteeeee a teteaet oe estat esreeete et ceeteteaete a etterteeraeeaeteietee 158
4.6. Derangements and A Generalization .............. 160
4.7. The Sieve of Eratosthenes and Euler y-function ....... 163
4.8. The ‘Probléme des Ménages’ .............20005 169
Exercise 40... eee 173
Generating Functions ............-0--0 00000 e ee 185
5.1. Ordinary Generating Functions .
5.2. Some Modelling Problems .. . .
5.3. Partitions of Integers . . . ‘
5.4. Exponential Generating Functions...
Exercise 5
Recurrence Relations .. 1... 6... eee eee ee eee 225
clo: Introduchion tatsisrcsasrere setae termites sie reiericrne cece 225
6.2. Two Examples ....... 2.0.0 e eee eee eee 228
6.3. Linear Homogeneous Recurrence Relations .......... 234
6.4, General Linear Recurrence Relations ............. 241
6.5. Two Applications ... 2.2... 0.05.0 eee eee ee 244
6.6. A System of Linear Recurrence Relations ........... 251
6.7. The Method of Generating Functions . .
6.8. A Nonlinear Recurrence Relation and Catalan Numbers » . 259
6.9. Oscillating Permutations and an Exponential Generating
PMAMCHION feet escictce te tee ieree te tecetietet eee atierietce te telietiercete teeta 262
Exercise 6 000... eee ee te tee eee 270
Bibliography, sees eee 287
BA as afr ease ae elepaeseoaee eerreaerier verreeniteerlarer ee teeenienraerearintes 289Chapter 1
Permutations and Combinations
1.1. Two Basic Counting Principles
In our everyday lives, we often need to enumerate “events” such as, the
arrangement of objects in a certain way, the partition of things under a
certain condition, the distribution of items according to a certain specifi-
cation, and so on. For instance, we may come across counting problems of
the following types:
“How many ways are there to arrange 5 boys and 3 girls in a row so
that no two girls are adjacent?”
“How many ways are there to divide a group of 10 people into three
groups consisting of 4, 3 and 2 people respectively, with 1 person rejected?”
These are two very simple examples of counting problems related to
what we call “permutations” and “combinations”. Before we introduce in
the next three sections what permutations and combinations are, we state
in’ this section two principles that are fundamental in all kinds of counting
problems.
The Addition Principle (AP) Assume that there are
my ways for the event Ej, to occur,
n2 ways for the event 2 to occur,
nx ways for the event Ej, to occur,
where k > 1. If these ways for the different events to occur are pair-
wise disjoint, then the number of ways for at least one of the events
E,, E2,..., or Ey to occur is ny +ng+--- +n, = hin.2 Section 1.1. Two Basic Counting Principles
Example 1.1.1. One can reach city Q from city P by sea, air and
road. Suppose that there are 2 ways by sea, 3 ways by air and 2 ways by
road (see Figure 1.1.1). Then by (AP), the total number of ways from P
to Q by sea, air or road is2+34+2=7. y
Figure 1.1.1.
An equivalent form of (AP), using set-theoretic terminology, is given
below.
Let Ai,Ao,...,Ax be any k finite sets, where k > 1. If the given
sets are pairwise disjoint, ie., A; A; = @ for i,j = 1,2,...,k, i # J,
then
k
|A1 U Ag U-+-U-Aa] = > Ail.
i=l
Example 1.1.2. Find the number of ordered pairs (z,y) of integers
such that 2? +y? <5.Chapter 1. Permutations and Combinations 3
Solution. We may divide the problem into 6 disjoint cases: 2? + y? =
0,1,...,5. Thus for i = 0,1,...,5, let
Si = {(z,y) |z,yEZ, 2? +y? =i}.
It can be checked that
So = {(0,0)},
Si = {(1,0), (-1,0), (0,1), (0,-1)},
Se = {(1,1), (1,-1),(-1,1),(-1,-)},
53 = 0,
Sa = {(0,2), (0, -2), (2,0),(—2,0)}, and
Ss = {(1,2), (1, -2), (2, 1), (2,-1); (-1, 2), (-1, -2), (2,1), (-2, -1)}.
Thus by (AP), the desired number of ordered pairs is
5
Vo isil=1+44+440444+8= 21.
#=0
Remarks. 1) In the above example, one can find out the answer “21”
simply by listing all the required ordered pairs (x,y). The above method,
however, provides us with a systematical way to obtain the answer.
2) One may also divide the above problem into disjoint cases: 2? =
0,1,...,5, find out the number of required ordered pairs in each case, and
obtain the desired answer by applying (AP).
The Multiplication Principle (MP) Assume that an event E
can be decomposed into r ordered events Ei, F2,...,£,, and that
there are
n, ways for the event E, to occur,
m2 ways for the event 2 to occur,
n, ways forthe event E, to occur.
Then the total number of ways for the event E to occur is given by:
my X Ng X +X My =4 Section 1.1. Two Basic Counting Principles
Example 1.1.3. To reach city D from city A, one has to pass through
city B and then city C as shown in Figure 1.1.2.
A
}_, k? = 3n(n + 1)(2n + 1), we finally obtain
Is] = i x 99 x 100 x 199 = 328350. »
As mathematical statements, both (AP) and (MP) are really ‘trivial’.
This could be a reason why they are very often neglected by students. Ac-
tually, they are very fundamental in solving counting problems. As we shall
witness in this book, a given counting problem, no matter how complicated
it is, can always be ‘decomposed’ into some simpler ‘sub-problems’ that in
turn can be counted by using (AP) and/or (MP).
1.2. Permutations
At the beginning of Section 1.1, we mentioned the following problem: “How
many ways are there to arrange 5 boys and 3 girls in a row so that no two
girls are adjacent?” This is a typical example of a more general problem of
arranging some distinct objects subject to certain additional conditions.
Let A = {a}, a2, ...,¢n} be a given set of n distinct objects. For 0 (n|n € S)
in part (ii). Observe that the 4 numbers in 5; can be paired off as {1,7} and
{3,5} so that the sum of the two numbers in each pair is equal to 8 and the
12 numbers in Sz can be paired off as {13,75}, {15,73}, {17,71}, {35,53},
... 80 that the sum of the two numbers in each pair is 88. Likewise, the 24
numbers in S3 and the 24 numbers in Sq can be paired off so that the sum
of the two numbers in each pair is equal to 888 and 8888 respectively. Thus
4 12 24 24
a= 8x 5 + 88x > + 888 x > + 8888 x a
= 117856.
1.3. Circular Permutations
The permutations discussed in Section 1.2 involved arrangements of objects
in a row. There are permutations which require arranging objects in a
circular closed curve. These are called circular permutations.
Consider the problem of arranging 3 distinct objects a,b, c in 3 positions
around a circle. Suppose the 3 positions are numbered (1), (2) and (3) as
shown in Figure 1.3.1. Then the three arrangements of a,b,c shown in the
figure can be viewed as the permutations:
abe, cab, bea
respectively.
a c. b
() ()) Q)
c bob aa ¢
(3) (2) (3) (2) (3) (2)
abe cab bea
Figure 1.3.1.Chapter 1. Permutations and Combinations 13
In this case, such “circular permutations” are identical with the usual
permutations, and thus there is nothing new worth discussing. To get
something interesting, let us now neglect the numbering of the positions
(and thus only “relative positions” of objects are concerned). As shown in
Figure 1.3.2, any of the 3 arrangements is a rotation of every other; i.e., the
relative positions of the objects are invariant under rotation. In this case,
we shall agree to say that the 3 arrangements of Figure 1.3.2 are identical.
In general, two circular permutations of the same objects are identical if
any one of them can be obtained by a rotation of the other.
abe cab bea
Figure 1.3.2.
Let A be a set of n distinct objects. For 0 < r < n, an r-circular
permutation of A is a circular permutation of any r distinct objects taken
from A. Let Q? denote the number of r-circular permutations of A. We
shall derive a formula for Q?.
Example 1.3.1. Let A= {a,b,c,d}. There are altogether P$(= 24)
3-permutations of A and they are shown in Example 1.2.1. These 24 3-
permutations are re-grouped into 8 subsets as shown below:
abe _cab_bea ach bac cba
abd dab bda | adb bad dba
acd_dac _cda | ade cad dca
bed _dbc_cdb | bde cbd deb
It is noted that every 3-circular permutation of A gives rise to a unique14 Section 1.8. Circular Permutations
such subset. For instance,
a
= — {acd,dac, eda}
Conversely, every such subset corresponds to a unique 3-circular permuta-
tion of A. For instance,
{adb,bad,dba} = =>
Thus we see that
Example 1.3.1 tells us that Q3 = $P}. What is the relation between
Q® and P? in general?
A circular permutation of r distinct objects 21, 29,...,2, shown below:
a
gives rise to a unique subset of r r-permutations:
©1XQ+++ Lp, LpX{LZQ-++ Ley, -.., Lares Lp TyChapter 1. Permutations and Combinations 15
obtained through a rotation of the circular permutation. Conversely, every
such subset of r r-permutations of A corresponds to a unique r-circular
permutation of A. Since all the r-permutations of A can be equally divided
into such subsets, we have
gam. (1.3.1)
r
In particular,
pr
Qh = <2 =(n-1)!. (1.3.2)
Example 1.3.2. In how many ways can 5 boys and 3 girls be seated
around a table if
(i) there is no restriction?
(ii) boy By and girl G; are not adjacent?
(iii) no girls are adjacent?
Solution (i) The number of ways is Q§ = 71.
(ii) The 5 boys and 2 girls not including G1 can be seated in (71)! ways.
Given such an arrangement as shown in Figure 1.3.3, G; has 5(= 7 — 2)
choices for a seat not adjacent to B,. Thus the desired number of ways is
6! x 5 = 3600.
Bs
G:
7 2
By
By
Bs
G3
Figure 1.3.3.
‘We may obtain another solution by using what we call the Principle of
Complementation as given below:16 Section 1.3. Circular Permutations
Principle of Complementation (CP) If A is a subset of a finite
universal set U/, then
W\ Al = Bal 1AL
Now, the number of ways to arrange the 5 boys and 3 girls around a
table so that boy B, and girl G, are adjacent (treating {B,,G,} as an
entity) is
(7-1)! x 2= 1440.
‘Thus the desired number of ways is by (CP),
7! — 1440 = 3600.
(iii) We first seat the 5 boys around the table in (5 — 1)! = 4! ways.
Given such an arrangement as shown in Figure 1.3.4, there are 5 ways to
seat gitl G;. As no girls are adjacent, Gz and G3 have 4 and 3 choices
respectively. Thus the desired number of ways is
4!x5x4x3=1440. g
Ba
By
Figure 1.3.4.
Example 1.3.3. Find the number of ways to seat n married couples
around a table in each of the following cases:
(i) Men and women alternate;
(ii) Every woman is next to her husband.Chapter 1. Permutations ond) Combinations 17
Solution. (i) The n men can first be seated in (n — 1)! ways. The
n women can then be seated in the n spaces between two men in n! ways.
Thus the number of such arrangements is (n — 1)! x n!.
(ii) Each couple is first treated as an entity. The number of ways to
arrange the n entities around the table is (n — 1)!. Since the two people in
each entity can be permuted in 2! ways, the desired number of ways is
(n=1)!x 2".
Remark. A famous and much more difficult problem related to the
above problem is the following: How many ways are there to seat n married
couples (n > 3) around a table such that men and women alternate and
each woman is not adjacent to her husband? This problem, known as the
problem of ménages, was first introduced by the French mathematician
Francis Edward Anatole Lucas (1842 — 1891). A solution to this problem
will be given in Chapter 4.
1.4. Combinations
Let A be a set of n distinct objects. A combination of A is simply a subset
of A. More precisely, for 0 < r < n, an r-combination of A is an r-element
subset of A. Thus, for instance, if A = {a,b,c,d}, then the following
consists of all the 3-combinations of A:
{a,b,c}, {a,b,d}, {a,c,d}, {b, c,d}.
There are 4 in number. Let C? or (") (which is read ‘n choose r’) denote the
number of r-combinations of an n-element set A. Then the above example
says that Cf = (3) = 4. We shall soon derive a formula for C?.
What is the difference between a permutation and a combination of a
set of objects? A permutation is an arrangement of certain objects and
thus the ordering of objects is important, whereas a combination is just a
set of objects and thus the ordering of objects is immaterial. As a matter
of fact, every r-permutation of A can be obtained in the following way:
Step 1. Form an r-combination B of A.
Step 2. Arrange the r objects of B in a row.18 Section 1.4. Combinations
‘This provides us with a means to relate the numbers P” and C?. Indeed,
we have by (MP):
PP =OP xr!
and thus =
geese eee
=r A@en! (144)
In particular,
Note that
nt
—r)\(n-(n—r))! Chars
()=(2) tas
For convenience, we show in Table 1.4.1 the values of ("), where 0 G-Dimaonl A
_ (n—Dir+(n
= rin
Combinatorial Proof. Let A = {1,2,...,n}. By definition, there are (")
ways to form r-combinations S of A. We shall count the number of such S
in a different way.
Every r-combination S of A either contains “1” or not. If 1 € S, the
number of ways to form S is (77). If 1 ¢ S, the number of ways to form
Sis ("7"). Thus by (AP), we have
(=a) C5)
= + |
r r-1 r
Remark. In the second proof, we fix an enumeration problem and
count it in two different ways, giving rise to an equality relating two different.
expressions. This is a useful way to derive combinatorial identities.
Example 1.4.2. By Example 1.1.4, there are 2” binary sequences of
length 7. How many such sequences are there which contain 3 0’s and 4
1's?
Solution. To form such a sequence of length 7:
EEE ey
(1) (2) (3) (4) (5) 6) (7)
we first select 3 of the 7 spaces for ‘0’ and then leave the remaining spaces
for ‘1’. There are (3) ways in the first step and (3) = 1 way in the next.
Thus the number of such binary sequences is given by (3). =20 Section 1.4. Combinations
Remarks. (1) In the above example, you may first select 4 of the 7
spaces for ‘1’ and obtain the answer (7), which is equal to (3) by identity
(1.4.2).
(2) In general, the number of binary sequences of length n with m 0’s
and (n — m) 1’s, where 0 < m < n, is given by (*).
Example 1.4.3. In how many ways can a committee of 5 be formed
from a group of 11 people consisting of 4 teachers and 7 students if
(i) there is no restriction in the selection?
(ii) the committee must include exactly 2 teachers?
(iii) the committee must include at least 3 teachers?
(iv) a particular teacher and a particular student cannot be both in the
committee?
Solution. (i) The number of ways is (*2) = 11!/(5!6!) = 462.
(ii) We first select 2 teachers from 4 and then (5 — 2) students from 7.
The number of ways is
4) (7
() () =6 x 35 = 210.
(iii) There are two cases: either 3 teachers or 4 teachers are in the
committee. In the former case, the number of ways is
()@)=+-nm
while in the latter, the number of ways is
@@=*
Thus by (AP), the desired number of ways is 84+ 7 = 91.
(iv) Let T be the particular teacher and $ the particular student. We
first find the number of ways to form a committee of 5 which includes both
T and S. Evidently, such a committee of 5 can be formed by taking the
union of {7,5} and a subset of 3 from the remaining 9 people. Thus the
number of ways to form a committee of 5 including T and S is (§) = 84.Chapter 1. Permutations and Combinations 21
Hence the number of ways to form a committee of 5 which does not include
both T and S is by (CP):
(2) 2 () = 462—84=378, by (i). #
Suppose that there are 8 players a,b,c,d,e, f,g,h taking part in the
singles event of a tennis championship. In the first round of the competition,
they are divided into 4 pairs so that the two players in each pair play against
each other. There are several ways to do so. For instance,
or () avsb, evsf, dvsh, evsg,
(2) avsh, bvsg, cvsf, dvse.
What is the number of ways that this arrangement can be made?
To phrase this sort of questions mathematically, let A be a set of 2n
distinct objects. A pairing of A is a partition of A into 2-element subsets;
ie., a collection of pairwise disjoint 2-element subsets whose union is A.
For instance, if A is the set of 8 players {a,b,c,d,e, f,9,h} as given above,
then
{{a,0}, {c, f}, {4,4}, fe, 9}}
and {{a,h}, {5,9}, {c, f}, {d, e}}
are different pairings of A. We note that the order of the subsets and the
order of the 2 elements in each subset are immaterial.
Example 1.4.4. Let A be a 2n-element set where n > 1. Find the
number of different pairings of A.
Solution. We shall give 3 different methods for solving the problem.
Method 1. Pick an arbitrary element, say 2, of A. The number of ways
to select z’s partner, say y, is 2n—1 (and {z,y} forms a 2-element subset).
Pick an arbitrary element, say z, from the 2n—2 elements of A\{z, y}. The
number of ways to select z’s partner is 2n — 3. Continuing in this manner
and applying (MP), the desired number of ways is given by
(2n — 1)(2n —8)---5-3-1.22 Section 1.4. Combinations
Method 2. First, form a 2-element subset of A and put it in position (1)
as shown below. There are (7s) ways to do so.
eee eyed)
Q @ (8) (n)
Next, form a 2-element subset from the remainder of A and put it in the
position (2). There are (°"7”) ways to do so. Continuing in this manner
and applying (MP), we see that the number of ways of arranging the n
2-element subsets in a row is:
Qn\ (2n—2\ (4) (2
2 2 2) \2}
Since the order of the n subsets is immaterial, the desired number of ways
is:
GCs) |
Method 3. We first arrange the 2n elements of A in a row by putting
them in the 2n spaces as shown below:
, bf , how ,
Q) ) (3) (4) (2n—1) — (2n)
There are (2n)! ways to do so. Since the order of the elements in each
2-element subset and the order of the n subsets are immaterial, the desired
number of ways is given by
(2n)! _ _(2n)!
2! x 2! x2xn! nlx 2°
ee es
It can be checked that the above 3 answers are all the same.
The above problem can be generalized in the following way. Let A be a
set of kn distinct elements, where k,n € N. A k-grouping of A is a partition
of A into k-element subsets; i.e., a collection of pairwise disjoint k-element
subsets whose union is A. Thus if A = {a1,a2,...,a12}, then
{{a1, 44,49, 412}, {a2, 45,48, 410}, {a3, 46, a7, a11}}
is a 4-grouping of A. Clearly, a pairing of a 2n-element set A is a 2-grouping
of A. What is the number of different k-groupings of a set with kn elements?
(See Problem 1.43.)Chapter 1. Permutations and Combinations 23
Example 1.4.5. (IMO, 1989/3) Let n and k be positive integers and
let S be a set of n points in the plane such that
(i) no three points of S are collinear, and
(ii) for any point P of S, there are at least k points of S equidistant
from P.
Prove that k << $+ -V2n.
Proof. For convenience, we call a line segment in the plane an edge if
it joins up any two points in S. Let £ be the number of edges in the plane.
We shall consider the quantity £.
First, since there are n distinct points in S and any two of them deter-
mine an edge, we have,
n
t= 6) (1)
Next, for each point P of S, by condition (ii), one can draw a circle
with centre P whose circumference C(P) contains at least k points of S.
Clearly, the points of S on C(P) determine at least (3) edges. As there are
n points P in S, the total number of these edges, counted with repetition,
is at least n(*).
Now, let us look at those edges which are counted more than once. An
edge is counted more than once when and only when it is a common chord
of at least 2 circles. Since two circles can have at most one common chord
and there are n such circles, the number of common chords, counted with
repetition, is at most (5). Thus
ee)-6) °
Combining (1) with (2), we have
“()-@)<()
0) <6)
BP k-2(n-1) <0.
or
which implies that24 Section 1.4. Combinations
Hence
ke 1+ V1+8(n-1)
Ht 2
11 1
1,
8(r,r) =1 ifr >0,
8(r,1)=(r—1)! for r > 2,
s(r,r—1)=(5) forr>2.
The following result, which resembles (1.4.3) in Example 1.4.1, tells us
how to compute s(r,n) for larger r and n from smaller r and n.26 Section 1.4. Combinations
Example 1.4.7. Show that
8(r,n) = 8(r —1,n—1) +(r— 1)s(r — 1,n) (1.4.4)
where r,n € N with n 1 and s(r,1) =
(r—1)! for r > 1, and applying the identity (1.4.4), one can easily find out
the values of s(r,n) for small r and n. For r,n withO B from A to B is injective (or
one-one) if f(a1) # f(a2) in B whenever a; # a2 in A. f is surjective (or
onto) if for any b € B, there exists a € A such that f(a) =b. f is bijective
if f is both injective and surjective. Every injective (resp., surjective and
bijective) mapping is also called an injection (resp., a surjection and a
bijection).
The Injection Principle (IP) Let A and B be two finite sets.
If there is an injection from A to B, then |A| < |BI.
The Bijection Principle (BP) Let A and B be two finite sets.
If there is an bijection from A to B, then |A| = |B].
Just like (AP), (MP) and (CP), the two principles (IP) and (BP) as
given above are also trivially true. However, as we will see below, they are
also useful and powerful as tools for solving counting problems.
Example 1.5.1. A student wishes to walk from the corner X to the
corner Y through streets as given in the street map shown in Figure 1.5.1.
How many shortest routes are there from X to Y available to the student?
Y
Figure 1.5.1.28 Section 1.5. The Injection and Bijection Principles
Solution. Let A be the set of all shortest routes from X to Y. We
shall find [A].
We first note that every route in A consists of 7 continuous segments
(a segment is part of a street connecting two adjacent junctions) of which
4 are horizontal and 3 vertical. Thus if we use a ‘0’ to denote a horizontal
segment and a ‘1’ to denote a vertical segment, then every route in A can be
uniquely represented by a binary sequence of length 7 with 4 0’s and 3 1’s
(for instance, the shortest route shown by bold line segments in Figure 1.5.1
is represented by 1001100). This way of representing a route clearly defines
a mapping f from A to the set B of all binary sequences of length 7 with 4
0’s and 3 1’s. It is easy to see that f is both one-one and onto, and hence
it is a bijection from A to B. Thus by (BP) and Example 1.4.2, we have
l4|=|B1=@)- o
Remark. The street map of Figure 1.5.1 is a 5 x 4 rectangular grid.
In general, if it is an (m+ 1) x (n + 1) rectangular grid consisting of m+1
vertical streets and n + 1 horizontal streets, then the number of shortest
routes form the southwest corner X to the northeast corner Y is equal to
the number of binary sequences of length m+n with m 0’s and n 1’s, which
by Remark (2) of Example 1.4.2, is given by
("a") = 2")
Given a set X, the power set of X, denoted by P(X), is the set of all
subsets of X, inclusive of X and the empty set 0. Thus, for instance, if
X = {1,2,3}, then
P(X) = {0, {1}, {2}, {3}, {1,2}, {1,3}, {2,3}, X}.
We observe that |P(X)| = 8. In general, what can be said about |P(X)| if
X consists of n distinct elements?
Example 1.5.2. Show that if |X| = n, then [P(X)| = 2” for all
neN.Chapter 1. Permutations and Combinations 29
Proof. We may assume that X = {1,2,...,n}. Now, let
B= {aa9...d, |; =0 or 1, i=1,2,..,n}
be the set of all binary sequences of length n.
Define a mapping f : P(X) — B as follows: For each S € P(X) (ie.,
SCX), we put
F(S) = bybe.. Bp
where :
ie i ifi eS,
0 ifi¢S.
(For instance, if X = {1,2,3,4,5}, S1 = {4} and S2 = {2,3,5}, then
F(S1) = 00010 and f(S2) = 01101.) It is easy to see that f is a bijection
from P(X) to B. Thus by (BP), |P(X)| = |B]. Since |B| = 2” by Example
1.1.4, we have [P(X)| = 2", as required.
Example 1.5.3. Let X = {1,2,...,n}, where n € N. Show that the
number of r-combinations of X which contain no consecutive integers is
given by
(ort?)
. ,
where 0 m for each i = 2,3,...,r.
Thus S is 2-separated if and only if S contains no consecutive integers. Let
X = {1,2,...,n}, where n € N. Using (BP), we can also find a formula for
the number of r-element subsets of X which are m-separated. Readers who
are interested may see Problem 1.91.
In the above three examples, three sets A (namely, the set of shortest
routes, the power set P(X) and the set of r-combinations containing no
consecutive integers) and their counterparts B (namely, the set of binary
sequences of length 7 with 4 0’s, the set of binary sequences of length n and
the set of r-combinations, respectively) are considered. By establishing a
bijection from A to B, we have by (BP), |A| = |B]. Note that in each case,
the enumeration of |A| by itself is not straightforward, while that of |B|
is fairly standard and so much easier. Thus with (BP), we can sometimes
transform a hard problem into an easier one. This is always a crucial step
in the process of solving a problem.
The above three examples involve only the applications of (BP). In what
follows, we shall give an interesting example which makes use of both (BP)
and (IP).Chapter 1. Permutations and Combinations 31
Example 1.5.4. (IMO, 1989/6) A permutation 2122...22n of the set
{1,2,...,2n}, where n € N, is said to have property P if |z; — zi41| =n
for at least one i in {1,2,...,2n—1}. Show that, for each n, there are more
permutations with property P than without.
This problem, proposed by Poland, was placed last in the set of the six
problems for the 1989 IMO, and was considered a more difficult problem
among the six. The original proof given by the proposer makes use of
recurrence relations which is rather long and looks hard. However, it was
a pleasant surprise that a contestant from the China team was able to
produce a shorter and more elegant proof of the result. Before we see this
proof, let us first try to understand the problem better.
Let S = {1,2,...,2n}. Clearly, a permutation of S does not have prop-
erty P if and only if for each k = 1,2,...,n, the pair of numbers k and n+k
are not adjacent in the permutation. For n = 2, the set A of permutations
without P and the set B of permutations with P are given below:
A ={1234, 1432, 2143, 2341, 3214, 3412, 4123, 4321},
B ={1243, 1324, 13.42, 1423, 2134, 2314, 2413, 2431,
3124, 3142, 3241, 3421, 4132, 4213, 4231, 4312}.
Clearly, |B| = 16 > 8 = |AI.
Proof. The case when n = 1 is trivial. Assume that n > 2. Let A
(resp., B) be the set of permutations of S = {1,2,...,2n} without property
P (resp., with P). To show that |B| > |A|, by (IP) and (BP), it suffices to
establish a mapping f : A + B which is injective but not surjective.
For convenience, any number in the pair {k,n + k} (k = 1,2,...,n) is
called the partner of the other. If k and n+k are adjacent in a permutation,
the pair {k,n +k} is called an adjacent pair of partners.
Let a@ = 2122...22, be an element in A. Since a does not have property
P, the partner of z, is z, where 3 0 for all i, can be represented by a row having r; 0’s within
the interval under a;. If we treat each vertical stroke as an ‘1’, then every
r-element multi-subset of M corresponds to a unique binary sequence of
length r + n — 1 with r 0’s and (n — 1) 1’s. This correspondence is indeed
a bijection between the family of all r-element multi-subsets of M and the
family of all such binary sequences. Thus by (BP) and Remark (2) of
Example 1.4.2, we obtain the following result.
(Il) Let M = {00+ 41,00 -43,...,00+@,}. The number H? of
r-element multi-subsets of M is given by
Ht= Ga)
Result (III) can be proved in various ways. We give another proof below.
Another Proof of (III). For convenience, we represent a; by i, i=
1,2,...,n, and so M = {c0-1,00-2,...,00-n}. Let A be the family of all
r-element multi-subsets of M and B be the family of all r-combinations of
the set {1,2,...,r-+n—1}. Define a mapping f : A > B as follows: For
each r-element multi-subset S = {b1, b2,...,6,} of M, where 1 < b; < bo <
wa S bp Sr, let
F(S) = {b1,b2 +1, b3 + 2,-1.5 bp + (nr — 1)}.40 Section 1.7. Distribution Problems
It should be noted that members in f(S) are distinct and so f(S) € B.
It is easy to see that f is injective. To show that f is surjective, let T =
{c1,¢2,...,¢,} be an r-combination of {1,2,...,7 +n — 1} with c, < c2 <
+++ < ¢. Consider
S = {e1,¢2 — 1,¢3 — 2.4 — (r— 1)}.
Observe that $ is an r-element multi-subset of M and by definition, f(S) =
T. This shows that f is surjective.
We thus conclude that f is a bijection from A to B. Hence by (BP),
r+n—1
Hp = |4l= [BI = ( 7 y
Remarks. (1) Let M’ = {p1-a1,p2-a9, ..., Pn-Gn} be amulti-set. From
the above discussion, we see that the number of r-element multi-subsets
{ri -a1,72 +42; ..51n * dn},
(0 p; for some i, then the above statement is
invalid. This case will be studied in Chapter 5.
(2) The reader might have noticed that there is some similarity be-~
tween the above proof and that given in Example 1.5.3. Indeed, the rule
defining f here is the same as that defining f~1 there.
1.7. Distribution Problems
We consider in this section the following problem: Count the number of
ways of distributing r objects into n distinct boxes satisfying certain con-
ditions. We split our consideration into two cases: (1) objects are distinct,
(2) objects are identical (or indistinguishable).
Case (1) Distributing r distinct objects into n distinct boxes.
(i) If each box can hold at most one object, then the number of ways
to distribute the objects is given by
n(n— 1)(n—2)++-(n—r+ 1) = PB,Chapter 1. Permutations and Combinations 41
since object 1 can be put into any of the n boxes, object 2 into any of the
n—1 boxes left, and so on.
(ii) If each box can hold any number of objects, then the number of
ways to distribute the objects is given by
as each object can be put into any of the n boxes.
(iii) Assume that each box can hold any number of objects and the
orderings of objects in each box count.
In this case, the 1st object, say a1, can be put in any of the n places
(namely, the n boxes); and the 2nd object, say az, can be put in any of
the n + 1 places (the n — 1 boxes not containing a; plus the left and right
positions of a; in the box containing a1). Similarly, the 3rd object can be
put in any of the n + 2 places due to the presents of a; and a2, and so on.
Thus the number of ways that an arrangement can be made in this case is
given by
n(n +1)(n +2)---(n+(r—1)).
left
a
box 1 box 2 box 3 ot box n
There is another way to solve the problem. As shown below,
4a: a: @3a27_ +—+ agasla;lasa2
box 1 box 2 box 3
n=3,r=5
one can establish a bijection between the set of such distributions of r dis-
tinct objects a1, a2, ...,@, into n distinct boxes and the set of arrangements
of the multi-set {a1,a2,...,4,,(n — 1) - 1} (we treate each vertical stroke
separating adjacent boxes as a ‘1’). Thus by (BP) and result (II) in Section
1.6, the desired number of ways is given by
(n-1+r)!
(n-1)! ’42 Section 1.7. Distribution Problems
which agrees with the above result.
Case (2) Distributing r identical objects into n distinct boxes.
(i) Assume that each box can hold at most one object (and thus r n);
i.e., no box is empty.
In this case, we first put one object in each box to fulfill the requirement
(this can be done in one way), and then distribute the remaining r—n
objects in the boxes in an arbitrary way. By (MP) and the result in (ii),
the desired number of ways is given by
RE)
By identity (1.4.2), this can also be written as
ayChapter 1. Permutations and Combinations 43
Example 1.7.1. How many ways are there to arrange the letters of
the word ‘VISITING?’ if no two I’s are adjacent?
Solution. Method 1. The letters used are V,S, T, N, G and 3 I’s. We
first arrange V, S, T, N, G in a row. There are 5! ways. Take one of these
arrangements as shown below.
EV see Essen ve gee EEN HEREC CteHeCaaay
1st 2nd 8rd 4th 5th 6th
‘There are 6 spaces separated by the 5 letters. The problem is now reduced
to that of distributing the 3 identical I’s in the 6 places such that each place
can hold at most one I (no 2 I’s are adjacent). By Case (2)(i), the number
", by (§). Thus by (MP), the desired number of ways
6)
In the above method, we first consider “V, S, T, N, G” and then 3 I’s.
In the next method, we reverse the order.
of ways to do so is giv
is
Method 2. We first arrange the 3 I’s in a row in one way:
Ree ee eeeeeee gee eee eee
1st 2nd 3rd 4th
Then treat the 5 letters “V, S, T, N, G” as 5 identical “x”. Since no 2 I’s
are adjacent, one ‘z’ must be put in the 2nd and 3rd places (this can be
done in one way):
1st 2nd 3rd 4th
Now, the remaining 3 z’s can be put in the 4 places arbitrarily in (**4-1) =
($) ways by Case (2)(ii). Finally, by restoring the original letters that each
“z” represents (so 5! ways to arrange them) and by applying (MP), the
desired number of ways is given by
(es44 Section 1.7. Distribution Problems
Example 1.7.2. (Example 1.2.3(ii) revisited) In how many ways can
7 boys and 3 girls be arranged in a row so that the 2 end-positions are
occupied by boys and no girls are adjacent?
In Example 1.2.3, this problem was solved by considering the arrange-
ment of boys followed by that of girls. In the following solution, we reverse
the order.
Solution. The 3 girls can be arranged in 3! ways. Fix one of them:
— G& — G — Gs —
Ist 2nd 3rd 4th
Then treat the 7 boys as 7 identical “x”. To meet the requirements, one
‘x” must be placed in each of the 4 places separated by the 3 girls as shown
below:
z Giz G, « G3
Now the remaining 3 2’s can be put in the 4 places arbitrarily in (*+{-*) =
(2) ways by Case (2)(ii). Finally, by restoring the meaning of ‘x’ and
applying (MP), we obtain the desired number of ways:
6
at. (§) = 71-6.5-4 '
Example 1.7.3. (Example 1.5.3 revisited) Let X = {1,2,...,n},
where n € N. Show that the number of r-combinations of X which contain
no consecutive integers is given by ("~1*"), where O 0 and
n>1.
An integer solution to the equation (1.7.1) is an n-tuple (€1, €2,...,€n) of
integers satisfying (1.7.1) when 2; is substituted by e;, for each i = 1,2,...,n.
Thus, for instance, (—1,—4,7),(2,0,0),(0,1,1),(0,2,0) and (0,0,2) are
some integer solutions to the equation
21 +29 +23 = 2.46 Section 1.7. Distribution Problems
There are infinitely many integer solutions to (1.7.1). In this section,
we shall confine ourselves to “nonnegative” integer solutions (i-e., e; > 0,
for all i).
Example 1.7.4. Show that the number of nonnegative integer solu-
tions to equation (1.7.1) is given by
r+n-1
is :
Proof. Every nonnegative integer solution (€1,€2,.-.,én) to (1.7.1)
corresponds to a way of distributing r identical objects to n distinct boxes
as shown below:
en
°
box n
Clearly, different solutions to (1.7.1) correspond to different ways of distri-
bution. On the other hand, every such way of distribution corresponds to
a nonnegative integer solution to (1.7.1). Thus by (BP) and the result in
Case (2)(ii), the desired number is given by
|
We now review all the problems in this chapter which give rise to the
important number ("*"~?).Chapter 1. Permutations and Combinations 47
=e}
The number of ways of selecting r objects from n different
types of objects with repetitions allowed
= the number of r-element multi-subsets of the multi-set
{00 -a1,00-a2,...,00-an}
= the number of ways of distributing r identical objects into
n distinct boxes
= the number of nonnegative integer solutions to the equation
tatzete +e, =r
Some problems of distributing objects (identical or distinct) into distinct
boxes have just been studied. In what follows, we shall study a problem of
distributing distinct objects into identical boxes. Problems of distributing
identical objects into identical boxes will be discussed in Chapter 5.
Given nonnegative integers r and n, the Stirling number of the second
kind, denoted by S(r,n), is defined as the number of ways of distributing r
distinct objects into n identical boxes such that no box is empty.
The following results are obvious.
O)
i)
(i)
(wv)
)
(vi)
$(0,0) =1,
S(r,0) = S(0,n) =0 for all rn € N,
S(r,n)>0ifr>n>1,
S(rn) =0ifn>r>1,
S(r,1) =1forr>1,
S(r,r) =1forr>1.
We also have (see Problem 1.84):48 Section 1.7. Distribution Problems
(vii) S(r,2) = 27-2 -1,
(viii) $(r,3) = 4087-1 +1) - 2°,
(x) S(r,r-1) = (9),
(x) S(r,r—2) = (§) + 3(4).
The following result bears some analogy to those given in Example 1.4.1
and Example 1.4.7.
Example 1.7.5. Show that
S(r,n) = S(r —1,n— 1) +nS(r—1,n) (1.7.2)
where r,n € N with r>n.
Proof. Let a be a particular object of the r distinct objects. In any
way of distributing the r objects into n identical boxes such that no box
is empty, either (i) a; is the only object in a box or (ii) a; is mixed with
others in a box. In case (i), the number of ways to do so is S(r — 1,n—1).
In case (ii), the r — 1 objects (excluding a) are first put in the n boxes in
S(r —1,n) ways; then a; can be put in any of the boxes in n ways (why?).
Thus the number of ways this can be done in case (ii) is nS(r —1,n). The
result now follows by (AP). §
Using some initial values of S(r,n) and applying the identity (1.7.2),
one can easily construct the following table:
Let A = {1,2,...,r}. For n € N, an n-partition of A is a collection
{S1, S2,...,Sn} of n nonempty subsets of A such that
() SS; =O for #5
and (ii) & S= A.
A partition of A is an n-partition of A for some n = 1, 2,..
A binary relation R on A is an equivalence relation on A if
, @Ra for all a € A,
(ii) R is symmetric; i.e., if a,b € A and aRb, then bRa, and
(iii) R is transitive; i.e., if a,b,c € A, aRb and bRe, then aRc.
(i) Ris reflexive; ie.Chapter 1. Permutations and Combinations 49
Table 1.7.1. The values of S(r,n),0 S(r,n) = the number of partitions of {1,2,...,7}
nat
the number of equivalence relations on {1,2,...,r}.
The sum )77,-; S(r,n), usually denoted by B,, is called a Bell number after
E.T. Bell (1883 — 1960). The first few Bell numbers are:
By =1, By =2, Bs =5, By = 15, By = 52, Be = 203,.
Exercise 1
1. Find the number of ways to choose a pair {a,b} of distinct numbers
from the set {1,2,...,50} such that
(i) |e-b| = 5; (ii) Ja— 0] < 5.
2. There are 12 students in a party. Five of them are girls. In how many
ways can these 12 students be arranged in a row if
(i) there are no restrictions?
(ii) the 5 girls must be together (forming a block)?
(iii) no 2 girls are adjacent?
(iv) between two particular boys A and B, there are no boys but exactly
3 girls?
3. m boys and n girls are to be arranged in a row, where m,n EN. Find
the number of ways this can be done in each of the following cases:
(i) There are no restrictions;
(ii) No boys are adjacent (m < n+ 1);
(iii) The n girls form a single block;
(iv) A particular boy and a particular girl must be adjacent.
4, How many 5-letter words can be formed using A, B, C, D, E, F, G, H,
I,J,
(i) if the letters in each word must be distinct?
(ii) if, in addition, A, B,C, D, E,F can only occur as the first, third or
fifth letters while the rest as the second or fourth letters?Chapter 1. Permutations and Combinations 51
5. Find the number of ways of arranging the 26 letters in the English
alphabet in a row such that there are exactly 5 letters between z and y.
6. Find the number of odd integers between 3000 and 8000 in which no
digit is repeated.
7. Evaluate
1-1142-2143-3!4---4n-nl,
where nEN.
See een eae et ee ae etn
G+! * @+H! (tb?
where n EN.
9. Prove that for each n € N,
(n+1)(n+2)---(2n)
is divisible by 2”. (Spanish Olympiad, 1985)
10. Find the number of common positive divisors of 104° and 20°°.
11. In each of the following, find the number of positive divisors of n (in-
clusive of n) which are multiples of 3:
(i) n= 210; (ii) n = 630; (iii) n = 151200.
12. Show that for any n € N, the number of positive divisors of n? is always
odd.
13. Show that the number of positive divisors of “111...1” is even.
1992
14. Let n,r € N with r 2, and let
T={(z,y,z)€S?|a2 6. Find the number of triangles
formed by any 3 vertices of P that are pairwise nonadjacent in P.35.
36.
37.
38.
39.
4
Ss
42.
43.
Chapter 1. Permutations and Combinations 55
. 6 boys and 5 girls are to be seated around a table. Find the number of
ways that this can be done in each of the following cases:
(i) There are no restrictions;
(ii) No 2 girls are adjacent;
(iii) All girls form a single block;
(iv) A particular girl G is adjacent to two particular boys B; and Bo.
Show that the number of r-circular permutations of n distinct objects,
where 1 720;
® (") (") et (") (277), where n> m3 730.
. Prove the identity (") = (,,",) by (BP).
41.
Let X = {1,2,...,.n}, A={ACX [ng A}, and B= {AC X |n€ A}.
Show that |A| = |B] by (BP).
Let r,n € N. Show that the product
(n+ 1)(n+2)---(n+7r)
of r consecutive positive integers is divisible by r!.
Let A be a set of kn elements, where k,n € N. A k-grouping of A is
a partition of A into k-element subsets. Find the number of different
k-groupings of A.56
44,
45.
46.
Exercise 1
Twenty five of King Arthur’s knights are seated at their customary
round table. Three of them are chosen - all choices of three being
equally likely — and are sent off to slay a troublesome dragon. Let P be
the probability that at least two of the three had been sitting next to
each other. If P is written as a fraction in lowest terms, what is the sum
of the numerator and denominator? (AIME, 1983/7) (Readers who wish
to get more information about the AIME may write to Professor Walter
E. Mientka, AMC Executive Director, Department of Mathematics &
Statistics, University of Nebraska, Lincohn, NE 68588-0322, USA.)
One commercially available ten-button lock may be opened by depress-
ing — in any order — the correct five buttons. The sample shown below
has {1,2,3,6,9} as its combination. Suppose that these locks are re-
designed so that sets of as many as nine buttons or as few as one button
could serve as combinations. How many additional combinations would
this allow? (AIME, 1988/1)
akeone
In a shooting match, eight clay targets are arranged in two hanging
columns of three each and one column of two, as pictured. A marksman
is to break all eight targets according to the following rules: (1) The
marksman first chooses a column from which a target is to be broken. (2)
The marksman must then break the lowest remaining unbroken target
in the chosen column. If these rules are followed, in how many different
orders can the eight targets be broken? (AIME, 1990/8)47.
48.
oo
49.
S
50.
51.
Chapter 1. Permutations and Combinations 57
Using the numbers 1, 2, 3, 4, 5, we can form 5!(= 120) 5-digit numbers
in which the 5 digits are all distinct. If these numbers are listed in
increasing order:
12345, 12354, 12435, 54321,
Ast 2nd 3rd.
120th
find (i) the position of the number 35421; (ii) the 100th number in the
list.
The P$(= 24) 3-permutations of the set {1,2,3,4} can be arranged in
the following way, called the lexicographic ordering:
123, 124, 132, 134, 142, 143, 213, 214, 231, 234,
241, 243, 312, ..., 431, 432.
Thus the 3-permutations “132” and “214” appear at the 3rd and
8th positions of the ordering respectively. There are P?(='3024) 4-
permutations of the set {1,2,...,9}. What are the positions of the ~
4-permutations “4567” and “5182” in the corresponding lexicographic
ordering of the 4 permutations of {1,2, ..., 9}?
The (§)(= 10) 3-element subsets of the set {1,2,3,4,5} can be arranged
in the following way, called the lexicographic ordering:
{1, 2,3}, {1,2,4}, {1,2,5}, {1,3,4}, {1,35}, {1,4,5},
{2,3,4}, {2,3,5}, {2,4,5}, {3,45}.
Thus the subset {1,3,5} appears at the 5th position of the ordering.
There are (1?) 4-clement subsets of the set {1,2,...,10}. What are the
positions of the subsets {3,4,5,6} and {3,5,7,9} in the corresponding
lexicographic ordering of the 4-element subsets of {1, 2, ..., 10}?
Six scientists are working of a secret project. They wish to lock up
the documents in a cabinet so that the cabinet can be opened when
and only when three or more of the scientists are present. What is the
smallest number of locks needed? What is the smallest number of keys
each scientist must carry?
A 10-storey building is to be painted with some 4 different colours such
that each storey is painted with one colour. It is not necessary that all
4 colours must be used. How many ways are there to paint the building
if
(i) there are no other restrictions?
(ii) any 2 adjacent stories must be painted with different colours?58 Exercise 1
52. Find the number of all multi-subsets of M = {r1-a1,r2-a2,+++,Tm Gn}.
53. Let r,b € N with r nk. Find the number of ways of distribut-
ing r identical objects into n distinct boxes so that each box holds at
least k objects.
61. Find the number of ways of arranging the 9 letters r,s,t,u,v,w,2,y,z
in a row so that y always lies between x and z (z and y, or y and z need
not be adjacent in the row).
62. Three girls A,B and C, and nine boys are to be lined up in a row. In
how many ways can this be done if B must lie between A and C, and
A,B must be separated by exactly 4 boys?
63. Five girls and eleven boys are to be lined up in a row such that from
left to right, the girls are in the order: G1, G2, G3, Ga, Gs. In how many
ways can this be done if G; and G2 must be separated by at least 3
boys, and there is at most one boy between G4 and Gs?
64. Given r,n € N with r > n, let L(r,n) denote the number of ways of
distributing r distinct objects into n identical boxes so that no box is
empty and the objects in each box are arranged in a row. Find L(r,n)
in terms of r and n.
65. Find the number of integer solutions to the equation:
2, +22 +23 +24+25 + 25 = 60
in each of the following cases:
(i) 2 > i-1 for each i = 1,2,...,6;
(ii) 1 > 2, 22 >5,2< 23 <7, t4 > 1, 25 > 3 and a6 > 2.
66. Find the number of integer solutions to the equation:
21 +22+23 +24 = 30
in each of the following cases:
(i) 2; > 0 for each i = 1,2,3, 4;
(ii) 2 < 21 <7 and 2; > 0 for each i = 2,3,4;
(iii) 21 > -5, 22 > -1, 23 > 1 and xq > 2.