You are on page 1of 33

Mathematics Olympiad

Combinatorics

Narasimhan R. Chari

om
References:
1) AoPS: Active Website for solutions to international math olympiad problems,
https://artofproblemsolving.com, (since 1993)

l.c
2) Alexander Bogomolny, www.cut-the-knot.org, (1996-onwards)
3) Arthur Engel, Problem-Solving Srategies, Springer-Verlag, 1998
4) H. Eves, A Survey of Geometry, Allyn and Bacon, Inc., 1972

ai
5) H. S. M. Coxeter and S. L. Greitzer, Geometry Revisited, MAA, (Mathematical Association of
America, 1967 gm
5) R. Graham, D. Knuth, O. Patashnik, Concrete Mathematics, Addison-Wesley, 1994
6) Roger A. Johnson, Advanced Euclidean Geometry, Dover, 1929
7) S. L. Loney, Plane Trigonometry, Cambridge, 1915)
8) Mactutor History of Mathematics, www.history.mcs.st-and.ac.uk, Univ of St. Andrews, Scotland
ri@

9) I. F. Sharygin, Problems in Plane Geometry, (1982), (free download available online):


10) G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 1938, (Sixth Edition,
D. R. Heath-Brown, J. H. Silverman, eds, OUP, 2008)
11) Ivan Niven, Herbert S. Zuckerman and Hugh L. Montgomery, An Introduction to the Theory
ha

of Numbers, Wiley, 1960, (Fifth Edition, 1991)


sic
ra
na
2

1. Permutations and Combinations

n denotes a non-negative integer. Let 0 ≤ r ≤ n. Define

nP n!
r = P(n, r) = n(n − 1)(n − 2) . . . (n − r + 1) =
(n − r)!
  n
nC = n = n(n − 1) . . . (n − r + 1) = Pr = n!
; 0! = 1.

om
r
r r! r! r! (n − r)!

‘An empty sum is 0’ and ‘an empty product is 1’. Equivalently, we have

0 is the identity element under addition, i.e., a + 0 = 0 + a = a, for all complex numbers.

l.c
1 is the identity element under multiplication, i.e., a × 1 = 1 × a = a, for all complex numbers.
These are standard conventions, i.e., part of the axioms we assume before starting any chapter.

ai
P stands for permutations, i.e., arrangements. gm
C stands for combinations, i.e., choices, i.e., selections.
 
n
= the number of ways of choosing/selecting r things out of n given objects;
r
ri@

 
n
Hence n Cr = = the number of subsets of {1, 2, . . . , n} which contain r elements.
r
n P = the number of ways of arranging r objects in n places in a straight line.
r

Both n Pr and n Cr are positive integers.


ha

           
n n n n+1 n n
= 1; = ; we have the recurrence relation = +
0 r n−r r r r−1
sic

2. PHP, Pigeonhole principle or Dirichlet’s box principle, (P. G. L. Dirichlet, German, 1834)
i) If n > m and there are n items (‘pigeons’) to be put into m boxes (‘pigeonholes’), then at
least one box must contain more than one item.
ra

Equivalently: Suppose let f : {1, 2, . . . , n} → {1, 2, . . . , m} is a mapping.


na

If m ≤ n − 1 then f cannot be one-one, i.e., injective.


i.e., there exists i 6= j, 1 ≤ i, j ≤ n such that f (i) = f ( j)
ii) If n ≥ km + 1 and there are n items (‘pigeons’) to be put into m boxes (‘pigeonholes’), then
at least one box must contain more than k items.
Equivalently,
If n items (‘pigeons’) are to be placed in m boxes (‘pigeonholes’), then
jn − 1k
at least one box must contain at least + 1 items.
m

narasichari@gmail.com
3

3. The floor function (or ‘the greatest integer function’) or ‘the integer part function’ is defined
as

bxc = [x] = the greatest integer which is less than or equal to x


C. F. Gauss, (German), used [x] in 1808; Kenneth Iverson, (Canadian, IBM), ‘A Programming
Language’, (APL), 1962, used the floor function, bxc = [x] and the ceiling function, dxe = the
smallest integer which is greater than or equal to x.

om
The fractional part of x is {x} = x − [x] = x − bxc . We always have 0 ≤ {x} < 1.
For example: b3.1c = 3; {3.1} = 0.1; −3.1 = −4 + 0.9 ; b−3.1c = −4; −3.1 = 0.9.

l.c
4. Inclusion-exclusion principle:
Let n(A) denote the number of elements in a finite set A.

ai
n(A ∪ B) = n(A) + n(B) − n(A ∩ B), for any two finite sets A and B.
gm
n(A ∪ B ∪C) = n(A) + n(B) + n(C) − n(A ∩ B) − n(A ∩C) − n(B ∩C) + n(A ∩ B ∩C), for any
finite sets A, B and C.
Write the general formula for n finite sets and prove it by induction.
ri@

5. a) Let n denote a natural number, i.e., positive integer.


The number of non-negative integer solutions of x + y = n is n + 1
n+2 n+2
The number of non-negative integer solutions of x + y + z = n is C2 = 2

The number of ways of writing a natural number n as a sum of k non-negative integers, i.e., the
ha

number of non-negative integral solutions of the equation

x1 + x2 + . . . + xk = n, xi ≥ 0 is given by
sic

   
n+k−1 n+k−1
d(n, k) = =
n k−1
Example: x + y + z = 4 ⇒ 4 = 4 + 0 + 0 = 2 + 2 + 0 = 2 + 1 + 1 , with 3 rearrangements each
ra

and 4 = 0 + 1 + 3, with 6 permutations ⇒ 15 solutions; d(4, 3) = 15; 6C4 = 15.


b) To find the number of ways of writing a natural number n as a sum of k positive integers:
na

x1 + x2 + . . . + xk = n, xi ≥ 1 . Let xi − 1 = yi . Then xi = yi + 1, yi ≥ 0

(y1 + 1) + . . . + (yk + 1) = n ⇒ y1 + . . . + yk = n − k
Hence by the previous calculation, the required number is
   
n−k+k−1 n−1 n−1 n−1
= Cn−k = C(n−1)−(n−k) =
n−k k−1
Example: To express 4 as a sum of 3 positive integers,
     
n−1 4−1 3
4 = 2 + 1 + 1 with 3 rearrangements; = = =3
k−1 3−1 2

narasichari@gmail.com
4

6. Recurrence relations
We know that, given a sequence an , if the difference between any two successive terms of an is
constant, the sequence is an arithmetic progression.
If the ratio between any two successive terms of an is constant, the sequence is a geometric
progression.

om
To generalise these two types of sequences we need standard notation.
Define E (an ) = an+1 and ∆ (an ) = an+1 − an

E is called the shift operator and ∆ is Newton’s forward difference operator.

l.c
∆ (an ) = an+1 − an = E (an ) − an = (E − 1) (an )
Hence ∆ = E − 1, as operators.

ai
E 2 (an ) = E(E (an )) = E (an+1 ) = an+2 ;

E k (an ) = an+k ;
gm
∆2 (an ) = (E − 1)2 (an ) = (E 2 − 2E + 1)an = an+2 − 2an+1 + an ,
 
k k k
∆ (an ) = (E − 1) (an ) = an+k − an+k−1 + . . . + (−1)k an
1
ri@

Example 1): For an arithmetic progression, the difference between any two successive terms of
an is constant, i.e.,

an+1 − an = d =constant, i.e., ∆ an = (E − 1) an =constant. Hence


ha

∆2 an = ∆(constant) = 0 ⇒ (E − 1)2 (an ) = 0. The solution is the general term of the AP,
an = a + (n − 1)d. This is of the form an = dn + c, i.e., it is a linear polynomial in n.
This corresponds to the statement in calculus: A polynomial function is linear in one variable if
sic

and only if its second derivative is zero.


In general, a function is a polynomial of degree k − 1 in one variable if and only if its k th
derivative is zero.
ra

Similarly, in the discrete set-up, we get ∆k an = 0 ⇔ an is a polynomial of degree k − 1 in n.


na

E.g., {2, 5, 8, 11, . . .}, defined by ‘common difference’, ∆ an = 3, a1 = 3 gives an = 3n + c


Then n = 1 gives a1 = 3 + c = 2 ⇒ c = −1 ⇒ an = 3n − 1
Example 2): For a geometric progression, the ratio between any two successive terms of an is
constant, i.e.,

an+1 = ran , i.e., (E − r) an = 0, r 6= 1. The general term is an = krn

{6, 12, 24, 48, 96, . . .}, defined by ‘common ratio’, an+1 = 2an , a1 = 6 gives an = k (2n )
Then n = 1 gives a1 = k(2) + c = 6 ⇒ c = 4 ⇒ an = 3n − 1
Note that if a sequence is a GP, an = {a, ar, ar2 , . . .},
then the first difference sequence is {ar − a, ar2 − ar, . . .} = {a(r − 1), ar(r − 1), . . .}
narasichari@gmail.com
5

This is also a GP with the same common ratio.


This corresponds to the calculus statement:

f (x) is a multiple of eax ⇔ f 0 (x) is a multiple of eax .


a(rn − 1)
We know that for a GP, if Tn = arn−1 then Sn = which is of the form αrn + β
r−1

om
Conclusion: A sequence is a non-constant GP if and only if all further common differences
∆k an , k ≥ 1 are geometric progressions with the same common ratio.
Example 3): For n ≥ 1, let {an } = {2n + 5} = {7, 9, 13, 21, 37, 69, . . .}

l.c
Then ∆ an = an+1 − an = {2, 4, 8, 16, 32, . . .}, which is a GP
We get an+1 − 2an = (2n+1 + 5) − 2(2n + 5) = −5 = constant.

ai
Hence (E − 2)an = constant; ∆ (E − 2)an = 0 but ∆ = E − 1; hence (E − 1)(E − 2)an = 0, with
the initial conditions a1 = 7, a2 = 9 gm
Example 4): Let an = n(2n ). Then

(E − 2)an = Ean − 2an = an+1 − 2an = (n + 1)2n+1 − n(2n+1 ) = 2n+1 (n + 1 − n) = 2n+1 ;

