Академический Документы
Профессиональный Документы
Культура Документы
1. Find the number of ways to choose a pair {a, b} of distinct numbers from the set {1, 2, . . . , 50} such
that
(i) |a − b| = 5
(ii) |a − b| ≤ 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?
JS The number of ways to arrange the 12 students is 12! = P12
12 .
(ii) the 5 girls must be together (forming a block)?
JS The number of ways to arrange five girls within a block is 5!, while the number of ways to
arrange 8 objects — 7 boys and 1 block of girls — is 8!, thus by M.P., the number of ways that
the students can be arranged is 5! · 8!.
(iii) no 2 girls are adjacent?
12−5+1
JS Given that H12 5 = 5 is the number of ways that five places can be chosen amongst
twelve, so that no two of the places are consecutive, which will be the positions for the girls,
5! ways to arrange the five girls amongst those positions and 7! ways to arrange the seven
boys amongst the remaining positions, by M.P., the number of ways that the students can be
arranged is 5! · 7! · 85 .
(iv) between two particular boys A and B, there are no boys but exactly 3 girls?
JS There are 2! ways to arrange A and B, 53 ways to choose the three girls amongst the
five that would be between A and B, 3! to arrange these three chosen girls, and 8! ways to
arrange the block of five students (A, B and the three girls between them) with the remaining
seven students. By M.P., the number of ways that the students can be arranged is 2!· 53 ·3!·8!.
3. m boys and n girls are to be arranged in a row, where m, n ∈ N. Find the number of ways this can
be done in each of the following cases:
(i) There are no restrictions;
JS The number of ways to arrange m + n people in a row is (m + n)! = Pm+n
m+n .
(ii) No boys are adjacent (m ≤ n + 1);
= m+n−m+1
JS There are Hm+n
m m ways of choosing m places among m + n such that no two
of these places are consecutive, which will be the positions of the boys, m! ways to arrange
the boys among the chosen positions and n! ways to arrange the girls among the remaining
positions, by M.P., the number of ways to arrange the students is m! · n! · n+1
m .
(iii) The n girls form a single block;
JS There are n! ways to arrange the girls within their block and (m + 1)! ways to arrange
m + 1 objects — the m boys and the block of girls — by M.P., the number of ways to arrange
the students is n! · (m + 1)!.
(iv) A particular boy and a particular girl must be adjacent.
JS There are 2! ways to arrange the boy and the girl within their block, and (m + n − 1)! ways
to arrange m + n − 2 + 1 objects — the boy-and-girl block and the m + n − 2 other students
— by M.P., the number of ways to arrange the students is 2! · (m + n − 1)!.
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?
JS The number of arrangements of five distinct letters from among the ten letters is P10
5 =
10!
5! = 10 · 9 · 8 · 7 · 6.
(ii) if, in addition, A, B, C, D, E, F can only occur as the first, third of fifth letters while the rest as
the second or fourth letters?
JS For the odd-numbered letters, the choices for the letters are 6, 5 and 4, respectively; for
the even-numbered letters, the choices for the letters are 4 and 3, repectively. By M.P., the
number of five-letter words that can be constructed is 6 · 4 · 5 · 3 · 4.
Exercises 1 Page 1 of 32
Mathematics 248 Topics in Combinatorial Mathematics 1st Semester AY 2006-2007
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 x and y.
6. Find the number of odd integers between 3000 and 8000 in which no digit is repeated.
JS There are two types of numbers that satisfy the conditions:
Type 1: Numbers with odd thousands digits: the thousands digit must be 3, 5 or 7. This will leave
only 4 possible digits for the ones digit, and 8 · 7 choices for the middle two digits. There are
3 · 8 · 7 · 4 = 672 such numbers.
Type 2: Numbers with even thousands digits: the thousands digit must be 4 or 6. This will leave
5 possible digits for the ones digit, and 8 · 7 choices for the middle two digits. There are
2 · 8 · 7 · 5 = 560 such numbers.
Thus, there are 672 + 560 = 1232 such numbers satisfying the conditions.
7. Evaluate
1 · 1! + 2 · 2! + 3 · 3! + · · · + n · n!
where n ∈ N.
MS Let k = 1 · 1! + 2 · 2! + 3 · 3! + · · · + n · n!. Note that
Thus k = 1 · 1! + 2 · 2! + 3 · 3! + · · · + n · n! = (n + 1)! − 1.
JS
1 · 1! + 2 · 2! + 3 · 3! + · · · + n · n!
+ 1! + 2! + 3! + · · · + n!
2! + 3! + 4! + · · · + (n + 1)!
− 1! − 2! − 3! − · · · − n!
− 1! + (n + 1)!
8. Evaluate
1 2 n
+ + ··· +
(1 + 1)! (2 + 1)! (n + 1)!
where n ∈ N.
1 2 n
MS Let k = + + ··· + . Note that
(1 + 1)! (2 + 1)! (n + 1)!
1 2 n
+ + ··· +
(1 + 1)! (2 + 1)! (n + 1)!
1 1 1
+ + + ··· +
(1 + 1)! (2 + 1)! (n + 1)!
2 3 n+1 1 1 1
+ + ··· + = + + ··· +
(1 + 1)! (2 + 1)! (n + 1)! 1! 2! n!
1 1 1 1 1 1 1 2 n 1
Thus k + + +· · ·+ = + + · · · + and k = + + · · · + = 1− .
2! 3! (n + 1)! 1! 2! n! 2! 3! (n + 1)! (n + 1)!
1 2 k−1 1
JS Prove, by induction, + + ··· + =1− :
(1 + 1)! (1 + 1)! k! k!
1 1 1
for k = 2: = = 1 − .
2! 2 2!
induction: Assume that the formula holds for k = n, then
1 2 n−1 n 1 n (n + 1)! − (n + 1) + n
+ + ··· + + = 1− + =
(1 + 1)! (1 + 1)! n! (n + 1)! n! (n + 1)! (n + 1)!
| {z }
(n + 1)! − 1 1
= =1− .
(n + 1)! (n + 1)!
Exercises 1 Page 2 of 32
Mathematics 248 Topics in Combinatorial Mathematics 1st Semester AY 2006-2007
111
| . {z
. . 1111} = 3r.
1992
Since 3r is not divisible by 9, r will not be divisible by 3. Hence, none of p1 , p2 , . . . , pk will actually
be a 3.
The prime factorization of 111 . . 1111} is simply given by
| . {z
1992
Exercises 1 Page 3 of 32
Mathematics 248 Topics in Combinatorial Mathematics 1st Semester AY 2006-2007
We need not concern ourselves with the actual prime factors and their corresponding exponents,
because as seen in the expression above, the product is always even.
Hence, the number of positive divisors for 111 . . 1111} is always even.
| . {z
1992
JS Pn+1
r is the number of arrangements of r distinct objects taken from n + 1 objects. This
number of arrangements may also be counted by considering two cases:
Case 1: The (n + 1)th object is not among the r distinct objects arranged. Therefore, the r objects
must be from the n other objects, which has Pnr arrangements.
Case 2: The (n + 1)th object is among the r distinct objects arranged. The (n + 1)th object can
be placed in any of the r positions in the arrangement, and the remaining r − 1 distinct
objects are taken from the n remaining objects. There are rPnr−1 such arrangements.
By A.P., the sum Pnr + rPnr−1 is also the number of arrangements of r distinct objects taken
from n + 1 objects, and therefore Pn+1
r = Pnr + rPnr−1 .
(v) Prn+1 = r! + r(Pnr−1 + Pn−1 r
r−1 + · · · + Pr−1 ).
JS Using (iv),
Pn+1
r = Pnr + rPnr−1 =⇒ Pn+1
r − Pnr = rPnr−1
n−1
Pr = Pr + rPr−1 =⇒ Pr − Pn−1
n n−1 n
r = rPn−1
r−1
n−1
Pr = Pn−2
r + rPn−2 n−1
r−1 =⇒ Pr − Pn−2
r = rPn−2
r−1
.. ..
. .
Pr+1
r = Prr + rPrr−1 =⇒ Pr+1
r − Prr = rPrr−1
Pn+1
r = r! + r(Pnr−1+ Pn−1
r−1 + · · · + Pr
r−1 ) ⇐= Pr − Prr = rPnr−1 + rPn−1
n+1 r
r−1 + · · · + rPr−1
15. In a group of 15 students, 5 of them are female. If exactly 3 female students are to be students are
to be selected, in how many ways can 9 students be chosen from the group
(i) to form a committee?
JA, JS From the given, we have 5 female students, thus, we have 10 male students, i.e.,
15 − 5 = 10. Now, we have the following restrictions: that are exactly 3 female students are to
be selected. So,
5
. (15a)
3
Exercises 1 Page 4 of 32
Mathematics 248 Topics in Combinatorial Mathematics 1st Semester AY 2006-2007
Since we need only exactly 3 students from the group of five female students and knowing
that a committee is composed of 9 students, we have to choose 6 male students from the
remaining 10 male students. For that case we have,
10
. (15b)
6
16. Ten chairs have been arranged in a row. Seven students are to be seated in seven of them so that
no two students share a common chair. Find the number of ways this can be done if no two empty
chairs are adjacent?
JS There are 7! ways that the seven students can be arranged in a selection of seven chairs. At
most one empty chair can be placed between any two chairs that seat students, and there may be
an empty chair at the ends of the row, so there are eight possible places to have the three empty
chairs, thus 83 ways to select the positions of the empty chairs in relation to the chairs that seat
students. By M.P., the number of ways that the students can be seated is 7! · 83 .
17. Eight boxes are arranged in a row. In how many ways can five distinct balls be put into the boxes
if each box can hold at most one ball and no two boxes without balls are adjacent?
JS There are H83 = 8−3+1
3 ways to select three empty boxes among the eight boxes so that no
two empty boxes are next to each other, and 5! ways to arrange the balls among the non-empty
boxes. By M.P., the number of ways to place the balls in the boxes are 5! · 63 .
18. A group of 20 students, including 3 particular girls and 4 particular boys, are to be lined up in two
rows with 10 students each. In how many ways can this be done if the 3 particular girls must be
in the front row while the 4 particular boys be in the back?
JS There are 10! ways to arrange the students in the front row, 10! ways to arrange the students in
the back row, and 13 6 ways to choose from the 20 − 3 − 4 students (other than the particular boys
and girls) six other students to accompanythe four boys in the back row. By M.P., the number of
ways to line up the students is 10! · 10! · 13
6 .
19. In how many ways can 7 boys and 2 girls be lined up in a row such that the girls must be separated
by exactly 3 boys?
JS There are 2! to arrange the two girls, 73 ways of choosing the three boys who will be between
the girls from among the seven boys, 3! ways to arrange the chosen boys between the girls, and
(4 + 1)! ways to arrange the four remaining boys and the block of five people that have the girls at
the ends. By M.P., the number of ways to line up the boys and girls is 2! · 73 · 3! · 5!.
20. In a group of 15 students, 3 of them are female. If at least one female student is to be selected, in
how many ways can 7 students be chosen from the group
(i) to form a committee?
LL, FO There are 31 12 there are 32 12
5 ways to form the committee with exactly 1 female; 5
ways to form the committee with only two females; and there are 33 12
4 ways to form the
committee with the three females. By AP, the total number of ways to form the committee with
Exercises 1 Page 5 of 32
Mathematics 248 Topics in Combinatorial Mathematics 1st Semester AY 2006-2007
3 12
+ 32 12 3 12
least one female is 1 + = 5, 643.
15
6 5 3 4
the committee of 7 students with no restrictions and 12
LL, FO There are 7 ways to form 7
ways to form the committeewith no females. Thus the number of ways to form the committee
with at least 1 female is 15 12
7 − 7 .
(ii) to take up 7 different posts in a committee?
LL, FO Since there are 7! ways for each student to take up different posts in a committee
and
every student in the committee could possibly take the 7 positions. Thus, by MP, we have
7! 15 12
7 − 7 = (5040)(5643) = 28, 440, 720.
21. Find the number of (m + n)-digit binary sequences with m 0s and n 1s such that no two 1s are
adjacent, where n ≤ m + 1.
22. Two sets of parallel lines with p and q lines each are shown in the following diagram:
p
| {z }
23. There are 10 girls and 15 boys in a junior class, and 4 girls and 10 boys in a senior class. A commit-
tee of 7 members is to be formed from these 2 classes. Find the number of ways this can be done if
the committee must have exactly 4 senior students and exactly 5 boys.
FO Restriction:
Exercises 1 Page 6 of 32
Mathematics 248 Topics in Combinatorial Mathematics 1st Semester AY 2006-2007
Case 3: Choosing
2 boys from the senior class
2 girl from the senior class
3 boys from the junior class
By (MP), 10
4 15
2 2 3 = 122, 850 ways.
Therefore, by (AP), there are 141, 750 + 504, 000 + 122, 850 = 768, 600 ways a committee of 7
members formed from 2 classes having exactly 4 senior students and exactly 5 boys.
24. A box contains 7 identical white balls and 5 identical black balls. They are to be drawn randomly,
one at a time without replacement, until the box is empty. Find the probability that the 6th ball
drawn is white, while before that exactly 3 black balls are drawn.
PB
5
6
2 25
12
2 = .
5
132
Note that the first factor in the numerator is the number of ways of arranging the first five balls,
three of which are black and two are white. The second factor in the numerator is the number of
ways of arranging the last six balls four of which are black and two are white. Also, the sixth ball is
fixed to be a white ball. The denominator is just the total number of arranging twelve balls, seven
of which are black and five are white.
25. In each of the following cases, find the number of shortest routes from O to P in the street network
shown below: P r
rC
A r rB
O
r
(i) The routes must pass through the junction A;
PB We first count the number of ways to go from point O to point A, then from point A to
5 8
point P . This is given by: = 560.
2 3
(ii) The routes must pass through the street AB;
PB We first count the number of ways to go from point O to point A, then from point B to
5 7
point P . This is given by: = 350.
2 3
(iii) The routes must pass through junctions A and C;
PB We first count the number of ways to go from point O topoint A, then
from point A to
5 4 4
point C, then finally from point C to point P . This is given by: = 240.
2 1 2
(iv) The street AB is closed.
PB We first count the number of ways to go from point O to point P,
then we subtract the
13 5 7
number of ways we pass through AB. This is given by: − = 937.
5 2 3
26. Find the number of ways of forming a group of 2k people from n couples, where k, n ∈ N with
2k ≤ n, in each of the following cases:
(i) There are k couples in such a group;
(ii) No couples are included in such a group;
(iii) At least one couple is included in such a group;
(iv) Exactly two couples are included in such a group.
Exercises 1 Page 7 of 32
Mathematics 248 Topics in Combinatorial Mathematics 1st Semester AY 2006-2007
KM
Pn+1 Pn
Method 1: If z ≥ 2, then there are z − 1 choices for both x and y. Thus, |T | = i=2 (i − 1)2 = k=1 k2 .
Method 2: Consider 2 disjoint cases.
Case 1: x = y. Then, there are n+1
2 such triples. Choose 2 numbers from S, the larger one is z,
and the smaller one is x and y.
Case 2: x 6= y. Then, there are 2 n+1
3 such triples. First, choose 3 numbers from S, the largest
one is z. We multiply by 2 because there are two possible positions for the remaining two
numbers from S (after having set z).
Thus, |T | = n+1 + 2 n+1
2 3 .
Exercises 1 Page 8 of 32
Mathematics 248 Topics in Combinatorial Mathematics 1st Semester AY 2006-2007
every digit in the number appears at least twice. Find the number of such 6-digit natural numbers.
31. In each of the following 7-digit natural numbers:
every digit in the number appears at least 3 times. Find the number of such 7-digit natural num-
bers.
MS A 7-digit must begin with a nonzero digit, giving nine possible options. In relation to the first
digit, there are three cases to consider:
Case 1: The first digit is repeated twice in the next six digits. The four remaining digits will be the
same, so the possibilities of this case are determined by the location of the two repetitions of
the first digit, and the choice of the remaining digit. Hence, this case has 9 · 62 · 9 elements.
Case 2: The first digit is repeated thrice in the next six digits. The three remaining digits will be the
same, so the possibilities of this case are determined by the location of the three repetitions
of the first digit, and the choice of the remaining digit. Hence, this case has 9 · 63 · 9 elements.
Case 3: The first digit is repeated in the next six digits. This case has 9 elements.
So there are a total of 9 · 62 · 9 + 9 · 63 · 9 + 9 = 2844 such 7-digit natural numbers.
32. Let X = {1, 2, 3, . . . , 1000}. Find the number of 2-element subsets {a, b} of X such that the product
a · b is divisible by 5.
PB Any product of two numbers is divisible by 5 if at least one of the two numbers is a multiple
of 5. Thus the product of (5k)(a) is divisible by 5 for any natural numbers a and k. Let us now
answer the problem. The 2-element subsets we are looking for is in the form {5k, a} (order does
not matter). Thus, the smallest value of k is 1 and the largest is k = 200. Thus we consider 200
cases.
Case 1. Let k = 1, thus {5k, a} = {5, a}. There are 999 subsets of this form. (All one thousand
elements except 5).
Case 2. Let k = 2, thus {5k, a} = {10, a}. Again, there are 999 subsets of this form. However, the
subset {10, 5} is already counted in the first case. Thus we only count the subsets of this form
that are not in the previous case. There are 998 such subsets. (All one thousand elements
except 5 and 10).
..
.
Case 200. Let k = 200 thus {5k, a} = {1000, a}. There are 800 subsets that are distinct from the previous
cases. (All one thousand elements except 5, 10, 15, . . . , 990, 995 and 1000).
Thus there are 999 + 998 + 997 + · · · + 801 + 800 = 179900 2-element subsets of X whose product
of the elements is divisible by 5.
TT We shall partition the set X into two sets: X1 = {5, 10, 15, . . . , 995, 1000} and X2 = {1, 2, 3, 4, 6,
. . . , 997, 998, 999}. Note that all elements in X1 are divisible by 5 while those in X2 are not. Fur-
thermore, |X1 | = 200 and |X2 | = 800. To get two element subsets of X such that the product its
elements is divisible by 5, we either get two elements from set X1 , which can be done in 200 2
ways, or get one element each from set X1 and X2 , which can be done in 200
800
1 1 ways. Thus
by AP, the total number of such subsets is 200 + 200 800
2 1 1 = 179900.
33. Consider the following set of points in the xy-plane:
Find
Exercises 1 Page 9 of 32
Mathematics 248 Topics in Combinatorial Mathematics 1st Semester AY 2006-2007
(i) |A|;
(ii) the number of straight lines which pass through at least 2 points in A; and
(iii) the number of triangles whose vertices are points in A.
34. Let P be a convex n-gon, where n ≥ 6. Find the number of triangles formed by any 3 vertices of P
that are pairwise nonadjacent in P .
35. 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;
PB (11 − 1)! = 10! ways.
(ii) No 2 girls are adjacent;
PB We first arrange the 6 boys around the table, then insert the girls in between the boys.
This guarantees that no two girls will be seated next to each other. Hence we have: 5! 65 5!
ways.
(iii) All girls form a single block;
PB We first chunk all the girls and treat them as one “object”. We now have a total of 7
“objects”, which we have to arrange around the table. We then permute the girls inside the
chunk. Hence we have: 6!5! ways.
(iv) A particular girl G is adjacent to two particular boys B1 and B2 .
PB We first chunk [B1 GB2 ], so now we have a total of 9 “objects”, which we have to arrange
around the table. Then we permute B1 and B2 . Hence we have: 8!2! ways.
36. Show that the number of r-circular permutations of n distinct objects, where 1 ≤ r ≤ n, is given
n!
by (n−r)!·r .
37. Let k, n ∈ N. Show that the number of ways to seat kn people around k distinct tables such that
there are n people in each table is given by (kn)!
nk
.
38. Let r ∈ N such that
1 1 11
9 − 10 =
11
.
r r 6 r
Find the value of r.
FO
1 1 11 r!(9 − r)! r!(10 − r)! (11)(r!)(11 − r)!
9!
− 10!
= 10!
⇐⇒ − =
r!(9−r)! 6( r!(11−n)!
r!(10−r)! ) 9! 10! 6(11!)
r!(9 − r)! (10 − r) (11)(r!)(11 − r)!
⇐⇒ 1− =
9! 10 6(11!)
9! r!(9 − r)! r
(11)(r!)(11 − r)(10 − r)(9 − r)! 9!(10)
⇐⇒ =
r!(9 − r)! 9! 10 6(11)(10)(9!) r!(9 − r)!
(11 − r)(10 − r)
⇐⇒ r = ⇐⇒ 6r = 110 − 21r + r2 ⇐⇒ r2 − 27r + 110 = 0
6
⇐⇒ (r − 22)(r − 5) = 0 ⇐⇒ r = 22 or r = 5
Thus, r = 5.
39. Prove each of the following identities:
n n n−1
(a) = , where n ≥ r ≥ 1;
r r r−1
LL
n n−1 n (n − 1)! n! n
= = = .
r r−1 r (r − 1)!(n − 1 − r + 1)! r!(n − r)! r
Exercises 1 Page 10 of 32
Mathematics 248 Topics in Combinatorial Mathematics 1st Semester AY 2006-2007
n n−r+1 n
(b) = , where n ≥ r ≥ 1;
r r r−1
LL
n−r+1 n n−r+1 n! n!(n − r + 1) n! n
= = = = .
r r−1 r (r − 1)!(n − r + 1)! r!(n − r + 1)! r!(n − r)! r
n n n−1
(c) = , where n > r ≥ 0;
r n−r r
LL
n n−1 n (n − 1)! n! n
= = = .
n−r r n − r r!(n − 1 − r)! r!(n − r)! r
n m n n−r
(d) = , where n ≥ m ≥ r ≥ 0.
m r r m−r
LL
n n−r n! (n − r)! n!(n − r)! m!
= = ·
r m−r r!(n − r)! (m − r)!(n − r − m + r)! r!(n − r)!(m − r)!(n − m)! m!
n! m! n m
= · = .
m!(n − m)! r!(m − r)! m r
n n
40. Prove the identity r = n−r by using the bijection principle.
41. Let X = {1, 2, . . . , n}, A = {A ⊂ X | n ∈
/ A}, and B = {A ⊂ X | n ∈ A}. Show that |A| = |B| by
using the bijection principle.
MS For every A ∈ A, X \ A ∈ B; for every B ∈ B, X \ B ∈ A. Therefore, |A| = |B|.
42. Let r, n ∈ N. Show that the product
(n + 1)(n + 2) · · · (n + r)
Exercises 1 Page 11 of 32
Mathematics 248 Topics in Combinatorial Mathematics 1st Semester AY 2006-2007
525 + 25 550 11
Therefore, P (E) = = = and the sum of the numerator and the denominator is
2300 2300 46
57.
45. One commercially available ten-button lock may be opened by depressing — in any order — the
correct five buttons. The sample shown below has {1, 2, 3, 6, 9} as its correct combination. Suppose
that these locks are redesigned 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?
1 a a a a a a 6
2 a a a 7
3 a a a 8
4 a a a 9
5 10
MS Currently, the locks require five buttons to unlock, which indicates that there are 10
5 com-
binations. If, after redesigning, as few as one button to as many as nine buttons can be used
as a combination, only two combinations will not be viable: the combination where no button is
depressed 10 10
0 , and the combinations where all buttons are depressed . Hence, the number
1010
of combinations added by the redesign is 1 + 2 + 3 + 4 + 6 + 7 + 10
10 10 10 10 10 10
8 + 9 = 770.
46. 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 accoring 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?
i i i
i i i
i i
TT Consider a string of letters that will be composed of three As, two Bs and three Cs. The number
8!
of ways in which we can construct such a string is equal to 3!·2!·3! .
Now let’s note a particular string, say ABACCABC. If we are to relate this to the given problem, we
can treat the three As as the clay targets on the first column, the two Bs as the clay targets on the
second column, and the three Cs as the clay targets on the third column.
Considering the given arrangement of letters in the string, this can be interpreted as:
(1) on the first shot, the first (or bottom) clay target on the first column was hit;
(2) on the second shot, the first (or bottom) clay target of the second column was hit;
(3) on the third shot, the second (or middle) clay target of the first column was hit;
(4) on the fourth shot, the first (or bottom) clay target of the third column was hit;
(5) on the fifth shot, the second (or middle) clay target of the third column was hit;
(6) on the sixth shot, the third (or top) clay target of the first column was hit;
(7) on the seventh shot, the second (or top) clay target of the second column was hit;
(8) and finally on the last shot, the remaining clay target on the third column was hit.
Note that the interpretation is still consistent with the rules stated in the problem.
Therefore, we can say that there is a bijection between the number of ways in which we can
arrange three As, two Bs and three Cs to form a string, and the number of ways in which a shooter
can break all the 8 clay targets according to the rules.
Exercises 1 Page 12 of 32
Mathematics 248 Topics in Combinatorial Mathematics 1st Semester AY 2006-2007
8!
Thus the number of ways a shooter can accomplish the task is equal to 3!·2!·3! = 560.
47. 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:
find (i) the position of the number 35421; (ii) the 100th number in the list.
FO
23541 31524 35241 43215 52341
24135 31542 35412 43251 52314
24153 32145 35421 43512 52413
24315 32154 41235 43521 52431
24351 32415 41253 45123 53124
24513 34251 41325 45132 53142
12345 12543 13524 14352 15324 21354 23145 24531 32514 41352 45213 53214
12354 13245 13542 14523 15342 21435 23154 25134 32541 41523 45231 53241
12435 13254 14235 14532 15423 21453 23415 25143 34125 41532 45312 54123
12453 13425 14253 15234 15432 21534 23451 25314 34152 42135 45321 54132
12534 13452 14325 15243 21345 21543 23514 25341 34215 42153 51234 54213
25413 34251 42315 51243 54231
25431 34512 42351 51324 54312
31245 34521 42513 51342 54321
31254 35124 42531 51423
31425 35142 43125 52134
31452 35214 43152 52143
(i) The position of the number 35421 is in the 72nd position. (ii) the 100th number in the list is the
number 51342.
48. The P43 (= 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 P94 (= 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 the set {1, 2, . . . , 9}?
KM Let us consider first 4567. We will find all the permutations less than 4567. There are
(3)(8)(7)(6) = 1008 numbers less than 4000. (The thousands place can only come from {1, 2, 3}.)
There are (1)(3)(7)(6) = 126 numbers greater than 4000 but less than 4500. (The hundreds can
only be {1, 2, 3}. The thousands place is already 4.) There are (1)(1)(3)(6) = 18 numbers greater
than 4500 but less than 4560. (The tens can only be {1, 2, 3}.) Lastly, there are (1)(1)(1)(3) =
3 numbers greater than 4560 but less than 4567. (The ones can come from {1, 2, 3}.) Thus,
the total number of permutations less than 4567 totals to 1155, implying that 4567 is the 1156th
permutation in lexicographic ordering.
Finding the position of 5182 is done similarly. There are (4)(8)(7)(6) = 1344 numbers less than
5000. (The thousands can be {1, 2, 3, 4}.) There are no permutations greater than 5000 but less
than 5100. There are (1)(1)(5)(6) = 30 numbers greater than 5100 and less than 5180. (The tens
can come from {2, 3, 4, 6, 7} and the ones can come from those remaining from the choices for the
tens (4), along with 8 and 9. This gives 6 choices for the ones.) Lastly, there are no permutations
greater than 5180 but less than 5182. Thus, the total number of permutations less than 5182 totals
to 1374, implying that 5182 is the 1375th permutation in lexicographic ordering.
Exercises 1 Page 13 of 32
Mathematics 248 Topics in Combinatorial Mathematics 1st Semester AY 2006-2007
49. The 53 (= 10) 3-element subsets of the set {1, 2, 3, 4, 5} can be arranged in the following way, called
{1, 2, 3}, {1, 2, 4}, {1, 2, 5}, {1, 3, 4}, {1, 3, 5}, {1, 4, 5},
{2, 3, 4}, {2, 3, 5}, {2, 4, 5}, {3, 4, 5}.
Thus the subset {1, 3, 5} appears in the 5th position of the ordering. There are 10
4 4-element
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}?
PB Notice that there are six 3-element subsets of the form {1, a, b}, where a and b are distinct
elements of the set {2, 3, 4, 5}. Since the subset {2, 3, 4} appears right next to these six subsets,
then it should appear in the 7th position. Keeping this in mind, it would now be easy for us to
determine the position of a given subset.
There are 93 4-element subsets of the form {1, a, b, c}, where a, b and c are distinct elements of
the set {2, 3, . . . , 10}; and there are 83 4-element subsets of the form {2, d, e, f }, where d, e and f
ments of the set {5, 6, . . . , 10}; and 41 4-element subsets of the form {3, 5, 6, i}, where i is an ele-
ment of the set {7, 8, 9, 10}. Since the subset {3, 5, 7, 9} is the second subset of the form {3, 5, 7, j},
where j is an element of the set {8, 9, 10}, then it should appear in the position numbered
9 8 6 4
+ + + + 2 = 161.
3 3 2 1
50. Six scientists are working on 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?
51. A 10-storey building is to be painted with some 4 different colors such that each storey is painted
with one color. It is not necessary that all the 4 colors must be used. How many ways are there to
paint the building if
(i) there are no other restrictions?
PB Each floor has four choices, hence there are 410 ways to paint the building.
(ii) any 2 adjacent stories must be painted with different colors?
PB Suppose we start painting with the ground floor, then initially we have four choices. But
for the second floor, we only have three choices not including our previous choice of color.
Again, for the third floor, we only have three choices, and so on. Thus there are 4 · 39 ways to
paint the building.
Exercises 1 Page 14 of 32
Mathematics 248 Topics in Combinatorial Mathematics 1st Semester AY 2006-2007
that k are of type 1, k are of type 2, . . . , k are of type n. And since these expressions are a result
of counting the number of arrangements, then they must always be an integer.
Note that the number of ways to arrange such nk objects is given by
(kn)!
.
| k!{z· · · k!}
k! ·
n times
(3n)!
(i) ,
2n · 3n
TT
(3n)! (3n)! (3n)!
n n
= n
= .
2 ·3 (3!) | · 3!{z· · · 3!}
3!
n times
This can viewed as the number of ways of arranging 3n objects, such that 3 are of type 1, 3
are of type 2, . . . , 3 are of type n.
(6n)!
(ii) n 2n 4n ,
5 ·3 ·2
TT
(6n)! (6n)! (6n)!
n 2n 4n
= n
= .
5 ·3 ·2 (6!) | · 6!{z· · · 6!}
6!
n times
This can viewed as the number of ways of arranging 6n objects, such that 6 are of type 1, 6
are of type 2, . . . , 6 are of type n.
(n2 )!
(iii) ,
(n!)n
TT
(n2 )! (n2 )!
= .
(n!)n | · n!
n! {z· · · n!}
n times
This can viewed as the number of ways of arranging n2 objects, such that n are of type 1, n
are of type 2, . . . , n are of type n. Note that the total number of objects, given you have n
kinds, each with n objects, is n · n = n2 .
(n!)!
(iv) .
(n!)(n−1)!
TT
(n!)! [n · (n − 1)!]!
(n−1)!
= .
(n!) | · n!
n! {z· · · n!}
(n−1)! times
This can viewed as the number of ways of arranging n! objects, such that n are of type 1, n
are of type 2, . . . , n are of type (n − 1)!. Note that the total number of objects, given you have
(n − 1)! kinds, each with n objects, is n · (n − 1)! = n!.
55. Find the number of r-element multi-subsets of the multi-set
M = {1 · a1 , ∞ · a2 , ∞ · a3 , . . . , ∞ · an }.
Exercises 1 Page 15 of 32
Mathematics 248 Topics in Combinatorial Mathematics 1st Semester AY 2006-2007
56. Six distinct symbols are transmitted through a communication channel. A total of 18 blanks are
to be inserted between the symbols with at least 2 blanks between every pair of symbols. In how
many ways can the symbols and the blanks be arranged?
PB We first permute the six distinct symbols then fix the ten blanks in such a way that exactly two
blanks are between every pair of symbols. This leaves us with eight more blanks to be inserted
in five spaces. Therefore the number of ways to arrange the symbols and the blanks is given by:
8+5−1
5−1 6! = 356400.
57. In how many ways can the following 11 letters: A, B, C, D, E, F, X, X, X, Y, Y be arranged in a row
so that every Y lies between two Xs (not necessarily adjacent)?
PB We first fix the three Xs. Since we want every Y to be in between two Xs, then we insert the Ys
into the spaces between the Xs. Next, we insert the remaining six letters anywhere between the
Xs and Ys including the “outside” spaces (space to the left of the leftmost X
and to the right of the
rightmost X). Finally, we permute these six letters. Hence we have: 2+2−1
2
6+6−1
6 6!.
58. Two n-digit integers (leading zero allowed) are said to be equivalent if one is a permutation of the
other. For instance, 10075, 01057 and 00751 are equivalent 5-digit integers.
(i) Find the number of 5-digit integers such that no two are equivalent.
TT The number of 5-digit integers such that no two are equivalent is just the same as the
number of 5-element multi-subsets of M = {∞ · 0, ∞ · 1, . . . , ∞ · 9}, or the number of non-
negative integer solutions to the equation x0 + x1 +· · · + x9 = 5, where xi denotes the number
of times digit i was used, which is just equal to 14
5 .
(ii) If the digits 5, 7, 9 can appear at most once, how many nonequivalent 5-digit integers are
there?
TT If 5, 7, 9 can appear at most once, we shall consider four cases:
(a) none of 5, 7, 9 are included
The number of such 5-digit
P9 integers is equal to the number of non-negative integer solu-
tions to the equation i=0 xi = 5. This will give us 11
5 numbers.
i6=5,7,9
(b) one of the numbers 5, 7, 9 is included
The number of such 5-digit
P integers is equal to the number of non-negative integer solu-
9
tions to the equation i=0 xi + xs = 5, where xs = 1, for s = 5, 7 or 9. This will give
i6=5,7,9
us 31 10
4 numbers.
(c) two of the numbers 5, 7, 9 are included
The number of such 5-digit
P numbers is equal to the number of non-negative integer solu-
9
tions to the equation i=0 xi + (xs + xt ) = 5, where xs = xt = 1, for s, t = 5, 7, 9 and
i6=5,7,9
s > t. This will give us 32 93 numbers.
Exercises 1 Page 16 of 32
Mathematics 248 Topics in Combinatorial Mathematics 1st Semester AY 2006-2007
61. Find the number of ways of arranging the 9 letters r, s, t, u, v, w, x, y, z in a row so that y always
lies between x and z (x and y, or y and z need not be adjacent in the row).
PB We first fix x, y and z respectively so that y is always between x and z. We then permute
x and z. Next we insert the remaining six letters to the spaces between x, y and z, including the
“outside” spaces. Finally we permute these six letters. Hence we have: 2! 4+6−1
6 6!.
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?
TT Since B is in between A and C, then the girls can only be arranged in two ways: CBA and
ABC. Now consider a particular arrangement, ABC.
9 boys must be placed in between/beside the girls; assume for now that every boy is the same.
Since there should be exactly 4 boys in between A and B, we are going to have AY Y Y Y BC (Y
represents a boy). Next we’re going to place the boys to the left of A, between B and C, and to
the right of C. There are 3 spaces where the 5 remaining boys
can position themselves in, and the
number of ways in which they can to that is given by 5+3−1
5 . Since the 9 boys are different from
5+3−1
one another, by MP we shall have 5 · 11!.
Since the number of ways of arranging the boys satisfying the given conditions given the initial
arrangement of girls ABC is the same as that for CBA, then the total number of arrangements is
just given by 5+3−1
5 · 11! · 2 = 42 · 11!.
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 , G4 , G5 . In how many ways can this be done if G1 and G2 must be separated
by at least 3 boys, and there is at most one boy between G4 and G5 ?
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.
r−1
KM The number of ways to place r identical objects into n distinct boxes is n−1 . Multiply by
r! since the objects must be distinct and the arrangement matters. Divide by n! since the boxes
must be identical and hence, its arrangements must be removed from the counting. Therefore,
r! r−1
L(r, n) = n! n−1 .
Exercises 1 Page 17 of 32
Mathematics 248 Topics in Combinatorial Mathematics 1st Semester AY 2006-2007
x1 + x2 + x3 + x4 + x5 + x6 = 60
y1 + y2 + y3 + y4 + y5 + y6 = 45.
45+6−1
= 50
Hence we have 45 5 .
(ii) x1 ≥ 2, x2 ≥ 5, 2 ≤ x3 ≤ 7, x4 ≥ 1, x5 ≥ 3 and x6 ≥ 2.
PB Again we have to adjust each lower bound to zero instead of some other number for our
general result to work. However, notice that x3 has an upper bound. Let us ignore this first
for the meantime. By the same technique shown above, the number of integer solutions to
the equation above (ignoring x3 ’s upper bound) is the same as the number of nonnegative
integer solutions to the equation:
y1 + y2 + y3 + y4 + y5 + y6 = 60 − 2 − 5 − 2 − 1 − 3 − 2 = 45.
Hence we have 50
5 . However, we still have to remove allthe cases when x3 ≥ 8 and there
are 39+6−1 44 50 44
39 = 5 of them. Hence our final answer is 5 − 5 .
66. Find the number of integer solutions to the equation:
x1 + x2 + x3 + x4 = 30
y1 + y2 + y3 + y4 = 30 + 5 + 1 − 1 − 2 = 33.
67. Find the number of quadruples (w, x, y, z) of nonnegative integers which satisfy the inequality
w + x + y + z ≤ 1992.
TT, JA The given inequality can be converted to an equation by introducing a slack variable s,
where s is nonnegative:
w + x + y + z + s = 1992.
The slack variable s captures any excess value not taken up by the original variables. That means
when w + x + y + z = 1991, then s = 1; when w + x + y + z = 1987, then s = 5.
Since s is non-negative, it would not be possible for w + x + y + z > 1992, as this will force s to
become negative. Thus the number of quadruplets (w, x, y, z) satisfying the inequality is the same
the number of nonnegative integer solutions for the equation w + x + y + z + s = 1992. This can
be interpreted as the number of ways of arranging 1992 sticks and 4 “+” signs, is equal to 1996
4 .
Exercises 1 Page 18 of 32
Mathematics 248 Topics in Combinatorial Mathematics 1st Semester AY 2006-2007
Exercises 1 Page 19 of 32
Mathematics 248 Topics in Combinatorial Mathematics 1st Semester AY 2006-2007
r(k) + x2 + · · · + xn = kr
which is equal to
x2 + · · · + xn = kr − kr = r(k − k)
and by the same reasoning, we have
r(k − k) + n − 2 n−2
= .
n−2 n−2
Exercises 1 Page 20 of 32
Mathematics 248 Topics in Combinatorial Mathematics 1st Semester AY 2006-2007
(x1 + x2 + x3 )(y1 + y2 + y3 ) = 77
is given by
10 13 9 14
+ .
3 2 2 3
(x1 + x2 + · · · + xn )(y1 + y2 + · · · + yn ) = p,
73. There are 5 ways to express “4” as a sum of 2 nonnegative integers in which the order counts:
4 = 4 + 0 = 3 + 1 = 2 + 2 = 1 + 3 = 0 + 4.
5 = 3 + 1 + 1 = 2 + 2 + 1 = 2 + 1 + 2 = 1 + 3 + 1 = 1 + 2 + 2 = 1 + 1 + 3.
Given r, n ∈ N with r ≥ n, what is the number of ways to express r as a sum of n positive integers
in which the order counts?
75. A positive integer d is said to be ascending if in its decimal representation: d = dm dm−1 · · · d2 d1 , we
have
0 < dm ≤ dm−1 ≤ · · · ≤ d2 ≤ d1 .
For instance, 1337 and 2455566799 are ascending integers. Find the number of ascending integers
which are less than 109 .
TT For this problem, we can only have ascending integers with at most nine digits. To determine
all such integers, let us consider a seqeunce of 9 sticks and 9 “+” signs.
If we were to initially place all nine “+” signs in a row, there will be 10 spaces available for the sticks
to occupy (8 spaces in between the “+” signs and 2 spaces at the ends of the row). Relating this
to the given problem, we can actually view the first 9 spaces as the numbers from 1 to 9 (i.e., the
Exercises 1 Page 21 of 32
Mathematics 248 Topics in Combinatorial Mathematics 1st Semester AY 2006-2007
first space represents the digit 1, the 2nd space represents the digit 2, and so on). As for the 9
sticks, they determine the number of digits that the ascending number will have.
In particular, if we let 7 of the sticks occupy (in any manner) the first 9 spaces — and therefore
the 2 remaining sticks occupy the last space — this means that we’re actually forming a 7-digit
number. If only 1 stick occupies any of the first 9 spaces — and therefore the 8 remaining sticks
will occupy the last space — this means that we’re just forming a 1-digit number. Notice that the
more sticks placed in the last space, the lesser the number of digits that the number will have.
Moreover, we can only construct a number with at most 9 digits, since we only have nine sticks.
To illustrate this, consider the sequence
|| + ||| + ||| + + + + + + + |.
Using the above interpretation, we can say that the number contains 8 digits, composed of two
1s, three 2s, three 3s. Note, however, that there is only one way in which we can construct an
ascending number, and that is 11222333.
Here’s another sequence:
+ + | + +| + + + + + |||||||.
This can be interpreted as an ascending number containing only two digits, and it is equal to 35.
Thus, the number of ways of arranging 9 sticks and 9 “+” signs can give us the total number of
ascending numbers less than 109 , which is 18
9 . However, we have to eliminate the sequence
+ + + + + + + + +||||||||||,
For instance, 145 and 23689 are strictly ascending integers. Find the number of strictly ascending
integers which are less than (i) 109 , (ii) 105 .
77. Let A = {1, 2, . . . , n}, where n ∈ N.
(i) Given k ∈ A, show that the number of subsets of A in which k is the maximum number is
given by 2k−1 .
(ii) Apply (i) to show that
n−1
X
2i = 2n − 1.
i=0
78. In a given circle, n ≥ 2 arbitrary chords are drawn such that no three are concurrent within the
interior of the circle. Suppose m is the number of points of intersection of the chords within the
interior. Find, in terms of n and m, the number r of line segments obtained through dividing the
chords by their points of intersection.
79. There are p ≥ 6 points given on the circumference of a circle, and every two of the points are joined
by a chord.
(i) Find the number of such chords.
Assume that no 3 chords are concurrent within the interior of the circle.
(ii) Find the number of points of intersection of these chords within the interior of the circle.
(iii) Find the number of line segments obtained through dividing the chords by their points of
intersection.
Exercises 1 Page 22 of 32
Mathematics 248 Topics in Combinatorial Mathematics 1st Semester AY 2006-2007
(iv) Find the number of triangles whose vertices are the points of intersection of the chords within
the interior of the circle.
80. In how many ways can n + 1 different prizes be awarded to n students in such a way that each
student has at least one prize?
FO Since there are n students, then they can be arranged n! ways for the prizes to be awarded.
The fact that at least one prize each student then n+1
r be number of distributions to be awarded
at n students, where r = 2, for r > 2 there will be student with no prize at all. Thus n+1
2 n! by (MP)
are the total number of ways.
81. (a) Let n, m, k ∈ N, and let Nk = {1, 2, . . . , k}. Find
(i) the number of mappings from Nn to Nm .
(ii) the number of 1-1 mappings from Nn to Nm , where n ≤ m.
(b) A mapping f : Nn → Nm is strictly increasing if f (a) < f (b) whenever a < b in Nn . Find the
number of strictly increasing mappings from Nn to Nm , where n ≤ m.
(c) Express the number of mappings from Nn onto Nm in terms of S(n, m) (the Stirling number
of the second kind).
82. Given r, n ∈ Z with 0 ≤ n ≤ r, the Stirling number s(r, n) of the first kind is defined as the number
of ways to arrange r distinct objects around n identical circles such that each circle has at least one
object. Show that
(i) s(r, 1) = (r − 1)! for r ≥ 1;
(ii) s(r, 2) = (r − 1)!(1 + 12 + 13 + · · · + 1
r−1 ) for r ≥ 2;
(iii) s(r, r − 1) = 2r for r ≥ 2;
1
(iv) s(r, r − 2) = 24 r(r − 1)(r − 2)(3r − 1) for r ≥ 2;
Pr
(v) n=0 s(r, n) = r!.
83. The Stirling numbers of the first kind occur as the coefficients of xn in the expansion of
and when r = 5,
Show that
r
X
x(x + 1)(x + 2) · · · (x + r − 1) = s(r, n)xn ,
n=0
where r ∈ N.
84. Given r, n ∈ Z with 0 ≤ n ≤ r, the Stirling number S(r, n) of the second kind is defined as the
number of ways of distributing r distinct objects into n identical boxes such that no box is empty.
Show that
(i) S(r, 2) = 2r−1 − 1;
(ii) S(r, 3) = 12 (3r−1 + 1) − 2r−1 ;
(iii) S(r, r − 1) = 2r ;
(iv) S(r, r − 2) = 3r + 3 4r .
Exercises 1 Page 23 of 32
Mathematics 248 Topics in Combinatorial Mathematics 1st Semester AY 2006-2007
The Stirling numbers of the second kind occur as the coefficients of (x)n when xr is expressed in
terms of (x)n s. For instance, when r = 2, 3 and 4, we have, respectively,
86. Suppose that m chords of a given circle are drawn in such a way that no three are concurrent in
the interior of the circle. If n denotes the number of points of intersection of the chords within the
circle, show that the number of regions divided by the chords in the circle is m + n + 1.
87. For n ≥ 4, let r(n) denote the number of interior regions of a convex n-gon divided by all its
diagonals if no three diagonals are concurrent within the n-gon. For instance, as shown in the
following diagrams, r(4) = 4 and r(5) = 11. Prove that r(n) = n4 + n−1
2 .
ZCCZZ
C Z
@ LlLl CC ,,
@ L l ,l,C
@ L, lC
88. Let n ∈ N. How many solutions are there in ordered positive integer pairs (x, y) to the equation
xy
= n?
x+y
n(n + b) n2
x= ⇐⇒ x = +n (88b)
b b
However, x is a positive integer, then for (88b) to be valid, then b must divide n2 , or in other words,
b must be a factor of n2 . Thus this answers the problem: the number of solutions to the original
problem is the same as the number of positive factors or divisors of n2 .
Furthermore, let n = p1 k1 · p2 k2 · · · pm km , where pi s are distint prime numbers and ki s are positive
integers. Then n2 would have (2k1 + 1)(2k2 + 1) · · · (2km + 1) factors. This is also the number of
solutions to the problem given above.
Exercises 1 Page 24 of 32
Mathematics 248 Topics in Combinatorial Mathematics 1st Semester AY 2006-2007
89. Let S = {1, 2, 3, . . . , 1992}. In each of the following cases, find the number of 3-element subsets
{a, b, c} of S satisfying the given condition:
(i) 3 | (a + b + c);
PB Express S = {1, 2, 3, . . . , 1992} in terms of its remainder when divided by 3, that is, we
can write it in its “modulo-3” form, say S 0 = {1, 2, 0, 1, 2, 0, . . . , 1, 2, 0}, where each number
from S is represented in S 0 by its remainder when divided by 3. Thus we have 664 elements
of 1s, 2s and 0s in S 0 . We denote the set of all 1s by set A, all 2s by set B, and all 0s by set
C. Therefore, to have the sum of any 3 elements from S 0 divisible by 3, we can simply choose
all three numbers from the one set, i.e., all from either set A, set B or set C; or we choose
one number from each of the three sets, i.e., one number from set A, one from set B and one
from set C. Therefore, the number of ways to do this is given by
3
664 664
3 + .
3 1
(ii) 4 | (a + b + c).
PB Similarly, let S 00 = {1, 2, 3, 0, 1, 2, 3, 0, . . . , 1, 2, 3, 0}, where each number from S is repre-
sented in S 00 by its remainder when divided by 4. Thus we have 498 elements of 1s, 2s, 3s
and 0s in S 00 . Again, we denote the set of all 1s by set A, all 2s by set B, all 3s by set C, and
all 0s by set D. In order to have the sum of any three numbers from S 00 , we consider three
cases. First, we can choose all three numbers from set D; second, we can choose exactly
one number from set A, set C and set D, respectively; finally, we can choose two numbers
from set C and one number from set B or two numbers from set A and one number from set
B or two numbers from set B and one from set D. Therefore, the number of ways to do this
is given by
3
498 498 498 498
+ +3 .
3 1 1 2
90. A sequence of 15 random draws, one at a time with replacement is made from the set
{A, B, C, . . . , X, Y, Z}
UNIVERSITY
Exercises 1 Page 25 of 32
Mathematics 248 Topics in Combinatorial Mathematics 1st Semester AY 2006-2007
for k = 1, 2, . . . , n − 1.
TT First, we shall construct two sets S and T in the following manner:
We will choose k positive integers from the set a1 , a2 , . . . , an , and get the product. Let that be s1 ,
which shall become an element in S. For the remaining n − k numbers not chosen, let their product
be t1 . The resulting term shall become an element in T . Note that s1 · t1 = a1 a2 a3 · · · an .
If we take a different set of k positive integers from a1 , a2 , . . . , an , we will again have to two products,
one of which will become a member of S (say s2 ) and the other will become a member of T (say
t2 ). Again, the product s2 · t2 = a1 a2 a3 · · · an .
The process will continue until we have chosen all possible combinations of k positive integers
from the set a1, a2 , . . . , an , which will allow us to fill in the sets S and T . Note that this process
will be done nk times (referring to the number of possible ways k number may be chosen from n
positive integers).
Ultimately, we will have sets S = {s1 , s2 , . . . , s(n) } and T = {t1 , t2 , . . . , t(n) }, where si · ti =
k k
a1 a2 a3 · · · an for i = 1, 2, . . . , nk .
n
(P
k)
Relating this to the given problem, we can actually say that Sn = si . The addends that constitute
i=1
the sum Sn are always a product of k positive integers taken from a1 , a2 , . . . , an , which can be said
for each element in set S.
As for Sn−k , the products of n − k integers that make up its sum can be related to the elements of
n
set T (where each element is a product of n − k integers). While Sn−k is a sum of n−k terms,
we know that nk is equal to n−k n
. Thus, we can represent Sn−k as the sum of nk products, all
n
k)
(P
of which coming from the set T — that is, Sn−k = ti .
i=1
To prove the inequality, we shall use two methods: the Generalized AM-GM Inequality and the
Cauchy Schwarz Inequality.
Method I: The Generalized AM-GM Inequality is stated as follows:
For nonnegative numbers a1 , a2 , . . . , an ,
n
1X √
ai ≥ n a1 a2 · · · an .
n i=1
Since all elements of S and T are positive, then we can establish the following statements
based on the Generalized AM-GM inequality,
1/(k )n n
1/(k )
Sn Sn−k
n
≥ s1 s2 · · · s n
( ) n
≥ t 1 t 2 · · · t n
( ) ,
k k
k k
2
n
Sn Sn−k ≥ a1 a2 a3 · · · an ,
k
Exercises 1 Page 26 of 32
Mathematics 248 Topics in Combinatorial Mathematics 1st Semester AY 2006-2007
√ √ n
Since si , ti ≥ 0, then si and ti are real numbers for i = 1, 2, . . . , k . Hence, we can use
CS Inequality:
2 n n
(nk) (k ) (k )
X √ √ X X
si ti ≤ si ti .
i=1 i=1 i=1
n
Note that si · ti = a1 a2 a3 · · · an for i = 1, 2, . . . , k .
n 2 n n
(k ) (k ) (k )
X √ X X
si ti ≤ si ti
i=1 i=1 i=1
2 n n
(nk) (k ) (k )
X √ X X
a1 a2 a3 · · · an ≤ si ti
i=1 i=1 i=1
n n
2 (k ) (k )
n √
X X
a1 a2 a3 · · · an ≤ si ti
k i=1 i=1
2
n
a1 a2 a3 · · · an ≤ Sn Sn−k ,
k
For each A ∈ P(Nn−1 ), there is a unique B = A ∪ {n} ∈ Nn ; for each B ∈ Nn , there is a unique
A = B \ {n} ∈ P(Nn−1 ). If A ∈ P(Nn−1 ), then aA∪{n} = n − aA , since n is larger than the elements
of A, and those elements will change signs relative to their sign in aA . Thus, since |P(Nk )| = 2k ,
X X X X X
An = aA = aA + aB = (aA + aA∪{n} ) = n = n2n−1 .
A∈P(Nn ) A∈P(Nn−1 ) B∈Nn A∈P(Nn−1 ) A∈P(Nn−1 )
Therefore, the sum An of all such alternating sums for n = 7 is A7 = 7 · 27−1 = 448.
94. A gardener plants three maple trees, four oak trees and five birch trees in a row. He plants them
in random order, each arrangement being equally likely. Let mn in lowest terms be the probability
that no two birch trees are next to one another. Find m + n.
95. In a tournament, each player played exactly one game against each of the other players. In the
game the winner was awarded 1 point, the loser got 0 points, and each of the two players earned
1/2 point if the game was a tie. After the completion of the tournament, it was found that exactly
Exercises 1 Page 27 of 32
Mathematics 248 Topics in Combinatorial Mathematics 1st Semester AY 2006-2007
half of the points earned by each player were earned in games against the ten players with the
least number of points. (In particular, each of the ten lowest scoring players earned half of her/his
points against the other nine of the ten.) What was the total number of players in the tournament?
Thus,
n n(n − 1) n − 10
= = 2 + 45 = (n − 10)(n − 11) + 90
2 2 2
n2 − n = 2n2 − 42n + 400
n2 − 41n + 400 = 0 =⇒ n = 16 or n = 25.
If n = 16, then the top six players would only have an average of 2 62 /6 = 5 points, which would
be less than the average score of the lowest ten players, which is 2 · 45/10 = 9 points. Thus, there
were 25 players in the tournament.
96. Let S be the sum of the base 10 logarithms of all of the proper divisors of 1,000,000. (By a proper
divisor of a natural number we mean a positive integral divisor other than 1 and the number itself.)
What is the integer nearest to S?
TT The prime factorization of 1,000,000 is given by 26 ·56 ; based on this, we can see that 1,000,000
has a total of 7 · 7 = 49 positive divisors. Let the divisors be denoted by (in no particular order of
magnitude) d1 , d2 , . . . , d49 .
Since S is the sum of the base 10 logarithms of all the proper divisors of 1,000,000 (which excludes
1 and 1,000,000), then S can be expressed as
d1 d2 · · · d49
S = log d1 + log d2 + · · · + log d49 − log 1 − log 1000000 = log .
1000000
To determine S, we should find the product d1 d2 · · · d49 .
Note that each of the 49 divisors of 1,000,000 can be expressed in the form 2x · 5y , for 0 ≤ x, y ≤ 6.
This means that the product d1 d2 · · · d49 can then be expressed in the form 2m ·5n , where m, n ∈ N.
To solve for m, we consider that: (a) 7 of the divisors have the form 21 · 5y (21 · 50 , 21 · 51 , . . . ,
21 · 56 ); (b) 7 of the divisors have the form 22 · 5y ; (c) 7 of the divisors have the form 23 · 5y ; (d) 7 of
the divisors have the form 24 · 5y ; (e) 7 of the divisors have the form 25 · 5y ; and (f) 7 of the divisors
have the form 26 · 5y . Considering all these cases, we can say that
2m = (21 )7 · (22 )7 · (23 )7 · (24 )7 · (25 )7 · (26 )7 = 2147 ,
which means m = 147. To solve for n, we may employ the same method, and by symmetry, we
can show that
5n = (51 )7 · (52 )7 · (53 )7 · (54 )7 · (55 )7 · (56 )7 = 5147 ,
which means n = 147. Thus, the product of the divisors d1 d2 · · · d49 is equal to 2147 · 5147 = 10147 .
Solving for the value of S, we have
d1 d2 · · · d49 10147
S = log = log = log 10141 = 141.
1000000 106
97. In a sequence of coin tosses one can keep a record of the number of instances when a tail is im-
mediately followed by a head, a head is immediately followed by a head, etc. We denote these
by T H, HH, etc. For example, in the sequence HHT T HHHHT HHT T T T of 15 coin tosses we
observe that there are five HH, three HT , two T H and four T T subsequences. How many dif-
ferent sequencesof 15 coin tosses will contain exactly two HH, three HT , four T H and five T T
subsequences?
Exercises 1 Page 28 of 32
Mathematics 248 Topics in Combinatorial Mathematics 1st Semester AY 2006-2007
98. An ordered pair (m, n) of nonnegative integers is called simple if the addition m + n in base 10
requires no carrying, Find the number of simple ordered pairs of nonnegative integers that sum to
(i) 1492;
PB Let abcd and ef gh be two “simple” 4-digit numbers (the first digit can be zero, in that case,
the number becomes 3-digit only). We want to find the number of “simple” integers that sum
up to 1492. To do this, let abcd + ef gh = 1492. Since abcd and ef gh are “simple” integers,
then no carrying is allowed in addition. Hence, the problem reduces to finding the number of
non-negative integers to the following linear equations:
a+e = 1 (98a)
b+f = 4 (98b)
c+g = 9 (98c)
d+h = 2 (98d)
It is easy to show that (98a) has 2 nonnegative integer solutions, (98b) has 5, (98c) has 10
and (98d) has 3. Thus, by multiplication property, there are a total of 2 · 5 · 10 · 3 = 300 number
of simple nonnegative integer solutions to abcd + ef gh = 1492.
(ii) 1992.
PB Similarly, the problem reduces to finding the number of non-negative integers to the
following linear equations:
a+e = 1 (98a)
b+f = 4 (98b)
c+g = 9 (98c)
d+h = 2 (98d)
(98a) has 2 non-negative integer solutions, (98b) has 10, (98c) has 10 and (98d) has 3. Thus,
by multiplication property, there are a total of 2 · 10 · 10 · 3 = 600 number of simple nonnegative
integer solutions to abcd + ef gh = 1992.
99. Let m/n, in lowest terms, be the probability that a randomly chosen positive integer of 1099 is an
integer multiple of 1088 . Find m + n.
PB 1099 can be expressed as 299 · 599 , thus 1099 has 1002 positive divisors. Integer multiples of
1088 can be expressed in the form 2x · 5y , where x and y are both integers and 88 ≤ x, y ≤ 99.
Thus among the 10000 positive divisors of 1099 , 12 · 12 are integer multiples of 1088 . Therefore, the
probability that a randomly chosen positive divisor of 1099 is an integer multiple of 1088 is 144/10000
or 9/625. Thus, m + n = 634.
100. A convex polyhedron has for its faces 12 squares, 8 regular hexagons, and 6 regular octagons.
At each vertex of the polyhedron, one square, one hexagon, and one octagon meet. How many
segments joining vertices of the polyhedron lie in the interior of the polyhedron rather than along
an edge or a face?
MS It is evident that no two polygons of the same shape share a side, and thus there are 48
vertices on the polygon. Each vertex shares a face with 3 + 5 + 7 − 3 = 12 other vertices, since
each of the faces that the vertex is on must share a side with an adjacent face. Thus, there are
48 − 13 = 35 other vertices that do not share a face with that vertex, and the edge connecting
any of these vertices to the given point must lie in the interior of the polyhedron. Since each
edge is counted twice (once per vertex it is incident on), the number of required edges must be
48 · 35/2 = 840.
101. Someone observed that 6! = 8 · 9 · 10. Find the largest positive integer n for which n! can be
expressed as the product of n − 3 consecutive positive integers.
MS It is apparent that the largest number in the n − 3 consecutive positive integers multiplied is
Exercises 1 Page 29 of 32
Mathematics 248 Topics in Combinatorial Mathematics 1st Semester AY 2006-2007
larger than n, and larger than 3. Let n + r be the largest number among the positive integers. Then
the problem becomes solving for n in
r r
(n + r)! n! Y n + r Y n+r
(n + r)(n + r − 1) · · · (n + r − (n − 4)) = = n! =⇒ = n! =⇒ = 6.
(r + 3)! 3! i=1 3 + r i=1
3+r
Since n > 3, the fraction (n + r)/(3 + r) > 1, and the larger r becomes, the smaller (n + 1)/4
becomes, and the smaller n becomes. Thus, n is largest when r = 1, and n + 1 = 24, n = 23.
102. Let S = {1, 2, . . . , n}. Find the number of subsets A of S satisfying the following conditions:
A = {a, a + d, . . . , a + kd} for some positive integers a, d and k, and
A ∪ {x} is no longer an arithmetic progression with common difference d for each x ∈ S \ A.
103. Find all natural numbers n > 1 and m > 1 such that
Thus,
n
n! X
bn!ec = Pnn + Pnn−1 + ··· + Pn1 + Pn0 + eξ1
= Pnn + Pnn−1 + · · · + Pn1 + Pn0 = Pnr .
(n + 1)! r=0
P
105. Let S = {1, 2, . . . , 1990}. A 31-element subset A of S is said to be good if the sum a∈A a is divisible
by 5. Find the number of 31-element subsets of S which are good.
106. Let S be a 1990-element set and let P be a set of 100-ary sequences (a1 , a2 , . . . , a100 ), where ai s are
distinct elements of S. An ordered pair (x, y) of elements of S is said to appear in (a1 , a2 , . . . a100 )
if x = ai and x = aj for some i, j with 1 ≤ i < j ≤ 100. Assume that every ordered pair (x, y) of
elements of S appears in at most one member in P. Show that
|P| ≤ 800.
Exercises 1 Page 30 of 32
Mathematics 248 Topics in Combinatorial Mathematics 1st Semester AY 2006-2007
and
m · d(n, m) = m · d(n − 1, m) + (2n − m) · d(n − 1, m − 1)
for 0 < m < n. Prove that all the d(n, m) are integers.
111. A difficult mathematical competition consisted of a Part I and a Part II with a combined total of
28 problems. Each contestant solved 7 problems altogether. For each pair of problems, there were
exactly two contestants who solved both of them. Prove that there was a contestant who, in Part I,
solved either no problems or at least four problems.
112. Suppose that five points in a plane are situated so that no two of the straight lines joining them
are parallel, perpendicular, or coincident. From each point perpendiculars are drawn to all the
lines joining the other four points. Determine the maximum number of intersections that these
perpendiculars can have.
3
113. Let n distinct points in the plane be given. Prove that fewer than 2n 2 pairs of them are at unit
distance apart.
114. If c and m are positive integers each greater than 1, find the number n(c, m) of ordered c-tuples
(n1 , n2 , . . . , nc ) with entries from the initial segment {1, 2, . . . , m} of the positive integers such that
n2 < n1 and n2 ≤ n3 ≤ · · · ≤ nc .
Exercises 1 Page 31 of 32
Mathematics 248 Topics in Combinatorial Mathematics 1st Semester AY 2006-2007
A(xi , ·) = ({xi } × Y ) ∩ A
(ii) Using (i), or otherwise, solve the following problem: There are n ≥ 3 given points in the plane
such that any three of them form a right-angled triangle. Find the largest possible value of n.
Source: Chen, Chuan-Chong and Koh, Khee-Meng. Principles and Techniques in Combinatorics.
Reproduced without explicit permission, for use in Math 248 class, Ateneo de Manila University, Philippines, 1st Semester AY
2006-2007.