(E − 2)2 an = (E − 2)2n+1 = 2n+2 − 2(2n+1 ) = 0


ri@

Hence 2n and n(2n ) are independent solutions of (E − 2)2 an = 0; hence a linear combination
of the form c1 2n + c2 n (2n ) is the general solution of the difference equation (E − 2)2 an = 0
To summarise:
ha

(E − 1)2 an = 0 ⇔ ∆2 an = 0 ⇔ an = c1 n + c2

(E − 2)2 an = 0 ⇔ an = (c1 + c2 n) (2n )


sic

General solution
The procedure parallels y = CF + PI and the ‘method of undetermined coefficients’ used to
solve ordinary differential equations with constant coefficients.
ra

Let the difference equation be given over the complex numbers as

(E − a1 )n1 .(E − a2 )n2 . . . (E − ak )nk = (a polynomial of degree m), where a1 = 1, ai 6= 1, i ≥ 2


na

Then an = (a general polynomial of degree n1 + m) +c2 (a2 )n . (a general polynomial of degree


(n2 − 1) + . . . + ck (ak )n .(a general polynomial of degree (nk − 1)

Example 5): Find the general term of the sequence {2, 3, 7, 12, 20, 29, 41, 62, . . .}, defined by
the two-term recurrence relation an+2 = an + 4n + 1, a1 = 2, a2 = 3
Method 1: Given an+2 − an = 4n + 1 ⇒ (E 2 − 1)an = 4n + 1 ⇒ (E − 1)(E + 1)an = 4n + 1; the
right side is a polynomial of degree 1
The general solution is an = (1)n .(an2 + bn + c) + c2 (−1)n = an2 + bn + c + c2 (−1)n (1)

an+2 − an = a n2 + 4n + 4 + b(n + 2) + c + c2 (−1)n+2 − an2 + bn + c + c2 (−1)n


  

an+2 − an = 4an + 4a + 2b = 4n + 1, (given)


narasichari@gmail.com
6

Equating coefficients on both sides, we get


3
4a = 4 and 4a + 2b = 1 ⇒ a = 1, b = −
2
Further, using the given initial conditions in eq (1), we get

a1 = a + b + c − c2 = 2; a2 = 4a + 2b + c + c2 = 3

om
5 9 1
c − c2 = , c + c2 = 2 ⇒ c = , c2 = −
2 4 4
3n 9 1
Hence an = n2 − + − (−1)n
2 4 4

l.c
Method 2: Given an = {2, 3, 7, 12, 20, 29, 41, 62, . . .}

⇒ ∆ an = {1, 4, 5, 8, 9, 12, 13, . . .} ⇒ ∆2 an = {3, 1, 3, 1, . . .}

ai
∆2 an = {2 + 1, 2 − 1, 2 + 1, 2 − 1, . . .} = {2 − (−1)n } = {2 − cos (nπ)}, n ≥ 1
gm
⇒ ∆2 an = constant + GP with common ratio (r = −1)

⇒ an = quadratic + GP with common ratio (r = −1) = an2 + bn + c + d(−1)n


The constants must be found as in the first method.
ri@

Example 6): Find the general term of the periodic sequence {1, 1, −2, 1, 1, −2, . . .}, defined
by the two-term recurrence relation an+2 + an+1 + an = 0, where a1 = 1, a2 = 1
Ans: The given relation is (E 2 + E + 1)an = 0. The characteristic roots are the complex cube
roots of unity. Each is the square of the other.
ha

√ 2πi √ −2πi
−1 + i 3 −1 − i 3
α= = ω = e 3 and β = = ω2 = e 3
2 2
sic

Hence an = c1 α n + c2 β n

a1 = 1 ⇒ c1 + c2 = 1 and c2 = 1 ⇒ c1 α 2 + c2 β 2 = 1

ra

We use the charactristic equation to get α 2 = −α − 1 and β 2 = −β − 1 ; β − α = −i 3


Solving the equations we get c1 = −1, c2 = −1
na

2nπi 2nπi
 
 
− 2nπ
The general term is an = −ω n − ω 2n = − e 3 + e 3  = −2 cos
3

narasichari@gmail.com
7

7. a) From any given set of seven distinct real numbers, show that we can always select two num-
bers x and y such that
x−y 1
0≤ ≤√
1 + xy 3
(n − 1)π nπ
[Hint: x = tan A, y = tan B ; A − B = θ ; use six regions <θ < , 1 ≤ n ≤ 6]
6 6

om
b) From any given set of 13 distinct
√ real numbers, show that we can always select two numbers
x and y such that |x − y| ≤ (2 − 3) |1 + xy|

8. a) Find the number of distinct triples of natural numbers (a, b, c) such that a < b < c and

l.c
abc = 30030
Ans: Each factor is a product a = 2a1 3a2 5a3 7a4 11a5 13a6 etc., each power is 0 or 1; the sum of
the powers is 1; remove {(a, 1, 1), (1, a, 1), (1, 1, a)} ;

ai
then a < b < c is 1 out of 6 permutations. gm
36 − 3
We get, the required number is = 121.
6
Method 2 : d(n) = d(30030) = 26 ;
64C 64C , . . . , 64C
ri@

the first factor a can be selected in 0 or 1 or 5 ways;


the second factor b can be selected from the remaining d(6/a) = 26/a factors.
Hence the total number of ways equals
              
1 6 6 6 5 6 4 6 3 6 2 6 1 6 0
2 + 2 + 2 + 2 + 2 + 2 + 2 −3
ha

3! 0 1 2 3 4 5 0

(2 + 1)6 − 3 729 − 3
= = = 121
sic

6 6
b) The number of 3−element subsets of the set {1, 2, . . . , 13} such that the sum of the elements
in each subset is divisible by 3 is
ra

1) 80 2) 84 3) 98 4) 88

Ans: 3)
na

Let A = {3, 6, 9, 12}; B = {1, 4, 7, 10, 13}; C = {2, 5, 8, 11}


To get three elements whose sum is a multiple of 3 , there are 4 ways:
Select one element each from A and B and C ; this gives
     
4 5 4
× × = 80 ways.
1 1 1
Select all the three elements from A or all from B or all from C; this gives
     
4 5 4
+ + = 4 + 10 + 4 = 18 ways.
3 3 3
Total number of ways is equal to 80 + 18 = 98.
narasichari@gmail.com
8

9. a) In a group of six persons there are always either three mutual acquaintances or three mutual
strangers.
b) All pairs of vertices of a pentagon are connected by edges which are coloured either red or
blue. Does there always exist a blue triangle or a red triangle?
c) Among n(m − 1) persons, there are always m mutual strangers or there is one person who
knows n persons.

om
d) In a group of nine persons there are always three mutual acquaintances or four mutual strangers.
e) Ramsey theory: In a group of 18 persons there are always 4 mutual acquaintances or 4 mutual
strangers.

l.c
10. a) In a room there are n persons, each one shaking hands with some others.

ai
Show that there are atleast two persons who have shaken hands the same number of times.
Hint: Case 1) Each person in a group of n persons can shake hands at most n−1 times, (because
gm
nobody shakes hands with himself). If there exists at least one person who has not shaken hands
with anyone, then by symmetry, all the others, also have not shaken hands with him. Hence each
of them must have shaken hands at most n − 2 times.
Consider the map f : Persons → Number of hands shaken by the person.
ri@

There are n persons who are the pigeons; the pigeonholes are the hands which are shaken, i.e.,
a subset of {0, 1, 2, . . . , n − 2}. This set has n − 1 elements.,
By the PHP, f cannot be one-one. Hence f (i) = f ( j), for some i 6= j
Case 2) If each person has shaken hands at least once, then the codomain in the mapping above
ha

is a subset of {1, 2, . . . , n − 1}. This set has n − 1 elements; hence the PHP can be applied; we
get the same conclusion as in Case 1)
sic

b) Let S be a set of n natural numbers.


Show that S has a subset T such that the sum of the elements of T is a multiple of n .
Hint: Let S = {ai : 1 ≤ i ≤ n}; define xi = a1 + a2 + . . . ai , for 1 ≤ i ≤ n; let X = {xi : 1 ≤ i ≤ n}
ra

Consider the mapping f : X → {0, 1, . . . , n − 1} defined by f (xi ) = xi (mod n)


na

If f (xi ) = 0 for some i, we can take T = {a1 , a2 , . . . , ai }


Otherwise, if 0 is not in the range of f , we get a mapping from a set with n elements to a set
with n − 1 elements. By the PHP, there exist i 6= j, say i < j, such that f (xi ) = f (x j ).

a1 + . . . + ai = a1 + . . . + ai + . . . + a j (mod n) ⇒ ai+1 + . . . + a j = 0 (mod n)


Hence we can take T = {ai+1 , . . . , a j }

c) n + 1 integers are selected from the set S = {1, 2, . . . , 2n} .


Show that there is atleast one coprime pair among these n + 1 numbers.

d) Let n be a positive integer which is not a multiple of 2 or 5 .


narasichari@gmail.com
9

Show that some multiple of n has all its digits equal to 1.

e) 6 points are selected at random inside a 3 cm × 4 cm rectangle.



Show that there exist 2 selected points which are at distance at most 5 cm from each other.

f) Let S = {1, 2, . . . , 9} . Let T be a subset of S having 6 elements.

om
Show that T must contain two numbers whose sum is 10.

g) Dirichlet’s rational approximation theorem: Let α be an irrational number. Let k be a

l.c
positive integer.
1
There exist positive integers m and n such that m α − n <
k

ai
Hint: Consider [0, 1] as a union of k closed intervals,
     
1 S 1 2 S S k−1
[0, 1] = 0,
k
,
k k
...
k
,1
gm (1)

Consider the k + 1 real numbers, defined as the fractional parts of α, 2α, . . . , (k + 1)α:

x1 = α − bαc, x2 = 2 α − b2 αc, . . . , xk+1 = (k + 1)α − b(k + 1)αc (2)


ri@

We know that bxc ≤ x < bxc + 1 ⇒ 0 ≤ x − bxc < 1, for all real numbers.
Hence 0 ≤ xi < 1, for 1 ≤ i ≤ k + 1
Also the interval [0, 1] is the union of k sub-intervals, from (1). Hence, by the pigeon-hole
ha

principle, at least two of these xi ’s must belong to the same sub-interval.


Hence the difference between these two xi ’s must be at most equal to the length of this sub-
interval. Also every xi is irrational; hence it cannot be an end-point of any sub-interval.
sic

1
Hence xi − x j < , for some i, j with 1 ≤ j < i ≤ k + 1
k
1
ra


⇒ iα − biαc − jα + b jαc < ; let i − j = m and biαc − b jαc = n
k
1
⇒ mα − n < . This proves the first part of the theorem.
na

k
h) i) Kronecker’s theorem. Let α be an irrational. Then the set

A = {mα + n : m, n ∈ Z} is dense in R
i.e., every interval of positive length has at least one element of A.
ii) Show that there exists a power of 2 which has 2019 as its first four digits
Note: 2019 can be replaced by any finite sequence of digits.

Hint: i) Given an interval I = (x, y) in R, with x < y


By Dirichlet’s approximation theorem, we get positive integers, m and n such that

narasichari@gmail.com
10

0 < |mα − n| < y − x; let |mα − n| = r ⇒ 0 < r < y − x (1)


Let k = min{r, 2r, . . .}, such that k > x. Then (k − 1)r ≤ x and kr > x (2)
Claim: kr < y.
Proof: Suppose if possible kr ≥ y; also (k − 1)x ≤ x ⇒ −(k − 1)x ≥ −x. Adding we get

kr − (k − 1)r ≥ y − x ⇒ r ≥ y − x, contradicting (1). This proves the claim.

om
Hence x < kr < y ⇒ |k(mα − n)| ∈ A
This proves Kronecker’s theorem.

l.c
ii) To find positive integers m and n such that (2019)(10)n < 2m < (2020)(10)n

⇔ n log10 10 + log10 2019 < m log10 2 < n log10 10 + log10 2020

ai
⇔ log10 2019 < m log10 2 − n < log10 2020
Let α = log10 2 and consider the interval (x, y) = (log10 2019, log10 2020)
gm
Kronecker’s theorem then gives the required answer.

11. Stirling numbers:


ri@

a) (‘First kind’): s(n, k) = the number of permutations of n symbols which are products of k
disjoint cycles.

s(n + 1, k) = n s(n, k) + s(n, k − 1), 0 ≤ k ≤ n ; s(0, 0) = 1; s(n, 0) = s(0, n) = 0.


b) (‘Second kind’): S(n, k) = the number of partitions of n into k parts.
ha

S(n + 1, k) = k S(n, k) + S(n, k − 1), 0 ≤ k ≤ n ; S(0, 0) = 1; S(n, 0) = S(0, n) = 0;

S(n, 1) = S(n, n) = 1.
sic

[Hint: Let [n] = {1, 2, . . . , n}. Let f : [n] → [k] be a surjection.


Then f is either one-one or many-one; hence f −1 (i) 6= f −1 ( j), for i 6= j.
ra

{ f −1 (i), 1 ≤ i ≤ k} are distinct subsets of [n]. Hence { f −1 (1), f −1 (2), . . . , f −1 (k)} are non-
empty sets and form a partition of {1, 2, . . . , n}.
na

Conversely, for every partition of [n] into k non-empty sets, we get k! onto mappings of [n]
onto [k], (because we have k! permutations of the k subsets of each such partition).
Hence the number of surjections of [n] onto [k] is given by k! S(n, k) where S(n, k), is the
number of partitions of [n] into k non-empty subsets.

S(1, 1) = 1; S(n, 1) = 1. The recurrence relation is given by

S(n + 1, k) = k S(n, k) + S(n, k − 1)


Proof: Consider a partition of {1, 2, . . . , n + 1} into k non-empty sets.
We have two disjoint cases.
Case 1: If the singleton set {n + 1} is not one of these subsets, there is a partition of {1, 2, . . . , n}
into k non-empty sets and n + 1 must be included in one of these subsets, which can be done in
narasichari@gmail.com
11

k ways. This gives k S(n, k) partitions.


Case 2: If the singleton set {n + 1} is one of these k subsets, then there is a partition of
{1, 2, . . . , n} into k − 1 non-empty sets. This gives S(n, k − 1) partitons.
Adding cases 1) and 2), we get the recurrence relation S(n + 1, k) = k S(n, k) + S(n, k − 1)

om
Table 1: Stirling numbers of the second kind, S(n, k)
k 1 2 3 4 5 6 7
n

l.c
1 1
2 1 1
3 1 3 1
4 1 7 6 1

ai
5 1 15 25 10 1
6 1 31 90 65 15 1
gm
7 1 63 301 350 140 21 1

k  
1 k− j k n
ri@

S(n, k) = ∑ (−1) j
k! j=0 j

c) Let A = [n] = {1, 2, . . . , n} and B = [m] = {1, 2, . . . , m}.


Find the number of one-one mappings, (i.e., injections) from A to B.
ha

Hint: For an injective mapping, the images of any two distinct elements of A must be distinct
 n < m. The number of ways of selecting n objects out of the m elements
elements of B. Hence
m
sic

of B is given by ; after making such a selection, the n possible images can be permuted
n
in n! ways to give
 all
 possible one-one mappings from A to B. Hence the number of injective
m
mappings is n! .
n
ra

d) The number of partitions of n into k parts is given by


na

n
H(0) = 1; H(n) = ∑ k! S(n, k)
0
e) The total number p(n), of partitions of n is given by
n  
n
p(n + 1) = ∑ p(r); p(0) = 1
0 r

12. a) Find the number of points {(x, y, z) : 1 ≤ x, y, z ≤ (n + 1)} , such that max{x, y} < z.
k  
k k n+1
b) Show that 1 + . . . + n = ∑ S(k, i). . i!
1 i+1

13. Catalan numbers, (Belgian, 1838), (Antu Ming, Chinese, 1730), (Euler, 1756) : Show that the
number of increasing lattice paths from (0, 0) to (n, n) not going above the diagonal is given by
narasichari@gmail.com
12

 
1 2n
Cn =
n+1 n

14. IMO (1972): From any ten distinct two-digit numbers, one can always select two disjoint non-
empty subsets such that their elements have the same sum.

om
15. a) There are 2n points on a circle. Find the number of non-intersecting chords which can be
formed by joining all pairs of the given points.
b) Find the number of ways of triangulating a convex n− sided polygon.
c) Find the number of derangements Dn , of {1, 2, . . . , n}, i.e., permutations which do not fix

l.c
any element.

ai
16. In a convex 2n−sided polygon, there is always a diagonal which is not parallel to any side.
gm
17. From any given set of 52 natural numbers, we can always select two numbers such that either
their sum or difference is a multiple of 100.

18. There are ten line segments whose lengths are positive integers which lie strictly between 1 cm
ri@

and 55 cm. Show that, from among these ten lines, three segments can be chosen which form
the sides of a triangle.

19. Show that the product of the differences between all possible pairs of four distinct integers is
ha

always divisible by 12.

20. All the points in a plane are coloured either red or blue.
sic

Show that there exists a monochromatic rectangle (i.e., with all vertices of the same colour).

21. The vertices of a regular 7−sided polygon (‘heptagon’) are coloured with 2 colours.
ra

Show that there are three vertices of one colour which form an isosceles triangle.
na

narasichari@gmail.com
13

22. a) Find the number of 5−digit numbers containing only the digits 0, 1 and 2 such that each
digit occurs at least once.
Hint: The first digit cannot be zero; hence the total number of integers containing the 3 digits
0, 1, 2 is 2(34 ).
There are 24 numbers containing only {1, 0} ; similarly for {0, 2} ; 25 numbers for {1, 2};
remove the common elements (1, 1, 1, 1, 1) and (2, 2, 2, 2, 2).

om
Hence 2(34 ) − (24 + 24 + 25 − 2) = 100.

b) Find the number of n−digit numbers containing only the digits 0, 1 and 2 such that each digit
occurs at least once.

l.c
[Ans: 2 3n − 1 − 2n + 1 + 2]


c) Find the number of n−digit numbers containing only the digits 1, 2 and 3; how many of these

ai
numbers contain each digit at least once?
gm
23. a) Show that the number ways of seating n persons in n places at a round table is (n − 1)!
b) Find the number of possible pairings in the first round of a chess tournament having 2n par-
ticipants.
Hint: Fix one player. His opponent can be chosen in 2n − 1 ways. Then repeat the process.
ri@

(2n)!
f (n) = (2n − 1). f (n − 1) ⇒ f (n) =
2n n!
c) i) Find the number of ways of seating 8 men and 4 women in a straight line such that the no
two women are seated together.
ha

ii) Do part i) for seating arrangements at a round table.


d) Find the number of ways of selecting a cricket team of 6 batsmen, 4 bowlers and 1 wicket-
keeper from an available group of 9 batsmen, 6 bowlers and 2 wicket-keepers.
sic

e) Find the number of positive integers having digits from the set {0, 1, 2, 3, 4, 5} which are
divisible by 3.
ra

f)
 Show that
 the number of binary words of length n containing m blocks of 01 is equal to
n+1
.
2m + 1
na

 
n n(n − 3)
24. a) The number of diagonals in a convex n−sided polygon is equal to −n=
2 2
b) If no three diagonals of a convex n−sided polygon intersect at a point,
  showthat
 the number
n n
of parts into which the polygon is divided by the diagonals is equal to + −n+1
4 2
c) If no three diagonals of a convex n−sided polygon intersect at a point and all the diagonals
are drawn, show
  that thenumber oftriangles
  into which the polygon is divided by the diagonals
n n n n
is equal to +5 +4 +
6 5 4 3

Hint: Method 1: To draw a diagonal


  in a polygon we must select 2 points out of the n given
n
vertices. This can be done in ways.
2
narasichari@gmail.com
14

But if 2 vertices are adjacent then we do not get a diagonal but a side. Hence we subtract the n
sides.
n2 − 3n n(n − 3)
 
n n(n − 1)
No. of diagonals = −n = −n = =
2 2 2 2

Method 2: Let d(n) = the number of diagonals of an n−sided convex polygon.

om
If n = 4, a quadrilateral has d(4) = 2 diagonals.
To count the diagonals of an (n+1)−sided polygon, A1 A2 . . . An+1 first we have d(n) diagonals
for the n−gon A1 A2 . . . An .
Now we add the vertex An+1 . This adds the diagonal A1 An (which was a side earlier); fur-

l.c
ther, diagonals are obtained by joining An+1 to all vertices except A1 , An and An+1 ; i.e.,
A2 , A3 , . . . , An−1 . This adds 1 + (n − 2) = n − 1 diagonals.
The recurrence relation is d(n + 1) = d(n) + (n − 1), n ≥ 5; with d(4) = 2.

ai
n = 4 ⇒ d(5) = d(4) + 4 = 2 + 3
n = 5 ⇒ d(6) = d(5) + 5 = 2 + 3 + 4, etc
gm
d(n) = 2 + 3 + · · · + (n − 2) = [1 + 2 + · · · + (n − 2)] − 1 =
(n − 2)(n − 1)
−1 =
n(n − 3)
2 2
ri@
ha
sic
ra
na

narasichari@gmail.com
15

25. IMO (1981): For 1 ≤ r ≤ n , consider all subsets of size r in {1, . . . , n}. Let F(n, r) be the
n+1
arithmetic mean of the minimum of these subsets. Prove that F(n, r) =
r+1

26. IMO (1989): We call a permutation (x1 , . . . , x2n ) of {1, 2, . . . , 2n} ‘pleasant’ if |xi − x j | = n,
for at least one i ∈ {1, . . . , 2n − 1}.

om
Prove that more than half of all permutations are pleasant for each positive integer n.

27. Given a positive integer n, show that there exists a Fibonacci number having 0 . . . 0 as its last n
digits.

l.c
28. Suppose a is a natural number which is not a multiple of 10. Given a natural number n, show
that there exists a power of a which ends with 00 . . . 01 as its last n digits.

ai
29. a) Let S = {1, 2, . . . , 9}. Each element of S is assigned one of 2 colours, either red or blue. Show
gm
that there exists three integers of the same colour which form an arithmetic progression. (van
der Waerden’s theorem).
b) Construct a colouring of T = {1, 2, . . . , 8}, with two colours such that there is no monochro-
matic arithmetic progression of length 3.
ri@

30. a) If n + 1 numbers are selected at random from {1, 2, . . . , 2n} , show that one of these must be
divisible by another.
b) Given a sequence of n integers {a1 , . . . , an }, show that there exists a subsequence of elements
whose sum is divisible by n.
ha

c) If n does not divide any of the numbers {a, a + d, . . . , a + (n − 1)d}, show that gcd(a, n) = 1.

31. a) INMO (2017): Let ABCDE be a convex pentagon in which ∠A = ∠B = ∠C = ∠D = 120◦


and whose side lengths are 5 consecutive integers in some order. Find all possible values of
sic

AB + BC + CD
b) 28 objects are placed along a circle at equal distances. In how many ways can 3 objects be
selected so that no two are adjacent or diametrically opposite to each other?
ra

32. a) Erdös, Szekeres, Hungary, (1935): Given the set S = {1, 2, . . . , 101}, show that we can re-
move a suitable subset of 90 numbers so that the remaining set is either monotonic increasing or
na

monotonic decreasing.
b) Any set of 5 distinct points in general position in the plane (i.e., no three points are collinear)
has a subset of 4 points which form a convex quadrilateral.
[Hint: Consider any 3 points; if one of the 2 remaining points is outside the triangle, we are
done; otherwise, any 2 vertices of the triangle with these 2 points form a convex quadrilateral].

33. Dutch test (2011): In a tournament there are 6 teams, each playing against every other team
exactly once. A winner gets 3 points and a loser gets 0 points. A draw implies 1 point to each
team. Can the final scores of the 6 teams be 6 consecutive integers?

narasichari@gmail.com
16

34. (RMO, 2014): a) For any natural number n, let S(n) denote the sum of the digits of n. Find the
number of all 3−digit numbers n, such that S(S(n)) = 2.
[Hint: S(S(n)) = 2 ⇔ S(n) = 2, 11, 20. Use inclusion-exclusion or direct counting: a + b + c =
2 ⇒ {abc} = 101; 110; 200; total 3;
a + b + c = 11 ⇒ {abc} = 911 (and its permutations) gives 3; {920}, 4; {821}, 6; {830}, 4;
{740}, 4; {731}, 6;{722}, 3;{641}, 6;{632}, 6;{650}, 4; {542}, 6;{533}, 3; {551}, 3;
{443}, 3; total 61;

om
a + b + c = 20 ⇒ {abc} = 992 gives 3; {983}, 6;{920}, 4;{974}, 6;{920}, 4;{965}, 6;{884}, 3;
{875}, 6;{866}, 3;{776}, 3; total 36; grand total 3 + 61 + 36 = 100.
b) For any natural number n, let S(n) denote the sum of the digits of n. Find the number of all
3−digit numbers n, such that S(S(n)) = 1. [Ans: 55].

l.c
ai
gm
ri@
ha
sic
ra
na

narasichari@gmail.com
17
35. Conductor formula
Frobenius coin problem, (German, 1870): Find the largest monetary amount which cannot be
obtained using only coins of two (or finitely many) specified co-prime denominations.
Example: Using 5-paise coins and 7-paise coins, we can see by trial and error that we cannot
obtain 23 paise as a non-negative linear combination of 5 and 7.
But the five consecutive integers 24 = (7)(2) + (5)(2); 25 = (5)(5); 26 = 5 + (7)(3);

27 = (5)(4) + 7, ; all greater integers are also (obviously) linear combinations of 5 and 7.

om
(5 − 1)(7 − 1) = 24 is called the conductor of the semi-group generated by 5 and 7.
Sylvester’s conductor formula, (British, 1882):

l.c
If m > 1, n > 1 are two positive integers such that gcd (m, n) = 1, the largest positive integer
which cannot be written as an integer linear combination of m and n is given by (m − 1)(n −
1) − 1 = mn − m − n.

ai
Hint: Let c ≥ (m − 1)(n − 1). Consider the residue classes modulo n of the set of integers

{c, c − m, c − 2m, . . . , c − (n − 1)m}. We claim that these numbers are distinct mod n.
gm
[Proof: Suppose c − i1 m ≡ c − i2 m ⇒ i1 m ≡ i2 m; but gcd(m, n) = 1 ⇒ m−1 exists (mod n);
we can cancel m on both sides to get i1 ≡ i2 (mod n), i.e., i1 − i2 is a multiple of n. (eq 1)
ri@

But 0 ≤ i1 ≤ n − 1 and 0 ≤ i2 ≤ n − 1 ⇒ |i1 − i2 | ≤ n − 1 (eq 2)


eq (1) and eq (2) give i1 − i2 = 0, i.e., i1 = i2 .]
Hence there is a unique value of i such that c − im = 0 (mod n), 0 ≤ i ≤ n − 1 ⇒ −i ≥ 1 − n
Hence c − im = jn and c − im ≥ (m − 1)(n − 1) − im ≥ (m − 1)(n − 1) + (1 − n)m = 1 − n
ha

⇒ jn ≥ 1 − n ⇒ j ≥ 0 (otherwise j ≤ −1 ⇒ jn ≤ −n < 1 − n
This shows that all integers which are greater than or equal to (m − 1)(n − 1) can be written as
sic

a non-negative linear combination of m and n.


Further mn − m − n cannot be written as a non-negative linear combination of m and n.
Proof: mn − m − n = am + bn ⇒ m(n − a − 1) = n(b + 1) ; but gcd(m, n) = 1
ra

⇒ m divides b + 1 ⇒ b + 1 = km, k ≥ 1
na

⇒ m(n − a − 1) = nkm ⇒ −a − 1 = nk − n = n(k − 1) ≥ 0, contradiction.

Let S = {am + bn : a, b are non-negative integers}. This is the ‘numerical semi-group generated
by m and n’.
Then (m − 1)(n − 1) − 1 = mn − m − n is the largest integer which is not in S, called the Frobe-
nius number F(S) of S.
The number C(S) := F(S) + 1 = (m − 1)(n − 1) is called the conductor of S.
There is no known formula for the conductor of the semi-group generated by three or more
elements.

narasichari@gmail.com
18

36. (INMO 2019) A1 B1C1 D1 E1 F1 is a regular pentagon. For 2 ≤ n ≤ 11, let An BnCn Dn En Fn be
the pentagon whose vertices are the mid-points of the sides of An−1 Bn−1Cn−1 Dn−1 En−1 Fn−1 .
All the five vertices of each of the eleven pentagons are arbitrarily coloured red or blue. Prove
that there are four points among the 55 vertices having the same colour and forming a cyclic
quarilateral.
Ans: Let P1 = A1 B1C1 D1 E1 F1 ; let Pi be the mid-point pentagon of Pi−1 , for 2 ≤ i ≤ 11.

om
Each of these is regular, hence cyclic, all with the same circumcentre O.
360
Each exterior angle is = 72◦ ; each interior angle is 180 − 72 = 108◦
5
Consider the first regular pentagon labelled ABCDEF (locally, for convenience).

l.c
∆ ABC ⇒ ∠ ABC = 108◦ ; BA = BC ⇒ ∠ BAC = ∠ BCA = 36◦
The interior angle ∠CDE = ∠ BCD = 108◦ ; ∠ ACD = ∠ BCD − ∠ BCA = 108 − 36 = 72◦

ai
⇒ ∠ ACD + ∠CDE = 180◦ ⇒ AC k ED, (but they are not equal; AC > ED)
The five sides and five diagonals of a regular pentagon ABCDEF are pairwise parallel; note that
gm
AB k EC; BC k AD; CD k BE; DE k CA; EA k DB
Hence these 10 lines are in (only) 5 distinct directions.
The vertices of the regular pentagon P1 can be taken as 1, ω, ω 2 , ω 3 , ω 4 ,
ri@

The contraction factor needed to pass from Pi to Pi−1 can also be calculated.
2πi
where ω = e 5 = 2 sin 72◦
π 
Each side of P1 is equal to AB = |1 − ω| = 2 sin
5

ha

Each diagonal of P1 is equal to BE = AB2 + AE 2 − 2 AB. AE cos 108 = 2 AB sin 54◦


Each side of P2 (which is parallel to and half of one diagonal of P1 ) is equal to AB sin 54◦ ;
Each side of Pi is equal to AB sini−1 54◦ , for 2 ≤ i ≤ 11
sic

Consider the similarly oriented six pentagons P1 , P3 , P5 , P7 , P9 , P11


By the pigeon-hole principle, out of the (total) 30 vertices of these 6 pentagons, atleast 15 ver-
ra

tices must have the same colour (out of the two given colours).
Case 1: If one (of the original) pentagons, Pi 1 ≤ i ≤ 11, contains atleast 4 vertices of a single
na

colour, then Pi itself is a monochromatic cyclic quadrilateral.


Case 2: Hence we may assume that each Pi has {3R and 2B} or {3B and 2R} vertices. Consider
Pi , for i = 1, 3, 5, 7, 9, 11, all of which have the same orientation.
At least 2 of these pentagons must (each) have a triangle of the same common colour.
These two triangles T1 and T2 have a total of 6 sides. But there are only 5 possible directions
(i.e., orientations), for all the sides and diagonals in the figure.
Hence there exists a side of T1 which is parallel to a side of T2 . These 4 vertices form an isosce-
les trapezium, which is thus a cyclic quadrilateral.
Method 2: Consider any pentagon. Its five vertices have two colours. By the pigeon-hole princi-
ple, among the five sides of the pentagon, there must exist one side such that both the end-points
of this side are of the same colour. This happens in each of the 11 given pentagons. As in the first
narasichari@gmail.com
19

method there areonly 5 possible orientations for these 11 sides. By the pigeon-hole principle
11
there must exist = 3 sides which are parallel. Out of these sides which are coloured with
5
2 colours there must be at least 2 sides which are of the same colour. These 2 sides are opposite
sides of an isosceles trapezium, which is hence a cyclic quadrilateral.

37. (INMO, 2019) Let M and n be natural numbers such that M > nn−1 . Prove that there are n

om
distinct primes p1 , p2 , . . . , pn such that p j divides M + j, for 1 ≤ j ≤ n.
Remarks: The original famous version of this problem is still an open problem called
Grimm’s conjecture, (Amer. Math. Monthly, 1969).

l.c
Statement: For any k consecutive positive integers m + 1, m + 2, . . . , m + k, there exist distinct
primes p1 , p2 , . . . , pk such that pi divides m + i for 1 ≤ i ≤ k.
Another version of this problem appeared in the Russian Tuymaada International Olympiad,

ai
2004:
Let M and n be natural numbers such that M > nn−1 . Consider n consecutive composite num-
gm
bers, M + 1, M + 2, . . . , M + n. Prove that there are n distinct primes p1 , p2 , . . . , pn such that
pi divides M + i, for 1 ≤ i ≤ n.
Ans: For any natural number n with prime factorisation n = pe11 pe22 · · · pekk ,
ri@

let f (n) = max {pi : pi |n}


Case 1) Suppose f (m + 1), f (m + 2), . . . , f (m + n) are all distinct primes. Then we have found
n distinct primes dividing m + i, for 1 ≤ i ≤ n
Case 2) Suppose i 6= j, f (m + i) = pa and f (m + j) = pb , for a common prime p.
ha

Suppose, without loss of generality, a ≥ b. Then

pb divides |(m + j) − (m + i)| = | j − i| ≤ n − 1 ⇒ pb ≤ n − 1 (1)


sic

If either m + i or m + j has at least n prime divisors then replace pi or p j (respectively),


for this number by some prime not in the set {p1 , p2 , . . . , pn }. This gives the required set of n
distinct primes.
ra

On the other hand, suppose both m + i and m + j have at most n − 1 prime divisors.
e
m + i = pe11 pe22 · · · pi−1
i−1 a
p ;
na

We have pi < p for 1 ≤ i ≤ n − 1 ⇒ m + i < (pa )n−1


n−1
Similarly, m + j < pb
n−1
Hence pb > m + j > m > nn−1 ⇒ pb > n, (given) (2)
Eq (2) contradicts eq (1). Hence this case cannot occur. This completes the proof.

38. a) Let S = {0, 1, 2, . . . 9}. A non-empty subset of S is called 3 − good if the sum of the ele-
ments in the subset is a multiple of 3. Find the number of 3 − good subsets of S.
b) If k is a positive integer and n is a positive multiple of k, find the number of non-empty
subsets of {1, 2, . . . , n} with each subset-sum divisible by k.
narasichari@gmail.com
20

Part a) : There are four singleton 3 − good sets, i.e., A = {{0}, {3}, {6}, {9}} ; hence there are
24 − 1 = 15 non-empty good subsets of A. (1)
We list the five doubleton good sets not containing any of these elements in A i.e.,

(1, 2), (1, 5), (1, 8), (2, 4), (2, 7), (4, 5), (4, 8), (5, 7), (7, 8) (2)
There are two 3-element good sets disjoint from A, (1, 4, 7), (2, 5, 8) (3)

om
There are nine such 4-element good sets, i.e., (1, 2, 4, 5), (1, 2, 4, 8),

(1, 2, 5, 7), (1, 2, 7, 8), (1, 5, 4, 8), (1, 5, 7, 8), (2, 4, 5, 7), (2, 4, 7, 8), (4, 5, 7, 8) (4)

l.c
There are no such 5-element good subsets.

There is one such 6-element good set, i.e., (1, 2, 4, 5, 7, 8) (5)

ai
Adding (2), (3), (4), (5) we get 21 sets. (6)
Taking the union of each of these 21 subsets with one of the 24 = 16 subsets of A we get
gm
16 × 21 = 336 good subsets.
Further, there are 15 non-empty good subsets of A.
We get the final answer: there are 336 + 15 = 351 good subsets in S.
ri@

Method 2): Generating functions. Let S = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} and

S1 = {1, 2, 3, 4, 5, 6, 7, 8, 9}
 45
Define f (x) = (1 + x) 1 + x2 . . . 1 + x9 = ∑ ai xi

(1)
ha

i=0

x3 + . . . + a x45 x4 + . . . + a 43 + a2 x2 + a5 x5 + . . . + a44 x44


  
= a0 + a3 45 + a1 x + a4 43 x
sic

Let A0 = a0 + a3 + . . . + a45 ; A1 = a1 + a4 + . . . + a44 ; A2 = a2 + a5 + . . . + a43


To find A0 = the number of subsets of S1 , including the empty set, such that the sum of the
elements of each subset is divisible of 3. (2)
ra

Put x = 1 ⇒ A0 + A1 + A2 = 29 = 512 (3)


Put x = ω where ω is the complex cube-root of unity.
na

Then 1 + ω + ω 2 = 0; hence ω 3 = 1; (1 + ω) 1 + ω 2 = 1 + ω + ω 2 + ω 3 = 1

3
Hence A0 + ωA1 + ωA2 = (1 + ω) 1 + ω 2 1 + ω 4 = (1)(2)3 = 8
 
(4)
Put x = ω 2
3  3
A0 + ω 2 A1 + ω 4 A2 = (1 + ω 2 ) 1 + ω 4 1 + ω 6 = 1 + ω 2 (1 + ω)(1 + 1) = 8
  
(5)
Adding equations (3), (4) and (5) we get

3 A0 + A1 1 + ω + ω 2 + A2 1 + ω + ω 2 = 512 + 8 + 8 = 528
 

Hence A0 = 176

narasichari@gmail.com
21

This is the number of subsets (including the empty set) of S1 = {1, 2, 3, 4, 5, 6, 7, 8, 9} such
that the sum of the elements in each subset is divisible by 3.
Including 0 in each of these subsets we get

2 × 176 = 352 subsets; then removing the empty set we get 351 as the required answer.

b) The same method can be used with the cube root of unity replaced by the kth root of unity. If

om
n is divisible by k, the number of subsets of {1, 2, . . . , n} whose subset-sum is a multiple of k
is given by
2n + (k − 1) 2n/k
−1
k

l.c
39. Let n ≥ 4. Show that every subset of n elements from {1, 2, . . . , 2n − 1} contains a non-empty
set whose subset-sum of elements is a multiple of 2n.

ai

Hint: Go mod 2n. Let A ⊆ {±1, ±2, . . . , ±(n − 1), n}, with A = n
Changing all signs if necessary, assume without loss of generality that n − 1 ∈ A
gm
If 1 ∈ A then 1 + (n − 1) = 0 ∈ A and we are done.

Assume A ⊆ {−1, ±2, . . . , (n − 1), n}, with A = n
ri@

If −(n − 2) ∈ A then −1 − (n − 2) + (n − 1) = 0 and we are done. Proceeding this way we get


two cases.

n = 2m −1 is odd, and A ⊆ {−1, −2, . . . , −(m −1), ±m, m +1, m +2, . . . , n = 2m −1},
Case 1:
with A = n
ha

If m ∈ A we get −1 + (−m + 1) + m = 0; if −m ∈ A then −1 + (−m) + (m + 1) = 0 and we


are done.

Case 2: If n = 2m is even, then A ⊆ {−1, −2, . . . , −m, m + 1, m + 2, . . . , 2m}, with A = n
sic

We get −1 + (−m) + (m + 1) = 0 and we are done.

40. n3 transparent cubes with each side 1 unit are glued together to form a bigger cube which is
ra

painted red on the outside. How many cubes are visible with
a) no face painted?
na

b) 1 face painted?
c) 2 faces painted?
d) 3 faces painted?
Hint: a) These are the faces lying completely inside the big cube; i.e., remove the unit cubes
along the boundary; i.e., (n − 2)3
b) Visible cubes with one painted outer face correspond to the (n − 2)2 squares lying completely
inside each of the 6 faces of the big cube, i.e., 6(n − 2)2
c) Cubes with two painted faces correspond to the n − 2 non-corner vertices on each edge of the
big cube; there are 12 edges; hence there are 12(n − 2) such faces.

narasichari@gmail.com
22

d) Cubes with three painted faces are those which lie at a vertex of the big cube; there are 8
vertices; hence there are 8 such faces.
Verify that the total number of cubes is (n − 2)3 + 6(n − 2)2 + 12(n − 2) + 8 = (n − 2 + 2)3 = n3

41. Find the number of six-digit numbers such that the sum of the digits leaves remainder 2 when
divided by 4.

om
1) 224998 2) 224999 3) 225000 4) 225002

Ans: 1)

l.c
Method 1) Inclusion-exclusion with the binomial/multinomial coefficient:

ai
To solve a1 + a2 + . . . + a6 = 2, 6, 10, . . . , 54; 1 ≤ a1 ≤ 9 and 0 ≤ ai ≤ 9, for 2 ≤ i ≤ 6
Let a1 − 1 = a01 . Then we must solve ∑ ai = k, with k ∈ {1, 5, 9, . . . , 53}, with 0 ≤ ai ≤ 9
gm n
The number of integer solutions of the equation ∑ xi = M, with 0 ≤ xi ≤ c, is given by the
0
inclusion-exclusion principle:
n   
i n M + n − 1 − i(c + 1)
ri@

∑ (−1) i n−1
0

(with the convention that nr = 0, when n < 0).



(1)
Equivalently, we need the sum of the coefficients of x, x5 , x9 , . . . , x53 in
ha

6
1 − x10

6
1 + x + x2 + . . . + x9 =
1−x
     
6 10 58
sic

But the student must avoid the mistake of taking just + + ...+ , because this
5 5 5
is over-counting.
Use eq. (1) with c = 9, n = 6; M = 1, 5, . . . , 53. This is a tedious calculation.
ra

Method 2) Recurrence relation: Let k be 0 or 1 or 2 or 3.


na

Let S1k = {n : 1 ≤ n ≤ 9}, such that the digital sum of n is k mod 4.


Let S2k = {n : 10 ≤ n ≤ 99}, such that the digital sum of n is k mod 4.
Let S3k = {n : 100 ≤ n ≤ 999}, such that the digital sum of n is k mod 4, and so on.
Let aik be the number of elements in Sik , for i ≥ 1
Let T1k = {n : 0 ≤ n ≤ 9}, such that the digital sum of n is k mod 4,
Let T2k = {n : 0 ≤ n ≤ 99}, such that the digital sum of n is k mod 4, and so on.
Let bik be the number of elements in Tik , for i ≥ 1
We have S10 = {4, 8}; hence a10 = 2 ; S11 = {1, 5, 9}; hence b10 = 3
Similarly, we get a11 = 3; b11 = 3; a12 = 2; b12 = 2; a13 = 2; b13 = 2
narasichari@gmail.com
23

a20 = number of 2−digit numbers whose digital sum is 0 mod 4


Now, 0 = 0 + 0 = 1 + 3 = 2 + 2 = 3 + 1 mod 4.

a20 = a10 b10 + a11 b13 + a12 b12 + a13 b11 = (2)(3) + (3)(2) + (2)(2) + (2)(3) = 22
Similarly, 1 = 0 + 1 = 1 + 0 = 2 + 3 = 3 + 2 mod 4

om
a21 = a10 b11 + a11 b10 + a12 b13 + a13 b12 = (2)(3) + (3)(3) + (2)(2) + (2)(2) = 23
Similarly, 2 = 0 + 2 = 1 + 1 = 2 + 0 = 3 + 3 mod 4

a22 = a10 b12 + a11 b11 + a12 b10 + a13 b13 = 23

l.c
Similarly, 3 = 0 + 3 = 1 + 2 = 2 + 1 = 3 + 0 mod 4

a23 = a10 b13 + a11 b12 + a12 b11 + a13 b10 = 22

ai
In general, an+1, 0 = 3 an, 0 + 2 an, 1 + 2 an, 2 + 3 an, 3 ; bn+1, 0 = an+1, 0 + b1, 0 (1)

an+1, 1 = 3 an, 0 + 3 an, 1 + 2 an, 2 + 2 an, 3 ; bn+1, 1 = an+1, 1 + b1, 1


gm
an+1, 2 = 2 an, 0 + 3 an, 1 + 3 an, 2 + 2 an, 3 ; bn+1, 2 = an+1, 2 + b1, 2

an+1, 3 = 2 an, 0 + 2 an, 1 + 3 an, 2 + 3 an, 3 ; bn+1, 3 = an+1, 3 + b1, 3


ri@

We have the table:

k a1k b1k a2k b2k a3k b3k


0 2 3 22 25 224 249
1 3 3 23 26 225 251
ha

2 2 2 23 25 226 251
3 2 2 22 24 225 249
sic

A six-digit number whose digital sum is 2 mod 4 can be split into two parts.
The first 3 digits and the last 3 digits, with 2 = 0 + 2 = 1 + 1 = 2 + 0 = 3 + 3 mod 4. Hence
Hence a62 = a30 b32 + a31 b31 + a32 b30 + a33 b33
ra

We get a62 = (224)(251) + (225)(251) + (226)(249) + (225)(249)


na

= (251)(449) + (249)(451) = (250 + 1)(450 − 1) + (250 − 1)(450 + 1)

= (250)(450) − 2

= 224998

Method 3) Matrix form: Equation (1) is equivalent to


    
an+1, 0 3 2 2 3 an, 0
an+1, 1  3 3 2 2
 an, 1 
 
an+1, 2  = 2
  
3 3 2 an, 2 
 
an+1, 3 2 2 3 3 an, 3

i.e., An+1 = B An ; repeat this process.


narasichari@gmail.com
24

An+1 = (B) (B) (An−1 ) = . . . = Bn A1 , where


   
2 3 2 2 3
3
3 3 2 2
5

A1 = 
2 Hence A6 = B A1 , where B = 2
  is a circulant matrix.
3 3 2
2 2 2 3 3

om
Its eigenvalues are {0, 10, 1 ± i}.
The corresponding eigenvector matrix has columns corresponding to the powers of the roots of
unity.
v1 = (1, i2 , i4 , i6 ) or v1 = (1, −1, 1, −1)0 ; v2 = (1, i0 , i0 , i0 ) = (1, 1, 1, 1)0 ,

l.c
v3 = (1, i, i2 , i3 )0 = (i, −1, −i, 1)0 ; v4 = (1, i3 , i6 , i9 ) or v4 = (1, −i, −1, i).
The powers of B can be found using diagonalisation. We can confirm our previous calculations.

ai
   
249 249 251 251 24998 25002 25002 24998

B3 = 
251 249
 251 251
249
249
251

249

; B5 = 
gm
24998 24998 25002
25002 24998 24998
25002
25002

249 251 251 249 25002 25002 24998 24998


    
24998 25002 25002 24998 2 225002
ri@

24998 24998 25002 25002  3 = 224998


   
B5 A1 = 
25002 24998 24998 25002 2   224998
25002 25002 24998 24998 2 225002

The number of 6−digit numbers whose digital sum is 1 (and 2) mod 4 is 224998.
ha

The number of 6−digit numbers whose digital sum is 0 (and 3) mod 4 is 225002.
sic

42) Let p be the probability that the sequence {T, H, H, T } occurs when a pair of coins is tossed
10 times. Then (1024) p is equal to

1) 448 2) 237 3) 392 4) 393


ra

Ans: 4)
na

When ten coins are tossed, the starting T of the sequence T HHT can occur at 1, 2, . . . , 7
and the remaining 6 entries can be either H or T . Total = 7(64) = 448 ways.
But this is over-counting. First remove one overlap, i.e., T HHT HHT..., .T HHT.., ..T HHT HHT.
and ...T HHT HHT . This gives 4(23 ) = 32 ways.
Next remove two non-overlapping occurences of T HHT , i.e., 24 ways, namely,

T HHT.T HHT. ; .T HHT.T HHT ; T HHT T HHT.. ; .T HHT T HHT. ; ..T HHT T HHT ;

T HHT..T HHT
This gives 6(22 ) = 24 ways.

narasichari@gmail.com
25

Finally we have one common occurence of three overlapping T HHT ’s, i.e., T HHT HHT HHT
By the inclusion-exclusion priniciple, we get 448 − 24 − 32 + 1 = 393 ways.

43) Using all the odd digits from 0 to 9, the number of six digit numbers which can be formed such
that only odd digits appear at each place is . . .

om
1) 900 2) 1200 3) 1800 4) 2400

Ans: 3)

l.c
5
Hint: There are 5 odd digits; one must be repeated. This can be selected in 1 =5 ways.

6! (1)(2)(3)(4)(5)(6)
Then the digits can be arranged, (like 1, 1, 3, 5, 7, 9) in = = 360 ways.
2! 2

ai
Total (5)(360) = 1800 ways.
gm
44) Let Tn be the total number of triangles formed by the vertices and all the points of intersection
of the diagonals inside a regular n−sided polygon. Then T5 − T4 = . . .

1) 35 2) 26 3) 22 4) 6
ri@

Ans: 1)
         
4 4 5 5 5
Hint: T4 = +4 = 8; T5 = +4 +5 = 35
3 4 3 4 5
ha

T5 − T4 = 35 − 8 = 27
The general formula is difficult to derive. See ‘Steven Sommars and Tim Sommars, J. Integer
Sequences, Vol. 1 (1998). The sequence for
sic

n = {3, 4, 5, 6, 7, 8, 9, 10} is Tn = {1, 8, 35, 110, 287, 632, 1302, 2400}.


ra

45) Find the number of triangles with integer sides and a given perimeter n.
 2
n
Ans: Tn = , if n is even, where {x} denotes the integer closest to x;
na

48
(n + 3)2
 
Tn = , if n is odd.
48

Proof: Let 0 < a ≤ b ≤ c with a + b + c = n and a + b > c. Let Tn be the number of solutions
for n ≥ 0. Then we get Tn = {0, 0, 0, 1, 0, 1, 2, 1, 1, 3, 2, 4, . . .}. This is called Alcuin’s sequence
in the online encyclopedia of integer sequences, ‘OEIS’.

Steps: 1 a) The number of positive integer solutions of the equation a + b = n with a ≥ b > 0 is
given by

jnk 2n + (−1)n − 1
= . This sequence is {an }n≥0 = {0, 0, 1, 1, 2, 2, 3, 3, . . .}
2 4
narasichari@gmail.com
26

n n−1
The general term is , if n is even and it is equal to , if n is odd. This follows from the fact
2 2
n
that b ≤ a ≤ n and a + b = n ⇒ b ≤ ; for each value of b there is a unique value of a = n − b.
2

b) To find thejnumber of positive integer solutions of the equation a + b = n with a > b > 0,
nk
note that b ≤ − 1.
2

om
n−1 n
Also, the condition a > b > 0 gives 1 ≤ b ≤ , if n is odd and 1 ≤ b ≤ − 1, if n is even.
2 2
Hence the required number of solutions is given by

l.c
2n − (−1)n − 3
   
n+1 n−1
−1 = = .
2 2 4

ai
This sequence is {bn }n≥1 = {0, 0, 1, 1, 2, 2, 3, 3, . . .}
gm
c) The recurrence relation: Let Tn be the number of non-congruent triangles with perimeter n.
Then

Tn = Tn−3 , if n is even, and


ri@

n−1
n + (−1) 2
Tn = Tn−3 + , if n is odd.
4

Proof: If (a, b, c) with a ≥ b ≥ c, a + b > c is a triangle with integer sides then


ha

(a − 1, b − 1, c − 1) is also an integer-sided triangle, unless a + b = c + 1 and


n−1 n+1
sic

a + b + c = n ⇒ 2c + 1 = n; hence n is odd; c = ; a+b = ; by 1 b) above, we get


2 2
n+1
n−1
 
n+1
2 + (−1) 2 − 1
2 n + (−1) 2
ra

=
4 4

d) The generating function. Note that 3 = 1 + 1 + 1; 5 = 2 + 2 + 1; 6 = 2 + 2 + 2;


na

7 = 3 + 2 + 2 = 3 + 3 + 1; 8 = 3 + 3 + 2; 9 = 3 + 3 + 3 = 4 + 4 + 1 = 4 + 3 + 2;
10 = 4 + 4 + 2 = 4 + 3 + 3; 11 = 5 + 3 + 3 = 5 + 4 + 2 = 4 + 4 + 3 = 5 + 5 + 1 etc.
Let T (x) = Σn≥0 Tn xn be the generating function of the sequence Tn .

T (x) = x3 + x5 + x6 + 2x7 + x8 + 3x9 + 2x10 + 4x11 + . . .

⇒ x3 T (x) = x6 + x8 + x9 + . . .

⇒ (1 − x3 )T (x) = x3 + x5 + 2x7 + 2x9 + 3x11 + 3x13 + . . .

= x3 (1 + x2 )(1 + 2x4 + 3x8 + . . .)


x3 (1 + x2 ) x3
Hence (1 − x3 ).T (x) = =
(1 − x4 )2 (1 − x2 )(1 − x4 )
narasichari@gmail.com
27

x3
This gives T (x) =
(1 − x2 )(1 − x3 )(1 − x4 )

References: Ross Honsberger, Mathematical Gems III; George Andrews, American Mathemat-
ical Monthly, 86, (1979), page 477; Nicholas Krier, Bennet Manvel, Mathematics Magazine,
Vol. 71, No.4, (Oct 1998), pp 291-295

om
46) a) Find the number of positive (and also distinct positive) integer solutions of the equation
2a + b = n.

2n − (−1)n − 3
 
n−1
Ans: i) For positive solutions, f (7) = 3; f (8) = 3; f (n) = = .

l.c
2 4
ii) For distinct positive solutions, a = b ⇔ 3a = n;
 
n−1
f (n) = , if n is not a multiple of 3; otherwise

ai
2
 
n−1
f (n) =
2
− 1, if n is a multiple of 3
gm
b) Find the number of scalene triangles with perimeter equal to 99 units.

(n + 3)2
 
ri@

Ans: Tn = , since n is odd; hence T99 = {216.75} = 217.


48
To subtract the contribution of the isosceles (whch includes equilateral) triangles from Tn ,

2a + c = 99, 2a > c; 99 < 4a ⇒ a must belong to the set {25, 26, . . . , 49} . Hence there are
217 − 25 = 192 scalene triangles with perimeter 99.
ha

c) Find the number of pairwise non-congruent integer-sided triangles with a given longest side c.
sic

(c − 1)2
 
Ans: The required number is .
24
Ref: Tom Jenkyns and Eric Muller, American Mathematical Monthly, Vol. 107, No. 7, (Aug.-
Sept. 2000), pp 634-639.
ra

47) Consider a 20-sided convex polygon K with vertices A1 , A2 , . . . , A20 labelled in order in the
na

anticlockwise direction. Find the number of ways of choosing 3 sides of K such that every pair
among them has at least two sides of K between them.
(For example, A1 A2 , A4 A5 , A11 A12 is an admissible triple but A1 A2 , A4 A5 , A19 A20 is not admis-
sible).
Ans: Method 1: There are 20 choices for the first side. If we select and fix a side, say A1 A2 ,
then we cannot select 4 sides on either side of A1 A2 as the second side.
If A5 A6 is the second side, we get 12 choices, A8 A9 , A9 A10 , . . . , A18 A19 , for the third side, since
we cannot select 4 more sides on either side of the second side as the third side.
If A6 A7 is the second side, we get 11 choices for the third side.
If A7 A8 is the second side, we get 10 choices for the third side, and so on.
narasichari@gmail.com
28

If A15 A16 is the second side, we get 1 choice, A18 A19 , for the third side.
12 × 13
Hence there are 1 + 2 + . . . + 12 = = 78 choices for each first side.
2
This gives 20 × 78 possibilities; but (a, b, c ) and (b, c, a ) and (c, a, b) give the same selection,
cyclically.
20 × 78
Hence there are a total of = 520 possible polygons.

om
3

Method 2: We can select a side in 20 ways. Select and fix a first side. Let a = the number of
vertices between the first and the second side; b =the number of vertices between the second
and the third side; c =the number of vertices between the first and the third side. Then 2 ver-

l.c
tices must be selected for each side. Hence a + b + c = 20 − 6 = 14. Further, the given condition
specifies that there must be at least 1 vertex between any two vertices. Hence a ≥ 1; b ≥ 1; c ≥ 1.

ai
Let a − 1 = x; b − 1 = y; c − 1 = z. Then x + y + z = 11.

The number of non-negative solutions of this equation is (11+3−1)C = 13C = 78.


11 2
gm
As in the previous method, the final answer is 520.

n(n − 7)(n − 8)
In general, for an n-sided polygon, the answer is .
6
ri@

48) a) Find the number of squares of all possible sizes on a chessboard.


b) Find the number of rectangles of all possible sizes on a chessboard.
c) How many ways are there to place 8 rooks on a chessboard so that no two rooks attack each
ha

other?

Hint: a) There are 64 1 × 1 squares; the base and height of a 2 × 2 square must be one of the 7
sic

pairs (1, 2), (2, 3), . . . , (7, 8) ; there are 49 2 × 2 squares;


for a 3 × 3 square, the base and height must be one of the triples 1, 2, 3), (2, 3, 4), . . . , (6, 7, 8) ,
so there are 36 3 × 3 squares, and so on.
ra

The total number of squares is 12 + 22 + . . . + 82 = 204 .


na

b) To draw a rectangle we must select 2 out of the 9 vertical lines as the left and right sides;
similarly, we must select 2 out of the 9 horizontal lines as the top and bottom sides;
hence there are 9C2 ×9C2 = 362 = 1296 rectangles.

c) First, place one rook in any of the 64 squares; then remove the row and column of this rook;
the second rook can be placed in 49 ways, and so on.
The total number of ways is given by

(82 )(72 )(62 )(52 )(42 )(32 )(22 )(12 ) = (8!)2 = (40320)2 .

narasichari@gmail.com
29

n
  n
j
49) Show that ∑ ∑ = 2n+1 − 1
i=0 j=i i
n 
Hint: ∑ iCi +i+1 Ci + . . . +n Ci

i=0

= 0C0 +1 C0 +2 C0 + . . . +n C0
+1 C1 +2 C1 + . . . +n C1

om
+2 C2 + . . . +n C2
...
+n Cn

l.c
= 1 + (1C0 +1 C1 ) + (2C0 +2 C1 +2 C2 ) + (3C0 +3 C1 +3 C2 +3 C3 ) + · · · + (nC0 +n C1 + . . . +n Cn )
= 1 + 21 + 22 + . . . + 2n = 2n+1 − 1

ai
50) Let S be a finite set containing n elements, i.e., |S| = n. Evaluate
gm
a) ∑ |A| ; b) ∑ |A ∪ B|
A⊆S A,B⊆S

Hnt: a) One method is to start with


ri@

(1 + x)n = 1 +n C1 x +n C2 x2 + . . . +n Cn xn ; differentiate and put x = 1;


n  
n
we get ∑ i = n 2n−1 ;
i=0  i
n
ha

there are subsets of S containing i elements; hence this is the required sum.
i
   
n n−1
Or, use k =n and then sum over k = 0 to n − 1.
k k−1
sic

1
Or, pair each set with its complement and get n(2n ).
2
Or, consider the number of ways of forming a committee of any size along with a president from
ra

a group of n persons. Either we can select the committee of k persons and then select one of
these as the president or we can first select a president and then select any subset of the remaining
n − 1 persons for the committee.
na

b) Fix x ∈ A ∪ B ; there are 3 possibilities for x: x ∈ A ∩ B or x ∈ A \ B or x ∈ B \ A ;


each of the remaining n − 1 elements y ∈ S has 4 choices: y ∈
/ A ∪ B or y ∈ A ∩ B or y ∈ A \ B
or y ∈ B \ A ; hence

∑ |A ∪ B| = ∑ ∑ 1
A,B⊆S x∈S x∈A∪B

= ∑ 3(4n−1) = 3(4n−1) |S| = 3n (4n−1)


x∈S

51) Let S = {1, 2, . . . , n}; π : S → S is any permutation of S . Evaluate


n
1
A= ∑ ∑ |k − π(k)|
n! π∈S
narasichari@gmail.com n k=1
30

Hint: Change the order of summation; for each k and j , between 1 and n , π(k) = j , for
(n − 1)! permutations of Sn , since the remaining n − 1 elements in the domain (except k ) can
be mapped onto any one of the remaining n − 1 elements except j in the range. Hence
1 n n
A= ∑ ∑ (n − 1)! |k − j|
n! k=1 j=1

Either k < j or k > j ( the terms are equal in these two cases), or k = j, in which case the terms

om
are zero; hence
2 n k 2 n n
 
2 k(k + 1) 1 2 
A = ∑ ∑ (k − j) = ∑ k − = ∑ k −k
n k=1 j=1 n k=1 2 k=1 n

n2 − 1
 
1 n(n + 1)(2n + 1) n(n + 1)

l.c
= − =
n 6 2 3
M+r m      
m r k m+r m
52) Show that ∑ ∑ = 2

ai
k=r j=0 j k− j r r
m     
m r m+r
Hint: By the Vandermonde identity, ∑
j=0 j
gm
k− j
=
k
,

i.e., the total number of ways of selecting k things out of m + r objects is the same as splitting
the m + r objects into two boxes of m and r objects and selecting j things from m objects
and k − j things from r objects, over all possible values of j .
ri@

m+r   
m+r k
Hence we can simplify the left side to get ∑ ; the absorption property gives
      k=r k r
n m n n−k
= ,
m k k m−k
ha

(i.e., selecting an m-member committee from n persons and then a sub-committee of k persons,
is equivalent to first selecting the k-man sub-committe from n persons and then m − k persons
from the remaining n − k persons);
sic

m+r 
m + r m+r
     
m+r k m
hence we get ∑
k r
=
r ∑ k − r ; change k − r to k ; we get
k=r k=r
m     
m+r m m+r m
∑ r = 2
ra

k=0 k r

53) Find the number of regions in the plane formed by m circles and n straight lines in general
na

position.
(i.e., Assume no two lines are parallel, no three lines are concurrent, any two circles intersect in
two distinct points and every straight line intersects every circle in two distinct points).

Hint: Let Ci , 1 ≤ i ≤ m denote the circles and Li , 1 ≤ i ≤ n denote the straight lines.
We will use Euler’s formula V − E + F = 2 for the ‘Euler characteristic’ of a polyhedron.
This becomes V − E + F = 1 where V is the number of vertices, E is the number of edges and
F is the number of regions inside a bounded, connected planar graph.
If the graph is not connected and has c ≥ 2 connected components, the number of bounded
regions F inside the graph is calculated using V − E + F = c

narasichari@gmail.com
31

 
m
Case 1: Suppose there are no straight lines and m circles. Then there are 2 points of
  2
m
intersection of Ci and C j , for i 6= j , each of degree 4 ; hence V = 2 .
  2  
m m
We know that 2E = ∑ deg Vi = 8 ; hence the number of edges is E = 4 .
2 2
Euler’s formula gives the required number of regions (including the unbounded region outside

om
all the circles)  
m
F = E −V + 2 = 2 + 2 = m(m − 1) + 2 = m2 − m + 2
2
Case 2: Suppose there are n ≥ 1 lines and m circles in general position. Take a big circle C of
large enough radius to properly contain all the given m circles and all the points of intersection

l.c
of the lines. We wish to count the total number of regions inside C .

Here we have four types of vertices.

ai
 
n
There are points of intersection of Li and L j , for i 6= j , each of degree 4;
2 gm
 
m
there are 2 points of intersection of Ci and C j , for i 6= j , each of degree 4;
2
there are 2mn points of intersection of Li and C j , each of degree 4;
ri@

there are 2n points of intersection of Li and C , for 1 ≤ i ≤ n , each of degree 3.


   
n m
The total number of vertices is V = +2 + 2mn + 2n;
 2  2
n 2m
We know that 2E = ∑ deg Vi = 4 +4 + 4(2mn) + 3(2n);
2 2
ha

   
n m
hence the number of edges is E = 2 +4 + 4mn + 3n.
2 2
sic

Euler’s formula gives the required number of regions


   
n m
F = E −V + 1 = +2 + 2mn + n + 1
2 2
If the lines or circles are not in general position, this number will decrease.
ra

If
 m  = 0 , there are n straight lines in general position in the plane; the number of regions is
n 1
na

+ n + 1 = n2 + n + 2

2 2
If m = 1 , there
  are n straight lines and one circle in general position in the plane; the number
n 1
of regions is + 3n + 1 = (n2 + 5n + 2)
2 2
 
n
54) Find the sum of the binomial coeffficients where 0 ≤ k ≤ n and k is a multiple of 3.
k
Hint: To evaluate
n
 

3 n n  
n
∑ 3k ; use (1 + x) = ∑ k xk ;
n
k=0 k=0

put x = 1, ω, ω 2 and add;


narasichari@gmail.com
32

n
 

3  n  2n + (1 + ω)n + 1 + ω 2 n

∑ 3k = 3
k=0

but 1 + ω + ω 2 = 0; hence
n
 

om
3  n  2n + (−ω)n + −ω 2 n

∑ 3k = 3
k=0
 n  n
2n + −e2πi/3 + −e4πi/3
=

l.c
 3 
n n 2nπ 2nπ 4nπ 4nπ
2 + (−1) cos + i sin + cos + i sin
3 3 3 3
=

ai
 3    
n n 2nπ 2nπ 2nπ 2nπ
2 + (−1) cos + i sin + cos 2nπ − + i sin 2nπ −
3 3 3 3
=
gm 3
2nπ
2n + 2 (−1)n cos
= 3
3
ri@

55) a) (RMO 2013): Find the number of non-empty subsets of {0, 1, . . . , 9} having the property that
the sum of their elements is divisible by 3
b) Generalise a): Find the number of non-empty subsets of {0, 1, . . . , n} having the property that
the sum of their elements is divisible by k
ha

Hint: a) Let S = {1, 2, . . . 9}; f (x) = Πi∈S 1 + xi = ∑45 i



i=0 ai x

The required number is equal to a0 + a3 + . . . + a45 ; apply a cube-root of unity filter, i.e., define
sic

A0 = a0 + a3 + a6 + . . . + a45 ;

A1 = a1 + a4 + a7 + . . . + a43 ; A2 = a2 + a5 + a8 + . . . + a44 .
ra

Let ω = the complex cube root of unity; ω 3 = 1; 1 + ω + ω 2 = 0


na

x3 + 1 = (x + 1)(x + ω)(x + ω 2 ); (1 + ω)(1 + ω 2 ) = 1; then

f (1) = A0 + A1 + A2 = 29 ; f (ω) = A0 + A1 ω + A2 ω 2 = 23 ; f (ω 2 ) = A0 + A1 ω 2 + A2 ω 4 = 23 ;
but ω 4 = ω; hence

3A0 = 29 + 23 + 23 = 528; A0 = 176.


This is the number of subsets of S = {1, 2, . . . , 9}, including φ , such that the sum of the elements
in each set is a multiple of 3. To include 0, we double this number; this gives 352; to get the
number of non-empty sets, we subtract 1 to get 351 as the required answer.

b) Given S = {1, 2, . . . , n}; to find the number of subsets of S such that the sum of the elements
in each subset is divisible by k. Following the procedure above, we get

narasichari@gmail.com
33

$ %
2n + (k − 1)2n/k − 1
the required number is equal to
k

56) Sum-free sets, Schur’s theorem, 1917.


(IMO 1978) An international society has members from 6 countries. The list of members has
1978 names, numbered 1, 2, . . . 1978. Prove that there is at least one member whose number is

om
the sum of the numbers of two members of his own country or twice as large as the number of
some member of his own country.
Hint: Let S be a set of positive integers. Define S + S = {x + y : x, y ∈ S}

S is called ‘sum-free’ if S ∩ (S + S) = 0/

l.c
Schur’s theorem states: The set of natural numbers cannot be partitioned into finitely many
sum-free sets. In fact,

ai
If {S1 , S2 , . . . Sk } is a partition of {1, 2, . . . n} and n ≥ b k! ec then there exists some Si which
is not sum-free. gm
Note that 6! e ≈ 1957.16. In the given problem, 1978 can be replaced by 1957. Assume that
there exists a partition {1, 2, . . . , 1957} = A ∪ B ∪C ∪ D ∪ E ∪ F into 6 disjoint sets. (1)
1957
Among these subsets, there exists one, say A, which contains at least , elements, i.e.,
6
ri@

A = {a1 < a2 < . . . < a327 }, which is sum-free.


The differences {a327 − ai : 1 ≤ i ≤ 326} cannot belong to A; otherwise,

a j = a327 − ai ⇒ ai + a j = a327 for i 6= j, or, if i = j, we get 2 ai = a327 , contradiction.


ha

326
Hence one of the sets B, C, D, E, F, say B, contains at least elements, i.e.,
5
B = {b1 < b2 < . . . < b66 }, which is sum-free.
sic

Consider the 65 differences {b66 − bi : 1 ≤ i ≤ 65} and repeat the argument. These cannot
belong to A or B.
65
Successively, we get, |C| ≥ ⇒ |C| ≥ 17
ra

4
16
|D| ≥ ⇒ |D| ≥ 5
3
na

5
|E| ≥ ⇒ |E| ≥ 3
2
2
|F| ≥ ⇒ |F| ≥ 2, F = { f1 < f2 }
1
Now f2 − f1 cannot belong to any of the 6 sets A, B, C, D, E, F, contradicting eq (1).
This completes the solution.

narasichari@gmail.com

You might also like