Вы находитесь на странице: 1из 437

Algebra

A1. Determine all functions f : R R such that the equality


f prxsy q  f pxqrf py qs.

holds for all x, y

(1)

P R. Here, by rxs we denote the greatest integer not exceeding x.

Answer. f pxq  const  C, where C

(France)

 0 or 1 C 2.

Solution 1. First, setting x  0 in (1) we get

f p0q  f p0qrf py qs

(2)

for all y P R. Now, two cases are possible.


Case 1. Assume that f p0q  0. Then from (2) we conclude that rf py qs  1 for all
y P R. Therefore, equation (1) becomes f prxsy q  f pxq, and substituting y  0 we have
f pxq  f p0q  C  0. Finally, from rf py qs  1  rC s we obtain that 1 C 2.
Case 2. Now we have f p0q  0. Here we consider two subcases.
Subcase 2a. Suppose that there exists 0 1 such that f pq  0. Then setting x 
in (1) we obtain 0  f p0q  f pqrf py qs for all y P R. Hence, rf py qs  0 for all y P R. Finally,
substituting x  1 in (1) provides f py q  0 for all y P R, thus contradicting the condition
f pq  0.
Subcase 2b. Conversely, we have f pq  0 for all 0 1. Consider any real z; there
z
exists an integer N such that 
P r0, 1q (one may set N  rzs 1 if z 0 and N  rzs 1
N
otherwise). Now, from (1) we get f pz q  f prN sq  f pN qrf pqs  0 for all z P R.
Finally, a straightforward check shows that all the obtained functions satisfy (1).
Solution 2. Assume that rf py qs  0 for some y; then the substitution x  1 provides
f py q  f p1qrf py qs  0. Hence, if rf py qs  0 for all y, then f py q  0 for all y. This function
obviously satisfies the problem conditions.
So we are left to consider the case when rf paqs  0 for some a. Then we have
f prxsaq  f pxqrf paqs,

or f pxq 

f prxsaq
rf paqs .

(3)

This means that f px1 q  f px2 q whenever rx1 s  rx2 s, hence f pxq  f prxsq, and we may assume
that a is an integer.
Now we have



f paq  f 2a  12  f p2aq f 12  f p2aqrf p0qs;

this implies rf p0qs  0, so we may even assume that a  0. Therefore equation (3) provides
f pxq 

f p0q
rf p0qs

C0

for each x. Now, condition (1) becomes equivalent to the equation C


exactly when rC s  1.

 C rC s which holds

A2. Let the real numbers a, b, c, d satisfy the relations a b c d  6 and a2 b2 c2 d2  12.

Prove that

36 4pa3

b3

d3 q  pa4

c3

b4

d4 q 48.

c4

(Ukraine)
Solution 1. Observe that
4pa3

b3

c3

d3 q  pa4

c4 d4 q   pa  1q4 pb  1q4 pc  1q4


6pa2 b2 c2 d2 q  4pa b c dq 4

b4

pd  1q4

  pa  1q4 pb  1q4 pc  1q4 pd  1q4 52.


Now, introducing x  a  1, y  b  1, z  c  1, t  d  1, we need to prove the inequalities
16 x4 y 4 z 4 t4 4,
under the constraint
x2

y2

z2

t2

 pa2

b2

d 2 q  2 pa

c2

dq

44

(1)

(we will not use the value of x y z t though it can be found).


Now the rightmost inequality in (1) follows from the power mean inequality:
4

p
x2

y2

t2 q2

z2
4

 4.

For the other one, expanding the brackets we note that

px2

y2

z2

t2 q2

 px4

y4

t4 q

z4

q,

where q is a nonnegative number, so


x4

y4

z4

t4

px2

y2

t2 q2

z2

 16,

and we are done.


Comment 1. The estimates are sharp; the lower and upper bounds are attained at p3, 1, 1, 1q and
p0, 2, 2, 2q, respectively.
Comment 2. After the change of variables, one can finish the solution in several different ways.
The latter estimate, for instance, it can be performed by moving the variables since we need only
the second of the two shifted conditions.

Solution 2. First, we claim that 0 a, b, c, d 3. Actually, we have


a

c  6  d,

a2

b2

c2

 12  d2,

hence the power mean inequality


a2
rewrites as

12  d2

b2

p6 3 dq

c2
2

pa

b
3

cq2

2dpd  3q 0,

9
which implies the desired inequalities for d; since the conditions are symmetric, we also have
the same estimate for the other variables.
Now, to prove the rightmost inequality, we use the obvious inequality x2 px  2q2 0 for
each real x; this inequality rewrites as 4x3  x4 4x2 . It follows that

p4a3  a4 q p4b3  b4 q p4c3  c4q p4d3  d4q 4pa2

b2

d2 q  48,

c2

as desired.
Now we prove the leftmost inequality in an analogous way. For each x P r0, 3s, we have
px 1qpx  1q2px  3q 0 which is equivalent to 4x3  x4 2x2 4x  3. This implies that

p4a3  a4 q p4b3  b4 q p4c3  c4 q p4d3  d4q 2pa2

b2

c2

d2 q

4 pa

dq 12

 36,

as desired.
Comment. It is easy to guess the extremal points p0, 2, 2, 2q and p3, 1, 1, 1q for this inequality. This
provides a method of finding the polynomials used in Solution 2. Namely, these polynomials should
have the form x4  4x3 ax2 bx c; moreover, the former polynomial should have roots at 2 (with
an even multiplicity) and 0, while the latter should have roots at 1 (with an even multiplicity) and 3.
These conditions determine the polynomials uniquely.

Solution 3. First, expanding 48  4pa2


we have
a4

b4

c4

d4

48  pa4

b2

c2

d2 q and applying the AMGM inequality,

pb4 4b2 q pc4 4c2q pd4 4d2 q


?
?
?
?
2 a4  4a2 b4  4b2 c4  4c2 d4  4d2
 4p|a3| |b3| |c3| |d3|q 4pa3 b3 c3 d3q,


4a2 q

which establishes the rightmost inequality.


To prove the leftmost inequality, we first show that a, b, c, d P r0, 3s as in the previous
solution. Moreover, we can assume that 0 a b c d. Then we have a b b c
2
pb c dq 23  6  4.
3
Next, we show that 4b  b2 4c  c2 . Actually, this inequality rewrites as pc  bqpb c  4q 0,
which follows from the previous estimate. The inequality 4a  a2 4b  b2 can be proved
analogously.
Further, the inequalities a b c together with 4a  a2 4b  b2 4c  c2 allow us to
apply the Chebyshev inequality obtaining

1
a2 p4a  a2 q b2 p4b  b2 q c2 p4c  c2 q pa2 b2 c2 q 4pa b cq  pa2 b2 c2 q
3
2
2
 p12  d qp4p6 3dq  p12  d qq .
This implies that
2
2
p4a3  a4 q p4b3  b4 q p4c3  c4q p4d3  d4q p12  d qpd3  4d
3
4
 144  48d 16d  4d  36 4 p3  dqpd  1qpd2  3q.

12q

4d3  d4

(2)
3
3
Finally, we have d2 14 pa2 b2 c2 d2 q  3 (which implies d 1); so, the expression
4
p3  dqpd  1qpd2  3q in the right-hand part of (2) is nonnegative, and the desired inequality
3
is proved.
Comment. The rightmost inequality is easier than the leftmost one. In particular, Solutions 2 and 3
show that only the condition a2 b2 c2 d2  12 is needed for the former one.

10

A3. Let x1 , . . . , x100 be nonnegative real numbers such that xi xi 1 xi 2 1 for all
i  1, . . . , 100 (we put x101  x1 , x102  x2 ). Find the maximal possible value of the sum
S

100

xi xi 2 .

i 1

(Russia)
Answer.

25
.
2

2

Solution 1. Let x2i  0, x2i1  12 for all i  1, . . . , 50. Then we have S  50  12 


we are left to show that S 25
for all values of xi s satisfying the problem conditions.
2

Consider any 1 i 50. By the problem condition, we get x2i1


x2i 2 1  x2i  x2i 1 . Hence by the AMGM inequality we get
x2i1 x2i

x2i x2i

p1  x2i  x2i 1 qx2i

x2i p1  x2i  x2i

1  x2i  x2i

25
.
2

So,

and

q
p1  x2i  x2i 1 q
2  1 .
1q
2
4

qp1  x2i  x2i 1 q px2i x2i


Summing up these inequalities for i  1, 2, . . . , 50, we get the desired inequality
 px2i

x2i

50

px2i1 x2i

x2i x2i

i 1

q 50  14  252 .

Comment. This solution shows that a bit more general fact holds. Namely, consider 2n nonnegative
numbers x1 , . . . , x2n in a row (with no cyclic notation) and suppose that xi xi 1 xi 2 1 for all
2n
2

n1
xi xi 2
.
i  1, 2, . . . , 2n  2. Then
4
i1
The proof is the same as above, though if might be easier to find it (for instance, applying
induction). The original estimate can be obtained from this version by considering the sequence
x1 , x2 , . . . , x100 , x1 , x2 .

Solution 2. We present another proof of the estimate. From the problem condition, we get
S

100

xi xi

100

xi p1  xi  xi

i 1

1q 

i 1


By the AMQM inequality, we have
S

100

xi 

i 1

1
200

100

pxi
xi

xi

q 

i 1

1
2

100

i 1

xi

100

100
2

100

pxi

xi 

i 1

2
100

2
100

xi
100

xi

2
100

xi

2

q2.

, so

xi

100
2

i 1

xi xi

i 1

1
pxi
2 i1

 
i1

100

xi

100

x2i 

i 1
100

i 1

And finally, by the AMGM inequality


 

xi 

q2 1001


2
100

i 1
100

100

xi 

i 1

pxi

100

100
4

100

xi

i 1

 252 .

11
Comment. These solutions are not as easy as they may seem at the first sight. There are two
different optimal configurations in which the variables have different values, and not all of sums of
three consecutive numbers equal 1. Although it is easy to find the value 25
2 , the estimates must be
done with care to preserve equality in the optimal configurations.

12

 1 and x2k  xk , x2k1  p1qk


   xn 0 for all n 1.

A4. A sequence x1 , x2 , . . . is defined by x1


k

1. Prove that x1

x2

xk for all
(Austria)

Solution 1. We start with some observations. First, from the definition of xi it follows that
for each positive integer k we have
x4k3
Hence, denoting Sn
S4k

 x2k1  x4k2

 x4k  x2k  xk .

and x4k1

(1)

 ni1 xi , we have

px4k3

x4k2 q

px4k1

x4k q

 p0

2xk q  2Sk ,

i 1

(2)

i 1

 S4k px4k 1 x4k 2 q  S4k .


(3)

Observe also that Sn  ni1 xi  ni1 1  n pmod 2q.


Now we prove by induction on k that Si 0 for all i 4k. The base case is valid since
x1  x3  x4  1, x2  1. For the induction step, assume that Si 0 for all i 4k. Using
S4k

the relations (1)(3), we obtain


S4k

 2Sk 1 0,

S4k

 S4k 0,

S4k

 S4k

x4k

 S4k

S4k

0.

So, we are left to prove that S4k 1 0. If k is odd, then S4k  2Sk 0; since k is odd, Sk
is odd as well, so we have S4k 2 and hence S4k 1  S4k x4k 1 1.
Conversely, if k is even, then we have x4k 1  x2k 1  xk 1 , hence S4k 1  S4k x4k 1 
2Sk xk 1  Sk Sk 1 0. The step is proved.
Solution 2. We will use the notation of Sn and the relations (1)(3) from the previous
solution.
Assume the contrary and consider the minimal n such that Sn 1 0; surely n 1, and
from Sn 0 we get Sn  0, xn 1  1. Hence, we are especially interested in the set
M  tn : Sn  0u; our aim is to prove that xn 1  1 whenever n P M thus coming to a
contradiction.
For this purpose, we first describe the set M inductively. We claim that (i) M consists only
of even numbers, (ii) 2 P M, and (iii) for every even n 4 we have n P M rn{4s P M.
Actually, (i) holds since Sn  n pmod 2q, (ii) is straightforward, while (iii) follows from the
relations S4k 2  S4k  2Sk .
Now, we are left to prove that xn 1  1 if n P M. We use the induction on n. The base
case is n  2, that is, the minimal element of M; here we have x3  1, as desired.
For the induction step, consider some 4 n P M and let m  rn{4s P M; then m is even,
and xm 1  1 by the induction hypothesis. We prove that xn 1  xm 1  1. If n  4m then we
have xn 1  x2m 1  xm 1 since m is even; otherwise, n  4m 2, and xn 1  x2m 2  xm 1 ,
as desired. The proof is complete.
Comment. Using the inductive definition of set M , one can describe it explicitly. Namely, M consists
exactly of all positive integers not containing digits 1 and 3 in their 4-base representation.

13

A5. Denote by Q the set of all positive rational numbers. Determine all functions f : Q

PQ :

f pxq2 y  x3 f pxy q.

which satisfy the following equation for all x, y


f

Q
(1)

(Switzerland)
Answer. The only such function is f pxq 
Solution. By substituting y

1
.
x

 1, we get
f f pxq2

Then, whenever f pxq  f py q, we have


x3

f f pxq2
f pxq

 x3 f pxq.

f f py q2
f py q

(2)

 y3

which implies x  y, so the function f is injective.

Now replace x by xy in (2), and apply (1) twice, second time to y, f pxq2 instead of px, y q:
f f pxy q2

 pxyq3f pxyq  y3f f pxq2y  f f pxq2f pyq2

Since f is injective, we get


f pxy q2  f pxq2 f py q2 ,
f pxy q  f pxqf py q.
Therefore, f is multiplicative. This also implies f p1q  1 and f pxn q  f pxqn for all integers n.
Then the function equation (1) can be re-written as
2

f f pxq f py q  x3 f pxqf py q,


f f pxq

x3 f pxq.

Let g pxq  xf pxq. Then, by (3), we have




g g pxq

(3)

 g xf pxq  xf pxq  f xf pxq  xf pxq2 f f pxq 


a


 xf pxq2 x3 f pxq  xf pxq 5{2  gpxq 5{2,

and, by induction,

g g . . . g pxq . . .

loooomoooon

 gpxq p5{2q

(4)

n 1

for every positive integer n.


p5{2qn
must be
Consider (4) for a fixed x. The left-hand side is always rational, so g pxq
rational for every n. We show that this is possible only if g pxq  1. Suppose that g pxq  1,
and let the prime factorization of g pxq be g pxq  p1 1 . . . pk k where p1 , . . . , pk are distinct primes
and 1 , . . . , k are nonzero integers. Then the unique prime factorization of (4) is


g g . . . g pxq . . .
loooomoooon
n 1

 gpxq

p5{2qn

 p1p5{2q    pkp5{2q
n

14
where the exponents should be integers. But this is not true for large values of n, for example
p 52 qn1 cannot be a integer number when 2n   1. Therefore, gpxq  1 is impossible.
1
Hence, g pxq  1 and thus f pxq  for all x.
x
1
The function f pxq  satisfies the equation (1):
x
f pf pxq2 y q 

1
f pxq2 y

functions, f pxq


1 2
x

x
 xy
 x3 f pxyq.

1
is not the only solution. Another solution is
x
f1 pxq  x3{2 . Using transfinite tools, infinitely many other solutions can be constructed.
Comment. Among R

15

A6. Suppose that f and g are two functions defined on the set of positive integers and taking
positive integer values. Suppose also that the equations f pg pnqq  f pnq 1 and g pf pnqq 
g pnq 1 hold for all positive integers. Prove that f pnq  g pnq for all positive integer n.
(Germany)
Solution 1. Throughout the solution, by N we denote the set of all positive integers. For
h . . . hpxq . . . (in
any function h : N N and for any positive integer k, define hk pxq  h
loooomoooon
particular, h0 pxq  x). 

Observe that f g k pxq  f g k1pxq
1      f pxq k for any positive integer k, and
similarly g f k pxq  g pxq k. Now let a and b are the minimal
 values attained
by f and g,
k
k
respectively; say f pnf q  a, g png q  b. Then we have f g pnf q  a k, g f png q  b k, so
the function f attains all values from the set Nf  ta, a 1, . . . u, while g attains all the values
from the set Ng  tb, b 1, . . . u.


Next, note that f pxq  f py q implies g pxq  g f pxq  1  g f py q  1  g py q; surely, the
converse implication also holds. Now, we say that x and y are similar (and write x  y) if
f pxq  f py q (equivalently, g pxq  g py q). For every x P N, we define rxs  ty P N : x  y u;
surely, y1  y2 for all y1 , y2 P rxs, so rxs  ry s whenever y P rxs.
Now we investigate the structure of the sets rxs.
Claim 1. Suppose that f pxq  f py q; then x  y, that is, f pxq  f py q. Consequently, each
class rxs contains at most one element from Nf , as well as at most one element from Ng .


Proof. If f pxq  f py q, then we have g pxq  g f pxq  1  g f py q  1  g py q, so x  y. The
second statement follows now from the sets of values of f and g.
l
Next, we clarify which classes do not contain large elements.
Claim 2. For any x P N, we have rxs t1, 2, . . . , b  1u if and only if f pxq  a. Analogously,
rxs t1, 2, . . . , a  1u if and only if gpxq  b.
Proof. We will prove that rxs t1, 2, . . . , b  1u f pxq a; the proof of the second
statement is similar.

Note that f pxq a implies that there exists some y satisfying f py q  f pxq 1, so f g py q 
f py q 1  f pxq, and hence x  g py q  b. Conversely, if b c  x then c  g py q for some y P N,
which in turn follows f pxq  f g py q  f py q 1 a 1, and hence f pxq a.
l
Claim 2 implies that there exists exactly one class contained in t1, . . . , a  1u (that is, the
class rng s), as well as exactly one class contained in t1, . . . , b  1u (the class rnf s). Assume for a
moment that a b; then rng s is contained in t1, . . . , b  1u as well, hence it coincides with rng s.
So, we get that
(1)
f pxq  a g pxq  b x  nf  ng .
k

Claim 3. a  b.
Proof. By Claim 2, we have ras  rnf s, so ras should contain some element a1 b by Claim 2
again. If a  a1 , then ras contains two elements a which is impossible by Claim 1. Therefore,
a  a1 b. Similarly, b a.
l
Now we are ready to prove the problem statement. First, we establish the following
Claim 4. For every integer d 0, f d 1 pnf q  g d 1 pnf q  a d.
Proof. Induction on d. For d  0, the statement follows from
 (1) and Claim
 3. Next, for d 1
d 1
d
d
from the induction hypothesis we have f pnf q  f f pnf q  f g pnf q  f pnf q d  a d.
The equality g d 1 pnf q  a d is analogous.
l

16


Finally, for each x P N, we have f pxq  a d for some d 0, so f pxq  f g dpnf q and
hence x  g d pnf q. It follows that g pxq  g g d pnf q  g d 1 pnf q  a d  f pxq by Claim 4.
Solution 2. We start with the same observations, introducing the relation  and proving
Claim 1 from the previous solution.

Note that f paq a since otherwise we have f paq  a and hence g paq  g f paq  g paq 1,
which is false.
Claim 21 . a  b.
Proof. We can assume that a b. Since f paq a  1, there exists some x P N such that
f paq  f pxq 1, which is equivalent to f paq  f g pxq and a  g pxq. Since g pxq b a, by
Claim 1 we have a  g pxq b, which together with a b proves the Claim.
l
Now, almost the same method allows to find the values f paq and g paq.
Claim 31 . f paq  g paq  a 1.
Proof. Assume the contrary; then f paq a 2, hence there exist some x, y P N such that

f pxq  f paq  2 and f py q  g pxq (as g pxq a  b). Now we get f paq  f pxq 2  f g 2pxq ,
so a  g 2pxq a, and by Claim 1 we get a  g 2 pxq  g f py q  1 g py q 1 a; this is
impossible. The equality g paq  a 1 is similar.
Now, we are prepared for the proof of the problem statement. First, we prove it for n a.
Claim 41 . For each integer x a, we have f pxq  g pxq  x 1.
1
Proof. Induction on x. The base case
 x  a is provided by Claim 3 , while the induction
step follows from f px 1q  f g pxq  f pxq 1  px 1q 1 and the similar computation
for g px 1q.
Finally,
for an arbitrary n P N we have g pnq a, so by Claim 41 we have f pnq 1 

f g pnq  g pnq 1, hence f pnq  g pnq.

Comment. It is not hard now to describe all the functions f : N N satisfying the property f pf pnqq 
f pnq 1. For each such function, there exists n0 P N such that f pnq  n 1 for all n n0 , while for
each n n0 , f pnq is an arbitrary number greater than of equal to n0 (these numbers may be different
for different n n0 ).

17

A7. Let a1 , . . . , ar be positive real numbers. For n r, we inductively define

 1max
pak ank q.
k n1
Prove that there exist positive integers r and N such that an  an

(1)

an

a for all n N.
(Iran)

Solution 1. First, from the problem conditions we have that each an (n r) can be expressed
as an  aj1 aj2 with j1 , j2 n, j1 j2  n. If, say, j1 r then we can proceed in the same
way with aj1 , and so on. Finally, we represent an in a form

 ai   
1 ij r, i1   
an

aik ,
ik

(2)
(3)

 n.

Moreover, if ai1 and ai2 are the numbers in (2) obtained on the last step, then i1
Hence we can adjust (3) as
1 ij

r,



i1

ik

 n,

i1

i2

r.

i2

r.
(4)

On the other hand, suppose that the indices i1 , . . . , ik satisfy the conditions (4). Then,
denoting sj  i1    ij , from (1) we have
an

 as as 
k

aik

k 1

as 

k 2

aik1

aik

   ai

Summarizing these observations we get the following


Claim. For every n r, we have
an

 maxtai





aik .

aik : the collection pi1 , . . . , ik q satisfies (4)u.

Now we denote

s  max

ai
1ir i

and fix some index r such that s 

a
.

2
Consider some n r 2r and choose an expansion of an in the form (2), (4). Then we have
n  i1    ik rk, so k n{r r 2. Suppose that none of the numbers i3 , . . . , ik equals .
Then by the pigeonhole principle there is an index 1 j r which appears among i3 , . . . , ik
at least times, and surely j  . Let us delete these occurrences of j from pi1 , . . . , ik q, and
add j occurrences of instead, obtaining a sequence pi1 , i2 , i13 , . . . , i1k1 q also satisfying (4). By
Claim, we have
ai1    aik  an ai1 ai2 ai13    ai1k1 ,
a
aj

or, after removing the coinciding terms, aj ja , so


. By the definition of , this

j
means that aj  ja , hence
an

 ai

ai2

ai13



ai1k1 .

Thus, for every n r 2 2r we have found a representation of the form (2), (4) with ij 
for some j 3. Rearranging the indices we may assume that ik  .
Finally, observe that in this representation, the indices pi1 , . . . , ik1 q satisfy the conditions (4) with n replaced by n  . Thus, from the Claim we get
an
which by (1) implies
an
as desired.

 an

pai



aik1 q

 an,

for each n r 2

2r,

18
Solution 2. As in the previous solution, we involve the expansion (2), (3), and we fix some
index 1 r such that
a
ai

s  max .
1ir i

Now, we introduce the sequence pbn q as bn  an  sn; then b  0.


We prove by induction on n that bn 0, and pbn q satisfies the same recurrence relation
as pan q. The base cases n r follow from the definition of s. Now, for n r from the
induction hypothesis we have
bn

 1max
pak
k n1

ank q  ns  max

pbk

1 k n 1

as required.
Now, if bk  0 for all 1 k
trivial. Otherwise, define
M

bnk

nsq  ns  max

pbk

1 k n 1

bnk q 0,

r, then bn  0 for all n, hence an  sn, and the statement is

 1max
|b |,
ir i

 mint|bi | : 1 i r, bi

0u.

Then for n r we obtain


bn

 1max
pbk
k n1

so

0 bn

bnk q b

bn

 bn,

bn bn2    M.

Thus, in view of the expansion (2), (3) applied to the sequence pbn q, we get that each bn is
contained in a set

ru X rM, 0s
We claim that this set is finite. Actually, for any x P T , let x  bi
   bi (i1, . . . , ik r).
M
M
nonzero terms (otherwise x
Then among bi s there are at most
 pq M). Thus

M
x can be expressed in the same way with k
, and there is only a finite number of such

 tbi

bi2



bik : i1 , . . . , ik

sums.
Finally, for every t  1, 2, . . . , we get that the sequence
br t , br

t , br t 2 , . . .

is non-decreasing and attains the finite number of values; therefore it is constant from some
index. Thus, the sequence pbn q is periodic with period from some index N, which means that
bn

 bn  bn

for all n N

and hence
an
as desired.

 bn

ns  pbn

pn  qsq pb

sq  an

for all n N

19

A8. Given six positive numbers a, b, c, d, e, f such that a b c d e f . Let a c e  S


and b

 T . Prove that
b
2ST 3pS

T q S pbd

df q

bf

T pac

ceq .

ae

(1)
(South Korea)

Solution 1. We define also  ac ce ae,  bd bf df . The idea of the solution is to


interpret (1) as a natural inequality on the roots of an appropriate polynomial.
Actually, consider the polynomial
P pxq  pb

f qpx  aqpx  cqpx  eq pa c eqpx  bqpx  dqpx  f q


 T px3  Sx2 x  aceq S px3  T x2 x  bdf q.

(2)

0. Moreover, we have
P paq  S pa  bqpa  dqpa  f q 0,
P pcq  S pc  bqpc  dqpc  f q 0,
P peq  S pe  bqpe  dqpe  f q 0,
P pf q  T pf  aqpf  cqpf  eq 0.
Hence, each of the intervals pa, cq, pc, eq, pe, f q contains at least one root of P pxq. Since there

Surely, P is cubic with leading coefficient S

are at most three roots at all, we obtain that there is exactly one root in each interval (denote
them by P pa, cq, P pc, eq, P pe, f q). Moreover, the polynomial P can be factorized as
P pxq  pT

S qpx  qpx  qpx  q.

(3)

Equating the coefficients in the two representations (2) and (3) of P pxq provides

 T2T SS ,

 ST

T
.
S

Now, since the numbers , , are distinct, we have


0 p  q2

p  q2 p  q2  2p

q2  6p

q,

which implies
4S 2 T 2
pT S q2

 p

q2

or
4S 2 T 2

3p

3pT

q 

S qpT

3pS
T

T q
,
S

S q,

which is exactly what we need.

Comment 1. In fact, one can locate the roots of P pxq more narrowly: they should lie in the intervals
pa, bq, pc, dq, pe, f q.
Surely, if we change all inequality signs in the problem statement to non-strict ones, the (non-strict)
inequality will also hold by continuity. One can also find when the equality is achieved. This happens
in that case when P pxq is a perfect cube, which immediately implies that b  c  d  ep   q,
together with the additional condition that P 2 pbq  0. Algebraically,
6pT

S qb  4T S

0

3bpa

4b

f q  2pa

4b  aq
 bp2a
b
b

This means that for every pair of numbers a, b such that 0


point pa, b, b, b, b, f q is a point of equality.

2bqp2b

3pb  aq
2a b

fq

b.

a b, there exists f b such that the

20
Solution 2. Let
U
and

 12 pe  aq2 pc  aq2 pe  cq2  S 2  3pac




 12 pf  bq2 pf  dq2 pd  bq2  T 2  3pbd

ae

ceq

bf

df q.

Then

pL.H.S.q2  pR.H.S.q2  p2ST q2  pS T q S  3pbd bf df q


 4S 2T 2  pS T q S pT 2  V q T pS 2  U q  pS T qpSV

T  3pac

ae

T U q  ST pT

ceq

 S q2 ,

and the statement is equivalent with

pS

T qpSV

T U q ST pT

By the Cauchy-Schwarz inequality,

pS

T qpT U

SV q

Estimate the quantities U and


and pd  bq2 being omitted:

T  SV

2

(4)

 ST

2

(5)

V by the QMAM inequality with the positive terms pe  cq2

S  TU

 S q2.

2
2
pf  bq2 pf  dq2
pe  aq 2 pc  aq
2


p
e  aq pc  aq pf  bq pf  dq
d b

 f 

e

c
2

a

 pT  S q

3
3
p
e  dq
pc  bq T  S.
2
2
The estimates (5) and (6) prove (4) and hence the statement.

(6)

Solution 3. We keep using the notations and from Solution 1. Moreover, let s
Note that
pc  bqpc  dq pe  f qpe  dq pe  f qpc  bq 0,

c

e.

since each summand is negative. This rewrites as

pbd

bf

df q  pac

ce

aeq pc eqpb d
 spT  S q.

 a  c  eq,

or
(7)

Then we have
S

 S p  q pS T q  SspT  S q
pS Tqpce asq
2
SspT  S q pS T q s4 pS  sqs  s 2ST  34 pS

Using this inequality together with the AMGM inequality we get


3
pS
4

Hence,
2ST

T qpS

T q

3
pS
4

3
4 pS

3pS

T q S pbd

T qs 2ST
T qs

bf

2ST
2
df q

3
pS
4

 34 pS

T pac

ae

T qs
T qs

 ST.


ceq .

T qs .

21
Comment 2. The expression (7) can be found by considering the sum of the roots of the quadratic
polynomial q pxq  px  bqpx  dqpx  f q  px  aqpx  cqpx  eq.

Solution 4. We introduce the expressions and as in the previous solutions. The idea of
the solution is to change the values of variables a, . . . , f keeping the left-hand side unchanged
and increasing the right-hand side; it will lead to a simpler inequality which can be proved in
a direct way.
Namely, we change the variables (i) keeping the (non-strict) inequalities a b c d
e f ; (ii) keeping the values of sums S and T unchanged; and finally (iii) increasing the
values of and . Then the left-hand side of (1) remains unchanged, while the right-hand
side increases. Hence, the inequality (1) (and even a non-strict version of (1)) for the changed
values would imply the same (strict) inequality for the original values.
First, we find the sufficient conditions for (ii) and (iii) to be satisfied.
Lemma. Let x, y, z 0; denote U px, y, z q  x y z, px, y, z q  xy xz yz. Suppose that
x1 y 1  x y but |x  y | |x1  y 1 |; then we have U px1 , y 1 , z q  U px, y, z q and px1 , y 1 , z q
px, y, z q with equality achieved only when |x  y |  |x1  y 1 |.
Proof. The first equality is obvious. For the second, we have
px1 , y 1 , z q  z px1

y1q

x1 y 1

 zpx1

y1q

px1

zpx yq px
with the equality achieved only for px1  y 1 q2  px  y q2
l

y 1 q2  px1  y 1 q2
4
y q2  px  y q2
 px, y, zq,
4
|x1  y1|  |x  y|, as desired.

Now, we apply Lemma several times making the following changes. For each change, we
denote the new values by the same letters to avoid cumbersome notations.
dc
1. Let k 
. Replace pb, c, d, eq by pb k, c k, d  k, e  k q. After the change we have
2
a b c  d e f , the values of S, T remain unchanged, but , strictly increase by
Lemma.
ed
2. Let 
. Replace pc, d, e, f q by pc , d , e  , f  q. After the change we have
2
a b c  d  e f , the values of S, T remain unchanged, but , strictly increase by the
Lemma.
cb
3. Finally, let m 
. Replace pa, b, c, d, e, f q by pa 2m, b 2m, cm, dm, em, f mq.
3
After the change, we have a b  c  d  e f and S, T are unchanged. To check (iii),
we observe that our change can be considered as a composition of two changes: pa, b, c, dq
pa m, b m, c  m, d  mq and pa, b, e, f q pa m, b m, e  m, f  mq. It is easy to see that
each of these two consecutive changes satisfy the conditions of the Lemma, hence the values
of and increase.
Finally, we come to the situation when a b  c  d  e f , and we need to prove the
inequality
2pa

2bqp2b

fq

3pa

4b

f q pa

3bpa

4b

fq 

f q  3bpa

4b

fq

2bqpb2

pa

2bqpb

2bf q

p2b f qp2ab b2 q

2f q p2b f qp2a bq .

Now, observe that


2  2pa

2bqp2b

pa

2bqpb

2f q

p2a

bqp2b

fq .

(8)

22
Hence p4q rewrites as
3bpa

4b

fq

pb
a

2bqpb

3bpa

4b

2f q

p2a
f q  pa

bqp2b

2bqpb

fq

2f q

p2b

f qp2a

bq ,

which is simply the AMGM inequality.


Comment 3. Here, we also can find all the cases of equality. Actually, it is easy to see that if
some two numbers among b, c, d, e are distinct then one can use Lemma to increase the right-hand side
of (1). Further, if b  c  d  e, then we need equality in p4q; this means that we apply AMGM to
equal numbers, that is,
3bpa

4b

f q  pa

2bqpb

which leads to the same equality as in Comment 1.

2f q

p2a

bqp2b

f q,

Combinatorics
C1. In a concert, 20 singers will perform. For each singer, there is a (possibly empty) set of
other singers such that he wishes to perform later than all the singers from that set. Can it
happen that there are exactly 2010 orders of the singers such that all their wishes are satisfied?
(Austria)
Answer. Yes, such an example exists.
Solution. We say that an order of singers is good if it satisfied all their wishes. Next, we
say that a number N is realizable by k singers (or k-realizable) if for some set of wishes of
these singers there are exactly N good orders. Thus, we have to prove that a number 2010 is
20-realizable.
We start with the following simple
Lemma. Suppose that numbers n1 , n2 are realizable by respectively k1 and k2 singers. Then
the number n1 n2 is pk1 k2 q-realizable.
Proof. Let the singers A1 , . . . , Ak1 (with some wishes among them) realize n1 , and the singers B1 ,
. . . , Bk2 (with some wishes among them) realize n2 . Add to each singer Bi the wish to perform
later than all the singers Aj . Then, each good order of the obtained set of singers has the form
pAi1 , . . . , Aik1 , Bj1 , . . . , Bjk2 q, where pAi1 , . . . , Aik1 q is a good order for Ais and pBj1 , . . . , Bjk2 q
is a good order for Bj s. Conversely, each order of this form is obviously good. Hence, the
number of good orders is n1 n2 .
l
In view of Lemma, we show how to construct sets of singers containing 4, 3 and 13 singers
and realizing the numbers 5, 6 and 67, respectively. Thus the number 2010  6  5  67 will be
realizable by 4 3 13  20 singers. These companies of singers are shown in Figs. 13; the
wishes are denoted by arrows, and the number of good orders for each Figure stands below in
the brackets.
a1
a2
a3
a4
a

a5

a6
y
c

(5)

(3)

Fig. 1

Fig. 2

a7
a8

x
a9

a10
a11
(67)

Fig. 3
For Fig. 1, there are exactly 5 good orders pa, b, c, dq, pa, b, d, cq, pb, a, c, dq, pb, a, d, cq,
pb, d, a, cq. For Fig. 2, each of 6 orders is good since there are no wishes.

24
Finally, for Fig. 3, the order of a1 , . . . , a11 is fixed; in this line, singer x can stand before
each of ai (i 9), and singer y can stand after each of aj (j 5), thus resulting in 9  7  63
cases. Further, the positions of x and y in this line determine the whole order uniquely unless
both of them come between the same pair pai , ai 1 q (thus 5 i 8); in the latter cases, there
are two orders instead of 1 due to the order of x and y. Hence, the total number of good orders
is 63 4  67, as desired.
Comment. The number 20 in the problem statement is not sharp and is put there to respect the
original formulation. So, if necessary, the difficulty level of this problem may be adjusted by replacing 20 by a smaller number. Here we present some improvements of the example leading to a smaller
number of singers.

Surely, each example with 20 singers can be filled with some super-stars who should perform
at the very end in a fixed order. Hence each of these improvements provides a different solution for
the problem. Moreover, the large variety of ideas standing behind these examples allows to suggest
that there are many other examples.

1. Instead of building the examples realizing 5 and 6, it is more economic to make an example
realizing 30; it may seem even simpler. Two possible examples consisting of 5 and 6 singers are shown
in Fig. 4; hence the number 20 can be decreased to 19 or 18.
For Fig. 4a, the order of a1 , . . . , a4 is fixed, there are 5 ways to add x into this order, and there
are 6 ways to add y into the resulting order of a1 , . . . , a4 , x. Hence there are 5  6  30 good orders.

On Fig. 4b, for 5 singers a, b1 , b2 , c1 , c2 there are 5!  120 orders at all. Obviously, exactly one half
of them satisfies the wish b1  b2 , and exactly one half of these orders satisfies another wish c1  c2 ;
hence, there are exactly 5!{4  30 good orders.

a1
x

b2

c1

b1

a2

b4
a

a3

b1

b3

b1

b3

b5

c2

b2

a4

a6

y
x
a8
a9

(30)
(30)

b)

a10

Fig. 4

a6
a7

x
a8
c9

Fig. 5

c10
c11

a11
(2010)

a)

b4

a5

a7
y

b2

(2010)

Fig. 6

2. One can merge the examples for 30 and 67 shown in Figs. 4b and 3 in a smarter way, obtaining
a set of 13 singers representing 2010. This example is shown in Fig. 5; an arrow from/to group
tb1 , . . . , b5 u means that there exists such arrow from each member of this group.
Here, as in Fig. 4b, one can see that there are exactly 30 orders of b1 , . . . , b5 , a6 , . . . , a11 satisfying
all their wishes among themselves. Moreover, one can prove in the same way as for Fig. 3 that each
of these orders can be complemented by x and y in exactly 67 ways, hence obtaining 30  67  2010
good orders at all.
Analogously, one can merge the examples in Figs. 13 to represent 2010 by 13 singers as is shown
in Fig. 6.

25
a1

a5

a2
a3
b1
b4

a4

a4

b2

a2

b6

b3

a1

Fig. 7

b4

a3

b5

(67)

b3
a6

b2
b1
(2010)

Fig. 8

3. Finally, we will present two other improvements; the proofs are left to the reader. The graph in
Fig. 7 shows how 10 singers can represent 67. Moreover, even a company of 10 singers representing 2010
can be found; this company is shown in Fig. 8.

26

4). Each country has a flag N units wide


and one unit high composed of N fields of size 1  1, each field being either yellow or blue. No
two countries have the same flag.
We say that a set of N flags is diverse if these flags can be arranged into an N  N square so
that all N fields on its main diagonal will have the same color. Determine the smallest positive
integer M such that among any M distinct flags, there exist N flags forming a diverse set.
C2. On some planet, there are 2N countries (N

(Croatia)
Answer. M

 2N 2

1.

Solution. When speaking about the diagonal of a square, we will always mean the main
diagonal.
Let MN be the smallest positive integer satisfying the problem condition. First, we show
that MN 2N 2 . Consider the collection of all 2N 2 flags having yellow first squares and blue
second ones. Obviously, both colors appear on the diagonal of each N  N square formed by
these flags.
We are left to show that MN 2N 2 1, thus obtaining the desired answer. We start with
establishing this statement for N  4.
Suppose that we have 5 flags of length 4. We decompose each flag into two parts of 2 squares
each; thereby, we denote each flag as LR, where the 2  1 flags L, R P S  tBB, BY, YB, YYu
are its left and right parts, respectively. First, we make two easy observations on the flags 2  1
which can be checked manually.
(i) For each A P S, there exists only one 2  1 flag C P S (possibly C  A) such that A
and C cannot form a 2  2 square with monochrome diagonal (for part BB, that is YY, and
for BY that is YB).
(ii) Let A1 , A2 , A3 P S be three distinct elements; then two of them can form a 2  2 square
with yellow diagonal, and two of them can form a 2  2 square with blue diagonal (for all parts
but BB, a pair (BY, YB) fits for both statements, while for all parts but BY, these pairs are
(YB, YY) and (BB, YB)).
Now, let and r be the numbers of distinct left and right parts of our 5 flags, respectively.
The total number of flags is 5 r, hence one of the factors (say, r) should be at least 3. On
the other hand, , r 4, so there are two flags with coinciding right part; let them be L1 R1
and L2 R1 (L1  L2 ).
Next, since r 3, there exist some flags L3 R3 and L4 R4 such that R1 , R3 , R4 are distinct.
Let L1 R1 be the remaining flag. By (i), one of the pairs pL1 , L1 q and pL1 , L2 q can form a
2  2 square with monochrome diagonal; we can assume that L1 , L2 form a square with a blue
diagonal. Finally, the right parts of two of the flags L1 R1 , L3 R3 , L4 R4 can also form a 2  2
square with a blue diagonal by (ii). Putting these 2  2 squares on the diagonal of a 4  4
square, we find a desired arrangement of four flags.
We are ready to prove the problem statement by induction on N; actually, above we have
proved the base case N  4. For the induction step, assume that N 4, consider any 2N 2 1
flags of length N, and arrange them into a large flag of size p2N 2 1q  N. This flag contains
a non-monochrome column since the flags are distinct; we may assumeR that this Vcolumn is the
2N 2 1
first one. By the pigeonhole principle, this column contains at least
 2N 3 1
2
squares of one color (say, blue). We call the flags with a blue first square good.
Consider all the good flags and remove the first square from each of them. We obtain at
least 2N 3 1 MN 1 flags of length N  1; by the induction hypothesis, N  1 of them

27
can form a square Q with the monochrome diagonal. Now, returning the removed squares, we
obtain a rectangle pN  1q  N, and our aim is to supplement it on the top by one more flag.
If Q has a yellow diagonal, then we can take each flag with a yellow first square (it exists
by a choice of the first column; moreover, it is not used in Q). Conversely, if the diagonal of Q
is blue then we can take any of the 2N 3 1 pN  1q 0 remaining good flags. So, in both
cases we get a desired N  N square.
Solution 2. We present a different proof of the estimate MN 2N 2 1. We do not use the
induction, involving Halls lemma on matchings instead.
Consider arbitrary 2N 2 1 distinct flags and arrange them into a large p2N 2 1q  N
flag. Construct two bipartite graphs Gy  pV Y V 1 , Ey q and Gb  pV Y V 1 , Eb q with the
common set of vertices as follows. Let V and V 1 be the set of columns and the set of flags
under consideration, respectively. Next, let the edge pc, f q appear in Ey if the intersection of
column c and flag f is yellow, and pc, f q P Eb otherwise. Then we have to prove exactly that
one of the graphs Gy and Gb contains a matching with all the vertices of V involved.
Assume that these matchings do not exist. By Halls lemma, it means that there exist
two sets of columns Sy , Sb V such that |Ey pSy q| |Sy |  1 and |Eb pSb q| |Sb |  1 (in the
left-hand sides, Ey pSy q and Eb pSb q denote respectively the sets of all vertices connected to Sy
and Sb in the corresponding graphs). Our aim is to prove that this is impossible. Note that
Sy , Sb  V since N 2N 2 1.
First, suppose that Sy X Sb  , so there exists some c P Sy X Sb . Note that each
flag is connected to c either in Gy or in Gb , hence Ey pSy q Y Eb pSb q  V 1 . Hence we have
2N 2 1  |V 1 | |Ey pSy q| |Eb pSb q| |Sy | |Sb |  2 2N  4; this is impossible for N 4.
So, we have Sy X Sb  . Let y  |Sy |, b  |Sb |. From the construction of our graph,
we have that all the flags in the set V 2  V 1 z Ey pSy q Y Eb pSb q have blue squares in the
columns of Sy and yellow squares in the columns of Sb . Hence the only undetermined positions
in these flags are the remaining N  y  b ones, so 2N yb |V 2 | |V 1 ||Ey pSy q||EbpSb q|
2N 2 1  py  1q  pb  1q, or, denoting c  y b, 2N c c 2N 2 2. This is impossible
since N c 2.

28

C3. 2500 chess kings have to be placed on a 100  100 chessboard so that

(i) no king can capture any other one (i.e. no two kings are placed in two squares sharing
a common vertex);
(ii) each row and each column contains exactly 25 kings.
Find the number of such arrangements. (Two arrangements differing by rotation or symmetry are supposed to be different.)
(Russia)
Answer. There are two such arrangements.
Solution. Suppose that we have an arrangement satisfying the problem conditions. Divide the
board into 2  2 pieces; we call these pieces blocks. Each block can contain not more than one
king (otherwise these two kings would attack each other); hence, by the pigeonhole principle
each block must contain exactly one king.
Now assign to each block a letter T or B if a king is placed in its top or bottom half,
respectively. Similarly, assign to each block a letter L or R if a king stands in its left or right
half. So we define T-blocks, B-blocks, L-blocks, and R-blocks. We also combine the letters; we call
a block a TL-block if it is simultaneously T-block and L-block. Similarly we define TR-blocks,
BL-blocks, and BR-blocks. The arrangement of blocks determines uniquely the arrangement of
kings; so in the rest of the solution we consider the 50  50 system of blocks (see Fig. 1). We
identify the blocks by their coordinate pairs; the pair pi, j q, where 1 i, j 50, refers to the
jth block in the ith row (or the ith block in the jth column). The upper-left block is p1, 1q.
The system of blocks has the following properties..
(i1 ) If pi, j q is a B-block then pi 1, j q is a B-block: otherwise the kings in these two blocks
can take each other. Similarly: if pi, j q is a T-block then pi  1, j q is a T-block; if pi, j q is an
L-block then pi, j  1q is an L-block; if pi, j q is an R-block then pi, j 1q is an R-block.
(ii1 ) Each column contains exactly 25 L-blocks and 25 R-blocks, and each row contains
exactly 25 T-blocks and 25 B-blocks. In particular, the total number of L-blocks (or R-blocks,
or T-blocks, or B-blocks) is equal to 25  50  1250.
Consider any B-block of the form p1, j q. By (i1 ), all blocks in the jth column are B-blocks;
so we call such a column B-column. By (ii1 ), we have 25 B-blocks in the first row, so we obtain
25 B-columns. These 25 B-columns contain 1250 B-blocks, hence all blocks in the remaining
columns are T-blocks, and we obtain 25 T-columns. Similarly, there are exactly 25 L-rows and
exactly 25 R-rows.
Now consider an arbitrary pair of a T-column and a neighboring B-column (columns with
numbers j and j 1).

k k k
k k k
k k k

TL

BL

TL

TL

BR TR

BL

BL

j+1

i+1

TR
T

Fig. 1

Fig. 2

Case 1. Suppose that the jth column is a T-column, and the pj 1qth column is a Bcolumn. Consider some index i such that the ith row is an L-row; then pi, j 1q is a BL-block.
Therefore, pi 1, j q cannot be a TR-block (see Fig. 2), hence pi 1, j q is a TL-block, thus the

29

pi 1qth row is an L-row. Now, choosing the ith row to be the topmost L-row, we successively
obtain that all rows from the ith to the 50th are L-rows. Since we have exactly 25 L-rows, it
follows that the rows from the 1st to the 25th are R-rows, and the rows from the 26th to the
50th are L-rows.
Now consider the neighboring R-row and L-row (that are the rows with numbers 25 and
26). Replacing in the previous reasoning rows by columns and vice versa, the columns from the
1st to the 25th are T-columns, and the columns from the 26th to the 50th are B-columns. So
we have a unique arrangement of blocks that leads to the arrangement of kings satisfying the
condition of the problem (see Fig. 3).

k k k k
k k k k
k k k k
k k k k

TR TR BR BR
TR TR BR BR
TL

TL

BL

BL

TL

TL

BL

BL

Fig. 3

k k kk kk
k k k k
k k k k
k k
Fig. 4

Case 2. Suppose that the jth column is a B-column, and the pj 1qth column is a T-column.
Repeating the arguments from Case 1, we obtain that the rows from the 1st to the 25th are
L-rows (and all other rows are R-rows), the columns from the 1st to the 25th are B-columns
(and all other columns are T-columns), so we find exactly one more arrangement of kings (see
Fig. 4).

30

C4. Six stacks S1 , . . . , S6 of coins are standing in a row. In the beginning every stack contains
a single coin. There are two types of allowed moves:

Move 1 : If stack Sk with 1 k 5 contains at least one coin, you may remove one coin
from Sk and add two coins to Sk 1 .

Move 2 : If stack Sk with 1 k 4 contains at least one coin, then you may remove
one coin from Sk and exchange stacks Sk 1 and Sk 2 .

Decide whether it is possible to achieve by a sequence of such moves that the first five stacks
2010
are empty, whereas the sixth stack S6 contains exactly 20102010
coins.
2010

C4 . Same as Problem C4, but the constant 20102010

is replaced by 20102010 .
(Netherlands)

Answer. Yes (in both variants of the problem). There exists such a sequence of moves.
Solution. Denote by pa1 , a2 , . . . , an q pa11 , a12 , . . . , a1n q the following: if some consecutive stacks
contain a1 , . . . , an coins, then it is possible to perform several allowed moves such that the stacks
contain a11 , . . . , a1n coins respectively, whereas the contents of the other stacks remain unchanged.
2010
Let A  20102010 or A  20102010 , respectively. Our goal is to show that

p1, 1, 1, 1, 1, 1q p0, 0, 0, 0, 0, Aq.

First we prove two auxiliary observations.


Lemma 1. pa, 0, 0q p0, 2a , 0q for every a 1.
Proof. We prove by induction that pa, 0, 0q pa  k, 2k , 0q for every 1
apply Move 1 to the first stack:

k a.

For k

 1,

pa, 0, 0q pa  1, 2, 0q  pa  1, 21, 0q.


Now assume that k a and the statement holds for some k a. Starting from pa  k, 2k , 0q,

apply Move 1 to the middle stack 2k times, until it becomes empty. Then apply Move 2 to the
first stack:

pa  k, 2k , 0q pa  k, 2k  1, 2q    pa  k, 0, 2k 1q pa  k  1, 2k
Hence,

pa, 0, 0q pa  k, 2k , 0q pa  k  1, 2k

Lemma 2.

For every positive integer n, let Pn

2.

..

, 0q.

, 0q.

lo2omoon (e.g. P3

pa, 0, 0, 0q p0, Pa, 0, 0q for every a 1.

22

16). Then

Proof. Similarly to Lemma 1, we prove that pa, 0, 0, 0q pa  k, Pk , 0, 0q for every 1 k


For k  1, apply Move 1 to the first stack:

a.

pa, 0, 0, 0q pa  1, 2, 0, 0q  pa  1, P1, 0, 0q.


Now assume that the lemma holds for some k a. Starting from pa  k, Pk , 0, 0q, apply

Lemma 1, then apply Move 1 to the first stack:

pa  k, Pk , 0, 0q pa  k, 0, 2P , 0q  pa  k, 0, Pk
k

Therefore,

1, 0

q pa  k  1, Pk

pa, 0, 0, 0q pa  k, Pk , 0, 0q pa  k  1, Pk

1 , 0, 0

q.

1 , 0, 0

q.

31
Now we prove the statement of the problem.
First apply Move 1 to stack 5, then apply Move 2 to stacks S4 , S3 , S2 and S1 in this order.
Then apply Lemma 2 twice:

p1, 1, 1, 1, 1, 1q p1, 1, 1, 1, 0, 3q p1, 1, 1, 0, 3, 0q p1, 1, 0, 3, 0, 0q p1, 0, 3, 0, 0, 0q


p0, 3, 0, 0, 0, 0q p0, 0, P3, 0, 0, 0q  p0, 0, 16, 0, 0, 0q p0, 0, 0, P16, 0, 0q.
We already have more than A coins in stack S4 , since
A 20102010

2010

p211 q2010

2010

 2112010

2010

22010

2011

2p2

11 2011

 22

11 2011

22 P16.
215

To decrease the number of coins in stack S4 , apply Move 2 to this stack repeatedly until its
size decreases to A{4. (In every step, we remove a coin from S4 and exchange the empty stacks
S5 and S6 .)

p0, 0, 0, P16, 0, 0q p0, 0, 0, P16  1, 0, 0q p0, 0, 0, P16  2, 0, 0q


   p0, 0, 0, A{4, 0, 0q.
Finally, apply Move 1 repeatedly to empty stacks S4 and S5 :

p0, 0, 0, A{4, 0, 0q    p0, 0, 0, 0, A{2, 0q    p0, 0, 0, 0, 0, Aq.


Comment 1. Starting with only 4 stack, it is not hard to check manually that we can achieve at
most 28 coins in the last position. However, around 5 and 6 stacks the maximal number of coins
14
explodes. With 5 stacks it is possible to achieve more than 22 coins. With 6 stacks the maximum is
greater than PP 14 .
2

2010

It is not hard to show that the numbers 20102010 and 20102010


by any nonnegative integer up to PP214 .

in the problem can be replaced

Comment 2. The simpler variant C41 of the problem can be solved without Lemma 2:

p1, 1, 1, 1, 1, 1q p0, 3, 1, 1, 1, 1q p0, 1, 5, 1, 1, 1q p0, 1, 1, 9, 1, 1q


p0, 1, 1, 1, 17, 1q p0, 1, 1, 1, 0, 35q p0, 1, 1, 0, 35, 0q p0, 1, 0, 35, 0, 0q
p0, 0, 35, 0, 0, 0q p0, 0, 1, 234 , 0, 0q p0, 0, 1, 0, 22 , 0q p0, 0, 0, 22 , 0, 0q
p0, 0, 0, 22  1, 0, 0q . . . p0, 0, 0, A{4, 0, 0q p0, 0, 0, 0, A{2, 0q p0, 0, 0, 0, 0, Aq.
34

34

34

For this reason, the PSC suggests to consider the problem C4 as well. Problem C4 requires more
invention and technical care. On the other hand, the problem statement in C41 hides the fact that the
resulting amount of coins can be such incredibly huge and leaves this discovery to the students.

32

C5. n 4 players participated in a tennis tournament. Any two players have played exactly
one game, and there was no tie game. We call a company of four players bad if one player
was defeated by the other three players, and each of these three players won a game and lost
another game among themselves. Suppose that there is no bad company in this tournament.
Let wi and i be respectively the number of wins and losses of the ith player. Prove that
n

pwi  iq3 0.

(1)

i 1

(South Korea)
Solution. For any tournament T satisfying the problem condition, denote by S pT q sum under
consideration, namely
S pT q 

pwi  iq3.

i 1

First, we show that the statement holds if a tournament T has only 4 players. Actually, let
A  pa1 , a2 , a3 , a4 q be the number of wins of the players; we may assume that a1 a2 a3 a4 .
We have a1 a2 a3 a4  42  6, hence a4 1. If a4  0, then we cannot have
a1  a2  a3  2, otherwise the company of all players is bad. Hence we should have
A  p3, 2, 1, 0q, and S pT q  33 13 p1q3 p3q3  0. On the other hand, if a4  1, then
only two possibilities, A  p3, 1, 1, 1q and A  p2, 2, 1, 1q can take place. In the former case we
have S pT q  33 3  p2q3 0, while in the latter one S pT q  13 13 p1q3 p1q3  0, as
desired.
Now we turn to the general problem. Consider a tournament T with no bad companies and
enumerate the players by the numbers from 1 to n. For every 4 players i1 , i2 , i3 , i4 consider a
sub-tournament Ti1 i2 i3 i4 consisting of only these players and the games which they performed
with each other. By the abovementioned, we have S pTi1 i2 i3 i4 q 0. Our aim is to prove that

S pT q 

S pTi1 i2 i3 i4 q,

(2)

i1 ,i2 ,i3 ,i4

where the sum is taken over all 4-tuples of distinct numbers from the set t1, . . . , nu. This way
the problem statement will be established.
We interpret the number pwi  i q3 as following. For i  j, let ij  1 if the ith player wins
against the jth one, and ij  1 otherwise. Then

pwi  iq3 

ij

j i

Hence,

S pT q 

ij1 ij2 ij3 .

j1 ,j2 ,j3 i

Rtj1 ,j2,j3 u

ij1 ij2 ij3 .

To simplify this expression, consider all the terms in this sum where two indices are equal.
If, for instance, j1  j2 , then the term contains 2ij1  1, so we can replace this term by ij3 .
Make such replacements for each such term; obviously, after this change each term of the form
ij3 will appear P pT q times, hence
S pT q 

|ti,j1 ,j2,j3 u|4

ij1 ij2 ij3

P pT q

i j

ij

 S 1 pT q

P pT qS2pT q.

33
We show that S2 pT q  0 and hence S pT q  S1 pT q for each tournament. Actually, note that
ij  ji, and the whole sum can be split into such pairs. Since the sum in each pair is 0, so
is S2 pT q.
Thus the desired equality (2) rewrites as

S1 pT q 

S1 pTi1 i2 i3 i4 q.

(3)

i1 ,i2 ,i3 ,i4

Now, if all the numbers j1 , j2 , j3 are distinct, then the set ti, j1 , j2 , j3 u is contained in exactly
one 4-tuple, hence the term ij1 ij2 ij3 appears in the right-hand part of (3) exactly once, as
well as in the left-hand part. Clearly, there are no other terms in both parts, so the equality is
established.
Solution 2. Similarly to the first solution, we call the subsets of players as companies, and
the k-element subsets will be called as k-companies.
In any company of the players, call a player the local champion of the company if he defeated
all other members of the company. Similarly, if a player lost all his games against the others
in the company then call him the local loser of the company. Obviously every company has
at most one local champion and at most one local loser. By the condition of the problem,
whenever a 4-company has a local loser, then this company has a local champion as well.
Suppose that k is some positive integer, and let us count all cases when a player is the local
champion of some k-company. The ith player won against wi other player. To be the local
champion of a k-company, he must be a member of the company, and the other k  1 members
must
from those whom he defeated. Therefore, the ith player is the local champion
 be chosen

wi
of
k-companies. Hence, the total number of local champions of all k-companies is
k1

n 

wi
.
k1
i1
Similarly, the total number of local losers of the k-companies is
Now apply this for k

i 1

 2, 3 and 4.

Since every game has a winner and a loser, we have

wi

i 1
n

w i  i

 0.

i 1

k1

n
, and hence
2
(4)

i 1

In every 3-company, either the players defeated one another in a cycle or the company has
both a local champion and a local loser. Therefore,
the total
number of local champions and
n 

n 

wi
i
local losers in the 3-companies is the same,

. So we have
2
2
i1
i1
n



i 1

wi
2

i
2

 0.

(5)

In every 4-company, by the problems condition, the number of local losers is less than or
equal to the number of local champions. Then the same holds for the total numbers of local

34

champions and local losers in all 4-companies, so

n 

wi

i 1
n



i 1

wi
3

i
3

i 1

i
. Hence,
3

0.

(6)

Now we establish the problem statement (1) as a linear combination of (4), (5) and (6). It
is easy check that

px  yq  24




x
3

y
3

Apply this identity to x  w1 and y


wi i  n  1, and thus

pwi  iq3  24
Then
n

pwi  iq  24

i 1



wi
3

 i .

i
3

i 1
looooooooomooooooooon

24

y
2

 3px

wi
2

i
2

 3pn  1q2  4



n 


wi
i

y q2  4 px  y q.

Since every player played n  1 games, we have



24

x
2

24



n 


wi
i




ilooooooooomooooooooon
1
0



 3pn  1q  4
2

w i  i .

n 


w i  i

i 1
looooomooooon
0

0.

35

C6. Given a positive integer k and other two integers b w

1. There are two strings of


pearls, a string of b black pearls and a string of w white pearls. The length of a string is the
number of pearls on it.
One cuts these strings in some steps by the following rules. In each step:
(i) The strings are ordered by their lengths in a non-increasing order. If there are some
strings of equal lengths, then the white ones precede the black ones. Then k first ones (if they
consist of more than one pearl) are chosen; if there are less than k strings longer than 1, then
one chooses all of them.
(ii) Next, one cuts each chosen string into two parts differing in length by at most one.

(For instance, if there are strings of 5, 4, 4, 2 black pearls, strings of 8, 4, 3 white pearls and
k  4, then the strings of 8 white, 5 black, 4 white and 4 black pearls are cut into the parts
p4, 4q, p3, 2q, p2, 2q and p2, 2q, respectively.)
The process stops immediately after the step when a first isolated white pearl appears.
Prove that at this stage, there will still exist a string of at least two black pearls.
(Canada)
Solution 1. Denote the situation after the ith step by Ai ; hence A0 is the initial situation, and
Ai1 Ai is the ith step. We call a string containing m pearls an m-string; it is an m-w-string
or a m-b-string if it is white or black, respectively.
We continue the process until every string consists of a single pearl. We will focus on three
moments of the process: (a) the first stage As when the first 1-string (no matter black or
white) appears; (b) the first stage At where the total number of strings is greater than k (if
such moment does not appear then we put t  8); and (c) the first stage Af when all black
pearls are isolated. It is sufficient to prove that in Af 1 (or earlier), a 1-w-string appears.
We start with some easy properties of the situations under consideration.
have s f . Moreover, all b-strings from Af 1 become single pearls in the f th
of them are 1- or 2-b-strings.
Next, observe that in each step Ai Ai 1 with i t  1, all p1q-strings
there are not more than k strings at all; if, in addition, i s, then there were
all the strings were cut in this step.

Obviously, we
step, hence all
were cut since
no 1-string, so

Now, let Bi and bi be the lengths of the longest and the shortest b-strings in Ai , and
let Wi and wi be the same for w-strings. We show by induction on i mints, tu that (i) the
situation Ai contains exactly 2i black and 2i white strings, (ii) Bi Wi , and (iii) bi wi .
The base case i  0 is obvious. For the induction step, if i mints, tu then in the ith step,
each string is cut, thus the claim (i) follows from the induction hypothesis; next, we have
Bi  rBi1 {2s rWi1 {2s  Wi and bi  tbi1 {2u twi1 {2u  wi , thus establishing (ii)
and (iii).
For the numbers s, t, f , two cases are possible.

Case 1. Suppose that s t or f t 1 (and hence s t 1); in particular, this is true


when t  8. Then in As1 we have Bs1 Ws1 , bs1 ws1 1 as s  1 mints, tu.
Now, if s  f , then in As1 , there is no 1-w-string as well as no p2q-b-string. That is,
2  Bs1 Ws1 bs1 ws1 1, hence all these numbers equal 2. This means that
in As1 , all strings contain 2 pearls, and there are 2s1 black and 2s1 white strings, which
means b  2  2s1  w. This contradicts the problem conditions.
Hence we have s f  1 and thus s t. Therefore, in the sth step each string is cut
into two parts. Now, if a 1-b-string appears in this step, then from ws1 bs1 we see that a

36
1-w-string appears as well; so, in each case in the sth step a 1-w-string appears, while not all
black pearls become single, as desired.
Case 2. Now assume that t 1 s and t 2 f . Then in At we have exactly 2t white
and 2t black strings, all being larger than 1, and 2t 1 k 2t (the latter holds since 2t is the
total number of strings in At1 ). Now, in the pt 1qst step, exactly k strings are cut, not more
than 2t of them being black; so the number of w-strings in At 1 is at least 2t pk  2t q  k.
Since the number of w-strings does not decrease in our process, in Af 1 we have at least k
white strings as well.
Finally, in Af 1 , all b-strings are not larger than 2, and at least one 2-b-string is cut in
the f th step. Therefore, at most k  1 white strings are cut in this step, hence there exists a
w-string W which is not cut in the f th step. On the other hand, since a 2-b-string is cut, all
p2q-w-strings should also be cut in the f th step; hence W should be a single pearl. This is
exactly what we needed.
Comment. In this solution, we used the condition b  w only to avoid the case b
if a number b  w is not a power of 2, then the problem statement is also valid.

 w  2t .

Hence,

Solution 2. We use the same notations as introduced in the first paragraph of the previous
solution. We claim that at every stage, there exist a u-b-string and a v-w-string such that
either
(i) u v 1, or
(ii) 2 u v 2u, and there also exist k  1 of pv {2q-strings other than considered
above.
First, we notice that this statement implies the problem statement. Actually, in both
cases (i) and (ii) we have u 1, so at each stage there exists a p2q-b-string, and for the last
stage it is exactly what we need.
Now, we prove the claim by induction on the number of the stage. Obviously, for A0 the
condition (i) holds since b w. Further, we suppose that the statement holds for Ai , and prove
it for Ai 1 . Two cases are possible.
Case 1. Assume that in Ai , there are a u-b-string and a v-w-string with u v. We can
assume that v is the length of the shortest w-string in Ai ; since we are not at the final stage,
we have v 2. Now, in the pi 1qst step, two subcases may occur.
Subcase 1a. Suppose that either no u-b-string is cut, or both some u-b-string and some
v-w-string are cut. Then in Ai 1 , we have either a u-b-string and a pv q-w-string (and (i) is
valid), or we have a ru{2s-b-string and a tv {2u-w-string. In the latter case, from u v we get
ru{2s tv{2u, and (i) is valid again.
Subcase 1b. Now, some u-b-string is cut, and no v-w-string is cut (and hence all the strings
which are cut are longer than v). If u1  ru{2s v, then the condition (i) is satisfied since we
have a u1 -b-string and a v-w-string in Ai 1 . Otherwise, notice that the inequality u v 2
implies u1 2. Furthermore, besides a fixed u-b-string, other k  1 of pv 1q-strings should
be cut in the pi 1qst step, hence providing at least k  1 of prpv 1q{2sq-strings, and
rpv 1q{2s v{2. So, we can put v1  v, and we have u1 v u 2u1, so the condition (ii)
holds for Ai 1 .
Case 2. Conversely, assume that in Ai there exist a u-b-string, a v-w-string (2 u v 2u)
and a set S of k  1 other strings larger than v {2 (and hence larger than 1). In the pi 1qst
step, three subcases may occur.
Subcase 2a. Suppose that some u-b-string is not cut, and some v-w-string is cut. The latter
one results in a tv {2u-w-string, we have v 1  tv {2u u, and the condition (i) is valid.

37
Subcase 2b. Next, suppose that no v-w-string is cut (and therefore no u-b-string is cut as
u v). Then all k strings which are cut have the length v, so each one results in a pv {2qstring. Hence in Ai 1 , there exist k k  1 of pv {2q-strings other than the considered u- and
v-strings, and the condition (ii) is satisfied.
Subcase 2c. In the remaining case, all u-b-strings are cut. This means that all puq-strings
are cut as well, hence our v-w-string is cut. Therefore in Ai 1 there exists a ru{2s-b-string
together with a tv {2u-w-string. Now, if u1  ru{2s tv {2u  v 1 then the condition (i) is
fulfilled. Otherwise, we have u1 v 1 u 2u1 . In this case, we show that u1 2. If, to the
contrary, u1  1 (and hence u  2), then all black and white p2q-strings should be cut in the
pi 1qst step, and among these strings there are at least a u-b-string, a v-w-string, and k  1
strings in S (k 1 strings altogether). This is impossible.
Hence, we get 2 u1 v 1 2u1 . To reach (ii), it remains to check that in Ai 1 , there exists
a set S 1 of k  1 other strings larger than v 1 {2. These will be exactly the strings obtained from
the elements of S. Namely, each s P S was either cut in the pi 1qst step, or not. In the former
case, let us include into S 1 the largest of the strings obtained from s; otherwise we include s
itself into S 1 . All k  1 strings in S 1 are greater than v {2 v 1 , as desired.

38

C7. Let P1 , . . . , Ps be arithmetic progressions of integers, the following conditions being


satisfied:
(i) each integer belongs to at least one of them;
(ii) each progression contains a number which does not belong to other progressions.
Denote by n the least common multiple of steps of these progressions; let n  p1 1 . . . pk k be
its prime factorization. Prove that
s1

i ppi  1q.

i 1

(Germany)
Solution 1. First, we prove the key lemma, and then we show how to apply it to finish the
solution.
Let n1 , . . . , nk be positive integers. By an n1  n2      nk grid we mean the set N 
tpa1 , . . . , ak q : ai P Z, 0 ai ni  1u; the elements of N will be referred to as points. In this
grid, we define a subgrid as a subset of the form
L  tpb1 , . . . , bk q P N : bi1

 xi , . . . , bi  xi u,
(1)
where I  ti1 , . . . , it u is an arbitrary nonempty set of indices, and xi P r0, ni  1s (1 j t)
1

are fixed integer numbers. Further, we say that a subgrid (1) is orthogonal to the ith coordinate
axis if i P I, and that it is parallel to the ith coordinate axis otherwise.

Lemma. Assume that the grid N is covered by subgrids L1 , L2 , . . . , Ls (this means N  si1 Li )
so that
(ii1 ) each subgrid contains a point which is not covered by other subgrids;
(iii) for each coordinate axis, there exists a subgrid Li orthogonal to this axis.
Then
s1

pni  1q.

i 1

Proof. Assume to the contrary that s i pni  1q  s1 . Our aim is to find a point that is not
covered by L1 , . . . , Ls .
The idea of the proof is the following. Imagine that we expand each subgrid to some maximal
subgrid so that for the ith axis, there will be at most ni  1 maximal subgrids orthogonal to
this axis. Then the desired point can be found easily: its ith coordinate should be that not
covered by the maximal subgrids orthogonal to the ith axis. Surely, the conditions for existence
of such expansion are provided by Halls lemma on matchings. So, we will follow this direction,
although we will apply Halls lemma to some subgraph instead of the whole graph.
Construct a bipartite graph G  pV Y V 1 , E q as follows. Let V  tL1 , . . . , Ls u, and let
V 1  tvij : 1 i s, 1 j ni  1u be some set of s1 elements. Further, let the edge pLm , vij q
appear iff Lm is orthogonal to the ith axis.
For each subset W V , denote
f pW q  tv

P V 1 : pL, vq P E for some L P W u.

Notice that f pV q  V 1 by (iii).


Now, consider the set W V containing the maximal number of elements such that |W |
|f pW q|; if there is no such set then we set W  . Denote W 1  f pW q, U  V zW , U 1  V 1zW 1.

39
By our assumption and the Lemma condition, |f pV q|  |V 1 | |V |, hence W  V and U  .
Permuting the coordinates, we can assume that U 1  tvij : 1 i u, W 1  tvij : 1 i k u.
Consider the induced subgraph G1 of G on the vertices U Y U 1 . We claim that for every
X U, we get |f pX q X U 1 | |X | (so G1 satisfies the conditions of Halls lemma). Actually, we
have |W | |f pW q|, so if |X | |f pX q X U 1 | for some X U, then we have

|W Y X |  |W | |X | |f pW q| |f pX q X U 1 |  |f pW q Y pf pX q X U 1 q|  |f pW Y X q|.
This contradicts the maximality of |W |.
Thus, applying Halls lemma, we can assign to each L P U some vertex vij P U 1 so that to
distinct elements of U, distinct vertices of U 1 are assigned. In this situation, we say that L P U
corresponds to the ith axis, and write g pLq  i. Since there are ni  1 vertices of the form vij ,
we get that for each 1 i , not more than ni  1 subgrids correspond to the ith axis.
Finally, we are ready to present the desired point. Since W  V , there exists a point
b  pb1 , b2 , . . . , bk q P N zpYLPW Lq. On the other hand, for every 1 i , consider any subgrid
L P U with g pLq  i. This means exactly that L is orthogonal to the ith axis, and hence all
its elements have the same ith coordinate cL . Since there are at most ni  1 such subgrids,
there exists a number 0 ai ni  1 which is not contained in a set tcL : g pLq  iu. Choose
such number for every 1 i . Now we claim that point a  pa1 , . . . , a , b 1 , . . . , bk q is not

covered, hence contradicting the Lemma condition.


Surely, point a cannot lie in some L P U, since all the points in L have g pLqth coordinate
cL  agpLq . On the other hand, suppose that a P L for some L P W ; recall that b R L. But the
points a and b differ only at first coordinates, so L should be orthogonal to at least one of
the first axes, and hence our graph contains some edge pL, vij q for i . It contradicts the
definition of W 1 . The Lemma is proved.
l
Now we turn to the problem. Let dj be the step of the progression Pj . Note that since
n  l.c.m.pd1 , . . . , ds q, for each 1 i k there exists an index j piq such that pi i  dj piq . We
assume that n 1; otherwise the problem statement is trivial.
For each 0 m n  1 and 1 i k, let mi be the residue of m modulo pi i , and let
mi  rii . . . ri1 be the base pi representation of mi (possibly, with some leading zeroes). Now,
we put into correspondence to m the sequence r pmq  pr11 , . . . , r11 , r21 , . . . , rkk q. Hence r pmq
lies in a ploooooomoooooon
pk      pk grid N.
1      p1      loooooomoooooon
k times


1 times

i 
1
mi  m1i , which follows pi i  m  m1 for all 1 i k;
Surely, if r pm
 q  r pm q then pi
consequently, n  m  m1 . So, when m runs over the set t0, . . . , n  1u, the sequences r pmq do
not repeat; since |N |  n, this means that r is a bijection between t0, . . . , n  1u and N. Now
we will show that for each 1 i s, the set Li  tr pmq : m P Pi u is a subgrid, and that for
each axis there exists a subgrid orthogonal to this axis. Obviously, these subgrids cover N, and
the condition (ii1 ) follows directly from (ii). Hence the Lemma provides exactly the estimate
we need.
Consider some 1 j s and let dj  p11 . . . pkk . Consider some q P Pj and let r pq q 
1 q we have
pr11 , . . . , rkk q. Then for an arbitrary q1 , setting rpq1q  pr111 , . . . , rk
k

q1

P Pj pi  q  q1 for each 1 i k ri,t  ri,t1 for all t i.


1 , . . . , r1 q P N : ri,t  r1 for all t i u which means that Lj is a subgrid
Hence Lj  tpr11
i,t
k
containing r pq q. Moreover, in Lj piq , all the coordinates corresponding to pi are fixed, so it is
i

orthogonal to all of their axes, as desired.

40
Comment 1. The estimate in the problem is sharp for every n. One of the possible examples is the
following one. For each 1 i k, 0 j i  1, 1 k p  1, let
Pi,j,k

 kpji

pij

Z,

and add the progression P0  nZ. One can easily check that this set satisfies all the problem conditions.
There also exist other examples.
On the other hand, the estimate can be adjusted in the following sense. For every 1 i k, let
0  i0 , i1 , . . . , ihi be all the numbers of the form ordpi pdj q in an increasing order (we delete the
repeating occurences of a number, and add a number 0  i0 if it does not occur). Then, repeating
the arguments from the solution one can obtain that
s1

hi
k

 

pp    1q.
j

j 1

i 1j 1

Note that p  1 pp  1q, and the equality is achieved only for  1. Hence, for reaching the
minimal number of the progressions, one should have i,j  j for all i, j. In other words, for each
1 j i , there should be an index t such that ordpi pdt q  j.

Solution 2. We start with introducing some notation. For positive integer r, we denote
rrs  t1, 2, . . . , ru. Next, we say that a set of progressions P  tP1 , . . . , Psu cover Z if each
integer belongs to some of them; we say that this covering is minimal if no proper subset of P
covers Z. Obviously, each covering contains a minimal subcovering.
Next, for a minimal covering tP1 , . . . , Ps u and for every 1 i s, let di be the step of
progression Pi , and hi be some number which is contained in Pi but in none of the other
progressions. We assume that n 1, otherwise the problem is trivial. This implies di 1,
otherwise the progression Pi covers all the numbers, and n  1.
We will prove a more general statement, namely the following
Claim. Assume that the progressions P1 , . . . , Ps and number n  p1 1 . . . pk k 1 are chosen as
in the problem statement. Moreover, choose some nonempty set of indices I  ti1 , . . . , it u rk s
and some positive integer i i for every i P I. Consider the set of indices
T
Then

j:1j

s, and pi 
i

|T | 1


 dj for some i

i ppi  1q.

PI

(2)

i I

Observe that the Claim for I  rk s and i  i implies the problem statement, since the
left-hand side in (2) is not greater than s. Hence, it suffices to prove the Claim.
1. First, we prove the Claim assuming that all dj s are prime numbers. If for some 1 i k
we have at least pi progressions with the step pi , then they do not intersect and hence cover all
the integers; it means that there are no other progressions, and n  pi ; the Claim is trivial in
this case.
Now assume that for every 1 i k, there are not more than pi  1 progressions with
step pi ; each such progression covers the numbers with a fixed residue modulo pi , therefore
there exists a residue qi mod pi which is not touched by these progressions. By the Chinese
Remainder Theorem, there exists a number q such that q  qi pmod pi q for all 1 i k; this
number cannot be covered by any progression with step pi , hence it is not covered at all. A
contradiction.

41
2. Now, we assume that the general Claim is not valid, and hence we consider a counterexample tP1 , . . . , Ps u for the Claim; we can choose it to be minimal in the following sense:
the number
n is minimal possible among all the counterexamples;
the sum i di is minimal possible among all the counterexamples having the chosen value
of n.
As was mentioned
above, not all numbers di are primes; hence we can assume that d1 is


composite, say p1 d1 and d11  dp11 1. Consider a progression P11 having the step d11 , and
containing P1 . We will focus on two coverings constructed as follows.
(i) Surely, the progressions P11 , P2 , . . . , Ps cover Z, though this covering in not necessarily
minimal. So, choose some minimal subcovering P 1 in it; surely P11 P P 1 since h1 is not covered
by P2 , . . . , Ps , so we may assume that P 1  tP11 , P2 , . . . , Ps1 u for some s1 s. Furthermore, the
period of the covering P 1 can appear to be less than n; so we denote this period by
n1

 p1 
1

. . . pkk k

 l.c.m.

d11 , d2 , . . . , ds1 .

Observe that for each Pj R P 1 , we have hj P P11 , otherwise hj would not be covered by P.
(ii) On the other hand, each nonempty set of the form Ri  Pi X P11 (1 i s) is also a
progression with a step ri  l.c.m.pdi , d11q, and such sets cover P11 . Scaling these progressions
with the ratio 1{d11 , we obtain the progressions Qi with steps qi  ri {d11 which cover Z. Now we
choose a minimal subcovering Q of this covering; again we should have Q1 P Q by the reasons
of h1 . Now, denote the period of Q by
n2

 l.c.m.tqi : Qi P Qu  l.c.m.trid:1 Qi P Qu  p1

. . . pkk
.
d11

Note that if hj P P11 , then the image of hj under the scaling can be covered by Qj only; so, in
this case we have Qj P Q.
Our aim is to find the desired number of progressions in coverings P and Q. First, we have
n n1 , and the sum of the steps in P 1 is less than that in P; hence the Claim is valid for P 1 .
We apply it to the set of indices I 1  ti P I : i i u and the exponents i1  i  i ; hence
the set under consideration is
!

T1  j : 1 j

1
s1 , and ppi i qi

pi i i 1


 dj for some i

P I1

T X rs1s,

and we obtain that

|T X rs1s| |T 1| 1

i I1

pi  iqppi  1q  1

pi  i q ppi  1q,

i I

where pxq  maxtx, 0u; the latter equality holds as for i R I 1 we have i i .
Observe that x  px  y q
mintx, y u for all x, y. So, if we find at least
G

minti , i uppi  1q

i I

X ts1 1, . . . , su, then we would have

pi  iq
|T |  |T Xrs1s| |T Xts1 1, . . . , su| 1
indices in T

i I

minti , i u ppi  1q  1

i ppi  1q,

i I

thus leading to a contradiction with the choice of P. We will find those indices among the
indices of progressions in Q.

42


3. Now denote I 2  ti P I : i 0u and consider


some i P I 2 ; then pi i   n1 . On the

other hand, there exists an index j piq such that pi i  dj piq ; this means that dj piq   n1 and hence
Pj piq cannot appear in P 1 , so j piq s1 . Moreover,
 we have observed before that in this case
2
 2
hj piq P P11 , hence Qj piq P Q. This means
that
q
j piq n , therefore i  i for each i P I (recall


here that qi  ri {d11 and hence dj piq  rj piq  d11 n2 ).
Let d11  p11 . . . pkk . Then n2  p11 1 . . . pki i . Now, if i P I 2 , then for every the condition
p  q 1  q is equivalent to pi  1  r .
pi i i
j
j
i
2
1
Note that n n{d1 n, hence we can apply the Claim to the covering Q. We perform
this with the set of indices I 2 and the exponents i2  minti , i u 0. So, the set under
consideration is
T2

 j : Qj P Q, and pip  qmint , u 1  qj for some i P I 2


!
)

mint , u 1 
2
 j : Qj P Q, and pi
rj for some i P I ,
i

and we obtain |T 2 | 1 G. Finally, we claim that T 2 T X t1u Y ts1 1, . . . , su ; then we


will obtain |T X ts1 1, . . . , su| G, which is exactly what we need.
To prove this, consider any j P T 2 . Observe first that i  minti , i u 1 i  i i ,
minti ,i u 1 
minti ,i u 1 
rj  l.c.m.pd11 , dj q we have pi i
dj , which means that
hence from pi i
j P T . Next, the exponent of pi in dj is greater than that in n1 , which means that Pj R P 1 . This
may appear only if j  1 or j s1 , as desired. This completes the proof.
Comment 2. A grid analogue of the Claim is also valid. It reads as following.
Claim. Assume that the grid N is covered by subgrids L1 , L2 , . . . , Ls so that
(ii1 ) each subgrid contains a point which is not covered by other subgrids;
(iii) for each coordinate axis, there exists a subgrid Li orthogonal to this axis.
Choose some set of indices I  ti1 , . . . , it u rks, and consider the set of indices
T
Then

 tj : 1 j s, and Lj is orthogonal to the ith axis for some i P I u .


|T | 1

pni  1q.

i I

This Claim may be proved almost in the same way as in Solution 1.

43

Geometry
G1. Let ABC be an acute triangle with D, E, F the feet of the altitudes lying on BC, CA, AB
respectively. One of the intersection points of the line EF and the circumcircle is P . The
lines BP and DF meet at point Q. Prove that AP  AQ.
(United Kingdom)
Solution 1. The line EF intersects the circumcircle at two points. Depending on the choice
of P , there are two different cases to consider.
Case 1 : The point P lies on the ray EF (see Fig. 1).
Let =CAB  , =ABC  and =BCA  . The quadrilaterals BCEF and CAF D are
cyclic due to the right angles at D, E and F . So,

=BDF  180  =F DC  =CAF  ,


=AF E  180  =EF B  =BCE  ,
=DF B  180  =AF D  =DCA  .
Since P lies on the arc AB of the circumcircle, =P BA =BCA  . Hence, we have
=P BD =BDF  =P BA =ABD =BDF  180,
and the point Q must lie on the extensions of BP and DF beyond the points P and F ,
respectively.
From the cyclic quadrilateral AP BC we get

=QP A  180  =AP B  =BCA   =DF B  =QF A.


Hence, the quadrilateral AQP F is cyclic. Then =AQP  180  =P F A  =AF E  .
We obtained that =AQP  =QP A  , so the triangle AQP is isosceles, AP  AQ.
Q

Fig. 1

Fig. 2

45
Case 2 : The point P lies on the ray F E (see Fig. 2). In this case the point Q lies inside
the segment F D.
Similarly to the first case, we have

=QP A  =BCA   =DF B  180  =AF Q.


Hence, the quadrilateral AF QP is cyclic.
Then =AQP  =AF P  =AF E 
=AQP  =QP A and thus AP  AQ.

 =QP A.

The triangle AQP is isosceles again,

Comment. Using signed angles, the two possible configurations can be handled simultaneously, without investigating the possible locations of P and Q.

the central angle


Solution 2. For arbitrary points X, Y on the circumcircle, denote by XY
of the arc XY .

Let P and P 1 be the two points where the line EF meets the circumcircle; let P lie on
the arc AB and let P 1 lie on the arc CA. Let BP and BP 1 meet the line DF and Q and Q1 ,
respectively (see Fig. 3). We will prove that AP  AP 1  AQ  AQ1 .
Q
A

Fig. 3
Like in the first solution, we have =AF E  =BF P  =DF B
cyclic quadrilaterals BCEF and CAF D.
1 A  2=AF P 1  2  2=BCA  AP

B P
B, we have
By P

AP

1 A, =P BA  =ABP 1
 P

and AP

 =BCA 

 AP 1.

from the

p1q

1 A, the lines BP and BQ1 are symmetrical about line AB.


P

Due to AP
Similarly, by =BF P  =Q1 F B, the lines F P and F Q1 are symmetrical about AB. It
follows that also the points P and P 1 are symmetrical to Q1 and Q, respectively. Therefore,

 AQ1

and AP 1

 AQ.
The relations (1) and (2) together prove AP  AP 1  AQ  AQ1 .
AP

p2q

46

G2. Point P lies inside triangle ABC. Lines AP , BP , CP meet the circumcircle of ABC
again at points K, L, M, respectively. The tangent to the circumcircle at C meets line AB
at S. Prove that SC  SP if and only if MK  ML.
(Poland)
Solution 1. We assume that CA CB, so point S lies on the ray AB.

From the similar triangles P KM  P CA and P LM


LM
CB
and
. Multiplying these two equalities, we get

PM
PB
LM
KM
Hence, the relation MK

PA
PM
 P CB we get KM
 CA

PA
 CB

.
CA P B

PB
 ML is equivalent to CB

.
CA
PA

Denote by E the foot of the bisector of angle B in triangle ABC. Recall that the locus of
CA
XA

points X for which
is the Apollonius circle with the center Q on the line AB,
XB
CB
and this circle passes through C and E. Hence, we have MK  ML if and only if P lies on ,
that is QP  QC.

C
C
C
C

K
P
P
P

S
A

Fig. 1
Now we prove that S  Q, thus establishing the problem statement. We have =CES 
=CAE =ACE  =BCS =ECB  =ECS, so SC  SE. Hence, the point S lies on AB
as well as on the perpendicular bisector of CE and therefore coincides with Q.
Solution 2. As in the previous solution, we assume that S lies on the ray AB.
1. Let P be an arbitrary point inside both the circumcircle of the triangle ABC and the
angle ASC, the points K, L, M defined as in the problem. We claim that SP  SC implies
MK  ML.
Let E and F be the points of intersection of the line SP with , point E lying on the
segment SP (see Fig. 2).

47
F

P
P
P
M
E
A

Fig. 2

SA
SP
, and hence
 SA  SB, so SB
 SP
LF
and 2=SAP  BE

=BP S  =SAP . Since 2=BP S  BE


We have SP 2

SC 2

LF

On the other hand, from

=SP C  =SCP

BSP . Then

we have
EK

 EK.

(1)

we have EC

MF

L  MF
From (1) and (2) we get MF
The claim is proved.

P SA

MF

 EC

, or
EM

.
 EM

(2)

FL  ME

EK

and hence MK  ML.


 MEK

2. We are left to prove the converse. So, assume that MK  ML, and introduce the
points E and F as above. We have SC 2  SE  SF ; hence, there exists a point P 1 lying on the
segment EF such that SP 1  SC (see Fig. 3).
L
L

F
K
K
K
P
P
P

K
E

Fig. 3

48
Assume that P  P 1 . Let the lines AP 1 , BP 1 , CP 1 meet again at points K 1 , L1 , M 1
respectively. Now, if P 1 lies on the segment P F then by the first part of the solution we have
1 F L1  M
1 EK 1 . On the other hand, we have MF
1 F L1  M
1 EK 1 MEK,

therefore
M
LM

which contradicts MK  ML.


MF
L MEK

which is impossible.
Similarly, if point P 1 lies on the segment EP then we get MF
L MEK
Therefore, the points P and P 1 coincide and hence SP  SP 1  SC.
Solution 3. We present a different proof of the converse direction, that is, MK  ML
SP  SC. As in the previous solutions we assume that CA CB, and the line SP meets
at E and F .
 MF

 MF
and EK
 FL.
From ML  MK we get MEK
L. Now we claim that ME
; then EK
 ME
MF


MF
 MEK
L  MF
To the contrary, suppose first that ME

F L. Now, the inequality ME MF implies 2=SCM  EC ME EC MF  2=SP C


FL implies 2=SP K 
and hence SP SC. On the other hand, the inequality EK

EK AF F L AF  2=ABL, hence

=SP A  180  =SP K 180  =ABL  =SBP.


L

K
K
K
P
E

Fig. 4
Consider the point A1 on the ray SA for which =SP A1  =SBP ; in our case, this point lies
on the segment SA (see Fig. 4). Then SBP  SP A1 and SP 2  SB  SA1 SB  SA  SC 2 .
Therefore, SP SC which contradicts SP SC.
MF
is also impossible. So, we get
Similarly, one can prove that the inequality ME
 MF
and therefore 2=SCM  EC

 EC

 2=SP C, which implies


ME
ME
MF
SC  SP .

49

50

G3. Let A1 A2 . . . An be a convex polygon. Point P inside this polygon is chosen so that its
projections P1 , . . . , Pn onto lines A1 A2 , . . . , An A1 respectively lie on the sides of the polygon.
Prove that for arbitrary points X1 , . . . , Xn on sides A1 A2 , . . . , An A1 respectively,
"

X n X1
X 1 X2
,...,
max
P1 P2
Pn P1

1.
(Armenia)

Solution 1. Denote Pn

 P1, Xn 1  X1, An 1  A1 .

Lemma. Let point Q lies inside A1 A2 . . . An . Then it is contained in at least one of the circumcircles of triangles X1 A2 X2 , . . . , Xn A1 X1 .
Proof. If Q lies in one of the triangles X1 A2 X2 , . . . , Xn A1 X1 , the claim is obvious. Otherwise
Q lies inside the polygon X1 X2 . . . Xn (see Fig. 1). Then we have

p=X1 A2X2 =X1 QX2q    p=XnA1 X1 =Xn QX1q


 p=X1 A1X2    =XnA1 X1q p=X1 QX2    =Xn QX1q  pn  2q

 n,

hence there exists an index i such that =Xi Ai 1 Xi 1 =Xi QXi 1 n


 . Since the
n
quadrilateral QXi Ai 1 Xi 1 is convex, this means exactly that Q is contained the circumcircle
l
of Xi Ai 1 Xi 1 , as desired.
Now we turn to the solution. Applying lemma, we get that P lies inside the circumcircle of
triangle Xi Ai 1 Xi 1 for some i. Consider the circumcircles and of triangles Pi Ai 1 Pi 1 and
Xi Ai 1 Xi 1 respectively (see Fig. 2); let r and R be their radii. Then we get 2r  Ai 1 P 2R
(since P lies inside ), hence
Pi Pi

 2r sin =PiAi

1 Pi 1

2R sin =Xi Ai

1 Xi 1

 Xi X i

1,

QED.

A4
X4

X3

A3
P

A5

Xi+1

Q
X2

Pi+1

X5

A1

X1

Fig. 1

A2

Pi

Ai+1

Xi

Fig. 2

51
Solution 2. As in Solution 1, we assume that all indices of points are considered modulo n.
We will prove a bit stronger inequality, namely
"
*
X1 X2
Xn X1
cos 1 , . . . ,
cos n 1,
max
P1 P2
Pn P1

where i (1 i n) is the angle between lines Xi Xi 1 and Pi Pi 1 . We denote i  =Ai Pi Pi1


and i  =Ai 1 Pi Pi 1 for all 1 i n.
Suppose that for some 1 i n, point Xi lies on the segment Ai Pi , while point Xi 1 lies on
the segment Pi 1 Ai 2 . Then the projection of the segment Xi Xi 1 onto the line Pi Pi 1 contains
segment Pi Pi 1 , since i and i 1 are acute angles (see Fig. 3). Therefore, Xi Xi 1 cos i
Pi Pi 1 , and in this case the statement is proved.
So, the only case left is when point Xi lies on segment Pi Ai 1 for all 1 i n (the case
when each Xi lies on segment Ai Pi is completely analogous).
Now, assume to the contrary that the inequality
Xi Xi

cos i

Pi Pi

(1)

holds for every 1 i n. Let Yi and Yi1 1 be the projections of Xi and Xi 1 onto Pi Pi 1 . Then
inequality (1) means exactly that YiYi1 1 Pi Pi 1 , or Pi Yi Pi 1 Yi1 1 (again since i and i 1
are acute; see Fig. 4). Hence, we have
Xi Pi cos i

Xi

1 Pi 1

Multiplying these inequalities, we get

cos 1 cos 2    cos n

cos i 1 ,

1 i n.

cos 1 cos 2    cos n.

On the other hand, the sines theorem applied to triangle P Pi Pi


P Pi
P Pi 1

i 1
.
 sinsin i 1  cos
cos i
i
2

(2)
provides

Multiplying these equalities we get


1

cos 2 cos 3

cos 1 cos 2

cos 1
   cos

which contradicts (2).

Yi+1

Xi+1

Pi+1
i+1
i

i
Yi

Xi+1

Xi

P
Pi+1

i+1

i
Xi

Ai+1

Pi

Pi1

Fig. 3

Ai+1

Xi1

Pi

Ai

Fig. 4

52

G4. Let I be the incenter of a triangle ABC and be its circumcircle. Let the line AI
intersect at a point D  A. Let F and E be points on side BC and arc BDC respectively
such that =BAF  =CAE 12 =BAC. Finally, let G be the midpoint of the segment IF .
Prove that the lines DG and EI intersect on .
(Hong Kong)
Solution 1. Let X be the second point of intersection of line EI with , and L be the foot
of the bisector of angle BAC. Let G1 and T be the points of intersection of segment DX with
lines IF and AF , respectively. We are to prove that G  G1 , or IG1  G1 F . By the Menelaus
theorem applied to triangle AIF and line DX, it means that we need the relation
1

G1 F
IG1

 TATF  AD
,
ID

or

TF
AT

ID
 AD
.

Let the line AF intersect at point K  A (see Fig. 1); since =BAK  =CAE we have
hence KE k BC. Notice that =IAT  =DAK  =EAD  =EXD  =IXT , so
 CE,
the points I, A, X, T are concyclic. Hence we have =IT A  =IXA  =EXA  =EKA, so
TF
IL
IT k KE k BC. Therefore we obtain
.

AT
AI
CL
IL
. Furthermore, =DCL  =DCB 
Since CI is the bisector of =ACL, we get

AI
AC
1
=DAB  =CAD  2 =BAC, hence the triangles DCL and DAC are similar; therefore we get
CL
DC
. Finally, it is known that the midpoint D of arc BC is equidistant from points I,

AC
AD
DC
ID
.

B, C, hence
AD
AD
Summarizing all these equalities, we get

BK

TF
AT

IL
CL
ID
,
 AI
 AC
 DC

AD
AD

as desired.
X

IIII

TT

F
B

L
K

C
E

Fig. 1

Fig. 2

53
AD
AI
Comment. The equality

is known and can be obtained in many different ways. For
IL
DI
instance, one can consider the inversion with center D and radius DC  DI. This inversion takes
to the segment BC, so point A goes to L. Hence IL  AI , which is the desired equality.
BAC
DI
AD

Solution 2. As in the previous solution, we introduce the points X, T and K and note that
it suffice to prove the equality
TF
AT

DI
 AD

T F AT
AT

 DIADAD

AT
AD

 DIAFAD .

=T DA  =XDA  =XEA  =IEA, we get that the trianAI


AT
.

gles AT D and AIE are similar, therefore
AD
AE
Next, we also use the relation DB  DC  DI. Let J be the point on the extension
of segment AD over point D such that DJ  DI  DC (see Fig. 2). Then =DJC 
=JCD  12 p  =JDC q  12 =ADC  12 =ABC  =ABI. Moreover, =BAI  =JAC, hence
AI
AB
, or AB  AC  AJ  AI  pDI AD q  AI.

triangles ABI and AJC are similar, so
AJ
AC
On the other hand, we get =ABF  =ABC  =AEC and =BAF  =CAE, so trianAB
AF

gles ABF and AEC are also similar, which implies
, or AB  AC  AF  AE.
AC
AE
Since

=F AD  =EAI

and

Summarizing we get

pDI

AD q  AI

 AB  AC  AF  AE

AI
AE

 ADAF DI

as desired.
Comment. In fact, point J is an excenter of triangle ABC.

AT
AD

 ADAF DI ,

54

G5. Let ABCDE be a convex pentagon such that BC k AE, AB  BC AE, and =ABC 
=CDE. Let M be the midpoint of CE, and let O be the circumcenter of triangle BCD. Given
that =DMO  90 , prove that 2=BDA  =CDE.
(Ukraine)
Solution 1. Choose point T on ray AE such that AT  AB; then from AE k BC we have
=CBT  =AT B  =ABT , so BT is the bisector of =ABC. On the other hand, we have
ET  AT  AE  AB  AE  BC, hence quadrilateral BCT E is a parallelogram, and the
midpoint M of its diagonal CE is also the midpoint of the other diagonal BT .
Next, let point K be symmetrical to D with respect to M. Then OM is the perpendicular
bisector of segment DK, and hence OD  OK, which means that point K lies on the circumcircle of triangle BCD. Hence we have =BDC  =BKC. On the other hand, the angles
BKC and T DE are symmetrical with respect to M, so =T DE  =BKC  =BDC.
Therefore, =BDT  =BDE =EDT  =BDE =BDC  =CDE  =ABC  180 
=BAT . This means that the points A, B, D, T are concyclic, and hence =ADB  =AT B 
1
=ABC  12 =CDE, as desired.
2
B

C
B
2

2 D

M
M
M

Solution 2. Let=CBD  , =BDC  , =ADE  , and =ABC  =CDE  2. Then


we have =ADB  2   , =BCD  180   , =AED  360  =BCD  =CDE 
180  2 , and finally =DAE  180  =ADE  =AED  2    .
B
B

C
N
N
N
O

N
N
N
D

O
O
O

M
M
M

M
M
D
D
D
E

Let N be the midpoint of CD; then =DNO  90  =DMO, hence points M, N lie on
the circle with diameter OD. Now, if points O and M lie on the same side of CD, we have
=DMN  =DON  12 =DOC  ; in the other case, we have =DMN  180  =DON  ;

55
so, in both cases =DMN  (see Figures). Next, since MN is a midline in triangle CDE,
we have =MDE  =DMN  and =NDM  2  .
Now we apply the sine rule to the triangles ABD, ADE (twice), BCD and MND obtaining
AB
AD

p2   q ,
 sinsin
p2  q
BC
CD

which implies
BC
AD

sin
sinp2    q
AE
DE

,

,
AD
sinp2   q
AD
sinp2   q
CD
sin
CD{2
ND
sin
,



,
sin
DE
DE {2
NM
sinp2  q

BC CD DE
   q .
 CD
 DE  AD  sinsinp2 sinpq2
 sinp2   q

AB
Hence, the condition AB  AE BC, or equivalently
AD
by the common denominator rewrites as

 AEADBC , after multiplying

sinp2   q  sinp2   q  sin  sinp2  q sin  sinp2    q


cosp  q  cosp4  2   q  cosp2   2  q  cosp2  q
cosp  q cosp2  q  cosp2   2  q cosp4  2   q
cos  cosp  q  cos  cosp3  2   q

cos  cosp  q  cosp3  2   q  0


cos  sinp2   q  sinp   q  0.

Since 2    180  =AED 180 and  12 =ABC


hence =BDA  2     12 =CDE, as desired.

90, it follows that 

56

G6. The vertices X, Y , Z of an equilateral triangle XY Z lie respectively on the sides BC,
CA, AB of an acute-angled triangle ABC. Prove that the incenter of triangle ABC lies inside
triangle XY Z.
1

G6 .

The vertices X, Y , Z of an equilateral triangle XY Z lie respectively on the sides


BC, CA, AB of a triangle ABC. Prove that if the incenter of triangle ABC lies outside
triangle XY Z, then one of the angles of triangle ABC is greater than 120 .
(Bulgaria)
Solution 1 for G6. We will prove a stronger fact; namely, we will show that the incenter I of
triangle ABC lies inside the incircle of triangle XY Z (and hence surely inside triangle XY Z
itself). We denote by dpU, V W q the distance between point U and line V W .
Denote by O the incenter of XY Z and by r, r 1 and R1 the inradii of triangles ABC, XY Z
and the circumradius of XY Z, respectively. Then we have R1  2r 1 , and the desired inequality
is OI r 1 . We assume that O  I; otherwise the claim is trivial.
Let the incircle of ABC touch its sides BC, AC, AB at points A1 , B1 , C1 respectively.
The lines IA1 , IB1 , IC1 cut the plane into 6 acute angles, each one containing one of the
points A1 , B1 , C1 on its border. We may assume that O lies in an angle defined by lines IA1 ,
IC1 and containing point C1 (see Fig. 1). Let A1 and C 1 be the projections of O onto lines IA1
and IC1 , respectively.
Since OX  R1 , we have dpO, BC q R1 . Since OA1 k BC, it follows that dpA1 , BC q 
A1 I r R1 , or A1 I R1  r. On the other hand, the incircle of XY Z lies inside ABC,
hence dpO, AB q r 1 , and analogously we get dpO, AB q  C 1 C1  r  IC 1 r 1 , or IC 1 r  r 1 .
B

C1
Z

A1

C
C
C
C
II

B1

Fig. 1

Fig. 2

Finally, the quadrilateral IA1 OC 1 is circumscribed due to the right angles at A1 and C 1
1 OC 1  2=A1 IC 1 180  OC
1I, hence 180

(see Fig. 2). On its circumcircle, we have A


1 O. This means that IC 1 A1 O. Finally, we have OI IA1 A1 O IA1 IC 1
1 A

IC
pR1  rq pr  r1q  R1  r1  r1, as desired.
Solution 2 for G6. Assume the contrary. Then the incenter I should lie in one of triangles AY Z, BXZ, CXY assume that it lies in AY Z. Let the incircle of ABC touch
sides BC, AC at point A1 , B1 respectively. Without loss of generality, assume that point A1
lies on segment CX. In this case we will show that =C 90 thus leading to a contradiction.
Note that intersects each of the segments XY and Y Z at two points; let U, U 1 and V ,
V 1 be the points of intersection of with XY and Y Z, respectively (UY U 1 Y , V Y V 1 Y ;
1 V 1 q 1 UV
U

, hence UV
120 .
see Figs. 3 and 4). Note that 60  =XY Z  12 pUV
2

57

On the other hand, since I lies in AY Z, we get V


UV 1 180 , hence UA
1U



180  UV 60 .
Now, two cases are possible due to the order of points Y , B1 on segment AC.

UA
1V

A
A

VVV
Y V
U
U
U
U
B1

B1

C1

VV
Y VV

I
V

A1

I
V

U
U
U
C

C1

Fig. 3

Z
U
A1 X

Fig. 4

Case 1. Let
Y lie on the segment AB1 (see Fig. 3). Then we have =Y XC 
 point
1 1

1

 A1 U 2 UA1 U 30; analogously, we get =XY C 12 UA


1 U 30 . Therefore,


=Y CX  180  =Y XC  =XY C 120 , as desired.
1
2

A
1U

Case 2. Now let point Y lie on the segment CB1 (see Fig. 4). Analogously, we obtain
=Y XC 30. Next, =IY X =ZY X  60, but =IY X =IY B1, since Y B1 is a tangent
and Y X is a secant line to circle from point Y . Hence, we get 120 =IY B1 =IY X 
=B1 Y X  =Y XC =Y CX 30 =Y CX, hence =Y CX 120  30  90, as desired.
Comment. In the same way, one can prove a more general
Claim. Let the vertices X, Y , Z of a triangle XY Z lie respectively on the sides BC, CA, AB of a
triangle ABC. Suppose that the incenter of triangle ABC lies outside triangle XY Z, and is the
least angle of XY Z. Then one of the angles of triangle ABC is greater than 3  90 .

Solution for G61 . Assume the contrary. As in Solution 2, we assume that the incenter I of
ABC lies in AY Z, and the tangency point A1 of and BC lies on segment CX. Surely,
=Y ZA 180  =Y ZX  120, hence points I and Y lie on one side of the perpendicular
bisector to XY ; therefore IX IY . Moreover, intersects segment XY at two points, and
therefore the projection M of I onto XY lies on the segment XY . In this case, we will prove
that =C 120 .
Let Y K, Y L be two tangents from point Y to (points K and A1 lie on one side of XY ;
if Y lies on , we say K  L  Y ); one of the points K and L is in fact a tangency point B1
of and AC. From symmetry, we have =Y IK  =Y IL. On the other hand, since IX IY ,
we get XM XY which implies =A1 XY =KY X.
Next, we have =MIY  90  =IY X 90  =ZY X  30 . Since IA1 K A1 X, IM K XY ,
IK K Y K we get =MIA1  =A1 XY =KY X  =MIK. Finally, we get

=A1 IK =A1 IL  p=A1 IM =MIK q p=KIY =Y ILq


2=MIK 2=KIY  2=MIY 60.
Hence,

=A1 IB1 60, and therefore =ACB  180  =A1 IB1 120, as desired.

58

K(= B1 )

A1

M
A1

L(= B1 )

C
M
M
M Y
M

X
I
B

A
I

Fig. 5

Fig. 6

Comment 1. The estimate claimed in G61 is sharp. Actually, if =BAC 120 , one can consider an
equilateral triangle XY Z with Z  A, Y P AC, X P BC (such triangle exists since =ACB 60 ). It
intersects with the angle bisector of =BAC only at point A, hence it does not contain I.
Comment 2. As in the previous solution, there is a generalization for an arbitrary triangle XY Z,
but here we need some additional condition. The statement reads as follows.
Claim. Let the vertices X, Y , Z of a triangle XY Z lie respectively on the sides BC, CA, AB of a
triangle ABC. Suppose that the incenter of triangle ABC lies outside triangle XY Z, is the least
angle of XY Z, and all sides of triangle XY Z are greater than 2r cot , where r is the inradius
of ABC. Then one of the angles of triangle ABC is greater than 2.
The additional condition is needed to verify that XM Y M since it cannot be shown in the
original way. Actually, we have =M Y I , IM r, hence Y M r cot . Now, if we have
XY  XM Y M 2r cot , then surely XM Y M .
On the other hand, this additional condition follows easily from the conditions of the original
problem. Actually, if I P AY Z, then the diameter of parallel to Y Z is contained in AY Z and
is thus shorter than Y Z. Hence Y Z 2r 2r cot 60 .

59

60

G7. Three circular arcs 1 , 2 , and 3 connect the points A and C. These arcs lie in the same
half-plane defined by line AC in such a way that arc 2 lies between the arcs 1 and 3 . Point
B lies on the segment AC. Let h1 , h2 , and h3 be three rays starting at B, lying in the same
half-plane, h2 being between h1 and h3 . For i, j  1, 2, 3, denote by Vij the point of intersection
of hi and j (see the Figure below).

Denote by V
ij Vkj Vk Vi the curved quadrilateral, whose sides are the segments Vij Vi , Vkj Vk
and arcs Vij Vkj and Vi Vk . We say that this quadrilateral is circumscribed if there exists a circle
touching these two segments and two arcs.

Prove that if the curved quadrilaterals V
11 V21 V22 V12 , V12 V22 V23 V13 , V21 V31 V32 V22 are circum

scribed, then the curved quadrilateral V22 V32 V33 V23 is circumscribed, too.
V23

h1

h2

h3
V33

V13
V22
V12

3
2
A

V32
V11

V21

V31
C

Fig. 1
(Hungary)
Solution. Denote by Oi and Ri the center and the radius of i , respectively. Denote also by H
the half-plane defined by AC which contains the whole configuration. For every point P in
the half-plane H, denote by dpP q the distance between P and line AC. Furthermore, for any
r 0, denote by pP, r q the circle with center P and radius r.
Lemma 1. For every 1 i j 3, consider those circles pP, r q in the half-plane H which
are tangent to hi and hj .
(a) The locus of the centers of these circles is the angle bisector ij between hi and hj .
(b) There is a constant uij such that r  uij  dpP q for all such circles.
Proof. Part (a) is obvious. To prove part (b), notice that the circles which are tangent to hi
and hj are homothetic with the common homothety center B (see Fig. 2). Then part (b) also
becomes trivial.
l

Lemma 2. For every 1 i j 3, consider those circles pP, r q in the half-plane H which
are externally tangent to i and internally tangent to j .
(a) The locus of the centers of these circles is an ellipse arc ij with end-points A and C.
(b) There is a constant vij such that r  vij  dpP q for all such circles.
Proof. (a) Notice that the circle pP, r q is externally tangent to i and internally tangent to j
if and only if Oi P  Ri r and Oj  Rj  r. Therefore, for each such circle we have
Oi P

Oj P

 Oi A

Oj A  Oi C

Oj C

 Ri

Rj .

Such points lie on an ellipse with foci Oi and Oj ; the diameter of this ellipse is Ri Rj , and it
passes through the points A and C. Let ij be that arc AC of the ellipse which runs inside the
half plane H (see Fig. 3.)
This ellipse arc lies between the arcs i and j . Therefore, if some point P lies on ij ,
then Oi P Ri and Oj P Rj . Now, we choose r  Oi P  Ri  Rj  Oj P 0; then the

61

(P, r)
hi

ij

Rj

ij

i
Oj

~
~

~j
hj

Ri

~i

d(P )

~v

Oi

d(P )
B

Fig. 2

Fig. 3

circle pP, r q touches i externally and touches j internally, so P belongs to the locus under
investigation.

(b) Let ~  AP , ~i  AOi, and ~j  AOj ; let dij  OiOj , and let ~v be a unit vector

orthogonal to AC and directed toward H. Then we have |~i |  Ri , |~j |  Rj , |OiP | 


P |  |~  ~j |  Rj  r, hence
|~  ~i|  Ri r, |Oj

p~  ~iq2  p~  ~j q2  pRi rq2  pRj  rq2,


p~i2  ~j2q 2~  p~j  ~iq  pRi2  Rj2 q 2rpRi Rj q,
dij  dpP q  dij ~v  ~  p~j  ~i q  ~  r pRi Rj q.
Therefore,
r

 R dij R  dpP q,
i

and the value vij

 R dij R
i

does not depend on P .

Lemma 3. The curved quadrilateral Qij


if ui,i 1  vj,j 1.

 Vi,j
Vi 1,j Vi

1,j 1 Vi,j 1

is circumscribed if and only

Proof. First suppose that the curved quadrilateral Qij is circumscribed and pP, r q is its inscribed circle. By Lemma 1 and Lemma 2 we have r  ui,i 1  dpP q and r  vj,j 1  dpP q as
well. Hence, ui,i 1  vj,j 1.
To prove the opposite direction, suppose ui,i 1  vj,j 1. Let P be the intersection of the
angle bisector i,i 1 and the ellipse arc j,j 1. Choose r  ui,i 1  dpP q  vj,j 1  dpP q. Then
the circle pP, r q is tangent to the half lines hi and hi 1 by Lemma 1, and it is tangent to the
l
arcs j and j 1 by Lemma 2. Hence, the curved quadrilateral Qij is circumscribed.
By Lemma 3, the statement of the problem can be reformulated to an obvious fact: If the
equalities u12  v12 , u12  v23 , and u23  v12 hold, then u23  v23 holds as well.

62
Comment 1. Lemma 2(b) (together with the easy Lemma 1(b)) is the key tool in this solution.
If one finds this fact, then the solution can be finished in many ways. That is, one can find a circle
touching three of h2 , h3 , 2 , and 3 , and then prove that it is tangent to the fourth one in either
synthetic or analytical way. Both approaches can be successful.
Here we present some discussion about this key Lemma.
1. In the solution above we chose an analytic proof for Lemma 2(b) because we expect that most
students will use coordinates or vectors to examine the locus of the centers, and these approaches are
less case-sensitive.
Here we outline a synthetic proof. We consider only the case when P does not lie in the line Oi Oj .
The other case can be obtained as a limit case, or computed in a direct way.
Let S be the internal homothety center between the circles of i and j , lying on Oi Oj ; this point
does not depend on P . Let U and V be the points of tangency of circle  pP, r q with i and j ,
respectively (then r  P U  P V ); in other words, points U and V are the intersection points of
rays Oi P , Oj P with arcs i , j respectively (see Fig. 4).
Due to the theorem on three homothety centers (or just to the Menelaus theorem applied to
triangle Oi Oj P ), the points U , V and S are collinear. Let T be the intersection point of line AC and
the common tangent to and i at U ; then T is the radical center of , i and j , hence T V is the
common tangent to and j .
Let Q be the projection of P onto the line AC. By the right angles, the points U , V and Q lie on
the circle with diameter P T . From this fact and the equality P U  P V we get =U QP  =U V P 
=V U P  =SU Oi. Since Oi S k P Q, we have =SOi U  =QP U . Hence, the triangles SOiU and U P Q
PU
Oi S
Oi S
r

; the last expression is constant since S is a constant


are similar and thus
dpP q
PQ
Oi U
Ri
point.
l

d (P )

ij
P

U
U
U

d(P ))
d(P

i
Oj
A

S
T

Oj

d (A)

C
Oi

C
Oi

Fig. 4

Fig. 5

2. Using some known facts about conics, the same statement can be proved in a very short way.
Denote by the directrix of ellipse of ij related to the focus Oj ; since ij is symmetrical about Oi Oj ,
we have k AC. Recall that for each point P P ij , we have P Oj   d pP q, where d pP q is the
distance from P to , and is the eccentricity of ij (see Fig. 5).
Now we have
r

 Rj  pRj  rq  AOj  P Oj  d pAq  dpP q  dpP q  dpAq   dpP q,

and does not depend on P .

63
Comment 2. One can find a spatial interpretations of the problem and the solution.
For every point px, y q and radius r 0, represent the circle px,
 y q, r by the point px, y, r q
in space. This point is the apex of the cone with base circle px, y q, r and height r. According to
1 , starting
Lemma 1, the circles which are tangent to hi and hj correspond to the points of a half line ij
at B.
Now we translate Lemma 2. Take some 1 i j 3, and consider those circles which are
internally tangent to j . It is easy to see that the locus of the points which represent these circles is
a subset of a cone, containing j . Similarly, the circles which are externally tangent to i correspond
to the points on the extension of another cone, which has its apex on the opposite side of the base
plane . (See Fig. 6; for this illustration, the z-coordinates were multiplied by 2.)
The two cones are symmetric to each other (they have the same aperture, and their axes are
parallel). As is well-known, it follows that the common points of the two cones are co-planar. So the
intersection of the two cones is a a conic section which is an ellipse, according to Lemma 2(a). The
points which represent the circles touching i and j is an ellipse arc 1ij with end-points A and C.

12

23

ij

23

12
i
j

Fig. 6

1
Thus, the curved quadrilateral Qij is circumscribed if and only if i,i

Fig. 7

and 1j,j 1 intersect, i.e. if


they are coplanar. If three of the four curved quadrilaterals are circumscribed, it means that 112 , 123 ,
1 and 1 lie in the same plane , and the fourth intersection comes to existence, too (see Fig. 7).
12
23
1

A connection between mathematics and real life:


the Palace of Creativity Shabyt (Inspiration) in Astana

Number Theory
N1. Find the least positive integer n for which there exists a set ts1 , s2 , . . . , snu consisting of

n distinct positive integers such that




1

1
s1

1

1
s2

... 1 

N1 . Same as Problem N1, but the constant

1
sn

51
.
 2010

51
42
is replaced by
.
2010
2010
(Canada)

Answer for Problem N1. n  39.


Solution for Problem N1. Suppose that for some n there exist the desired numbers; we
1
 0. So we have
may assume that s1 s2    sn . Surely s1 1 since otherwise 1 
s1
2 s1 s2  1    sn  pn  1q, hence si i 1 for each i  1, . . . , n. Therefore
51
2010

1

1

1
1
1
1
... 1 
s1
s2
sn

1
1
1
1 2
n

1
... 1 




2
3
n 1
2 3
n 1

which implies
n

2010
51

 n 1 1,

 670
39,
17

so n 39.
Now we are left to show that n  39 fits. Consider the set t2, 3, . . . , 33, 35, 36, . . . , 40, 67u
which contains exactly 39 numbers. We have
1 2
32 34
39 66









2 3
33 35
40 67

66
17
51
 331  34



,
40 67
670
2010

p1q

hence for n  39 there exists a desired example.

Comment. One can show that the example p1q is unique.

Answer for Problem N11 . n  48.

Solution for Problem N11 . Suppose that for some n there exist the desired numbers. In
the same way we obtain that si i 1. Moreover, since the denominator of the fraction
7
42
is divisible by 67, some of si s should be divisible by 67, so sn si 67. This

2010
335
means that


1 2
n1
1
66
42






1

,
2010
2 3
n
67
67n

65
which implies

2010  66
42  67

 330
47,
7

so n 48.
Now we are left to show that n  48 fits. Consider the set t2, 3, . . . , 33, 36, 37, . . . , 50, 67u
which contains exactly 48 numbers. We have
1 2
32 35
49 66









2 3
33 36
50 67

66
7
42
 331  35



,
50 67
335
2010

hence for n  48 there exists a desired example.


Comment 1. In this version of the problem, the estimate needs one more step, hence it is a bit
harder. On the other hand, the example in this version is not unique. Another example is
1 2
46 66 329




 
2 3
47 67 330

66 329
42
.
 671  330
 47  677 5  2010

Comment 2. N11 was the Proposers formulation of the problem. We propose N1 according to the
number of current IMO.

66

N2. Find all pairs pm, nq of nonnegative integers for which


2  3n

m2

m

2n

1

(1)

(Australia)

Answer. p6, 3q, p9, 3q, p9, 5q, p54, 5q.

Solution. For fixed values of n, the equation (1) is a simple quadratic equation in m. For
n 5 the solutions are listed in the following table.
case
n0
n1
n2
n3
n4
n5

equation
m2  m 2  0
m2  3m 6  0
m2  7m 18  0
m2  15m 54  0
m2  31m 162  0
m2  63m 486  0

discriminant
7
15
23
9
313
2025  452

We prove that there is no solution for n 6.

integer roots
none
none
none
m  6 and m  9
none
m  9 and m  54

Suppose that pm, nq satisfies (1) and n 6. Since m  2  3n  m 2n


m  3p with some 0 p n or m  2  3q with some 0 q n.
In the first case, let q  n  p; then
2n

1m

In the second case let p  n  q. Then


2n

1m

2  3n
m

 3p

2  3n
m

 2  3q

 1  m2 , we have

2  3q .

3p .

Hence, in both cases we need to find the nonnegative integer solutions of


3p

2  3q

 2n 1  1,

 n.

(2)

Next, we prove bounds for p, q. From (2) we get


3p
and

2n 1  8

n 1
3

n 1
3

3 p

2 n 1
3

2n 1  2  8 2  9  2  3 2  3 p q ,
so p, q 2pn3 1q . Combining these inequalities with p q  n, we obtain
n2
p, q 2pn 1q .
2  3q

n
3

n
3

2n
3

2 n 1
3

(3)

Now let h  minpp, q q. By (3) we have h n3 2 ; in particular,



 we have h 1. On the
h
 3h  2n 1  1. It is easy check
left-hand side of (2), both
terms
are
divisible
by
3
,
therefore
9


that ord9 p2q  6, so 9  2n 1  1 if and only if 6  n 1. Therefore, n 1  6r for some positive
integer r, and we can write
2n

 1  43r  1  p42r

4r

1qp2r  1qp2r

1q.

(4)

67
Notice that the factor 42r 4r 1  p4r  1q2 3  4r is divisible by 3, but it is never
divisible by 9. The other two factors in (4), 2r  1 and 2r 1 are coprime: both are odd and
their difference is 2. Since the whole product is divisible by 3h , we have either 3h1  2r  1 or
3h1  2r 1. In any case, we have 3h1 2r 1. Then
3h1 2r 1 3r  3 6 ,
n 1
n2
,

1h1
3
6
n 11.
n 1

But this is impossible since we assumed n 6, and we proved 6  n

1.

68

N3. Find the smallest number n such that there exist polynomials f1 , f2 , . . . , fn with rational
coefficients satisfying
x2 7  f1 pxq2 f2 pxq2    fn pxq2 .
(Poland)
Answer. The smallest n is 5.
Solution 1. The equality x2 7  x2 22 12 12 12 shows that n 5. It remains to
show that x2 7 is not a sum of four (or less) squares of polynomials with rational coefficients.
Suppose by way of contradiction that x2 7  f1 pxq2 f2 pxq2 f3 pxq2 f4 pxq2 , where the
coefficients of polynomials f1 , f2 , f3 and f4 are rational (some of these polynomials may be
zero).
Clearly, the degrees of f1 , f2 , f3 and f4 are at most 1. Thus fi pxq  ai x bi for i  1, 2, 3, 4
and some rationals a1 , b1 , a2 , b2 , a3 , b3 , a4 , b4 . It follows that x2 7  4i1 pai x bi q2 and
hence
4

Let pi

 1,

a2i

i 1

 ai

bi and qi

ai bi

 0,

i 1

 ai  bi for i  1, 2, 3, 4. Then
4

i 1
4

i 1
4

and

p2i
qi2

pi qi





i 1

i 1
4

i 1
4

a2i

a2i  2
a2i 

i 1

i 1
4

ai bi

 7.

(1)

i 1

ai bi

i 1
4

b2i
i 1

b2i

i 1
4

b2i

 8,

b2i

8

i 1

 6,

which means that there exist a solution in integers x1 , y1 , x2 , y2 , x3 , y3 , x4 , y4 and m


the system of equations
(i)

x2i

 8m2,

i 1

(ii)

yi2

 8m2,

i 1

(iii)

xi yi

0 of

 6m2.

i 1

We will show that such a solution does not exist.


Assume the contrary and consider a solution with minimal m. Note that if an integer x is
odd then x2  1 pmod 8q. Otherwise (i.e., if x is even) we have x2  0 pmod 8q or x2  4
pmod 8q. Hence, by (i), we get that x1 , x2 , x3 and x4 are even. Similarly, by (ii), we get that
y1 , y2 , y3 and y4 are even. Thus the LHS of (iii) is divisible by 4 and m is also even. It follows
that p x21 , y21 , x22 , y22 , x23 , y23 , x24 , y24 , m2 q is a solution of the system of equations (i), (ii) and (iii),
which contradicts the minimality of m.
Solution 2. We prove that n 4 is impossible. Define the numbers ai , bi for i  1, 2, 3, 4 as
in the previous solution.
By Eulers identity we have

pa21

a22

a23

a24 qpb21

b22

b23

b24 q pa1 b1 a2 b2
pa1 b3  a3b1

a3 b3 a4 b4 q2
a4 b2  a2 b4 q2

pa1 b2  a2b1
pa1 b4  a4b1

a3 b4  a4 b3 q2
a2 b3  a3 b2 q2 .

69
So, using the relations (1) from the Solution 1 we get that
7

 m 2

 m 2

 m 2

(2)

where
m1
m
m2
m
m3
m

 a1 b2  a2b1
 a1 b3  a3b1
 a1 b4  a4b1

a3 b4  a4 b3 ,
a4 b2  a2 b4 ,
a2 b3  a3 b2

and m1 , m2 , m3 P Z, m P N.
Let m be a minimum positive integer number for which (2) holds. Then
8m2

 m21

m22

m23

m2 .

As in the previous solution, we get that m1 , m2 , m3 , m are all even numbers. Then m21 , m22 , m23 , m2
is also a solution of (2) which contradicts the minimality of m. So, we have n 5. The example
with n  5 is already shown in Solution 1.

70

N4. Let a, b be integers, and let P pxq  ax3

bx.  For any positive integer n we say that the


pair pa, bq is n-good if n  P pmq  P pk q implies n  m  k for all integers m, k. We say that
pa, bq is very good if pa, bq is n-good for infinitely many positive integers n.
(a) Find a pair pa, bq which is 51-good, but not very good.
(b) Show that all 2010-good pairs are very good.
(Turkey)
Solution. (a) We show that the pair p1, 512 q is good but not very good. Let P pxq  x3  512x.
Since P p51q  P p0q, the pair p1, 512q is not n-good for any positive integer that does not
divide 51. Therefore, p1, 512 q is not very good.
On the other hand, if P pmq  P pk q pmod 51q, then m3  k 3 pmod 51q. By Fermats
theorem, from this we obtain
m  m3

 k3  k pmod 3q and m  m33  k33  k pmod 17q.


Hence we have m  k pmod 51q. Therefore p1, 512q is 51-good.
(b) We will show that if a pair pa, bq is 2010-good then pa, bq is 67i -good for all positive

integer i.
Claim 1. If pa, bq is 2010-good then pa, bq is 67-good.
Proof. Assume that P pmq  P pk q pmod 67q. Since 67 and 30 are coprime, there exist integers
m1 and k 1 such that k 1  k pmod 67q, k 1  0 pmod 30q, and m1  m pmod 67q, m1  0
pmod 30q. Then we have P pm1q  P p0q  P pk1q pmod 30q and P pm1q  P pmq  P pkq  P pk1q
pmod 67q, hence P pm1q  P pk1q pmod 2010q. This implies m1  k1 pmod 2010q as pa, bq is
2010-good. It follows that m  m1  k 1  k pmod 67q. Therefore, pa, bq is 67-good.
l


Claim 2. If pa, bq is 67-good then 67  a.



Proof. Suppose that 67   a. Consider the sets tat2 pmod 67q : 0 t 33u and t3as2  b
mod 67 : 0 s 33u. Since a  0 pmod 67q, each of these sets has 34 elements. Hence they
have at least one element in common. If at2  3as2  b pmod 67q then for m  t  s, k  2s
we have
P pmq  P pk q  apm3  k 3 q

bpm  k q  pm  k q apm2 mk k 2 q b
 pt  3sqpat2 3as2 bq  0 pmod 67q.

Since pa, bq is 67-good, we must have m  k pmod 67q in both cases, that is, t  3s pmod 67q
and t  3s pmod 67q. This means t  s  0  pmod 67q and b  3as2  at2  0 pmod 67q.
But then 67  P p7q P p2q  67  5a 5b and 67  7  2, contradicting that pa, bq is 67-good. l

Claim 3. If pa, bq is 2010-good then pa, bq is 67i-good all i 1.




Proof. By Claim 2, we have 67  a. If 67  b, then P pxq  P p0q pmod 67q for all x, contradicting
that pa, bq is 67-good. Hence, 67  b.



Suppose that 67i  P pmq  P pk q  pm  k q apm2 mk k 2 q b . Since 67  a and 67   b,
the second factor apm2 mk k 2 q b is coprime to 67 and hence 67i  m  k. Therefore, pa, bq
is 67i -good.
l

Comment 1. In the proof of Claim 2, the following reasoning can also be used. Since 3 is not
a quadratic residue modulo 67, either au2  b pmod 67q or 3av 2  b pmod 67q has a solution.
The settings pm, kq  pu, 0q in the first case and pm, kq  pv, 2v q in the second case lead to b  0
pmod 67q.


Comment 2. The pair p67, 30q is n-good if and only if n  d  67i , where d  30 and i 0. It shows
that in part (b), one should deal with the large powers of 67 to reach the solution. The key property
of number 67 is that it has the form 3k 1, so there exists a nontrivial cubic root of unity modulo 67.

71

N5. Let N be the set of all positive integers. Find all functions f : N
number f pmq

n m

f pnq is a square for all m, n P N.

N such that the


(U.S.A.)

Answer. All functions of the form f pnq  n

c, where c P N Y t0u.

Solution. First, it is clear that all functions of the form f pnq  n c with
 a constant nonnegative integer c satisfy the problem conditions since f pmq n f pnq m  pn m cq2 is a
square.
We are left to prove that there are no other functions. We start with the following


Lemma. Suppose that p  f pk q f pq for some prime p and positive integers k, . Then p  k  .

Proof. Suppose first that p2  f pk q  f pq, so f pq  f pk q p2 a for some integer a. Take some
positive integer D maxtf pk q, f pqu which is not divisible by p and set n 
 pD  f pk q. Then
the positive numbers n f pk q  pD and n f pq  pD
f pq  f pk q  ppD paq are
both divisible by p but not byp2 . Now, applying
conditions, we get that both the
 the problem

numbers f pk q n f pnq k and f pq n f pnq are squares divisible by p (and thus
by p2 ); this means
that the multipliers f pnq k and f pnq are also divisible by p, therefore


p f pnq k  f pnq  k  as well.
On the other hand, if f pk q  f pq is divisible by p but not by p2 , then choose the same
number D and set n  p3 D  f pk q. Then the positive numbers f pk q n  p3 D and f pq n 
p3 D
f pq  f pk q are respectively divisible by p3 (but not by p4 ) and by p (but not by p2 ).
Hence in analogous
way
the numbers f pnq k and f pnq are divisible by p,

 we obtain that


therefore p f pnq k  f pnq  k  .
l
We turn to the problem. First, suppose that f pk q  f pq for some k, P N. Then by Lemma
we have that k  is divisible by every prime number, so k   0, or k  . Therefore, the
function f is injective.
Next, consider the numbers f pk q and f pk 1q. Since the number pk 1q  k  1 has no
prime divisors, by Lemma the same holds for f pk 1q  f pk q; thus |f pk 1q  f pk q|  1.
Now, let f p2q  f p1q  q, |q |  1. Then we prove by induction that f pnq  f p1q q pn  1q.
The base for n  1, 2 holds by the definition of q. For the step, if n 1 we have f pn 1q 
f pnq q  f p1q q pn  1q q. Since f pnq  f pn  2q  f p1q q pn  2q, we get f pnq  f p1q qn,
as desired.
Finally, we have f pnq  f p1q q pn  1q. Then q cannot be 1 since otherwise for n f p1q 1
we have f pnq 0 which is impossible. Hence q  1 and f pnq  pf p1q  1q n for each n P N,
and f p1q  1 0, as desired.

72

N6. The rows and columns of a 2n  2n table are numbered from 0 to 2n  1. The cells of the

table have been colored with the following property being satisfied: for each 0 i, j 2n  1,
the jth cell in the ith row and the pi j qth cell in the jth row have the same color. (The
indices of the cells in a row are considered modulo 2n .)
Prove that the maximal possible number of colors is 2n .
(Iran)
Solution. Throughout the solution we denote the cells of the table by coordinate pairs; pi, j q
refers to the jth cell in the ith row.
Consider the directed graph, whose vertices are the cells of the board, and the edges are
the arrows pi, j q pj, i j q for all 0 i, j 2n  1. From each vertex pi, j q, exactly one edge
passes (to pj, i j mod 2n q); conversely, to each cell pj, k q exactly one edge is directed (from
the cell pk  j mod 2n , j qq. Hence, the graph splits into cycles.
Now, in any coloring considered, the vertices of each cycle should have the same color by
the problem condition. On the other hand, if each cycle has its own color, the obtained coloring
obviously satisfies the problem conditions. Thus, the maximal possible number of colors is the
same as the number of cycles, and we have to prove that this number is 2n .
Next, consider any cycle pi1 , j1 q, pi2 , j2 q, . . . ; we will describe it in other terms. Define a
sequence pa0 , a1 , . . . q by the relations a0  i1 , a1  j1 , an 1  an an1 for all n 1 (we
say that such a sequence is a Fibonacci-type sequence). Then an obvious induction shows
that ik  ak1 pmod 2n q, jk  ak pmod 2n q. Hence we need to investigate the behavior of
Fibonacci-type sequences modulo 2n .
Denote by F0 , F1 , . . . the Fibonacci numbers defined by F0  0, F1  1, and Fn 2 
Fn 1 Fn for n 0. We also set F1  1 according to the recurrence relation.
For every positive integer
m, denote by

 pmq the exponent of 2 in the prime factorization
pmq 
pmq 1 
of m, i.e. for which 2
m but 2
 m.
Lemma 1. For every Fibonacci-type sequence a0 , a1 , a2 , . . . , and every k 0, we have ak 
Fk1 a0 Fk a1 .
Proof. Apply induction on k. The base cases k  0, 1 are trivial. For the step, from the
induction hypothesis we get
ak

 ak

ak1

 pFk1a0

Fk a1 q

pFk2a0

Fk1 a1 q  Fk a0

Fk 1 a1 .

Lemma 2. For every m 3,


(a) we have pF32m2 q  m;

(b) d  3  2m2 is the least positive index for which 2m  Fd ;
(c) F32m2 1  1 2m1 pmod 2m q.
Proof. Apply induction on m. In the base case m  3 we have pF32m2 q  F6  8, so
pF32m2 q  p8q  3, the preceding Fibonacci-numbers are not divisible by 8, and indeed
F32m2 1  F7  13  1 4 pmod 8q.
Now suppose that m 3 and let k  3  2m3 . By applying Lemma 1 to the Fibonacci-type
sequence Fk , Fk 1 , . . . we get

 pFk 1  Fk qFk Fk 1Fk  2Fk 1Fk  Fk2,


F2k 1  Fk  Fk Fk 1  Fk 1  Fk2 Fk2 1 .
By the induction hypothesis, pFk q  m  1, and Fk 1 is odd. Therefore we get pFk2 q 
2pm  1q pm  1q 1  p2Fk Fk 1 q, which implies pF2k q  m, establishing statement (a).
F2k

 Fk1Fk

Fk Fk

73
Moreover, since Fk
F2k

1

 Fk2

2m2
Fk2

a2m1 for some integer a, we get

 0 p1

2m2

a2m1 q2

1

2m1

pmod 2mq,

as desired in statement (c).




We are left to prove that 2m   F for 2k. Assume the contrary. Since 2m1  F , from
the induction hypothesis it follows that k. But then we have F  Fk1 Fk Fk Fk 1 ,
where the second summand is divisible by 2m1 but the first one is not (since Fk1 is odd and
 k k). Hence the sum is not divisible even by 2m1 . A contradiction.
l

Now, for every pair of integers pa, bq  p0, 0q, let pa, bq  mint paq, pbqu. By an obvious induction, for every Fibonacci-type sequence A  pa0 , a1 , . . . q we have pa0 , a1 q  pa1 , a2 q  . . .;
denote this common value by pAq. Also denote by pn pAq the period of this sequence modulo
2n , that is, the least p 0 such that ak p  ak pmod 2n q for all k 0.
Lemma 3. Let A  pa0 , a1 , . . . q be a Fibonacci-type sequence such that pAq  k n. Then
pn pAq  3  2n1k .
Proof. First, we note that the sequence pa0 , a1 , . . . q has period p modulo 2n if and only if the
sequence pa0 {2k , a1 {2k , . . . q has period p modulo 2nk . Hence, passing to this sequence we can
assume that k  0.
We prove the statement by induction on n. It is easy to see that for n  1, 2 the claim
is true; actually, each Fibonacci-type sequence A with pAq  0 behaves as 0, 1, 1, 0, 1, 1, . . .
modulo 2, and as 0, 1, 1, 2, 3, 1, 0, 1, 1, 2, 3, 1, . . . modulo 4 (all pairs of residues from which at
least one is odd appear as a pair of consecutive terms in this sequence).
Now suppose that n 3 and consider an arbitrary
 Fibonacci-type sequence A  pa0 , a1 , . . . q
with pAq  0. Obviously we should have pn1 pAq  pn pAq, or, using the induction hypothesis,
s  3  2n2  pn pAq. Next, we may suppose that a0 is even; hence a1 is odd, and a0  2b0 ,
a1  2b1 1 for some integers b0 , b1 .
Consider the Fibonacci-type sequence B  pb0 , b1 , . . . q starting with pb0 , b1 q. Since a0 
2b0 F0 , a1  2b1 F1 , by an easy induction
we get ak  2bk Fk for all k 0. By

the induction hypothesis, we have pn1 pB q  s, hence the sequence p2b0 , 2b1 , . . . q is s-periodic
modulo 2n . On the other hand, by Lemma 2 we have Fs 1  1 2n1 pmod 2n q, F2s  0
pmod 2nq, F2s 1  1 pmod 2nq, hence
as

Fs 1  2b1 1 2n1  2b1 1  a1 pmod 2n q,


a2s  2b2s F2s  2b0 0  a0 pmod 2n q,
a2s 1  2b2s 1 F2s 1  2b1 1  a1 pmod 2n q.

 2bs

The first line means that A is not s-periodic, while the other
two provide that a2s  a0 ,

a2s 1  a1 and hence a2s t  at for all t 0. Hence s  pn pAq  2s and pn pAq  s, which means
that pn pAq  2s, as desired.
l
Finally, Lemma 3 provides a straightforward method of counting the number of cycles.
Actually, take any number 0 k n  1 and consider all the cells pi, j q with pi, j q  k. The
total number of such cells is 22pnkq  22pnk1q  3  22n2k2 . On the other hand, they are split
into cycles, and by Lemma 3 the length of each cycle is 3  2n1k . Hence the number of cycles
3  22n2k2
consisting of these cells is exactly
 2nk1. Finally, there is only one cell p0, 0q
3  2n1k
which is not mentioned in the previous computation, and it forms a separate cycle. So the total
number of cycles is

n1

k 0

2n1k

 1 p1



2n1q  2n .

74
Comment. We outline a different proof for the essential part of Lemma 3. That is, we assume that
k  0 and show that in this case the period of pai q modulo 2n coincides with the period of the Fibonacci
numbers modulo 2n ; then the proof can be finished by the arguments from Lemma 2..
Note that p is a (not necessarily minimal) period of the sequence pai q modulo 2n if and only if we
have a0  ap pmod 2n q, a1  ap 1 pmod 2n q, that is,

 ap  Fp1 a0 Fp a1  Fp pa1  a0 q Fp 1a0 pmod 2nq,


(1)
a1  ap 1  Fp a0 Fp 1 a1 pmod 2n q.
Now, If p is a period of pFi q then we have Fp  F0  0 pmod 2n q and Fp 1  F1  1 pmod 2n q, which
by (1) implies that p is a period of pai q as well.
Conversely, suppose that p is a period of pai q. Combining the relations of (1) we get

0  a1  a0  a0  a1  a1 Fp pa1  a0 q Fp 1 a0  a0 pFp a0 Fp 1 a1 q
 Fp pa21  a1 a0  a20 q pmod 2nq,

a21  a1 a0  a20  pa1  a0 qa1  a0  a0  pa1  a0 qpFp a0 Fp 1 a1 q  a0 Fp pa1  a0 q Fp 1 a0
 Fp 1pa21  a1 a0  a20 q pmod 2nq.
Since at least one of the numbers a0 , a1 is odd, the number a21  a1 a0  a20 is odd as well. Therefore the
previous relations are equivalent with Fp  0 pmod 2n q and Fp 1  1 pmod 2n q, which means exactly
that p is a period of pF0 , F1 , . . . q modulo 2n .
So, the sets of periods of pai q and pFi q coincide, and hence the minimal periods coincide as well.
a0

75

76

52nd International
Mathematical Olympiad
12 24 July 2011
Amsterdam
The Netherlands

Problem Shortlist
with Solutions

IMO2011
Amsterdam

International
Mathematical
Olympiad Am
sterdam 2011

52nd International
Mathematical Olympiad
12-24 July 2011
Amsterdam
The Netherlands

Problem shortlist
with solutions

IMPORTANT

IMO regulation:
these shortlist problems have to
be kept strictly confidential
until IMO 2012.

The problem selection committee


Bart de Smit (chairman), Ilya Bogdanov, Johan Bosman,
Andries Brouwer, Gabriele Dalla Torre, Geza Kos,
Hendrik Lenstra, Charles Leytem, Ronald van Luijk,
Christian Reiher, Eckard Specht, Hans Sterk, Lenny Taelman

The committee gratefully acknowledges the receipt of 142 problem proposals


by the following 46 countries:
Armenia, Australia, Austria, Belarus, Belgium,
Bosnia and Herzegovina, Brazil, Bulgaria, Canada, Colombia,
Cyprus, Denmark, Estonia, Finland, France, Germany, Greece,
Hong Kong, Hungary, India, Islamic Republic of Iran, Ireland, Israel,
Japan, Kazakhstan, Republic of Korea, Luxembourg, Malaysia,
Mexico, Mongolia, Montenegro, Pakistan, Poland, Romania,
Russian Federation, Saudi Arabia, Serbia, Slovakia, Slovenia,
Sweden, Taiwan, Thailand, Turkey, Ukraine, United Kingdom,
United States of America

Algebra

Problem shortlist

52nd IMO 2011

Algebra

A1

A1
For any set A = {a1 , a2 , a3 , a4 } of four distinct positive integers with sum sA = a1 + a2 + a3 + a4 ,
let pA denote the number of pairs (i, j) with 1 i < j 4 for which ai + aj divides sA . Among
all sets of four distinct positive integers, determine those sets A for which pA is maximal.
A2

A2
Determine all sequences (x1 , x2 , . . . , x2011 ) of positive integers such that for every positive integer n there is an integer a with
xn1 + 2xn2 + + 2011xn2011 = an+1 + 1.
A3

A3
Determine all pairs (f, g) of functions from the set of real numbers to itself that satisfy
g(f (x + y)) = f (x) + (2x + y)g(y)
for all real numbers x and y.
A4

A4
Determine all pairs (f, g) of functions from the set of positive integers to itself that satisfy
f g(n)+1 (n) + g f (n) (n) = f (n + 1) g(n + 1) + 1
for every positive integer n. Here, f k (n) means f (f (. . . f (n) . . .)).
| {z }
k

A5

A5
Prove that for every positive integer n, the set {2, 3, 4, . . . , 3n + 1} can be partitioned into
n triples in such a way that the numbers from each triple are the lengths of the sides of some
obtuse triangle.

52nd IMO 2011

Problem shortlist

Algebra

A6

A6
Let f be a function from the set of real numbers to itself that satisfies
f (x + y) yf (x) + f (f (x))
for all real numbers x and y. Prove that f (x) = 0 for all x 0.
A7

A7
Let a, b, and c be positive real numbers satisfying min(a+b, b+c, c+a) >
Prove that

2 and a2 +b2 +c2 = 3.

a
b
c
3
+
+

.
2
2
2
(b + c a)
(c + a b)
(a + b c)
(abc)2

Combinatorics

Problem shortlist

52nd IMO 2011

Combinatorics

C1

C1
Let n > 0 be an integer. We are given a balance and n weights of weight 20 , 21 , . . . , 2n1 . In a
sequence of n moves we place all weights on the balance. In the first move we choose a weight
and put it on the left pan. In each of the following moves we choose one of the remaining
weights and we add it either to the left or to the right pan. Compute the number of ways in
which we can perform these n moves in such a way that the right pan is never heavier than the
left pan.
C2

C2
Suppose that 1000 students are standing in a circle. Prove that there exists an integer k with
100 k 300 such that in this circle there exists a contiguous group of 2k students, for which
the first half contains the same number of girls as the second half.
C3

C3
Let S be a finite set of at least two points in the plane. Assume that no three points of S are
collinear. By a windmill we mean a process as follows. Start with a line going through a
point P S. Rotate clockwise around the pivot P until the line contains another point Q
of S. The point Q now takes over as the new pivot. This process continues indefinitely, with
the pivot always being a point from S.
Show that for a suitable P S and a suitable starting line containing P , the resulting
windmill will visit each point of S as a pivot infinitely often.
C4

C4
Determine the greatest positive integer k that satisfies the following property: The set of positive
integers can be partitioned into k subsets A1 , A2 , . . . , Ak such that for all integers n 15 and
all i {1, 2, . . . , k} there exist two distinct elements of Ai whose sum is n.

52nd IMO 2011

Problem shortlist

Combinatorics

C5

C5
Let m be a positive integer and consider a checkerboard consisting of m by m unit squares.
At the midpoints of some of these unit squares there is an ant. At time 0, each ant starts
moving with speed 1 parallel to some edge of the checkerboard. When two ants moving in
opposite directions meet, they both turn 90 clockwise and continue moving with speed 1.
When more than two ants meet, or when two ants moving in perpendicular directions meet,
the ants continue moving in the same direction as before they met. When an ant reaches one
of the edges of the checkerboard, it falls off and will not re-appear.
Considering all possible starting positions, determine the latest possible moment at which the
last ant falls off the checkerboard or prove that such a moment does not necessarily exist.
C6

C6
Let n be a positive integer and let W = . . . x1 x0 x1 x2 . . . be an infinite periodic word consisting
of the letters a and b. Suppose that the minimal period N of W is greater than 2n .
A finite nonempty word U is said to appear in W if there exist indices k such that
U = xk xk+1 . . . x . A finite word U is called ubiquitous if the four words Ua, Ub, aU, and bU
all appear in W . Prove that there are at least n ubiquitous finite nonempty words.
C7

C7
On a square table of 2011 by 2011 cells we place a finite number of napkins that each cover
a square of 52 by 52 cells. In each cell we write the number of napkins covering it, and we
record the maximal number k of cells that all contain the same nonzero number. Considering
all possible napkin configurations, what is the largest value of k?

Geometry

Problem shortlist

52nd IMO 2011

Geometry

G1

G1
Let ABC be an acute triangle. Let be a circle whose center L lies on the side BC. Suppose
that is tangent to AB at B and to AC at C . Suppose also that the circumcenter O of the
triangle ABC lies on the shorter arc B C of . Prove that the circumcircle of ABC and
meet at two points.
G2

G2
Let A1 A2 A3 A4 be a non-cyclic quadrilateral. Let O1 and r1 be the circumcenter and the
circumradius of the triangle A2 A3 A4 . Define O2 , O3 , O4 and r2 , r3 , r4 in a similar way. Prove
that
1
1
1
1
+
+
+
= 0.
2
2
2
2
2
2
2
O1 A1 r1 O2 A2 r2 O3 A3 r3 O4 A4 r42
G3

G3
Let ABCD be a convex quadrilateral whose sides AD and BC are not parallel. Suppose that the
circles with diameters AB and CD meet at points E and F inside the quadrilateral. Let E be
the circle through the feet of the perpendiculars from E to the lines AB, BC, and CD. Let F
be the circle through the feet of the perpendiculars from F to the lines CD, DA, and AB.
Prove that the midpoint of the segment EF lies on the line through the two intersection points
of E and F .
G4

G4
Let ABC be an acute triangle with circumcircle . Let B0 be the midpoint of AC and let C0
be the midpoint of AB. Let D be the foot of the altitude from A, and let G be the centroid
of the triangle ABC. Let be a circle through B0 and C0 that is tangent to the circle at a
point X 6= A. Prove that the points D, G, and X are collinear.
G5

G5
Let ABC be a triangle with incenter I and circumcircle . Let D and E be the second
intersection points of with the lines AI and BI, respectively. The chord DE meets AC at a
point F , and BC at a point G. Let P be the intersection point of the line through F parallel to
AD and the line through G parallel to BE. Suppose that the tangents to at A and at B meet
at a point K. Prove that the three lines AE, BD, and KP are either parallel or concurrent.

52nd IMO 2011

Problem shortlist

Geometry

G6

G6
Let ABC be a triangle with AB = AC, and let D be the midpoint of AC. The angle bisector
of BAC intersects the circle through D, B, and C in a point E inside the triangle ABC.
The line BD intersects the circle through A, E, and B in two points B and F . The lines AF
and BE meet at a point I, and the lines CI and BD meet at a point K. Show that I is the
incenter of triangle KAB.
G7

G7
Let ABCDEF be a convex hexagon all of whose sides are tangent to a circle with center O.
Suppose that the circumcircle of triangle ACE is concentric with . Let J be the foot of the
perpendicular from B to CD. Suppose that the perpendicular from B to DF intersects the
line EO at a point K. Let L be the foot of the perpendicular from K to DE. Prove that
DJ = DL.
G8

G8
Let ABC be an acute triangle with circumcircle . Let t be a tangent line to . Let ta , tb ,
and tc be the lines obtained by reflecting t in the lines BC, CA, and AB, respectively. Show
that the circumcircle of the triangle determined by the lines ta , tb , and tc is tangent to the
circle .

Number Theory

Problem shortlist

52nd IMO 2011

Number Theory

N1

N1
For any integer d > 0, let f (d) be the smallest positive integer that has exactly d positive
divisors (so for example we have f (1) = 1, f (5) = 16, and f (6) = 12). Prove that for every
integer k 0 the number f (2k ) divides f (2k+1).
N2

N2
Consider a polynomial P (x) = (x + d1 )(x + d2 ) . . . (x + d9 ), where d1 , d2 , . . . , d9 are nine
distinct integers. Prove that there exists an integer N such that for all integers x N the
number P (x) is divisible by a prime number greater than 20.
N3

N3
Let n 1 be an odd integer. Determine all functions f from the set of integers to itself such
that for all integers x and y the difference f (x) f (y) divides xn y n .
N4

N4
For each positive integer k, let t(k) be the largest odd divisor of k. Determine all positive
integers a for which there exists a positive integer n such that all the differences
t(n + a) t(n),

t(n + a + 1) t(n + 1),

...,

t(n + 2a 1) t(n + a 1)

are divisible by 4.
N5

N5
Let f be a function from the set of integers to the set of positive integers. Suppose that for
any two integers m and n, the difference f (m) f (n) is divisible by f (m n). Prove that for
all integers m, n with f (m) f (n) the number f (n) is divisible by f (m).
N6

N6
Let P (x) and Q(x) be two polynomials with integer coefficients such that no nonconstant
polynomial with rational coefficients divides both P (x) and Q(x). Suppose that for every
positive integer n the integers P (n) and Q(n) are positive, and 2Q(n) 1 divides 3P (n) 1.
Prove that Q(x) is a constant polynomial.

10

52nd IMO 2011

Problem shortlist

Number Theory

N7

N7
Let p be an odd prime number. For every integer a, define the number
Sa =

ap1
a a2
+
++
.
1
2
p1

Let m and n be integers such that


S3 + S4 3S2 =

m
.
n

Prove that p divides m.


N8

N8
Let k be a positive integer and set n = 2k + 1. Prove that n is a prime number if and only if
the following holds: there is a permutation a1 , . . . , an1 of the numbers 1, 2, . . . , n 1 and a
sequence of integers g1 , g2 , . . . , gn1 such that n divides giai ai+1 for every i {1, 2, . . . , n 1},
where we set an = a1 .

11

A1

Algebra solutions

52nd IMO 2011

A1
For any set A = {a1 , a2 , a3 , a4 } of four distinct positive integers with sum sA = a1 + a2 + a3 + a4 ,
let pA denote the number of pairs (i, j) with 1 i < j 4 for which ai + aj divides sA . Among
all sets of four distinct positive integers, determine those sets A for which pA is maximal.

Answer. The sets A for which pA is maximal are the sets the form {d, 5d, 7d, 11d} and
{d, 11d, 19d, 29d}, where d is any positive integer. For all these sets pA is 4.
Solution. Firstly, we will prove that the maximum value of pA is at most 4. Without loss
of generality, we may assume that a1 < a2 < a3 < a4 . We observe that for each pair of
indices (i, j) with 1 i < j 4, the sum ai + aj divides sA if and only if ai + aj divides
sA (ai + aj ) = ak + al , where k and l are the other two indices. Since there are 6 distinct
pairs, we have to prove that at least two of them do not satisfy the previous condition. We
claim that two such pairs are (a2 , a4 ) and (a3 , a4 ). Indeed, note that a2 + a4 > a1 + a3 and
a3 + a4 > a1 + a2 . Hence a2 + a4 and a3 + a4 do not divide sA . This proves pA 4.
Now suppose pA = 4. By the previous argument we have

a1 + a4 a2 + a3

a1 + a2 a3 + a4

a1 + a3 a2 + a4

and
and
and


a2 + a3 a1 + a4 ,

a3 + a4 6 a1 + a2 ,

a2 + a4 6 a1 + a3 .

Hence, there exist positive integers m and n with m > n 2 such that

a1 + a4 = a2 + a3
m(a1 + a2 ) = a3 + a4

n(a1 + a3 ) = a2 + a4 .

Adding up the first equation and the third one, we get n(a1 + a3 ) = 2a2 + a3 a1 . If n 3,
then n(a1 + a3 ) > 3a3 > 2a2 + a3 > 2a2 + a3 a1 . This is a contradiction. Therefore n = 2. If
we multiply by 2 the sum of the first equation and the third one, we obtain
6a1 + 2a3 = 4a2 ,
while the sum of the first one and the second one is
(m + 1)a1 + (m 1)a2 = 2a3 .
Adding up the last two equations we get
(m + 7)a1 = (5 m)a2 .
12

52nd IMO 2011

Algebra solutions

A1

It follows that 5 m 1, because the left-hand side of the last equation and a2 are positive.
Since we have m > n = 2, the integer m can be equal only to either 3 or 4. Substituting
(3, 2) and (4, 2) for (m, n) and solving the previous system of equations, we find the families of
solutions {d, 5d, 7d, 11d} and {d, 11d, 19d, 29d}, where d is any positive integer.

13

A2

Algebra solutions

52nd IMO 2011

A2
Determine all sequences (x1 , x2 , . . . , x2011 ) of positive integers such that for every positive integer n there is an integer a with
xn1 + 2xn2 + + 2011xn2011 = an+1 + 1.

Answer. The only sequence that satisfies the condition is


(x1 , . . . , x2011 ) = (1, k, . . . , k) with k = 2 + 3 + + 2011 = 2023065.
Solution. Throughout this solution, the set of positive integers will be denoted by Z+ .
Put k = 2 + 3 + + 2011 = 2023065. We have
1n + 2k n + 2011k n = 1 + k k n = k n+1 + 1
for all n, so (1, k, . . . , k) is a valid sequence. We shall prove that it is the only one.
Let a valid sequence (x1 , . . . , x2011 ) be given. For each n Z+ we have some yn Z+ with
xn1 + 2xn2 + + 2011xn2011 = ynn+1 + 1.
Note that xn1 + 2xn2 + + 2011xn2011 < (x1 + 2x2 + + 2011x2011 )n+1 , which implies that
the sequence (yn ) is bounded. In particular, there is some y Z+ with yn = y for infinitely
many n.
Let m be the maximum of all the xi . Grouping terms with equal xi together, the sum xn1 +
2xn2 + + 2011xn2011 can be written as
xn1 + 2xn2 + + xn2011 = am mn + am1 (m 1)n + + a1
with ai 0 for all i and a1 + + am = 1 + 2 + + 2011. So there exist arbitrarily large
values of n, for which
am mn + + a1 1 y y n = 0.
(1)
The following lemma will help us to determine the ai and y:
Lemma. Let integers b1 , . . . , bN be given and assume that there are arbitrarily large positive
integers n with b1 + b2 2n + + bN N n = 0. Then bi = 0 for all i.
Proof. Suppose that not all bi are zero. We may assume without loss of generality that bN 6= 0.

14

52nd IMO 2011

Algebra solutions

A2

Dividing through by N n gives




n
n

 n


N

1
N 1
1


|bN | = bN 1
(|bN 1 | + + |b1 |)
+ + b1
.
N
N
N

n
The expression NN1 can be made arbitrarily small for n large enough, contradicting the
assumption that bN be non-zero.

We obviously have y > 1. Applying the lemma to (1) we see that am = y = m, a1 = 1,
and all the other ai are zero. This implies (x1 , . . . , x2011 ) = (1, m, . . . , m). But we also have
1 + m = a1 + + am = 1 + + 2011 = 1 + k so m = k, which is what we wanted to show.

15

A3

Algebra solutions

52nd IMO 2011

A3
Determine all pairs (f, g) of functions from the set of real numbers to itself that satisfy
g(f (x + y)) = f (x) + (2x + y)g(y)
for all real numbers x and y.

Answer. Either both f and g vanish identically, or there exists a real number C such that
f (x) = x2 + C and g(x) = x for all real numbers x.

Solution. Clearly all these pairs of functions satisfy the functional equation in question, so it
suffices to verify that there cannot be any further ones. Substituting 2x for y in the given
functional equation we obtain
g(f (x)) = f (x).
(1)
Using this equation for x y in place of x we obtain
f (x y) = g(f (x + y)) = f (x) + (2x + y)g(y).

(2)

Now for any two real numbers a and b, setting x = b and y = a + b we get
f (a) = f (b) + (a b)g(a + b).
If c denotes another arbitrary real number we have similarly
f (b) = f (c) + (b c)g(b + c)
as well as
f (c) = f (a) + (c a)g(c + a).
Adding all these equations up, we obtain



(a + c) (b + c) g(a + b) + (a + b) (a + c) g(b + c) + (b + c) (a + b) g(a + c) = 0.

Now given any three real numbers x, y, and z one may determine three reals a, b, and c such
that x = b + c, y = c + a, and z = a + b, so that we get
(y x)g(z) + (z y)g(x) + (x z)g(y) = 0.
This implies that the three points (x, g(x)), (y, g(y)), and (z, g(z)) from the graph of g are
collinear. Hence that graph is a line, i.e., g is either a constant or a linear function.

16

52nd IMO 2011

Algebra solutions

A3

Let us write g(x) = Ax + B, where A and B are two real numbers. Substituting (0, y) for
(x, y) in (2) and denoting C = f (0), we have f (y) = Ay 2 By + C. Now, comparing the
coefficients of x2 in (1) we see that A2 = A, so A = 0 or A = 1.
If A = 0, then (1) becomes B = Bx + C and thus B = C = 0, which provides the first of the
two solutions mentioned above.
Now suppose A = 1. Then (1) becomes x2 Bx + C + B = x2 Bx + C, so B = 0. Thus,
g(x) = x and f (x) = x2 + C, which is the second solution from above.
Comment. Another way to show that g(x) is either a constant or a linear function is the following.
If we interchange x and y in the given functional equation and subtract this new equation from the
given one, we obtain
f (x) f (y) = (2y + x)g(x) (2x + y)g(y).
Substituting (x, 0), (1, x), and (0, 1) for (x, y), we get
f (x) f (0) = xg(x) 2xg(0),
f (1) f (x) = (2x + 1)g(1) (x + 2)g(x),
f (0) f (1) = 2g(0) g(1).

Taking the sum of these three equations and dividing by 2, we obtain



g(x) = x g(1) g(0) + g(0).

This proves that g(x) is either a constant of a linear function.

17

A4

Algebra solutions

52nd IMO 2011

A4
Determine all pairs (f, g) of functions from the set of positive integers to itself that satisfy
f g(n)+1 (n) + g f (n) (n) = f (n + 1) g(n + 1) + 1
for every positive integer n. Here, f k (n) means f (f (. . . f (n) . . .)).
| {z }
k

Answer. The only pair (f, g) of functions that satisfies the equation is given by f (n) = n and
g(n) = 1 for all n.
Solution. The given relation implies

f f g(n) (n) < f (n + 1) for all n,

(1)

which will turn out to be sufficient to determine f .

Let y1 < y2 < . . . be all the values attained by f (this sequence might be either finite or
infinite). We will prove that for every positive n the function f attains at least n values, and
we have (i)n : f (x) = yn if and only if x = n, and (ii)n : yn = n. The proof will follow the
scheme
(i)1 , (ii)1 , (i)2 , (ii)2 , . . . , (i)n , (ii)n , . . .
(2)

To start, consider any x such that f (x) = y1 . If x > 1, then (1) reads f f g(x1) (x 1) < y1 ,
contradicting the minimality of y1 . So we have that f (x) = y1 is equivalent to x = 1, establishing (i)1 .
Next, assume that for some n statement (i)n is established, as well as all the previous statements
in (2). Note that these statements imply that for all k 1 and a < n we have f k (x) = a if
and only if x = a.
Now, each value yi with 1 i n is attained at the unique integer i, so yn+1 exists. Choose
an arbitrary x such that f (x) = yn+1 ; we necessarily have x > n. Substituting x 1 into (1)

we have f f g(x1) (x 1) < yn+1, which implies
f g(x1) (x 1) {1, . . . , n}

(3)

Set b = f g(x1) (x 1). If b < n then we would have x 1 = b which contradicts x > n. So
b = n, and hence yn = n, which proves (ii)n . Next, from (i)n we now get f (k) = n k = n,
so removing all the iterations of f in (3) we obtain x 1 = b = n, which proves (i)n+1 .
So, all the statements in (2) are valid and hence f (n) = n for all n. The given relation between
f and g now reads n + g n (n) = n + 1 g(n + 1) + 1 or g n (n) + g(n + 1) = 2, from which it

18

52nd IMO 2011

Algebra solutions

A4

immediately follows that we have g(n) = 1 for all n.


Comment. Several variations of the above solution are possible. For instance, one may first prove by
induction that the smallest n values of f are exactly f (1) < < f (n) and proceed as follows. We
certainly have f (n) n for all n. If there is an n with f (n) > n, then f (x) > x for all x n. From
this we conclude f g(n)+1 (n) > f g(n) (n) > > f (n). But we also have f g(n)+1 < f (n + 1). Having
squeezed in a function value between f (n) and f (n + 1), we arrive at a contradiction.
In any case, the inequality (1) plays an essential r
ole.

19

A5

Algebra solutions

52nd IMO 2011

A5
Prove that for every positive integer n, the set {2, 3, 4, . . . , 3n + 1} can be partitioned into
n triples in such a way that the numbers from each triple are the lengths of the sides of some
obtuse triangle.

Solution. Throughout the solution, we denote by [a, b] the set {a, a + 1, . . . , b}. We say that
{a, b, c} is an obtuse triple if a, b, c are the sides of some obtuse triangle.
We prove by induction on n that there exists a partition of [2, 3n + 1] into n obtuse triples Ai
(2 i n + 1) having the form Ai = {i, ai , bi }. For the base case n = 1, one can simply set
A2 = {2, 3, 4}. For the induction step, we need the following simple lemma.
Lemma. Suppose that the numbers a < b < c form an obtuse triple, and let x be any positive
number. Then the triple {a, b + x, c + x} is also obtuse.
Proof. The numbers a < b + x < c + x are the sides of a triangle because (c + x) (b + x) =
cb < a. This triangle is obtuse since (c+x)2 (b+x)2 = (cb)(c+b+2x) > (cb)(c+b) > a2 .

Now we turn to the induction step. Let n > 1 and put t = n/2 < n. By the induction
hypothesis, there exists a partition of the set [2, 3t + 1] into t obtuse triples Ai = {i, ai , bi }
(i [2, t + 1]). For the same values of i, define Ai = {i, ai + (n t), bi + (n t)}. The
constructed triples are obviously disjoint, and they are obtuse by the lemma. Moreover, we
have
t+1
[
Ai = [2, t + 1] [n + 2, n + 2t + 1].
i=2

Next, for each i [t + 2, n + 1], define Ai = {i, n + t + i, 2n + i}. All these sets are disjoint, and
n+1
[

i=t+2

so

Ai = [t + 2, n + 1] [n + 2t + 2, 2n + t + 1] [2n + t + 2, 3n + 1],
n+1
[

Ai = [2, 3n + 1].

i=2

Thus, we are left to prove that the triple Ai is obtuse for each i [t + 2, n + 1].
Since (2n + i) (n + t + i) = n t < t + 2 i, the elements of Ai are the sides of a triangle.
Next, we have
(2n + i)2 (n + t + i)2 = (n t)(3n + t + 2i)

n 9n
n
(3n + 3(t + 1) + 1) >
(n + 1)2 i2 ,
2
2 2

so this triangle is obtuse. The proof is completed.

20

52nd IMO 2011

Algebra solutions

A6

A6
Let f be a function from the set of real numbers to itself that satisfies
f (x + y) yf (x) + f (f (x))

(1)

for all real numbers x and y. Prove that f (x) = 0 for all x 0.

Solution 1. Substituting y = t x, we rewrite (1) as


f (t) tf (x) xf (x) + f (f (x)).

(2)

Consider now some real numbers a, b and use (2) with t = f (a), x = b as well as with t = f (b),
x = a. We get
f (f (a)) f (f (b)) f (a)f (b) bf (b),

f (f (b)) f (f (a)) f (a)f (b) af (a).


Adding these two inequalities yields
2f (a)f (b) af (a) + bf (b).
Now, substitute b = 2f (a) to obtain 2f (a)f (b) af (a) + 2f (a)f (b), or af (a) 0. So, we get
f (a) 0 for all a < 0.

(3)

Now suppose f (x) > 0 for some real number x. From (2) we immediately get that for every
xf (x) f (f (x))
t<
we have f (t) < 0. This contradicts (3); therefore
f (x)
f (x) 0 for all real x,

(4)

and by (3) again we get f (x) = 0 for all x < 0.


We are left to find f (0). Setting t = x < 0 in (2) we get
0 0 0 + f (0),
so f (0) 0. Combining this with (4) we obtain f (0) = 0.
Solution 2. We will also use the condition of the problem in form (2). For clarity we divide
the argument into four steps.

21

A6

Algebra solutions

52nd IMO 2011

Step 1. We begin by proving that f attains nonpositive values only. Assume that there
exist some real number z with f (z) > 0. Substituting x = z into (2) and setting A = f (z),
B = zf (z) f (f (z)) we get f (t) At + B for all real t. Hence, if for any positive real
number t we substitute x = t, y = t into (1), we get
f (0) tf (t) + f (f (t)) t(At + B) + Af (t) + B

t(At B) + A(At + B) + B = At2 (A2 B)t + (A + 1)B.

But surely this cannot be true if we take t to be large enough. This contradiction proves that
we have indeed f (x) 0 for all real numbers x. Note that for this reason (1) entails
f (x + y) yf (x)

(5)

for all real numbers x and y.


Step 2. We proceed by proving that f has at least one zero. If f (0) = 0, we are done.
Otherwise, in view of Step 1 we get f (0) < 0. Observe that (5) tells us now f (y) yf (0) for all
real numbers y. Thus we can specify a positive real number a that is so large that f (a)2 > f (0).
Put b = f (a) and substitute x = b and y = b into (5); we learn b2 < f (0) bf (b), i.e.
b < f (b). Now we apply (2) to x = b and t = f (b), which yields

f (f (b)) f (b) b f (b) + f (f (b)),

i.e. f (b) 0. So in view of Step 1, b is a zero of f .

Step 3. Next we show that if f (a) = 0 and b < a, then f (b) = 0 as well. To see this, we just
substitute x = b and y = a b into (5), thus getting f (b) 0, which suffices by Step 1.
Step 4. By Step 3, the solution of the problem is reduced to showing f (0) = 0. Pick any
zero r of f and substitute x = r and y = 1 into (1). Because of f (r) = f (r 1) = 0 this gives
f (0) 0 and hence f (0) = 0 by Step 1 again.
Comment 1. Both of these solutions also show f (x) 0 for all real numbers x. As one can see
from Solution 1, this task gets much easier if one already knows that f takes nonnegative values for
sufficiently small arguments. Another way of arriving at this statement, suggested by the proposer, is
as follows:
Put a = f (0) and substitute x = 0 into (1). This gives f (y) ay + f (a) for all real numbers y. Thus
if for any real number x we plug y = a x into (1), we obtain
f (a) (a x)f (x) + f (f (x)) (a x)f (x) + af (x) + f (a)
and hence 0 (2a x)f (x). In particular, if x < 2a, then f (x) 0.
Having reached this point, one may proceed almost exactly as in the first solution to deduce f (x) 0
for all x. Afterwards the problem can be solved in a few lines as shown in steps 3 and 4 of the second

22

52nd IMO 2011

Algebra solutions

A6

solution.
Comment 2. The original problem also contained the question whether a nonzero function satisfying
the problem condition exists. Here we present a family of such functions.
Notice first that if g : (0, ) [0, ) denotes any function such that
g(x + y) yg(x)
for all positive real numbers x and y, then the function f given by

g(x) if x > 0
f (x) =
0
if x 0

(6)

(7)

automatically satisfies (1). Indeed, we have f (x) 0 and hence also f (f (x)) = 0 for all real numbers x.
So (1) reduces to (5); moreover, this inequality is nontrivial only if x and y are positive. In this last
case it is provided by (6).
Now it is not hard to come up with a nonzero function g obeying (6). E.g. g(z) = Cez (where C is
a positive constant) fits since the inequality ey > y holds for all (positive) real numbers y. One may
also consider the function g(z) = ez 1; in this case, we even have that f is continuous.

23

A7

Algebra solutions

52nd IMO 2011

A7

2 and a2 +b2 +c2 = 3.

b
c
3
a
+
+

.
2
2
2
(b + c a)
(c + a b)
(a + b c)
(abc)2

(1)

Let a, b, and c be positive real numbers satisfying min(a+b, b+c, c+a) >
Prove that

Throughout both solutions, we denote the sums of the form f (a, b, c) + f (b, c, a) + f (c, a, b)
P
by
f (a, b, c).

Solution 1. The condition b + c > 2 implies b2 + c2 > 1, so a2 = 3 (b2 + c2 ) < 2, i.e.

a < 2 < b + c. Hence we have b + c a > 0, and also c + a b > 0 and a + b c > 0 for
similar reasons.
lders inequality
We will use the variant of Ho
xp+1
(x1 + x2 + . . . + xn )p+1
xp+1
xp+1
1
1
n

,
+
+
.
.
.
+
y1p
y1p
ynp
(y1 + y2 + . . . + yn )p
which holds for all positive real numbers p, x1 , x2 , . . . , xn , y1, y2 , . . . , yn . Applying it to the
left-hand side of (1) with p = 2 and n = 3, we get
X

X
27
(a2 )3
(a2 + b2 + c2 )3
a
=
=


2 .
P
P
2
(b + c a)2
a5 (b + c a)2
a5/2 (b + c a)
a5/2 (b + c a)

(2)

To estimate the denominator of the right-hand part, we use an instance of Schurs inequality,
namely
X
a3/2 (a b)(a c) 0,
which can be rewritten as

a5/2 (b + c a) abc( a + b + c).

Moreover, by the inequality between the arithmetic mean and the fourth power mean we also
have

!4

a+ b+ c
a2 + b2 + c2
= 1,

3
3

i.e., a + b + c 3. Hence, (2) yields


X

3
27
a

2 2 2 2 ,

2
(b + c a)
abc
abc( a + b + c)

thus solving the problem.

24

52nd IMO 2011

A7

Algebra solutions

lders inequality
Comment. In this solution, one may also start from the following version of Ho
n
X
i=1

applied as

a3i

n
X
i=1

b3i

n
X
i=1

c3i

n
X

ai bi ci

i=1

!3

X
X
a

a3 (b + c a)
a2 (b + c a) 27.
2
(b + c a)

After doing that, one only needs the slightly better known instances
X

a3 (b + c a) (a + b + c)abc

and

of Schurs Inequality.

a2 (b + c a) 3abc

Solution 2. As in Solution 1, we mention that all the numbers b + c a, a + c b, a + b c


are positive. We will use only this restriction and the condition
a5 + b5 + c5 3,

(3)

which is weaker than the given one. Due to the symmetry we may assume that a b c.
In view of (3), it suffices to prove the inequality
X

X
a3 b2 c2

a5 ,
(b + c a)2

or, moving all the terms into the left-hand part,


X

a3
2
2
(bc)

(a(b
+
c

a))
0.
(b + c a)2

(4)

Note that the signs of the expressions (yz)2 (x(y + z x))2 and yzx(y+zx) = (xy)(xz)
are the same for every positive x, y, z satisfying the triangle inequality. So the terms in (4)
corresponding to a and c are nonnegative, and hence it is sufficient to prove that the sum of
the terms corresponding to a and b is nonnegative. Equivalently, we need the relation
b3
a3
(a

b)(a

c)(bc
+
a(b
+
c

a))

(a b)(b c)(ac + b(a + c b)).


(b + c a)2
(a + c b)2
Obviously, we have
a3 b3 0,

0 < b + c a a + c b,

and a c b c 0,

hence it suffices to prove that


ab + ac + bc b2
ab + ac + bc a2

.
b+ca
c+ab
25

A7

Algebra solutions

52nd IMO 2011

Since all the denominators are positive, it is equivalent to


(c + a b)(ab + ac + bc a2 ) (ab + ac + bc b2 )(b + c a) 0,
or
(a b)(2ab a2 b2 + ac + bc) 0.
Since a b, the last inequality follows from
c(a + b) > (a b)2
which holds since c > a b 0 and a + b > a b 0.

26

52nd IMO 2011

Combinatorics solutions

C1

C1
Let n > 0 be an integer. We are given a balance and n weights of weight 20 , 21 , . . . , 2n1 . In a
sequence of n moves we place all weights on the balance. In the first move we choose a weight
and put it on the left pan. In each of the following moves we choose one of the remaining
weights and we add it either to the left or to the right pan. Compute the number of ways in
which we can perform these n moves in such a way that the right pan is never heavier than the
left pan.

Answer. The number f (n) of ways of placing the n weights is equal to the product of all odd
positive integers less than or equal to 2n 1, i.e. f (n) = (2n 1)!! = 1 3 5 . . . (2n 1).
Solution 1. Assume n 2. We claim
f (n) = (2n 1)f (n 1).

(1)

Firstly, note that after the first move the left pan is always at least 1 heavier than the right
one. Hence, any valid way of placing the n weights on the scale gives rise, by not considering
weight 1, to a valid way of placing the weights 2, 22 , . . . , 2n1 .
If we divide the weight of each weight by 2, the answer does not change. So these n 1 weights
can be placed on the scale in f (n 1) valid ways. Now we look at weight 1. If it is put on
the scale in the first move, then it has to be placed on the left side, otherwise it can be placed
either on the left or on the right side, because after the first move the difference between the
weights on the left pan and the weights on the right pan is at least 2. Hence, there are exactly
2n 1 different ways of inserting weight 1 in each of the f (n 1) valid sequences for the n 1
weights in order to get a valid sequence for the n weights. This proves the claim.
Since f (1) = 1, by induction we obtain for all positive integers n
f (n) = (2n 1)!! = 1 3 5 . . . (2n 1).
Comment 1. The word compute in the statement of the problem is probably too vague. An
alternative but more artificial question might ask for the smallest n for which the number of valid
ways is divisible by 2011. In this case the answer would be 1006.
Comment 2. It is useful to remark that the answer is the same for any set of weights where each weight
is heavier than the sum of the lighter ones. Indeed, in such cases the given condition is equivalent to
asking that during the process the heaviest weight on the balance is always on the left pan.
Comment 3. Instead of considering the lightest weight, one may also consider the last weight put on
the balance. If this weight is 2n1 then it should be put on the left pan. Otherwise it may be put on

27

C1

Combinatorics solutions

52nd IMO 2011

any pan; the inequality would not be violated since at this moment the heaviest weight is already put
onto the left pan. In view of the previous comment, in each of these 2n 1 cases the number of ways
to place the previous weights is exactly f (n 1), which yields (1).

Solution 2. We present a different way of obtaining (1). Set f (0) = 1. Firstly, we find a
recurrent formula for f (n).
Assume n 1. Suppose that weight 2n1 is placed on the balance in the i-th move with

1 i n. This weight has to be put on the left pan. For the previous moves we have n1
i1
choices of the weights and from Comment 2 there are f (i 1) valid ways of placing them on
the balance. For later moves there is no restriction on the way in which the weights are to be
put on the pans. Therefore, all (n i)!2ni ways are possible. This gives

n
n 
X
X
(n 1)!f (i 1)2ni
n1
ni
f (i 1)(n i)!2
=
f (n) =
.
i1
(i 1)!
i=1
i=1

(2)

Now we are ready to prove (1). Using n 1 instead of n in (2) we get


f (n 1) =

n1
X
(n 2)!f (i 1)2n1i
i=1

(i 1)!

Hence, again from (2) we get


f (n) = 2(n 1)

n1
X
(n 2)!f (i 1)2n1i
i=1

(i 1)!

+ f (n 1)

= (2n 2)f (n 1) + f (n 1) = (2n 1)f (n 1),

QED.
Comment. There exist different ways of obtaining the formula (2). Here we show one of them.
Suppose that in the first move we use weight 2ni+1 . Then the lighter n i weights may be put
on the balance at any moment and on either pan. This gives 2ni (n 1)!/(i 1)! choices for the
moves (moments and choices of pan) with the lighter weights. The remaining i 1 moves give a valid
sequence for the i 1 heavier weights and this is the only requirement for these moves, so there are
f (i 1) such sequences. Summing over all i = 1, 2, . . . , n we again come to (2).

28

52nd IMO 2011

Combinatorics solutions

C2

C2
Suppose that 1000 students are standing in a circle. Prove that there exists an integer k with
100 k 300 such that in this circle there exists a contiguous group of 2k students, for which
the first half contains the same number of girls as the second half.

Solution. Number the students consecutively from 1 to 1000. Let ai = 1 if the ith student
is a girl, and ai = 0 otherwise. We expand this notion for all integers i by setting ai+1000 =
ai1000 = ai . Next, let
Sk (i) = ai + ai+1 + + ai+k1 .
Now the statement of the problem can be reformulated as follows:
There exist an integer k with 100 k 300 and an index i such that Sk (i) = Sk (i + k).
Assume now that this statement is false. Choose an index i such that S100 (i) attains the maximal
possible value. In particular, we have S100 (i100)S100 (i) < 0 and S100 (i) S100 (i + 100) > 0,
for if we had an equality, then the statement would hold. This means that the function S(j)
S(j + 100) changes sign somewhere on the segment [i 100, i], so there exists some index j
[i 100, i 1] such that
S100 (j) S100 (j + 100) 1,

but S100 (j + 1) S100 (j + 101) + 1.

(1)

Subtracting the first inequality from the second one, we get aj+100 aj aj+200 aj+100 + 2, so
aj = 0,

aj+100 = 1,

aj+200 = 0.

Substituting this into the inequalities of (1), we also obtain S99 (j+1) S99 (j+101) S99 (j+1),
which implies
S99 (j + 1) = S99 (j + 101).
(2)
Now let k and be the least positive integers such that ajk = 1 and aj+200+ = 1. By
symmetry, we may assume that k . If k 200 then we have aj = aj1 = = aj199 = 0,
so S100 (j199) = S100 (j99) = 0, which contradicts the initial assumption. Hence k 199.
Finally, we have
S100+ (j + 1) = (aj+1 + + aj ) + S99 (j + 1) + aj+100 = S99 (j + 1) + 1,

S100+ (j + 101) = S99 (j + 101) + (aj+200 + + aj+200+1 ) + aj+200+ = S99 (j + 101) + 1.


Comparing with (2) we get S100+ (j + 1) = S100+ (j + 101) and 100 + 299, which again
contradicts our assumption.
Comment. It may be seen from the solution that the number 300 from the problem statement can be

29

C2

Combinatorics solutions

52nd IMO 2011

replaced by 299. Here we consider some improvements of this result. Namely, we investigate which
interval can be put instead of [100, 300] in order to keep the problem statement valid.
First of all, the two examples
1, 1, . . . , 1, 0, 0, . . . , 0, 1, 1, . . . , 1, 0, 0, . . . , 0, 1, 1, . . . , 1, 0, 0, . . . , 0
| {z } | {z } | {z } | {z } | {z } | {z }
167

and

167

167

167

167

165

1, 1, . . . , 1, 0, 0, . . . , 0, 1, 1, . . . , 1, 0, 0, . . . , 0
| {z } | {z } | {z } | {z }
249

251

249

251

show that the interval can be changed neither to [84, 248] nor to [126, 374].
On the other hand, we claim that this interval can be changed to [125, 250]. Note that this statement
is invariant under replacing all 1s by 0s and vice versa. Assume, to the contrary, that there is no
admissible k [125, 250]. The arguments from the solution easily yield the following lemma.
Lemma. Under our assumption, suppose that for some indices i < j we have S125 (i) S125 (i + 125)
but S125 (j) S125 (j +125). Then there exists some t [i, j 1] such that at = at1 = = at125 = 0
and at+250 = at+251 = = at+375 = 0.

Let us call a segment [i, j] of indices a crowd, if (a) ai = ai+1 = = aj , but ai1 6= ai 6= aj+1 , and (b)
j i 125. Now, using the lemma, one can get in the same way as in the solution that there exists
some crowd. Take all the crowds in the circle, and enumerate them in cyclic order as A1 , . . . , Ad . We
also assume always that As+d = Asd = As .
Consider one of the crowds, say A1 . We have A1 = [i, i + t] with 125 t 248 (if t 249, then
ai = ai+1 = = ai+249 and therefore S125 (i) = S125 (i + 125), which contradicts our assumption).
We may assume that ai = 1. Then we have S125 (i + t 249) 125 = S125 (i + t 124) and
S125 (i) = 125 S125 (i + 125), so by the lemma there exists some index j [i + t 249, i 1] such
that the segments [j 125, j] and [j + 250, j + 375] are contained in some crowds.
Let us fix such j and denote the segment [j + 1, j + 249] by B1 . Clearly, A1 B1 . Moreover, B1
cannot contain any crowd other than A1 since |B1 | = 249 < 2 126. Hence it is clear that j Ad and
j + 250 A2 . In particular, this means that the genders of Ad and A2 are different from that of A1 .
Performing this procedure for every crowd As , we find segments Bs = [js + 1, js + 249] such that
|Bs | = 249, As Bs , and js As1 , js + 250 As+1 . So, Bs covers the whole segment between As1
and As+1 , hence the sets B1 , . . . , Bd cover some 1000 consecutive indices. This implies 249d 1000,
and d 5. Moreover, the gender of Ai is alternating, so d is even; therefore d 6.
Consider now three segments A1 = [i1 , i1 ], B2 = [j2 + 1, j2 + 249], A3 = [i3 , i3 ]. By construction, we
have [j2 125, j2 ] A1 and [j2 + 250, j2 + 375] A3 , whence i1 j2 125, i3 j2 + 375. Therefore
i3 i1 500. Analogously, if A4 = [i4 , i4 ], A6 = [i6 , i6 ] then i6 i4 500. But from d 6 we get
i1 < i3 < i4 < i6 < i1 + 1000, so 1000 > (i3 i1 ) + (i6 i4 ) 500 + 500. This final contradiction
shows that our claim holds.
One may even show that the interval in the statement of the problem may be replaced by [125, 249]
(both these numbers cannot be improved due to the examples above). But a proof of this fact is a bit
messy, and we do not present it here.

30

52nd IMO 2011

C3

Combinatorics solutions

C3
Let S be a finite set of at least two points in the plane. Assume that no three points of S are
collinear. By a windmill we mean a process as follows. Start with a line going through a
point P S. Rotate clockwise around the pivot P until the line contains another point Q
of S. The point Q now takes over as the new pivot. This process continues indefinitely, with
the pivot always being a point from S.
Show that for a suitable P S and a suitable starting line containing P , the resulting
windmill will visit each point of S as a pivot infinitely often.

Solution. Give the rotating line an orientation and distinguish its sides as the oranje side and
the blue side. Notice that whenever the pivot changes from some point T to another point U,
after the change, T is on the same side as U was before. Therefore, the number of elements
of S on the oranje side and the number of those on the blue side remain the same throughout
the whole process (except for those moments when the line contains two points).

First consider the case that |S| = 2n + 1 is odd. We claim that through any point T S,
there is a line that has n points on each side. To see this, choose an oriented line through T
containing no other point of S and suppose that it has n + r points on its oranje side. If
r = 0 then we have established the claim, so we may assume that r 6= 0. As the line rotates
through 180 around T , the number of points of S on its oranje side changes by 1 whenever
the line passes through a point; after 180, the number of points on the oranje side is n r.
Therefore there is an intermediate stage at which the oranje side, and thus also the blue side,
contains n points.
Now select the point P arbitrarily, and choose a line through P that has n points of S on each
side to be the initial state of the windmill. We will show that during a rotation over 180 ,
the line of the windmill visits each point of S as a pivot. To see this, select any point T of S
and select a line through T that separates S into equal halves. The point T is the unique
point of S through which a line in this direction can separate the points of S into equal halves
(parallel translation would disturb the balance). Therefore, when the windmill line is parallel
to , it must be itself, and so pass through T .
Next suppose that |S| = 2n. Similarly to the odd case, for every T S there is an oriented

31

C3

Combinatorics solutions

52nd IMO 2011

line through T with n 1 points on its oranje side and n points on its blue side. Select such
an oriented line through an arbitrary P to be the initial state of the windmill.
We will now show that during a rotation over 360 , the line of the windmill visits each point
of S as a pivot. To see this, select any point T of S and an oriented line through T that
separates S into two subsets with n 1 points on its oranje and n points on its blue side.
Again, parallel translation would change the numbers of points on the two sides, so when the
windmill line is parallel to with the same orientation, the windmill line must pass through T .
Comment. One may shorten this solution in the following way.
Suppose that |S| = 2n + 1. Consider any line that separates S into equal halves; this line is unique
given its direction and contains some point T S. Consider the windmill starting from this line. When
the line has made a rotation of 180 , it returns to the same location but the oranje side becomes blue
and vice versa. So, for each point there should have been a moment when it appeared as pivot, as this
is the only way for a point to pass from on side to the other.
Now suppose that |S| = 2n. Consider a line having n 1 and n points on the two sides; it contains
some point T . Consider the windmill starting from this line. After having made a rotation of 180 ,
the windmill line contains some different point R, and each point different from T and R has changed
the color of its side. So, the windmill should have passed through all the points.

32

52nd IMO 2011

Combinatorics solutions

C4

C4
Determine the greatest positive integer k that satisfies the following property: The set of positive
integers can be partitioned into k subsets A1 , A2 , . . . , Ak such that for all integers n 15 and
all i {1, 2, . . . , k} there exist two distinct elements of Ai whose sum is n.

Answer. The greatest such number k is 3.


Solution 1. There are various examples showing that k = 3 does indeed have the property
under consideration. E.g. one can take
A1 = {1, 2, 3} {3m | m 4},

A2 = {4, 5, 6} {3m 1 | m 4},

A3 = {7, 8, 9} {3m 2 | m 4}.

To check that this partition fits, we notice first that the sums of two distinct elements of Ai
obviously represent all numbers n 1 + 12 = 13 for i = 1, all numbers n 4 + 11 = 15 for
i = 2, and all numbers n 7 + 10 = 17 for i = 3. So, we are left to find representations of the
numbers 15 and 16 as sums of two distinct elements of A3 . These are 15 = 7 + 8 and 16 = 7 + 9.

Let us now suppose that for some k 4 there exist sets A1 , A2 , . . . , Ak satisfying the given
property. Obviously, the sets A1 , A2 , A3 , A4 Ak also satisfy the same property, so one
may assume k = 4.
Put Bi = Ai {1, 2, . . . , 23} for i = 1, 2, 3, 4. Now for any index i each of the ten numbers
15, 16, . . . , 24 can be written as sum of two distinct elements of Bi . Therefore this set needs
to contain at least five elements. As we also have |B1 | + |B2 | + |B3 | + |B4 | = 23, there has to
be some index j for which |Bj | = 5. Let Bj = {x1 , x2 , x3 , x4 , x5 }. Finally, now the sums of
two distinct elements of Aj representing the numbers 15, 16, . . . , 24 should be exactly all the
pairwise sums of the elements of Bj . Calculating the sum of these numbers in two different
ways, we reach
4(x1 + x2 + x3 + x4 + x5 ) = 15 + 16 + . . . + 24 = 195.
Thus the number 195 should be divisible by 4, which is false. This contradiction completes our
solution.
Comment. There are several variation of the proof that k should not exceed 3. E.g., one may consider
the sets Ci = Ai {1, 2, . . . , 19} for i = 1, 2, 3, 4. As in the previous solution one can show that for
some index j one has |Cj | = 4, and the six pairwise sums of the elements of Cj should represent all
numbers 15, 16, . . . , 20. Let Cj = {y1 , y2 , y3 , y4 } with y1 < y2 < y3 < y4 . It is not hard to deduce

33

C4

Combinatorics solutions

52nd IMO 2011

Cj = {7, 8, 9, 11}, so in particular we have 1


6 Cj . Hence it is impossible to represent 21 as sum of
two distinct elements of Aj , which completes our argument.

Solution 2. Again we only prove that k 3. Assume that A1 , A2 , . . . , Ak is a partition


satisfying the given property. We construct a graph G on the set V = {1, 2, . . . , 18} of vertices
as follows. For each i {1, 2, . . . , k} and each d {15, 16, 17, 19} we choose one pair of distinct
elements a, b Ai with a + b = d, and we draw an edge in the ith color connecting a with b. By
hypothesis, G has exactly 4 edges of each color.
Claim. The graph G contains at most one circuit.
Proof. Note that all the connected components of G are monochromatic and hence contain at
most four edges. Thus also all circuits of G are monochromatic and have length at most four.
Moreover, each component contains at most one circuit since otherwise it should contain at
least five edges.
Suppose that there is a 4-cycle in G, say with vertices a, b, c, and d in order. Then {a + b, b +
c, c + d, d + a} = {15, 16, 17, 19}. Taking sums we get 2(a + b + c + d) = 15 + 16 + 17 + 19 which
is impossible for parity reasons. Thus all circuits of G are triangles.
Now if the vertices a, b, and c form such a triangle, then by a similar reasoning the set {a+b, b+
c, c + a} coincides with either {15, 16, 17}, or {15, 16, 19}, or {16, 17, 19}, or {15, 17, 19}. The
last of these alternatives can be excluded for parity reasons again, whilst in the first three cases
the set {a, b, c} appears to be either {7, 8, 9}, or {6, 9, 10}, or {7, 9, 10}, respectively. Thus, a
component containing a circuit should contain 9 as a vertex. Therefore there is at most one
such component and hence at most one circuit.

By now we know that G is a graph with 4k edges, at least k components and at most one
circuit. Consequently, G must have at least 4k + k 1 vertices. Thus 5k 1 18, and k 3.

34

52nd IMO 2011

C5

Combinatorics solutions

C5
Let m be a positive integer and consider a checkerboard consisting of m by m unit squares.
At the midpoints of some of these unit squares there is an ant. At time 0, each ant starts
moving with speed 1 parallel to some edge of the checkerboard. When two ants moving in
opposite directions meet, they both turn 90 clockwise and continue moving with speed 1.
When more than two ants meet, or when two ants moving in perpendicular directions meet,
the ants continue moving in the same direction as before they met. When an ant reaches one
of the edges of the checkerboard, it falls off and will not re-appear.
Considering all possible starting positions, determine the latest possible moment at which the
last ant falls off the checkerboard or prove that such a moment does not necessarily exist.

Antswer. The latest possible moment for the last ant to fall off is

3m
2

1.

Solution. For m = 1 the answer is clearly correct, so assume m > 1. In the sequel, the word
collision will be used to denote meeting of exactly two ants, moving in opposite directions.
If at the beginning we place an ant on the southwest corner square facing east and an ant on
the southeast corner square facing west, then they will meet in the middle of the bottom row
at time m1
. After the collision, the ant that moves to the north will stay on the board for
2
another m 12 time units and thus we have established an example in which the last ant falls
+ m 21 = 3m
1. So, we are left to prove that this is the latest possible
off at time m1
2
2
moment.
Consider any collision of two ants a and a . Let us change the rule for this collision, and enforce
these two ants to turn anticlockwise. Then the succeeding behavior of all the ants does not
change; the only difference is that a and a swap their positions. These arguments may be
applied to any collision separately, so we may assume that at any collision, either both ants
rotate clockwise or both of them rotate anticlockwise by our own choice.
For instance, we may assume that there are only two types of ants, depending on their initial
direction: NE-ants, which move only north or east, and SW-ants, moving only south and west.
Then we immediately obtain that all ants will have fallen off the board after 2m 1 time
units. However, we can get a better bound by considering the last moment at which a given
ant collides with another ant.
Choose a coordinate system such that the corners of the checkerboard are (0, 0), (m, 0), (m, m)
and (0, m). At time t, there will be no NE-ants in the region {(x, y) : x + y < t + 1} and no
SW-ants in the region {(x, y) : x + y > 2m t 1}. So if two ants collide at (x, y) at time t,
we have
t + 1 x + y 2m t 1.
(1)

35

C5

Combinatorics solutions

52nd IMO 2011

Analogously, we may change the rules so that each ant would move either alternatingly north
and west, or alternatingly south and east. By doing so, we find that apart from (1) we also
have |x y| m t 1 for each collision at point (x, y) and time t.
To visualize this, put


B(t) = (x, y) [0, m]2 : t + 1 x + y 2m t 1 and |x y| m t 1 .

An ant can thus only collide with another ant at time t if it happens to be in the region B(t).
The following figure displays B(t) for t = 12 and t = 72 in the case m = 6:

Now suppose that an NE-ant has its last collision at time t and that it does so at the point (x, y)
1 time units, so this
(if the ant does not collide at all, it will fall off the board within m 12 < 3m
2
case can be ignored). Then we have (x, y) B(t) and thus x+y t+1 and xy (mt1).
So we get
(t + 1) (m t 1)
m
x
=t+1 .
2
2
m
By symmetry we also have y t + 1 2 , and hence min{x, y} t + 1 m2 . After this collision,
the ant will move directly to an edge, which will take at most m min{x, y} units of time. In
sum, the total amount of time the ant stays on the board is at most

m  3m
=
1.
t + (m min{x, y}) t + m t + 1
2
2
By symmetry, the same bound holds for SW-ants as well.

36

52nd IMO 2011

Combinatorics solutions

C6

C6
Let n be a positive integer and let W = . . . x1 x0 x1 x2 . . . be an infinite periodic word consisting
of the letters a and b. Suppose that the minimal period N of W is greater than 2n .
A finite nonempty word U is said to appear in W if there exist indices k such that
U = xk xk+1 . . . x . A finite word U is called ubiquitous if the four words Ua, Ub, aU, and bU
all appear in W . Prove that there are at least n ubiquitous finite nonempty words.

Solution. Throughout the solution, all the words are nonempty. For any word R of length m,
we call the number of indices i {1, 2, . . . , N} for which R coincides with the subword
xi+1 xi+2 . . . xi+m of W the multiplicity of R and denote it by (R). Thus a word R appears
in W if and only if (R) > 0. Since each occurrence of a word in W is both succeeded by either
the letter a or the letter b and similarly preceded by one of those two letters, we have
(R) = (Ra) + (Rb) = (aR) + (bR)

(1)

for all words R.


We claim that the condition that N is in fact the minimal period of W guarantees that each
word of length N has multiplicity 1 or 0 depending on whether it appears or not. Indeed, if
the words xi+1 xi+2 . . . xi+N and xj+1 . . . xj+N are equal for some 1 i < j N, then we have
xi+a = xj+a for every integer a, and hence j i is also a period.
Moreover, since N > 2n , at least one of the two words a and b has a multiplicity that is strictly
larger than 2n1 .
For each k = 0, 1, . . . , n 1, let Uk be a subword of W whose multiplicity is strictly larger
than 2k and whose length is maximal subject to this property. Note that such a word exists in
view of the two observations made in the two previous paragraphs.
Fix some index k {0, 1, . . . , n 1}. Since the word Uk b is longer than Uk , its multiplicity can
be at most 2k , so in particular (Uk b) < (Uk ). Therefore, the word Uk a has to appear by (1).
For a similar reason, the words Uk b, aUk , and bUk have to appear as well. Hence, the word Uk
is ubiquitous. Moreover, if the multiplicity of Uk were strictly greater than 2k+1 , then by (1)
at least one of the two words Uk a and Uk b would have multiplicity greater than 2k and would
thus violate the maximality condition imposed on Uk .
So we have (U0 ) 2 < (U1 ) 4 < . . . 2n1 < (Un1 ), which implies in particular that
the words U0 , U1 , . . . , Un1 have to be distinct. As they have been proved to be ubiquitous as
well, the problem is solved.
Comment 1. There is an easy construction for obtaining ubiquitous words from appearing words
whose multiplicity is at least two. Starting with any such word U we may simply extend one of its
occurrences in W forwards and backwards as long as its multiplicity remains fixed, thus arriving at a

37

C6

Combinatorics solutions

52nd IMO 2011

word that one might call the ubiquitous prolongation p(U ) of U .


There are several variants of the argument in the second half of the solution using the concept of prolongation. For instance, one may just take all ubiquitous words U1 , U2 , . . . , U ordered by increasing
multiplicity and then prove for i {1, 2, . . . , } that (Ui ) 2i . Indeed, assume that i is a minimal counterexample to this statement; then by the arguments similar to those presented above, the
ubiquitous prolongation of one of the words Ui a, Ui b, aUi or bUi violates the definition of Ui .
Now the multiplicity of one of the two letters a and b is strictly greater than 2n1 , so passing to
ubiquitous prolongations once more we obtain 2n1 < (U ) 2 , which entails n, as needed.
Comment 2. The bound n for the number of ubiquitous subwords in the problem statement is not
optimal, but it is close to an optimal one in the following sense. There is a universal constant C > 0
such that for each positive integer n there exists an infinite periodic word W whose minimal period is
greater than 2n but for which there exist fewer than Cn ubiquitous words.

38

52nd IMO 2011

Combinatorics solutions

C7

C7
On a square table of 2011 by 2011 cells we place a finite number of napkins that each cover
a square of 52 by 52 cells. In each cell we write the number of napkins covering it, and we
record the maximal number k of cells that all contain the same nonzero number. Considering
all possible napkin configurations, what is the largest value of k?


Answer. 20112 (522 352 ) 39 172 = 4044121 57392 = 3986729.
Solution 1. Let m = 39, then 2011 = 52m 17. We begin with an example showing that
there can exist 3986729 cells carrying the same positive number.

To describe it, we number the columns from the left to the right and the rows from the bottom
to the top by 1, 2, . . . , 2011. We will denote each napkin by the coordinates of its lowerleft cell. There are four kinds of napkins: first, we take all napkins (52i + 36, 52j + 1) with
0 j i m 2; second, we use all napkins (52i + 1, 52j + 36) with 0 i j m 2;
third, we use all napkins (52i + 36, 52i + 36) with 0 i m 2; and finally the napkin (1, 1).
Different groups of napkins are shown by different types of hatchings in the picture.
Now except for those squares that carry two or more different hatchings, all squares have the
number 1 written into them. The number of these exceptional cells is easily computed to be
(522 352 )m 172 = 57392.
We are left to prove that 3986729 is an upper bound for the number of cells containing the same
number. Consider any configuration of napkins and any positive integer M. Suppose there are
g cells with a number different from M. Then it suffices to show g 57392. Throughout the
solution, a line will mean either a row or a column.
Consider any line . Let a1 , . . . , a52m17 be the numbers written into its consecutive cells.
P
For i = 1, 2, . . . , 52, let si = ti (mod 52) at . Note that s1 , . . . , s35 have m terms each, while
s36 , . . . , s52 have m 1 terms each. Every napkin intersecting contributes exactly 1 to each si ;

39

C7

Combinatorics solutions

52nd IMO 2011

hence the number s of all those napkins satisfies s1 = = s52 = s. Call the line rich if
s > (m 1)M and poor otherwise.
Suppose now that is rich. Then in each of the sums s36 , . . . , s52 there exists a term greater
than M; consider all these terms and call the corresponding cells the rich bad cells for this line.
So, each rich line contains at least 17 cells that are bad for this line.
If, on the other hand, is poor, then certainly s < mM so in each of the sums s1 , . . . , s35 there
exists a term less than M; consider all these terms and call the corresponding cells the poor
bad cells for this line. So, each poor line contains at least 35 cells that are bad for this line.
Let us call all indices congruent to 1, 2, . . . , or 35 modulo 52 small, and all other indices,
i.e. those congruent to 36, 37, . . . , or 52 modulo 52, big. Recall that we have numbered the
columns from the left to the right and the rows from the bottom to the top using the numbers
1, 2, . . . , 52m 17; we say that a line is big or small depending on whether its index is big or
small. By definition, all rich bad cells for the rows belong to the big columns, while the poor
ones belong to the small columns, and vice versa.
In each line, we put a strawberry on each cell that is bad for this line. In addition, for each
small rich line we put an extra strawberry on each of its (rich) bad cells. A cell gets the
strawberries from its row and its column independently.
Notice now that a cell with a strawberry on it contains a number different from M. If this cell
gets a strawberry by the extra rule, then it contains a number greater than M. Moreover, it
is either in a small row and in a big column, or vice versa. Suppose that it is in a small row,
then it is not bad for its column. So it has not more than two strawberries in this case. On
the other hand, if the extra rule is not applied to some cell, then it also has not more than two
strawberries. So, the total number N of strawberries is at most 2g.
We shall now estimate N in a different way. For each of the 2 35m small lines, we have
introduced at least 34 strawberries if it is rich and at least 35 strawberries if it is poor, so at
least 34 strawberries in any case. Similarly, for each of the 2 17(m 1) big lines, we put at
least min(17, 35) = 17 strawberries. Summing over all lines we obtain
2g N 2(35m 34 + 17(m 1) 17) = 2(1479m 289) = 2 57392,
as desired.
Comment. The same reasoning applies also if we replace 52 by R and 2011 by Rm H, where m, R,
and H are integers with m, R 1 and 0 H 31 R. More detailed information is provided after the
next solution.

Solution 2. We present a different proof of the estimate which is the hard part of the problem.
Let S = 35, H = 17, m = 39; so the table size is 2011 = Sm + H(m 1), and the napkin size is
52 = S + H. Fix any positive integer M and call a cell vicious if it contains a number distinct

40

52nd IMO 2011

Combinatorics solutions

C7

from M. We will prove that there are at least H 2 (m 1) + 2SHm vicious cells.
Firstly, we introduce some terminology. As in the previous solution, we number rows and
columns and we use the same notions of small and big indices and lines; so, an index is small if
it is congruent to one of the numbers 1, 2, . . . , S modulo (S + H). The numbers 1, 2, . . . , S + H
will be known as residues. For two residues i and j, we say that a cell is of type (i, j) if the
index of its row is congruent to i and the index of its column to j modulo (S + H). The number
of vicious cells of this type is denoted by vij .
Let s, s be two variables ranging over small residues and let h, h be two variables ranging over
big residues. A cell is said to be of class A, B, C, or D if its type is of shape (s, s ), (s, h), (h, s),
or (h, h ), respectively. The numbers of vicious cells belonging to these classes are denoted in
this order by a, b, c, and d. Observe that each cell belongs to exactly one class.
Claim 1. We have
m

a
b+c
+
.
2
S
2SH

(1)

Proof. Consider an arbitrary small row r. Denote the numbers of vicious cells on r belonging
to the classes A and B by and , respectively. As in the previous solution, we obtain that
S or H. So in each case we have S + H 1.
Performing this argument separately for each small row and adding up all the obtained inequalities, we get Sa + Hb mS. Interchanging rows and columns we similarly get Sa + Hc mS.
Summing these inequalities and dividing by 2S we get what we have claimed.

Claim 2. Fix two small residue s, s and two big residues h, h . Then 2m1 vss +vsh +vhh .
Proof. Each napkin covers exactly one cell of type (s, s ). Removing all napkins covering a
vicious cell of this type, we get another collection of napkins, which covers each cell of type
(s, s ) either 0 or M times depending on whether the cell is vicious or not. Hence (m2 vss )M
napkins are left and throughout the proof of Claim 2 we will consider only these remaining
napkins. Now, using a red pen, write in each cell the number of napkins covering it. Notice
that a cell containing a red number greater than M is surely vicious.
We call two cells neighbors if they can be simultaneously covered by some napkin. So, each cell
of type (h, h ) has not more than four neighbors of type (s, s), while each cell of type (s, h ) has
not more than two neighbors of each of the types (s, s) and (h, h ). Therefore, each red number
at a cell of type (h, h ) does not exceed 4M, while each red number at a cell of type (s, h ) does
not exceed 2M.
Let x, y, and z be the numbers of cells of type (h, h ) whose red number belongs to (M, 2M],
(2M, 3M], and (3M, 4M], respectively. All these cells are vicious, hence x + y + z vhh . The
red numbers appearing in cells of type (h, h ) clearly sum up to (m2 vss )M. Bounding each
of these numbers by a multiple of M we get

(m2 vss )M (m 1)2 (x + y + z) M + 2xM + 3yM + 4zM,
41

C7

Combinatorics solutions

52nd IMO 2011

i.e.
2m 1 vss + x + 2y + 3z vss + vhh + y + 2z.
So, to prove the claim it suffices to prove that y + 2z vsh .
For a cell of type (h, h ) and a cell of type (s, h ) we say that forces if there are more
than M napkins covering both of them. Since each red number in a cell of type (s, h ) does not
exceed 2M, it cannot be forced by more than one cell.
On the other hand, if a red number in a (h, h )-cell belongs to (2M, 3M], then it forces at
least one of its neighbors of type (s, h ) (since the sum of red numbers in their cells is greater
than 2M). Analogously, an (h, h )-cell with the red number in (3M, 4M] forces both its neighbors of type (s, h ), since their red numbers do not exceed 2M. Therefore there are at least
y + 2z forced cells and clearly all of them are vicious, as desired.

Claim 3. We have
2m 1

b+c
d
a
+
+
.
S 2 2SH H 2

(2)

Proof. Averaging the previous result over all S 2 H 2 possibilities for the quadruple (s, s , h, h ),
b
+ Hd2 . Due to the symmetry between rows and columns, the same
we get 2m 1 Sa2 + SH
estimate holds with b replaced by c. Averaging these two inequalities we arrive at our claim.

Now let us multiply (2) by H 2 , multiply (1) by (2SH H 2 ) and add them; we get
H 2 + 2SH H 2
2H
H 2 + 2SH H 2
H (2m1)+(2SH H )m a
+(b+c)
+d
=
a
+b+c+d.
S2
2SH
S
2

The left-hand side is exactly H 2 (m 1) + 2SHm, while the right-hand side does not exceed
a + b + c + d since 2H S. Hence we come to the desired inequality.
Comment 1. Claim 2 is the key difference between the two solutions, because it allows to get rid of
the notions of rich and poor cells. However, one may prove it by the strawberry method as well.
It suffices to put a strawberry on each cell which is bad for an s-row, and a strawberry on each cell
which is bad for an h -column. Then each cell would contain not more than one strawberry.
Comment 2. Both solutions above work if the residue of the table size T modulo the napkin size R
is at least 32 R, or equivalently if T = Sm + H(m 1) and R = S + H for some positive integers S, H,
m such that S 2H. Here we discuss all other possible combinations.
Case 1. If 2H S H/2, then the sharp bound for the number of vicious cells is mS 2 + (m 1)H 2 ;
it can be obtained by the same methods as in any of the solutions. To obtain an example showing
that the bound is sharp, one may simply remove the napkins of the third kind from the example in
Solution 1 (with an obvious change in the numbers).
Case 2. If 2S H, the situation is more difficult. If (S + H)2 > 2H 2 , then the answer and the
example are the same as in the previous case; otherwise the answer is (2m 1)S 2 + 2SH(m 1), and
the example is provided simply by (m 1)2 nonintersecting napkins.

42

52nd IMO 2011

Combinatorics solutions

C7

Now we sketch the proof of both estimates for Case 2. We introduce a more appropriate notation
based on that from Solution 2. Denote by a and a+ the number of cells of class A that contain the
number which is strictly less than M and strictly greater than M , respectively. The numbers b , c ,
and d are defined in a similar way. One may notice that the proofs of Claim 1 and Claims 2, 3 lead
in fact to the inequalities
m1

d+
b + c
+ 2
2SH
H

and 2m 1

a
b+ + c+
d+
+
+ 2
2
S
2SH
H

(to obtain the first one, one needs to look at the big lines instead of the small ones). Combining these
inequalities, one may obtain the desired estimates.
These estimates can also be proved in some different ways, e.g. without distinguishing rich and poor
cells.

43

G1

Geometry solutions

52nd IMO 2011

G1
Let ABC be an acute triangle. Let be a circle whose center L lies on the side BC. Suppose
that is tangent to AB at B and to AC at C . Suppose also that the circumcenter O of the
triangle ABC lies on the shorter arc B C of . Prove that the circumcircle of ABC and
meet at two points.

Solution. The point B , being the perpendicular foot of L, is an interior point of side AB.
Analogously, C lies in the interior of AC. The point O is located inside the triangle AB C ,
hence COB < C OB .

O
C
B
B

O
Let = CAB. The angles CAB and C OB are inscribed into the two circles with
centers O and L, respectively, so COB = 2CAB = 2 and 2C OB = 360 C LB .
From the kite AB LC we have C LB = 180 C AB = 180 . Combining these, we
get
360 C LB
360 (180 )

2 = COB < C OB =
=
= 90 + ,
2
2
2
so
< 60 .
Let O be the reflection of O in the line BC. In the quadrilateral ABO C we have
CO B + CAB = COB + CAB = 2 + < 180 ,
so the point O is outside the circle ABC. Hence, O and O are two points of such that one
of them lies inside the circumcircle, while the other one is located outside. Therefore, the two
circles intersect.

44

52nd IMO 2011

Geometry solutions

G1

Comment. There are different ways of reducing the statement of the problem to the case < 60 .
E.g., since the point O lies in the interior of the isosceles triangle AB C , we have OA < AB . So,
if AB 2LB then OA < 2LO, which means that intersects the circumcircle of ABC. Hence the
only interesting case is AB > 2LB , and this condition implies CAB = 2B AL < 2 30 = 60 .

45

G2

Geometry solutions

52nd IMO 2011

G2
Let A1 A2 A3 A4 be a non-cyclic quadrilateral. Let O1 and r1 be the circumcenter and the
circumradius of the triangle A2 A3 A4 . Define O2 , O3 , O4 and r2 , r3 , r4 in a similar way. Prove
that
1
1
1
1
+
+
+
= 0.
2
2
2
2
2
2
2
O1 A1 r1 O2 A2 r2 O3 A3 r3 O4 A4 r42

Solution 1. Let M be the point of intersection of the diagonals A1 A3 and A2 A4 . On each


diagonal choose a direction and let x, y, z, and w be the signed distances from M to the
points A1 , A2 , A3 , and A4 , respectively.
Let 1 be the circumcircle of the triangle A2 A3 A4 and let B1 be the second intersection point
of 1 and A1 A3 (thus, B1 = A3 if and only if A1 A3 is tangent to 1 ). Since the expression
O1 A21 r12 is the power of the point A1 with respect to 1 , we get
O1 A21 r12 = A1 B1 A1 A3 .
On the other hand, from the equality MB1 MA3 = MA2 MA4 we obtain MB1 = yw/z.
Hence, we have

 yw
zx
x (z x) =
(yw xz).
O1 A21 r12 =
z
z
Substituting the analogous expressions into the sought sum we get
4
X
i=1

1
=
2
2
Oi Ai ri
yw xz
1

z
w
x
y

zx wy xz yw

= 0,

as desired.
Comment. One might reformulate the problem by assuming that the quadrilateral A1 A2 A3 A4 is
convex. This should not really change the difficulty, but proofs that distinguish several cases may
become shorter.

Solution 2. Introduce a Cartesian coordinate system in the plane. Every circle has an equation
of the form p(x, y) = x2 + y 2 + l(x, y) = 0, where l(x, y) is a polynomial of degree at most 1.
For any point A = (xA , yA ) we have p(xA , yA ) = d2 r 2 , where d is the distance from A to the
center of the circle and r is the radius of the circle.
For each i in {1, 2, 3, 4} let pi (x, y) = x2 + y 2 + li (x, y) = 0 be the equation of the circle with
center Oi and radius ri and let di be the distance from Ai to Oi . Consider the equation
4
X
pi (x, y)
i=1

46

d2i ri2

= 1.

(1)

52nd IMO 2011

G2

Geometry solutions

Since the coordinates of the points A1 , A2 , A3 , and A4 satisfy (1) but these four points do not
lie on a circle or on an line, equation (1) defines neither a circle, nor a line. Hence, the equation
is an identity and the coefficient of the quadratic term x2 + y 2 also has to be zero, i.e.
4
X

d2
i=1 i

1
= 0.
ri2

Comment. Using the determinant form of the equation of the circle through three given points, the
same solution can be formulated as follows.
For i = 1, 2, 3, 4 let (ui , vi ) be the coordinates of Ai and define

u2 + v 2
1
1
2
u2 + v22
= 2
2
u 3 + v3
2
u4 + v42

where i + 1, i + 2, and

u v 1
1 1

u2 v2 1
Expanding
u3 v3 1

u4 v4 1

u1
u2
u3
u4

v1
v2
v3
v4


1

1
1

1

and



ui+1 vi+1 1




i = ui+2 vi+2 1 ,


ui+3 vi+3 1

i + 3 have to be read modulo 4 as integers in the set {1, 2, 3, 4}.



1

1
= 0 along the third column, we get 1 2 + 3 4 = 0.
1

1

The circle through Ai+1 , Ai+2 , and Ai+3 is given by the equation

x2 + y 2
x
y

2
2
1 ui+1 + vi+1 ui+1 vi+1
2
i u2i+2 + vi+2
ui+2 vi+2
2
2
ui+3 + vi+3 ui+3 vi+3


1

1
= 0.
1

1

(2)

On the left-hand side, the coefficient of x2 + y 2 is equal to 1. Substituting (ui , vi ) for (x, y) in (2) we
obtain the power of point Ai with respect to the circle through Ai+1 , Ai+2 , and Ai+3 :

Thus, we have


u2 + v 2
ui
vi
i
i
2
2
1 ui+1 + vi+1 ui+1 vi+1
d2i ri2 =
2
i u2i+2 + vi+2
ui+2 vi+2
2
2
ui+3 + vi+3
ui+3 vi+3
4
X

d2
i=1 i


1

1

= (1)i+1 .
i
1

1

1 2 + 3 4
1
=
= 0.
2

ri

47

G3

Geometry solutions

52nd IMO 2011

G3
Let ABCD be a convex quadrilateral whose sides AD and BC are not parallel. Suppose that the
circles with diameters AB and CD meet at points E and F inside the quadrilateral. Let E be
the circle through the feet of the perpendiculars from E to the lines AB, BC, and CD. Let F
be the circle through the feet of the perpendiculars from F to the lines CD, DA, and AB.
Prove that the midpoint of the segment EF lies on the line through the two intersection points
of E and F .

Solution. Denote by P , Q, R, and S the projections of E on the lines DA, AB, BC, and
CD respectively. The points P and Q lie on the circle with diameter AE, so QP E = QAE;
analogously, QRE = QBE. So QP E + QRE = QAE + QBE = 90 . By similar
reasons, we have SP E + SRE = 90 , hence we get QP S + QRS = 90 + 90 = 180 ,
and the quadrilateral P QRS is inscribed in E . Analogously, all four projections of F onto the
sides of ABCD lie on F .
Denote by K the meeting point of the lines AD and BC. Due to the arguments above, there
is no loss of generality in assuming that A lies on segment DK. Suppose that CKD 90 ;
then the circle with diameter CD covers the whole quadrilateral ABCD, so the points E, F
cannot lie inside this quadrilateral. Hence our assumption is wrong. Therefore, the lines EP
and BC intersect at some point P , while the lines ER and AD intersect at some point R .

C
M
S
E

P
R
B
N

E
Q

F
K

A M N

Figure 1
We claim that the points P and R also belong to E . Since the points R, E, Q, B are
concyclic, QRK = QEB = 90 QBE = QAE = QP E. So QRK = QP P , which
means that the point P lies on E . Analogously, R also lies on E .
In the same manner, denote by M and N the projections of F on the lines AD and BC

48

52nd IMO 2011

G3

Geometry solutions

respectively, and let M = F M BC, N = F N AD. By the same arguments, we obtain that
the points M and N belong to F .

P
g

R
E
N
V

U
F
K

M N

Figure 2
Now we concentrate on Figure 2, where all unnecessary details are removed. Let U = NN
P P , V = MM RR . Due to the right angles at N and P , the points N, N , P , P are
concyclic, so UN UN = UP UP which means that U belongs to the radical axis g of the
circles E and F . Analogously, V also belongs to g.
Finally, since EUF V is a parallelogram, the radical axis UV of E and F bisects EF .

49

G4

Geometry solutions

52nd IMO 2011

G4
Let ABC be an acute triangle with circumcircle . Let B0 be the midpoint of AC and let C0
be the midpoint of AB. Let D be the foot of the altitude from A, and let G be the centroid
of the triangle ABC. Let be a circle through B0 and C0 that is tangent to the circle at a
point X 6= A. Prove that the points D, G, and X are collinear.

Solution 1. If AB = AC, then the statement is trivial. So without loss of generality we may
assume AB < AC. Denote the tangents to at points A and X by a and x, respectively.
Let 1 be the circumcircle of triangle AB0 C0 . The circles and 1 are homothetic with center
A, so they are tangent at A, and a is their radical axis. Now, the lines a, x, and B0 C0 are the
three radical axes of the circles , 1 , and . Since a 6 kB0 C0 , these three lines are concurrent
at some point W .
The points A and D are symmetric with respect to the line B0 C0 ; hence W X = W A = W D.
This means that W is the center of the circumcircle of triangle ADX. Moreover, we have
W AO = W XO = 90 , where O denotes the center of . Hence AW X + AOX = 180 .

a
A

T
1

C0

B0
G
O

A0

x
Denote by T the second intersection point of and the line DX. Note that O belongs to 1 .
Using the circles and , we find DAT = ADX AT D = 21 (360 AW X) 21 AOX =
180 12 (AW X + AOX) = 90 . So, AD AT , and hence AT k BC. Thus, AT CB is an
isosceles trapezoid inscribed in .
Denote by A0 the midpoint of BC, and consider the image of AT CB under the homothety h
with center G and factor 21 . We have h(A) = A0 , h(B) = B0 , and h(C) = C0 . From the

50

52nd IMO 2011

G4

Geometry solutions

symmetry about B0 C0 , we have T CB = CBA = B0 C0 A = DC0 B0 . Using AT k DA0 ,


we conclude h(T ) = D. Hence the points D, G, and T are collinear, and X lies on the same
line.
Solution 2. We define the points A0 , O, and W as in the previous solution and we concentrate
on the case AB < AC. Let Q be the perpendicular projection of A0 on B0 C0 .
Since W AO = W QO = OXW = 90 , the five points A, W , X, O, and Q lie on a
common circle. Furthermore, the reflections with respect to B0 C0 and OW map A to D
and X, respectively. For these reasons, we have
W QD = AQW = AXW = W AX = W QX.
Thus the three points Q, D, and X lie on a common line, say .

a
A

C0

Q
G

B0

A0

X
x

To complete the argument, we note that the homothety centered at G sending the triangle ABC
to the triangle A0 B0 C0 maps the altitude AD to the altitude A0 Q. Therefore it maps D to Q,
so the points D, G, and Q are collinear. Hence G lies on as well.
Comment. There are various other ways to prove the collinearity of Q, D, and X obtained in the
middle part of Solution 2. Introduce for instance the point J where the lines AW and BC intersect.
Then the four points A, D, X, and J lie at the same distance from W , so the quadrilateral ADXJ is
cyclic. In combination with the fact that AW XQ is cyclic as well, this implies
JDX = JAX = W AX = W QX.
Since BC k W Q, it follows that Q, D, and X are indeed collinear.

51

G5

Geometry solutions

52nd IMO 2011

G5
Let ABC be a triangle with incenter I and circumcircle . Let D and E be the second
intersection points of with the lines AI and BI, respectively. The chord DE meets AC at a
point F , and BC at a point G. Let P be the intersection point of the line through F parallel to
AD and the line through G parallel to BE. Suppose that the tangents to at A and at B meet
at a point K. Prove that the three lines AE, BD, and KP are either parallel or concurrent.

Solution 1. Since
IAF = DAC = BAD = BED = IEF
the quadrilateral AIF E is cyclic. Denote its circumcircle by 1 . Similarly, the quadrilateral BDGI is cyclic; denote its circumcircle by 2 .
The line AE is the radical axis of and 1 , and the line BD is the radical axis of and 2 .
Let t be the radical axis of 1 and 2 . These three lines meet at the radical center of the three
circles, or they are parallel to each other. We will show that t is in fact the line P K.
Let L be the second intersection point of 1 and 2 , so t = IL. (If the two circles are tangent
to each other then L = I and t is the common tangent.)
1

E
A

t
K=K

P=P
B

Let the line t meet the circumcircles of the triangles ABL and F GL at K 6= L and P 6= L,
respectively. Using oriented angles we have
(AB, BK ) = (AL, LK ) = (AL, LI) = (AE, EI) = (AE, EB) = (AB, BK),

52

52nd IMO 2011

Geometry solutions

G5

so BK k BK. Similarly we have AK k AK, and therefore K = K. Next, we have


(P F, F G) = (P L, LG) = (IL, LG) = (ID, DG) = (AD, DE) = (P F, F G),
hence P F k P F and similarly P G k P G. Therefore P = P . This means that t passes through
K and P , which finishes the proof.
Solution 2. Let M be the intersection point of the tangents to at D and E, and let the
lines AE and BD meet at T ; if AE and BD are parallel, then let T be their common ideal
point. It is well-known that the points K and M lie on the line T I (as a consequence of
Pascals theorem, applied to the inscribed degenerate hexagons AADBBE and ADDBEE).
The lines AD and BE are the angle bisectors of the angles CAB and ABC, respectively, so
D and E are the midpoints of the arcs BC and CA of the circle , respectively. Hence, DM
is parallel to BC and EM is parallel to AC.
Apply Pascals theorem to the degenerate hexagon CADDEB. By the theorem, the points
CA DE = F , AD EB = I and the common ideal point of lines DM and BC are collinear,
therefore F I is parallel to BC and DM. Analogously, the line GI is parallel to AC and EM.

A
T
K
F

I
H
B

P
C
M

D
FG
which takes E to G and D to F . Since the
Now consider the homothety with scale factor ED
triangles EDM and GF I have parallel sides, the homothety takes M to I. Similarly, since the
triangles DEI and F GP have parallel sides, the homothety takes I to P . Hence, the points
M, I, P and the homothety center H must lie on the same line. Therefore, the point P also
lies on the line T KIM.

Comment. One may prove that IF k BC and IG k AC in a more elementary way. Since ADE =
EDC and DEB = CED, the points I and C are symmetric about DE. Moreover, since the
arcs AE and EC are equal and the arcs CD and DB are equal, we have CF G = F GC, so the
triangle CF G is isosceles. Hence, the quadrilateral IF CG is a rhombus.

53

G6

Geometry solutions

52nd IMO 2011

G6
Let ABC be a triangle with AB = AC, and let D be the midpoint of AC. The angle bisector
of BAC intersects the circle through D, B, and C in a point E inside the triangle ABC.
The line BD intersects the circle through A, E, and B in two points B and F . The lines AF
and BE meet at a point I, and the lines CI and BD meet at a point K. Show that I is the
incenter of triangle KAB.

Solution 1. Let D be the midpoint of the segment AB, and let M be the midpoint of BC.
By symmetry at line AM, the point D has to lie on the circle BCD. Since the arcs D E
and ED of that circle are equal, we have ABI = D BE = EBD = IBK, so I lies on
the angle bisector of ABK. For this reason it suffices to prove in the sequel that the ray AI
bisects the angle BAK.
From
1
1
DF A = 180 BF A = 180 BEA = MEB = CEB = CDB
2
2
we derive DF A = DAF so the triangle AF D is isosceles with AD = DF .

E
D

I
K

M
2

Applying Menelauss theorem to the triangle ADF with respect to the line CIK, and applying
the angle bisector theorem to the triangle ABF , we infer
1=
and therefore

54

AC DK F I
DK BF
DK
BF
DK BF

=2

=2

CD KF IA
KF AB
KF 2 AD
KF AD
BF + F D
BF
KF
DF
AD
BD
=
=
+1=
+1=
=
.
AD
AD
AD
DK
DK
DK

52nd IMO 2011

G6

Geometry solutions

It follows that the triangles ADK and BDA are similar, hence DAK = ABD. Then
IAB = AF D ABD = DAF DAK = KAI
shows that the point K is indeed lying on the angle bisector of BAK.
Solution 2. It can be shown in the same way as in the first solution that I lies on the angle
bisector of ABK. Here we restrict ourselves to proving that KI bisects AKB.

E
D

I
1

O3

K
F

C
2

O1
Denote the circumcircle of triangle BCD and its center by 1 and by O1 , respectively. Since
the quadrilateral ABF E is cyclic, we have DF E = BAE = DAE. By the same reason,
we have EAF = EBF = ABE = AF E. Therefore DAF = DF A, and hence
DF = DA = DC. So triangle AF C is inscribed in a circle 2 with center D.
Denote the circumcircle of triangle ABD by 3 , and let its center be O3 . Since the arcs BE
and EC of circle 1 are equal, and the triangles ADE and F DE are congruent, we have
AO1 B = 2BDE = BDA, so O1 lies on 3 . Hence O3 O1 D = O3 DO1 .
The line BD is the radical axis of 1 and 3 . Point C belongs to the radical axis of 1 and 2 ,
and I also belongs to it since AI IF = BI IE. Hence K = BD CI is the radical center of 1 ,
2 , and 3 , and AK is the radical axis of 2 and 3 . Now, the radical axes AK, BK and IK are
perpendicular to the central lines O3 D, O3 O1 and O1 D, respectively. By O3 O1 D = O3 DO1 ,
we get that KI is the angle bisector of AKB.
Solution 3. Again, let M be the midpoint of BC. As in the previous solutions, we can deduce
ABI = IBK. We show that the point I lies on the angle bisector of KAB.
Let G be the intersection point of the circles AF C and BCD, different from C. The lines

55

G6

Geometry solutions

52nd IMO 2011

CG, AF , and BE are the radical axes of the three circles AGF C, CDB, and ABF E, so
I = AF BE is the radical center of the three circles and CG also passes through I.

I
K
F

The angle between line DE and the tangent to the circle BCD at E is equal to EBD =
EAF = ABE = AF E. As the tangent at E is perpendicular to AM, the line DE is
perpendicular to AF . The triangle AF E is isosceles, so DE is the perpendicular bisector
of AF and thus AD = DF . Hence, the point D is the center of the circle AF C, and this circle
passes through M as well since AMC = 90 .
Let B be the reflection of B in the point D, so ABCB is a parallelogram. Since DC = DG
we have GCD = DBC = KB A. Hence, the quadrilateral AKCB is cyclic and thus
CAK = CB K = ABD = 2MAI. Then
1
1
1
IAB = MAB MAI = CAB CAK = KAB
2
2
2
and therefore AI is the angle bisector of KAB.

56

52nd IMO 2011

G7

Geometry solutions

G7
Let ABCDEF be a convex hexagon all of whose sides are tangent to a circle with center O.
Suppose that the circumcircle of triangle ACE is concentric with . Let J be the foot of the
perpendicular from B to CD. Suppose that the perpendicular from B to DF intersects the
line EO at a point K. Let L be the foot of the perpendicular from K to DE. Prove that
DJ = DL.

Solution 1. Since and the circumcircle of triangle ACE are concentric, the tangents from A,
C, and E to have equal lengths; that means that AB = BC, CD = DE, and EF = F A.
Moreover, we have BCD = DEF = F AB.

A
B

L
B

O
E

C
M

K
B

D
Consider the rotation around point D mapping C to E; let B and L be the images of the
points B and J, respectively, under this rotation. Then one has DJ = DL and B L DE;
moreover, the triangles B ED and BCD are congruent. Since DEO < 90 , the lines EO
and B L intersect at some point K . We intend to prove that K B DF ; this would imply
K = K , therefore L = L , which proves the problem statement.
Analogously, consider the rotation around F mapping A to E; let B be the image of B under
this rotation. Then the triangles F AB and F EB are congruent. We have EB = AB = BC =
EB and F EB = F AB = BCD = DEB , so the points B and B are symmetrical
with respect to the angle bisector EO of DEF . So, from K B DE we get K B EF .
From these two relations we obtain
K D2 K E 2 = B D2 B E 2

and K E 2 K F 2 = B E 2 B F 2 .

Adding these equalities and taking into account that B E = B E we obtain


K D 2 K F 2 = B D 2 B F 2 = BD 2 BF 2 ,
57

G7

Geometry solutions

52nd IMO 2011

which means exactly that K B DF .


Comment. There are several variations of this solution. For instance, let us consider the intersection
point M of the lines BJ and OC. Define the point K as the reflection of M in the line DO. Then
one has
DK 2 DB 2 = DM 2 DB 2 = CM 2 CB 2 .
Next, consider the rotation around O which maps CM to EK . Let P be the image of B under this
rotation; so P lies on ED. Then EF K P , so
CM 2 CB 2 = EK 2 EP 2 = F K 2 F P 2 = F K 2 F B 2 ,
since the triangles F EP and F AB are congruent.

Solution 2. Let us denote the points of tangency of AB, BC, CD, DE, EF , and F A to
by R, S, T , U, V , and W , respectively. As in the previous solution, we mention that AR =
AW = CS = CT = EU = EV .
The reflection in the line BO maps R to S, therefore A to C and thus also W to T . Hence, both
lines RS and W T are perpendicular to OB, therefore they are parallel. On the other hand,
the lines UV and W T are not parallel, since otherwise the hexagon ABCDEF is symmetric
with respect to the line BO and the lines defining the point K coincide, which contradicts the
conditions of the problem. Therefore we can consider the intersection point Z of UV and W T .

Z
A

L
S

V
O

E
T

D
Next, we recall a well-known fact that the points D, F , Z are collinear. Actually, D is the pole
of the line UT , F is the pole of V W , and Z = T W UV ; so all these points belong to the
polar line of T U V W .

58

52nd IMO 2011

Geometry solutions

G7

Now, we put O into the origin, and identify each point (say X) with the vector OX. So, from
now on all the products of points refer to the scalar products of the corresponding vectors.
Since OK UZ and OB T Z, we have K (Z U) = 0 = B (Z T ). Next, the
condition BK DZ can be written as K (D Z) = B (D Z). Adding these two equalities
we get
K (D U) = B (D T ).
By symmetry, we have D (D U) = D (D T ). Subtracting this from the previous equation,
we obtain (K D) (D U) = (B D) (D T ) and rewrite it in vector form as

DK UD = DB T D.

Finally, projecting the vectors DK and DB onto the lines UD and T D respectively, we can
rewrite this equality in terms of segment lengths as DL UD = DJ T D, thus DL = DJ.
Comment. The collinearity of Z, F , and D may be shown in various more elementary ways. For insin DZT
sin DT Z
stance, applying the sine theorem to the triangles DT Z and DU Z, one gets
=
;
sin DZU
sin DU Z
sin F W Z
sin F ZW
=
. The right-hand sides are equal, hence so are the left-hand
analogously,
sin F ZV
sin F V Z
sides, which implies the collinearity of the points D, F , and Z.
There also exist purely synthetic proofs of this fact. E.g., let Q be the point of intersection of the
circumcircles of the triangles ZT V and ZW U different from Z. Then QZ is the bisector of V QW
since V QZ = V T Z = V U W = ZQW . Moreover, all these angles are equal to 21 V OW ,
so V QW = V OW , hence the quadrilateral V W OQ is cyclic. On the other hand, the points O,
V , W lie on the circle with diameter OF due to the right angles; so Q also belongs to this circle.
Since F V = F W , QF is also the bisector of V QW , so F lies on QZ. Analogously, D lies on the
same line.

59

G8

Geometry solutions

52nd IMO 2011

G8
Let ABC be an acute triangle with circumcircle . Let t be a tangent line to . Let ta , tb ,
and tc be the lines obtained by reflecting t in the lines BC, CA, and AB, respectively. Show
that the circumcircle of the triangle determined by the lines ta , tb , and tc is tangent to the
circle .

To avoid a large case distinction, we will use the notion of oriented angles. Namely, for two
lines and m, we denote by (, m) the angle by which one may rotate anticlockwise to
obtain a line parallel to m. Thus, all oriented angles are considered modulo 180 .

tc

B
C

B
X

ta

C =S

B
A

I
T

tb
A

Solution 1. Denote by T the point of tangency of t and . Let A = tb tc , B = ta tc ,


C = ta tb . Introduce the point A on such that T A = AA (A 6= T unless T A is a
diameter). Define the points B and C in a similar way.
Since the points C and B are the midpoints of arcs T C and T B , respectively, we have
(t, B C ) = (t, T C ) + (T C , B C ) = 2(t, T C) + 2(T C , BC )

= 2 (t, T C) + (T C, BC) = 2(t, BC) = (t, ta ).

It follows that ta and B C are parallel. Similarly, tb k A C and tc k A B . Thus, either the
triangles A B C and A B C are homothetic, or they are translates of each other. Now we
will prove that they are in fact homothetic, and that the center K of the homothety belongs

60

52nd IMO 2011

Geometry solutions

G8

to . It would then follow that their circumcircles are also homothetic with respect to K and
are therefore tangent at this point, as desired.
We need the two following claims.
Claim 1. The point of intersection X of the lines B C and BC lies on ta .
Proof. Actually, the points X and T are symmetric about the line BC, since the lines CT
and CB are symmetric about this line, as are the lines BT and BC .

Claim 2. The point of intersection I of the lines BB and CC lies on the circle .
Proof. We consider the case that t is not parallel to the sides of ABC; the other cases may be
regarded as limit cases. Let D = t BC, E = t AC, and F = t AB.
Due to symmetry, the line DB is one of the angle bisectors of the lines B D and F D; analogously,
the line F B is one of the angle bisectors of the lines B F and DF . So B is either the incenter
or one of the excenters of the triangle B DF . In any case we have (BD, DF ) + (DF, F B) +
(B B, B D) = 90 , so
(B B, B C ) = (B B, B D) = 90 (BC, DF ) (DF, BA) = 90 (BC, AB).
Analogously, we get (C C, B C ) = 90 (BC, AC). Hence,
(BI, CI) = (B B, B C ) + (B C , C C) = (BC, AC) (BC, AB) = (AB, AC),
which means exactly that the points A, B, I, C are concyclic.

Now we can complete the proof. Let K be the second intersection point of B B and .
Applying Pascals theorem to hexagon KB CIBC we get that the points B = KB IB
and X = B C BC are collinear with the intersection point S of CI and C K. So S =
CI B X = C , and the points C , C , K are collinear. Thus K is the intersection point
of B B and C C which implies that K is the center of the homothety mapping A B C
to A B C , and it belongs to .
Solution 2. Define the points T , A , B , and C in the same way as in the previous solution.
Let X, Y , and Z be the symmetric images of T about the lines BC, CA, and AB, respectively.
Note that the projections of T on these lines form a Simson line of T with respect to ABC,
therefore the points X, Y , Z are also collinear. Moreover, we have X B C , Y C A ,
Z A B .
Denote = (t, T C) = (BT, BC). Using the symmetry in the lines AC and BC, we get
(BC, BX) = (BT, BC) = and (XC, XC ) = (t, T C) = (Y C, Y C ) = .
Since (XC, XC ) = (Y C, Y C ), the points X, Y , C, C lie on some circle c . Define the
circles a and b analogously. Let be the circumcircle of triangle A B C .

61

G8

Geometry solutions

52nd IMO 2011

Now, applying Miquels theorem to the four lines A B , A C , B C , and XY , we obtain that
the circles , a , b , c intersect at some point K. We will show that K lies on , and that
the tangent lines to and at this point coincide; this implies the problem statement.
Due to symmetry, we have XB = T B = ZB, so the point B is the midpoint of one of the
arcs XZ of circle b . Therefore (KB, KX) = (XZ, XB). Analogously, (KX, KC) =
(XC, XY ). Adding these equalities and using the symmetry in the line BC we get
(KB, KC) = (XZ, XB) + (XC, XZ) = (XC, XB) = (T B, T C).
Therefore, K lies on .
Next, let k be the tangent line to at K. We have
(k, KC ) = (k, KC) + (KC, KC ) = (KB, BC) + (XC, XC )

= (KB, BX) (BC, BX) + = (KB , B X) + = (KB , B C ),

which means exactly that k is tangent to .

k
K

Z
B

tc

T
ta

tb

Comment. There exist various solutions combining the ideas from the two solutions presented above.
For instance, one may define the point X as the reflection of T with respect to the line BC, and
then introduce the point K as the second intersection point of the circumcircles of BB X and CC X.
Using the fact that BB and CC are the bisectors of (A B , B C ) and (A C , B C ) one can show
successively that K , K , and that the tangents to and at K coincide.

62

52nd IMO 2011

N1

Number Theory solutions

N1
For any integer d > 0, let f (d) be the smallest positive integer that has exactly d positive
divisors (so for example we have f (1) = 1, f (5) = 16, and f (6) = 12). Prove that for every
integer k 0 the number f (2k ) divides f (2k+1).

Solution 1. For any positive integer n, let d(n) be the number of positive divisors of n. Let
Q
n = p pa(p) be the prime factorization of n where p ranges over the prime numbers, the integers
Q
a(p) are nonnegative and all but finitely many a(p) are zero. Then we have d(n) = p (a(p)+1).
Thus, d(n) is a power of 2 if and only if for every prime p there is a nonnegative integer b(p)
with a(p) = 2b(p) 1 = 1 + 2 + 22 + + 2b(p)1 . We then have
n=

Y b(p)1
Y
p

p2 ,

and d(n) = 2k

with k =

b(p).

i=0

Let S be the set of all numbers of the form p2 with p prime and r a nonnegative integer. Then
we deduce that d(n) is a power of 2 if and only if n is the product of the elements of some finite

subset T of S that satisfies the following condition: for all t T and s S with s t we have
s T . Moreover, if d(n) = 2k then the corresponding set T has k elements.

Note that the set Tk consisting of the smallest k elements from S obviously satisfies the condition
above. Thus, given k, the smallest n with d(n) = 2k is the product of the elements of Tk . This n

is f (2k ). Since obviously Tk Tk+1 , it follows that f (2k ) f (2k+1 ).

Solution 2. This is an alternative to the second part of the Solution 1. Suppose k is a


Q
nonnegative integer. From the first part of Solution 1 we see that f (2k ) = p pa(p) with
P
a(p) = 2b(p) 1 and p b(p) = k. We now claim that for any two distinct primes p, q with
b(q) > 0 we have
b(p)
b(q)1
m = p2 > q 2
= .
(1)
To see this, note first that divides f (2k ). With the first part of Solution 1 one can see that
the integer n = f (2k )m/ also satisfies d(n) = 2k . By the definition of f (2k ) this implies that
n f (2k ) so m . Since p 6= q the inequality (1) follows.
Q
Let the prime factorization of f (2k+1) be given by f (2k+1) = p pr(p) with r(p) = 2s(p) 1.
P
P
Since we have p s(p) = k + 1 > k = p b(p) there is a prime p with s(p) > b(p). For any
prime q 6= p with b(q) > 0 we apply inequality (1) twice and get
s(q)

q2

s(p)1

> p2

b(p)

p2

b(q)1

> q2


which implies s(q) b(q). It follows that s(q) b(q) for all primes q, so f (2k ) f (2k+1 ).

63

N2

Number Theory solutions

52nd IMO 2011

N2
Consider a polynomial P (x) = (x + d1 )(x + d2 ) . . . (x + d9 ), where d1 , d2 , . . . , d9 are nine
distinct integers. Prove that there exists an integer N such that for all integers x N the
number P (x) is divisible by a prime number greater than 20.

Solution 1. Note that the statement of the problem is invariant under translations of x; hence
without loss of generality we may suppose that the numbers d1 , d2 , . . . , d9 are positive.
The key observation is that there are only eight primes below 20, while P (x) involves more
than eight factors.
We shall prove that N = d8 satisfies the desired property, where d = max{d1 , d2 , . . . , d9 }.
Suppose for the sake of contradiction that there is some integer x N such that P (x) is
composed of primes below 20 only. Then for every index i {1, 2, . . . , 9} the number x + di
can be expressed as product of powers of the first 8 primes.
Since x + di > x d8 there is some prime power fi > d that divides x + di . Invoking the
pigeonhole principle we see that there are two distinct indices i and j such that fi and fj are
powers of the same prime number. For reasons of symmetry, we may suppose that fi fj .
Now both of the numbers x + di and x + dj are divisible by fi and hence so is their difference
di dj . But as
0 < |di dj | max(di , dj ) d < fi ,
this is impossible. Thereby the problem is solved.

Solution 2. Observe that for each index i {1, 2, . . . , 9} the product


Di =

1j9,j6=i

|di dj |

is positive. We claim that N = max{D1 d1 , D2 d2 , . . . , D9 d9 } + 1 satisfies the statement


of the problem. Suppose there exists an integer x N such that all primes dividing P (x) are
smaller than 20. For each index i we reduce the fraction (x + di )/Di to lowest terms. Since
x + di > Di the numerator of the fraction we thereby get cannot be 1, and hence it has to be
divisible by some prime number pi < 20.
By the pigeonhole principle, there are a prime number p and two distinct indices i and j such
that pi = pj = p. Let pi and pj be the greatest powers of p dividing x + di and x + dj ,
respectively. Due to symmetry we may suppose i j . But now pi divides di dj and hence
also Di , which means that all occurrences of p in the numerator of the fraction (x + di )/Di
cancel out, contrary to the choice of p = pi . This contradiction proves our claim.

64

52nd IMO 2011

Number Theory solutions

N2

Solution 3. Given a nonzero integer N as well as a prime number p we write vp (N) for the
exponent with which p occurs in the prime factorization of |N|.
Evidently, if the statement of the problem were not true, then there would exist an infinite
sequence (xn ) of positive integers tending to infinity such that for each n Z+ the integer
P (xn ) is not divisible by any prime number > 20. Observe that the numbers d1 , d2 , . . . , d9
do not appear in this sequence.
Now clearly there exists a prime p1 < 20 for which the sequence vp1 (xn + d1 ) is not bounded;
thinning out the sequence (xn ) if necessary we may even suppose that
vp1 (xn + d1 ) .
Repeating this argument eight more times we may similarly choose primes p2 , . . . , p9 < 20 and
suppose that our sequence (xn ) has been thinned out to such an extent that vpi (xn + di )
holds for i = 2, . . . , 9 as well. In view of the pigeonhole principle, there are distinct indices i
and j as well as a prime p < 20 such that pi = pj = p. Setting k = vp (di dj ) there now has to
be some n for which both vp (xn + di ) and vp (xn + dj ) are greater than k. But now the numbers
xn + di and xn + dj are divisible by pk+1 whilst their difference di dj is not a contradiction.
Comment. This problem is supposed to be a relatively easy one, so one might consider adding the
hypothesis that the numbers d1 , d2 , . . . , d9 be positive. Then certain merely technical issues are not
going to arise while the main ideas required to solve the problems remain the same.

65

N3

Number Theory solutions

52nd IMO 2011

N3
Let n 1 be an odd integer. Determine all functions f from the set of integers to itself such
that for all integers x and y the difference f (x) f (y) divides xn y n .

Answer. All functions f of the form f (x) = xd + c, where is in {1, 1}, the integer d is a
positive divisor of n, and c is an integer.
Solution. Obviously, all functions in the answer satisfy the condition of the problem. We will
show that there are no other functions satisfying that condition.
Let f be a function satisfying the given condition. For each integer n, the function g defined
by g(x) = f (x) + n also satisfies the same condition. Therefore, by subtracting f (0) from f (x)
we may assume that f (0) = 0.
For any prime p, the condition on f with (x, y) = (p, 0) states that f (p) divides pn . Since the
set of primes is infinite, there exist integers d and with 0 d n and {1, 1} such that
for infinitely many primes p we have f (p) = pd . Denote the set of these primes by P . Since a
function g satisfies the given condition if and only if g satisfies the same condition, we may
suppose = 1.
The case d = 0 is easily ruled out, because 0 does not divide any nonzero integer. Suppose
d 1 and write n as md + r, where m and r are integers such that m 1 and 0 r d 1.
Let x be an arbitrary integer. For each prime p in P , the difference f (p) f (x) divides pn xn .
Using the equality f (p) = pd , we get
pn xn = pr (pd )m xn pr f (x)m xn 0

(mod pd f (x))

Since we have r < d, for large enough primes p P we obtain


|pr f (x)m xn | < pd f (x).
Hence pr f (x)m xn has to be zero. This implies r = 0 and xn = (xd )m = f (x)m . Since m is
odd, we obtain f (x) = xd .
Comment. If n is an even positive integer, then the functions f of the form

xd + c for some integers,


f (x) =
xd + c for the rest of integers,

where d is a positive divisor of n/2 and c is an integer, also satisfy the condition of the problem.
Together with the functions in the answer, they are all functions that satisfy the condition when n is
even.

66

52nd IMO 2011

N4

Number Theory solutions

N4
For each positive integer k, let t(k) be the largest odd divisor of k. Determine all positive
integers a for which there exists a positive integer n such that all the differences
t(n + a) t(n),

t(n + a + 1) t(n + 1),

...,

t(n + 2a 1) t(n + a 1)

are divisible by 4.

Answer. a = 1, 3, or 5.
Solution. A pair (a, n) satisfying the condition of the problem will be called a winning pair.
It is straightforward to check that the pairs (1, 1), (3, 1), and (5, 4) are winning pairs.
Now suppose that a is a positive integer not equal to 1, 3, and 5. We will show that there are
no winning pairs (a, n) by distinguishing three cases.
Case 1: a is even. In this case we have a = 2 d for some positive integer and some odd d. Since
a 2 , for each positive integer n there exists an i {0, 1, . . . , a 1} such that n + i = 21 e,
where e is some odd integer. Then we have t(n + i) = t(21 e) = e and
t(n + a + i) = t(2 d + 21 e) = 2d + e e + 2 (mod 4).
So we get t(n + i) t(n + a + i) 2 (mod 4), and (a, n) is not a winning pair.
Case 2: a is odd and a > 8. For each positive integer n, there exists an i {0, 1, . . . , a 5}
such that n + i = 2d for some odd d. We get
t(n + i) = d 6 d + 2 = t(n + i + 4)

(mod 4)

and
t(n + a + i) = n + a + i n + a + i + 4 = t(n + a + i + 4) (mod 4).
Therefore, the integers t(n + a + i) t(n + i) and t(n + a + i + 4) t(n + i + 4) cannot be both
divisible by 4, and therefore there are no winning pairs in this case.
Case 3: a = 7. For each positive integer n, there exists an i {0, 1, . . . , 6} such that n + i is
either of the form 8k + 3 or of the form 8k + 6, where k is a nonnegative integer. But we have
t(8k + 3) 3 6 1 4k + 5 = t(8k + 3 + 7)

(mod 4)

and
t(8k + 6) = 4k + 3 3 6 1 t(8k + 6 + 7) (mod 4).
Hence, there are no winning pairs of the form (7, n).

67

N5

Number Theory solutions

52nd IMO 2011

N5
Let f be a function from the set of integers to the set of positive integers. Suppose that for
any two integers m and n, the difference f (m) f (n) is divisible by f (m n). Prove that for
all integers m, n with f (m) f (n) the number f (n) is divisible by f (m).

Solution 1. Suppose that x and y are two integers with f (x) < f (y). We will show that

f (x) f (y). By taking m = x and n = y we see that

f (x y) |f (x) f (y)| = f (y) f (x) > 0,

so f (x y) f (y) f (x) < f (y). Hence the number d = f (x) f (x y) satisfies


f (y) < f (x y) < d < f (x) < f (y).

Taking m = x and n = x y we see that f (y) d, so we deduce d = 0, or in other words

f (x) = f (x y). Taking m = x and n = y we see that f (x) = f (x y) f (x) f (y), which

implies f (x) f (y).
Solution 2. We split the solution into a sequence of claims; in each claim, the letters m and n
denote arbitrary integers.

Claim 1. f (n) f (mn).


Proof. Since trivially f (n) f (1 n) and f (n) f ((k + 1)n) f (kn) for all integers k, this is
easily seen by using induction on m in both directions.


Claim 2. f (n) f (0) and f (n) = f (n).
Proof. The first part follows by plugging m = 0 into Claim 1. Using Claim 1 twice with


m = 1, we get f (n) f (n) f (n), from which the second part follows.


From Claim 1, we get f (1) f (n) for all integers n, so f (1) is the minimal value attained by f .
Next, from Claim 2, the function f can attain only a finite number of values since all these
values divide f (0).
Now we prove the statement of the problem by induction on the number Nf of values attained
by f . In the base case Nf 2, we either have f (0) 6= f (1), in which case these two numbers
are the only values attained by f and the statement is clear, or we have f (0) = f (1), in which


case we have f (1) f (n) f (0) for all integers n, so f is constant and the statement is obvious
again.

For the induction step, assume that Nf 3, and let a be the least positive integer with
f (a) > f (1). Note that such a number exists due to the symmetry of f obtained in Claim 2.

68

52nd IMO 2011

Number Theory solutions

N5


Claim 3. f (n) 6= f (1) if and only if a n.

Proof. Since f (1) = = f (a 1) < f (a), the claim follows from the fact that
f (n) = f (1) f (n + a) = f (1).
So it suffices to prove this fact.

Assume that f (n) = f (1). Then f (n + a) f (a) f (n) = f (a) f (n) > 0, so f (n + a)
f (a) f (n) < f (a); in particular the difference f (n + a) f (n) is stricly smaller than f (a).
Furthermore, this difference is divisible by f (a) and nonnegative since f (n) = f (1) is the
least value attained by f . So we have f (n + a) f (n) = 0, as desired. For the converse
direction we only need to remark that f (n + a) = f (1) entails f (n a) = f (1), and hence
f (n) = f (n) = f (1) by the forward implication.


We return to the induction step. So let us take two arbitrary integers m and n with f (m) f (n).



If a 6 m, then we have f (m) = f (1) f (n). On the other hand, suppose that a m; then by

Claim 3 a n as well. Now define the function g(x) = f (ax). Clearly, g satisfies the conditions of the problem, but Ng < Nf 1, since g does not attain f (1). Hence, by the induction

hypothesis, f (m) = g(m/a) g(n/a) = f (n), as desired.
Comment. After the fact that f attains a finite number of values has been established, there are
several ways of finishing the solution. For instance, let f (0) = b1 > b2 > > bk be all these values.
One may show (essentially in the same way as in Claim 3) that the set Si = {n : f (n) bi } consists

exactly of all numbers divisible by some integer ai 0. One obviously has ai ai1 , which implies




f (ai ) f (ai1 ) by Claim 1. So, bk bk1 b1 , thus proving the problem statement.
Moreover, now it is easy to describe all functions satisfying the conditions of the problem. Namely, all
these functions can be constructed as follows. Consider a sequence of nonnegative integers a1 , a2 , . . . , ak
and another sequence of positive integers b1 , b2 , . . . , bk such that |ak | = 1, ai 6= aj and bi 6= bj for all


1 i < j k, and ai ai1 and bi bi1 for all i = 2, . . . , k. Then one may introduce the function
f (n) = bi(n) ,


where i(n) = min{i : ai n}.

These are all the functions which satisfy the conditions of the problem.

69

N6

Number Theory solutions

52nd IMO 2011

N6
Let P (x) and Q(x) be two polynomials with integer coefficients such that no nonconstant
polynomial with rational coefficients divides both P (x) and Q(x). Suppose that for every
positive integer n the integers P (n) and Q(n) are positive, and 2Q(n) 1 divides 3P (n) 1.
Prove that Q(x) is a constant polynomial.

Solution. First we show that there exists an integer d such that for all positive integers n we

have gcd P (n), Q(n) d.

Since P (x) and Q(x) are coprime (over the polynomials with rational coefficients), Euclids algorithm provides some polynomials R0 (x), S0 (x) with rational coefficients such that P (x)R0 (x)
Q(x)S0 (x) = 1. Multiplying by a suitable positive integer d, we obtain polynomials R(x) =
d R0 (x) and S(x) = d S0 (x) with integer coefficients for which P (x)R(x) Q(x)S(x) = d.

Then we have gcd P (n), Q(n) d for any integer n.
To prove the problem statement, suppose that Q(x) is not constant. Then the sequence Q(n)
is not bounded and we can choose a positive integer m for which
M = 2Q(m) 1 3max{P (1),P (2),...,P (d)} .

(1)



Since M = 2Q(n) 1 3P (n) 1, we have 2, 3 6 M. Let a and b be the multiplicative orders
of 2 and 3 modulo M, respectively. Obviously, a = Q(m) since the lower powers of 2 do not


reach M. Since M divides 3P (m) 1, we have b P (m). Then gcd(a, b) gcd P (m), Q(m) d.
Since the expression ax by attains all integer values divisible by gcd(a, b) when x and y
run over all nonnegative integer values, there exist some nonnegative integers x, y such that
1 m + ax by d.
By Q(m + ax) Q(m) (mod a) we have
2Q(m+ax) 2Q(m) 1

(mod M)

and therefore


M 2Q(m+ax) 1 3P (m+ax) 1.

Then, by P (m + ax by) P (m + ax) (mod b) we have

3P (m+axby) 3P (m+ax) 1 (mod M).


Since P (m + ax by) > 0 this implies M 3P (m+axby) 1. But P (m + ax by) is listed
among P (1), P (2), . . . , P (d), so
M < 3P (m+axby) 3max{P (1),P (2),...,P (d)}

70

52nd IMO 2011

Number Theory solutions

N6

which contradicts (1).


Comment. We present another variant of the solution above.
Denote the degree of P by k and its leading coefficient by p. Consider any positive integer n and let

a = Q(n). Again, denote by b the multiplicative order of 3 modulo 2a 1. Since 2a 1 3P (n) 1, we



have b P (n). Moreover, since 2Q(n+at) 1 3P (n+at) 1 and a = Q(n) Q(n + at) for each positive


integer t, we have 2a 1 3P (n+at) 1, hence b P (n + at) as well.
Therefore, b divides gcd{P (n + at) : t 0}; hence it also divides the number
k
X
i=0

(1)ki

 
k
P (n + ai) = p k! ak .
i



Finally, we get b gcd P (n), k!p Q(n)k , which is bounded by the same arguments as in the beginning
of the solution. So 3b 1 is bounded, and hence 2Q(n) 1 is bounded as well.

71

N7

Number Theory solutions

52nd IMO 2011

N7
Let p be an odd prime number. For every integer a, define the number
Sa =

ap1
a a2
+
++
.
1
2
p1

Let m and n be integers such that


S3 + S4 3S2 =

m
.
n

Prove that p divides m.

Solution 1. For rational numbers p1 /q1 and p2 /q2 with the denominators q1 , q2 not divisible
by p, we write p1 /q1 p2 /q2 (mod p) if the numerator p1 q2 p2 q1 of their difference is divisible
by p.
We start with finding an explicit formula for the residue of Sa modulo p. Note first that for

every k = 1, . . . , p 1 the number kp is divisible by p, and
 
1 p
(p 1)(p 2) (p k + 1)
(1) (2) (k + 1)
(1)k1
=

=
p k
k!
k!
k

(mod p)

Therefore, we have
Sa =

p1
X
(a)k (1)k1

k=1

p1
X

 
1 p
(a)

p k
k=1
k

(mod p).

The number on the right-hand side is integer. Using the binomial formula we express it as
p1
X

 
1
k 1 p
(a)

=
p k
p
k=1

 !
(a 1)p ap + 1
p
=
(a)k
1 (a)p +
k
p
k=0
p
X

since p is odd. So, we have


Sa

(a 1)p ap + 1
p

(mod p).

Finally, using the obtained formula we get


(2p 3p + 1) + (3p 4p + 1) 3(1p 2p + 1)
p
p
p
p
42 4 4
(2 2)2
=
=
(mod p).
p
p


By Fermats theorem, p 2p 2, so p2 (2p 2)2 and hence S3 + S4 3S2 0 (mod p).
S3 + S4 3S2

72

52nd IMO 2011

N7

Number Theory solutions

Solution 2. One may solve the problem without finding an explicit formula for Sa . It is
enough to find the following property.
Lemma. For every integer a, we have Sa+1 Sa (mod p).
Proof. We expand Sa+1 using the binomial formula as
Sa+1

p1
p1
k  
X
1X k j X
=
a =
k j=0 j
k=1
k=1

 ! X
p1
p1
p1  
k
1 X j 1 k
1 X jX1 k k
=
a .
a
+
a
+
j
k j=1
k j
k
k
j=1
k=1
k=j

p
1
Note that k1 + pk
= k(pk)
0 (mod p) for all 1 k p 1; hence the first sum vanishes


to obtain
modulo p. For the second sum, we use the relation k1 kj = 1j k1
j1

Sa+1


p1 j p1 
X
a X k1

j k=1 j 1
j=1

(mod p).

Finally, from the relation



p1 
X
k1
k=1

j 1



(p 1)(p 2) . . . (p j)
p1
=
=
(1)j
j
j!

we obtain
Sa+1

p1 j
X
a (1)j

j!

j=1

(mod p)

= Sa .

Now we turn to the problem. Using the lemma we get


S3 3S2 S2 3S2 =

1kp1
k is even

2 2k
+
k

1kp1
k is odd

4 2k
k

(mod p).

(1)

The first sum in (1) expands as


(p1)/2
X 4
X 2 22
=
.
2

=1
=1

(p1)/2

Next, using Fermats theorem, we expand the second sum in (1) as


(p1)/2

X
=1

(p1)/2
X
22+1
2p+2

=
2 1
p + 2 1
=1

(here we set m = +

p1
).
2

p1
X

m=(p+1)/2

2 4m
=
2m

p1
X

m=(p+1)/2

4m
m

(mod p)

Hence,
(p1)/2

X 4

S3 3S2

=1

p1
X

m=(p+1)/2

4m
= S4
m

(mod p).

73

N8

Number Theory solutions

52nd IMO 2011

N8
Let k be a positive integer and set n = 2k + 1. Prove that n is a prime number if and only if
the following holds: there is a permutation a1 , . . . , an1 of the numbers 1, 2, . . . , n 1 and a
sequence of integers g1 , g2 , . . . , gn1 such that n divides giai ai+1 for every i {1, 2, . . . , n 1},
where we set an = a1 .

Solution. Let N = {1, 2, . . . , n 1}. For a, b N, we say that b follows a if there exists an
integer g such that b g a (mod n) and denote this property as a b. This way we have a
directed graph with N as set of vertices. If a1 , . . . , an1 is a permutation of 1, 2, . . . , n 1 such
that a1 a2 . . . an1 a1 then this is a Hamiltonian cycle in the graph.
Step I. First consider the case when n is composite. Let n = p1 1 . . . ps s be its prime factorization. All primes pi are odd.
Suppose that i > 1 for some i. For all integers a, g with a 2, we have g a 6 pi (mod p2i ),
because g a is either divisible by p2i or it is not divisible by pi . It follows that in any Hamiltonian
cycle pi comes immediately after 1. The same argument shows that 2pi also should come
immediately after 1, which is impossible. Hence, there is no Hamiltonian cycle in the graph.
Now suppose that n is square-free. We have n = p1 p2 . . . ps > 9 and s 2. Assume that there
exists a Hamiltonian cycle. There are n1
even numbers in this cycle, and each number which
2
follows one of them should be a quadratic residue modulo n. So, there should be at least n1
2
pi +1
nonzero quadratic residues modulo n. On the other hand, for each pi there exist exactly 2
quadratic residues modulo pi ; by the Chinese Remainder Theorem, the number of quadratic
residues modulo n is exactly p12+1 p22+1 . . . ps2+1 , including 0. Then we have a contradiction
by
 s
p1 + 1 p2 + 1
ps + 1
2p1 2p2
2ps
2
n1
4n

...

...
=
<
.
n
2
2
2
3
3
3
3
9
2
This proves the if-part of the problem.
Step II. Now suppose that n is prime. For any a N, denote by 2 (a) the exponent of 2 in
the prime factorization of a, and let (a) = max{t [0, k] | 2t a}.
Lemma. For any a, b N, we have a b if and only if 2 (a) (b).
Proof. Let = 2 (a) and m = (b).
m

Suppose m. Since b follows 2m , there exists some g0 such that b g02 (mod n). By
gcd(a, n 1) = 2 there exist some integers p and q such that pa q(n 1) = 2 . Choosing
m
m
m
2m +2m q(n1)
g = g02 p we have g a = g02 pa = g0
g02 b (mod n) by Fermats theorem.
Hence, a b.
To prove the reverse statement, suppose that a b, so b g a (mod n) with some g. Then

b (g a/2 )2 , and therefore 2 b. By the definition of (b), we have (b) . The lemma is

74

52nd IMO 2011

Number Theory solutions

proved.

N8


Now for every i with 0 i k, let


Ai = {a N | 2 (a) = i},

Bi = {a N | (a) = i},

and Ci = {a N | (a) i} = Bi Bi+1 . . . Bk .


We claim that |Ai | = |Bi | for all 0 i k. Obviously we have |Ai | = 2ki1 for all i =
0, . . . , k 1, and |Ak | = 1. Now we determine |Ci |. We have |C0 | = n 1 and by Fermats
theorem we also have Ck = {1}, so |Ck | = 1. Next, notice that Ci+1 = {x2 mod n | x Ci }.
For every a N, the relation x2 a (mod n) has at most two solutions in N. Therefore we
have 2|Ci+1| |Ci |, with the equality achieved only if for every y Ci+1 , there exist distinct
elements x, x Ci such that x2 x2 y (mod n) (this implies x + x = n). Now, since
2k |Ck | = |C0|, we obtain that this equality should be achieved in each step. Hence |Ci | = 2ki
for 0 i k, and therefore |Bi | = 2ki1 for 0 i k 1 and |Bk | = 1.
From the previous arguments we can see that for each z Ci (0 i < k) the equation x2 z 2
(mod n) has two solutions in Ci , so we have n z Ci . Hence, for each i = 0, 1, . . . , k 1,
exactly half of the elements of Ci are odd. The same statement is valid for Bi = Ci \ Ci+1
for 0 i k 2. In particular, each such Bi contains an odd number. Note that Bk = {1}
also contains an odd number, and Bk1 = {2k } since Ck1 consists of the two square roots of 1
modulo n.
Step III. Now we construct a Hamiltonian cycle in the graph. First, for each i with 0 i k,
connect the elements of Ai to the elements of Bi by means of an arbitrary bijection. After
performing this for every i, we obtain a subgraph with all vertices having in-degree 1 and outdegree 1, so the subgraph is a disjoint union of cycles. If there is a unique cycle, we are done.
Otherwise, we modify the subgraph in such a way that the previous property is preserved and
the number of cycles decreases; after a finite number of steps we arrive at a single cycle.
For every cycle C, let (C) = mincC 2 (c). Consider a cycle C for which (C) is maximal. If
(C) = 0, then for any other cycle C we have (C ) = 0. Take two arbitrary vertices a C
and a C such that 2 (a) = 2 (a ) = 0; let their direct successors be b and b , respectively.
Then we can unify C and C to a single cycle by replacing the edges a b and a b by
a b and a b.
Now suppose that = (C) 1; let a C A . If there exists some a A \ C, then a lies
in another cycle C and we can merge the two cycles in exactly the same way as above. So, the
only remaining case is A C. Since the edges from A lead to B , we get also B C. If
6= k 1 then B contains an odd number; this contradicts the assumption (C) > 0. Finally,
if = k 1, then C contains 2k1 which is the only element of Ak1 . Since Bk1 = {2k } = Ak
and Bk = {1}, the cycle C contains the path 2k1 2k 1 and it contains an odd number
again. This completes the proof of the only if-part of the problem.

75

N8

Number Theory solutions

52nd IMO 2011

Comment 1. The lemma and the fact |Ai | = |Bi | together show that for every edge a b of the
Hamiltonian cycle, 2 (a) = (b) must hold. After this observation, the Hamiltonian cycle can be built
in many ways. For instance, it is possible to select edges from Ai to Bi for i = k, k 1, . . . , 1 in such
a way that they form disjoint paths; at the end all these paths will have odd endpoints. In the final
step, the paths can be closed to form a unique cycle.
Comment 2. Step II is an easy consequence of some basic facts about the multiplicative group modulo
the prime n = 2k + 1. The Lemma follows by noting that this group has order 2k , so the a-th powers
are exactly the 22 (a) -th powers. Using the existence of a primitive root g modulo n one sees that the
map from {1, 2, . . . , n 1} to itself that sends a to g a mod n is a bijection that sends Ai to Bi for each
i {0, . . . , k}.

76

Shortlisted Problems with Solutions

53rd International Mathematical Olympiad


Mar del Plata, Argentina 2012

Note of Confidentiality

The shortlisted problems should be kept


strictly confidential until IMO 2013

Contributing Countries
The Organizing Committee and the Problem Selection Committee of IMO 2012 thank the
following 40 countries for contributing 136 problem proposals:

Australia, Austria, Belarus, Belgium, Bulgaria, Canada, Cyprus,


Czech Republic, Denmark, Estonia, Finland, France, Germany,
Greece, Hong Kong, India, Iran, Ireland, Israel, Japan,
Kazakhstan, Luxembourg, Malaysia, Montenegro, Netherlands,
Norway, Pakistan, Romania, Russia, Serbia, Slovakia, Slovenia,
South Africa, South Korea, Sweden, Thailand, Ukraine,
United Kingdom, United States of America, Uzbekistan

Problem Selection Committee


Martn Avenda
no
Carlos di Fiore
Geza Kos
Svetoslav Savchev

Algebra
A1. Find all the functions f : Z Z such that
f (a)2 + f (b)2 + f (c)2 = 2f (a)f (b) + 2f (b)f (c) + 2f (c)f (a)
for all integers a, b, c satisfying a + b + c = 0.

A2. Let Z and Q be the sets of integers and rationals respectively.


a) Does there exist a partition of Z into three non-empty subsets A, B, C such that the sets
A + B, B + C, C + A are disjoint?
b) Does there exist a partition of Q into three non-empty subsets A, B, C such that the sets
A + B, B + C, C + A are disjoint?
Here X + Y denotes the set {x + y | x X, y Y }, for X, Y Z and X, Y Q.

A3. Let a2 , . . . , an be n 1 positive real numbers, where n 3, such that a2 a3 an = 1.

Prove that

(1 + a2 )2 (1 + a3 )3 (1 + an )n > nn .

A4.

Let f and g be two nonzero polynomials with integer coefficients and deg f > deg g.
Suppose that for infinitely many primes p the polynomial pf + g has a rational root. Prove
that f has a rational root.

A5. Find all functions f : R R that satisfy the conditions


f (1 + xy) f (x + y) = f (x)f (y) for all x, y R
and f (1) 6= 0.
Let f : N N be a function, and let f m be f applied m times. Suppose that for
every n N there exists a k N such that f 2k (n) = n + k, and let kn be the smallest such k.
Prove that the sequence k1 , k2 , . . . is unbounded.

A6.

A7. We say that a function f : Rk R is a metapolynomial if, for some positive integers m
and n, it can be represented in the form

f (x1 , . . . , xk ) = max

min Pi,j (x1 , . . . , xk )

i=1,...,m j=1,...,n

where Pi,j are multivariate polynomials. Prove that the product of two metapolynomials is also
a metapolynomial.

Combinatorics
C1.

Several positive integers are written in a row. Iteratively, Alice chooses two adjacent
numbers x and y such that x > y and x is to the left of y, and replaces the pair (x, y) by either
(y + 1, x) or (x 1, x). Prove that she can perform only finitely many such iterations.

C2. Let n 1 be an integer. What is the maximum number of disjoint pairs of elements of the
set {1, 2, . . . , n} such that the sums of the different pairs are different integers not exceeding n?

C3. In a 999 999 square table some cells are white and the remaining ones are red. Let T

be the number of triples (C1 , C2 , C3) of cells, the first two in the same row and the last two in
the same column, with C1 and C3 white and C2 red. Find the maximum value T can attain.

C4. Players A and B play a game with N 2012 coins and 2012 boxes arranged around a
circle. Initially A distributes the coins among the boxes so that there is at least 1 coin in each
box. Then the two of them make moves in the order B, A, B, A, . . . by the following rules:
On every move of his B passes 1 coin from every box to an adjacent box.
On every move of hers A chooses several coins that were not involved in Bs previous
move and are in different boxes. She passes every chosen coin to an adjacent box.
Player As goal is to ensure at least 1 coin in each box after every move of hers, regardless of
how B plays and how many moves are made. Find the least N that enables her to succeed.

C5. The columns and the rows of a 3n 3n square board are numbered 1, 2, . . . , 3n. Every

square (x, y) with 1 x, y 3n is colored asparagus, byzantium or citrine according as the


modulo 3 remainder of x + y is 0, 1 or 2 respectively. One token colored asparagus, byzantium
or citrine is placed on each square, so that there are 3n2 tokens of each color.
Suppose that one can permute the tokens so that each token is moved to a distance of
at most d from its original position, each asparagus token replaces a byzantium token, each
byzantium token replaces a citrine token, and each citrine token replaces an asparagus token.
Prove that it is possible to permute the tokens so that each token is moved to a distance of at
most d + 2 from its original position, and each square contains a token with the same color as
the square.

C6. Let k and n be fixed positive integers. In the liars guessing game, Amy chooses integers
x and N with 1 x N. She tells Ben what N is, but not what x is. Ben may then repeatedly
ask Amy whether x S for arbitrary sets S of integers. Amy will always answer with yes or no,
but she might lie. The only restriction is that she can lie at most k times in a row. After he
has asked as many questions as he wants, Ben must specify a set of at most n positive integers.
If x is in this set he wins; otherwise, he loses. Prove that:
a) If n 2k then Ben can always win.
b) For sufficiently large k there exist n 1.99k such that Ben cannot guarantee a win.

C7. There are given 2500 points on a circle labeled 1, 2, . . . , 2500 in some order. Prove that
one can choose 100 pairwise disjoint chords joining some of these points so that the 100 sums
of the pairs of numbers at the endpoints of the chosen chords are equal.

Geometry
G1. In the triangle ABC the point J is the center of the excircle opposite to A. This excircle
is tangent to the side BC at M, and to the lines AB and AC at K and L respectively. The
lines LM and BJ meet at F , and the lines KM and CJ meet at G. Let S be the point of
intersection of the lines AF and BC, and let T be the point of intersection of the lines AG
and BC. Prove that M is the midpoint of ST .

G2.

Let ABCD be a cyclic quadrilateral whose diagonals AC and BD meet at E. The


extensions of the sides AD and BC beyond A and B meet at F . Let G be the point such that
ECGD is a parallelogram, and let H be the image of E under reflection in AD. Prove that
D, H, F , G are concyclic.

G3. In an acute triangle ABC the points D, E and F are the feet of the altitudes through A,
B and C respectively. The incenters of the triangles AEF and BDF are I1 and I2 respectively;
the circumcenters of the triangles ACI1 and BCI2 are O1 and O2 respectively. Prove that I1 I2
and O1 O2 are parallel.

G4.

Let ABC be a triangle with AB 6= AC and circumcenter O. The bisector of BAC


intersects BC at D. Let E be the reflection of D with respect to the midpoint of BC. The lines
through D and E perpendicular to BC intersect the lines AO and AD at X and Y respectively.
Prove that the quadrilateral BXCY is cyclic.

Let ABC be a triangle with BCA = 90 , and let C0 be the foot of the altitude
from C. Choose a point X in the interior of the segment CC0 , and let K, L be the points on
the segments AX, BX for which BK = BC and AL = AC respectively. Denote by M the
intersection of AL and BK. Show that MK = ML.

G5.

G6. Let ABC be a triangle with circumcenter O and incenter I. The points D, E and F on
the sides BC, CA and AB respectively are such that BD + BF = CA and CD + CE = AB.
The circumcircles of the triangles BF D and CDE intersect at P 6= D. Prove that OP = OI.

G7.

Let ABCD be a convex quadrilateral with non-parallel sides BC and AD. Assume
that there is a point E on the side BC such that the quadrilaterals ABED and AECD are
circumscribed. Prove that there is a point F on the side AD such that the quadrilaterals
ABCF and BCDF are circumscribed if and only if AB is parallel to CD.

G8. Let ABC be a triangle with circumcircle and a line without common points with .
Denote by P the foot of the perpendicular from the center of to . The side-lines BC, CA, AB
intersect at the points X, Y, Z different from P . Prove that the circumcircles of the triangles
AXP, BY P and CZP have a common point different from P or are mutually tangent at P .

Number Theory
N1. Call admissible a set A of integers that has the following property:
If x, y A (possibly x = y) then x2 + kxy + y 2 A for every integer k.
Determine all pairs m, n of nonzero integers such that the only admissible set containing both m
and n is the set of all integers.

N2. Find all triples (x, y, z) of positive integers such that x y z and
x3 (y 3 + z 3 ) = 2012(xyz + 2).

N3. Determine all integers m 2 such that every n with


coefficient

n
m2n

m
3

m
2

divides the binomial

An integer a is called friendly if the equation (m2 + n)(n2 + m) = a(m n)3 has a
solution over the positive integers.

N4.

a) Prove that there are at least 500 friendly integers in the set {1, 2, . . . , 2012}.
b) Decide whether a = 2 is friendly.

N5. For a nonnegative integer n define rad(n) = 1 if n = 0 or n = 1, and rad(n) = p1 p2 pk

where p1 < p2 < < pk are all prime factors of n. Find all polynomials f (x) with nonnegative
integer coefficients such that rad(f (n)) divides rad(f (nrad(n) )) for every nonnegative integer n.
n

Let x and y be positive integers. If x2 1 is divisible by 2n y + 1 for every positive


integer n, prove that x = 1.

N6.

N7. Find all n N for which there exist nonnegative integers a1 , a2 , . . . , an such that
1
1
1
2
n
1
+
+

+
+
+

+
=
= 1.
a
a
a
a
a
21 22
2n
31 32
3an

N8. Prove that for every prime p > 100 and every integer r there exist two integers a and b
such that p divides a2 + b5 r.

Algebra
A1. Find all the functions f : Z Z such that
f (a)2 + f (b)2 + f (c)2 = 2f (a)f (b) + 2f (b)f (c) + 2f (c)f (a)
for all integers a, b, c satisfying a + b + c = 0.
Solution. The substitution a = b = c = 0 gives 3f (0)2 = 6f (0)2, hence
f (0) = 0.

(1)

The substitution b = a and c = 0 gives ((f (a) f (a))2 = 0. Hence f is an even function:
f (a) = f (a) for all a Z.

(2)

Now set b = a and c = 2a to obtain 2f (a)2 + f (2a)2 = 2f (a)2 + 4f (a)f (2a). Hence
f (2a) = 0 or f (2a) = 4f (a) for all a Z.

(3)

If f (r) = 0 for some r 1 then the substitution b = r and c = ar gives (f (a+r)f (a))2 = 0.
So f is periodic with period r, i. e.
f (a + r) = f (a) for all a Z.
In particular, if f (1) = 0 then f is constant, thus f (a) = 0 for all a Z. This function clearly
satisfies the functional equation. For the rest of the analysis, we assume f (1) = k 6= 0.
By (3) we have f (2) = 0 or f (2) = 4k. If f (2) = 0 then f is periodic of period 2, thus
f (even) = 0 and f (odd) = k. This function is a solution for every k. We postpone the
verification; for the sequel assume f (2) = 4k 6= 0.
By (3) again, we have f (4) = 0 or f (4) = 16k. In the first case f is periodic of period 4, and
f (3) = f (1) = f (1) = k, so we have f (4n) = 0, f (4n+1) = f (4n+3) = k, and f (4n+2) = 4k
for all n Z. This function is a solution too, which we justify later. For the rest of the analysis,
we assume f (4) = 16k 6= 0.
We show now that f (3) = 9k. In order to do so, we need two substitutions:
a = 1, b = 2, c = 3 = f (3)2 10kf (3) + 9k 2 = 0 = f (3) {k, 9k},
a = 1, b = 3, c = 4 = f (3)2 34kf (3) + 225k 2 = 0 = f (3) {9k, 25k}.
Therefore f (3) = 9k, as claimed. Now we prove inductively that the only remaining function is
f (x) = kx2 , x Z. We proved this for x = 0, 1, 2, 3, 4. Assume that n 4 and that f (x) = kx2
holds for all integers x [0, n]. Then the substitutions a = n, b = 1, c = n 1 and a = n 1,
b = 2, c = n 1 lead respectively to
f (n + 1) {k(n + 1)2 , k(n 1)2 }

and

f (n + 1) {k(n + 1)2 , k(n 3)2 }.

Since k(n 1)2 6= k(n 3)2 for n 6= 2, the only possibility is f (n + 1) = k(n + 1)2 . This
completes the induction, so f (x) = kx2 for all x 0. The same expression is valid for negative
values of x since f is even. To verify that f (x) = kx2 is actually a solution, we need to check
the identity a4 + b4 + (a + b)4 = 2a2 b2 + 2a2 (a + b)2 + 2b2 (a + b)2 , which follows directly by
expanding both sides.

9
Therefore the only possible solutions of the functional equation are the constant function
f1 (x) = 0 and the following functions:


0 x 0 (mod 4)
0 x even
2
k x 1 (mod 2)
f4 (x) =
f2 (x) = kx
f3 (x) =
k x odd

4k x 2 (mod 4)

for any non-zero integer k. The verification that they are indeed solutions was done for the
first two. For f3 note that if a + b + c = 0 then either a, b, c are all even, in which case
f (a) = f (b) = f (c) = 0, or one of them is even and the other two are odd, so both sides of
the equation equal 2k 2 . For f4 we use similar parity considerations and the symmetry of the
equation, which reduces the verification to the triples (0, k, k), (4k, k, k), (0, 0, 0), (0, 4k, 4k).
They all satisfy the equation.
Comment. We used several times the same fact: For any a, b Z the functional equation is a
quadratic equation in f (a + b) whose coefficients depend on f (a) and f (b):
f (a + b)2 2(f (a) + f (b))f (a + b) + (f (a) f (b))2 = 0.
Its discriminant is 16f (a)f (b). Since this value has to be non-negative for any a, b Z, we conclude
that either f or f is always non-negative. Also, if f is a solution of the functional equation, then
f is also a solution. Therefore we can assume f (x) 0 for all x Z. Now, the two solutions of the
quadratic equation are

2 p
2 
p
p
p
f (a) + f (b) ,
f (a) f (b)
for all a, b Z.
f (a + b)

The computation of f (3) from f (1), f (2) and f (4) that we did above follows immediately by setting
(a, b) = (1, 2) and (a, b) = (1, 4). The inductive step, where f (n + 1) is derived from f (n), f (n 1),
f (2) and f (1), follows immediately using (a, b) = (n, 1) and (a, b) = (n 1, 2).

10

A2. Let Z and Q be the sets of integers and rationals respectively.


a) Does there exist a partition of Z into three non-empty subsets A, B, C such that the sets
A + B, B + C, C + A are disjoint?
b) Does there exist a partition of Q into three non-empty subsets A, B, C such that the sets
A + B, B + C, C + A are disjoint?
Here X + Y denotes the set {x + y | x X, y Y }, for X, Y Z and X, Y Q.
Solution 1. a) The residue classes modulo 3 yield such a partition:
A = {3k | k Z},

B = {3k + 1 | k Z},

C = {3k + 2 | k Z}.

b) The answer is no. Suppose that Q can be partitioned into non-empty subsets A, B, C as
stated. Note that for all a A, b B, c C one has
a + b c C,

b + c a A,

c + a b B.

(1)

Indeed a+bc
/ A as (A+B)(A+C) = , and similarly a+bc
/ B, hence a+bc C. The
other two relations follow by symmetry. Hence A+ B C + C, B + C A+ A, C + A B + B.
The opposite inclusions also hold. Let a, a A and b B, c C be arbitrary. By (1)
a + c b B, and since a A, c C, we use (1) again to obtain
a + a b = a + (a + c b) c C.
So A + A B + C and likewise B + B C + A, C + C A + B. In summary
B + C = A + A,

C + A = B + B,

A + B = C + C.

Furthermore suppose that 0 A without loss of generality. Then B = {0} + B A + B


and C = {0} + C A + C. So, since B + C is disjoint with A + B and A + C, it is also disjoint
with B and C. Hence B + C is contained in Z \ (B C) = A. Because B + C = A + A, we
obtain A + A A. On the other hand A = {0} + A A + A, implying A = A + A = B + C.
Therefore A + B + C = A + A + A = A, and now B + B = C + A and C + C = A + B yield
B + B + B = A + B + C = A, C + C + C = A + B + C = A. In particular if r Q = A B C
is arbitrary then 3r A.
However such a conclusion is impossible. Take any b B (B 6= ) and let r = b/3 Q.
Then b = 3r A which is a contradiction.
Solution 2. We prove that the example for Z from the first solution is unique, and then use
this fact to solve part b).
Let Z = A B C be a partition of Z with A, B, C 6= and A + B, B + C, C + A disjoint.
We need the relations (1) which clearly hold for Z. Fix two consecutive integers from different
sets, say b B and c = b + 1 C. For every a A we have, in view of (1), a 1 = a + b c C
and a + 1 = a + c b B. So every a A is preceded by a number from C and followed by a
number from B.
In particular there are pairs of the form c, c + 1 with c C, c + 1 A. For such a pair and
any b B analogous reasoning shows that each b B is preceded by a number from A and
followed by a number from C. There are also pairs b, b 1 with b B, b 1 A. We use them
in a similar way to prove that each c C is preceded by a number from B and followed by a
number from A.
By putting the observations together we infer that A, B, C are the three congruence classes
modulo 3. Observe that all multiples of 3 are in the set of the partition that contains 0.

11
Now we turn to part b). Suppose that there is a partition of Q with the given properties.
Choose three rationals ri = pi /qi from the three sets A, B, C, i = 1, 2, 3, and set N = 3q1 q2 q3 .
Let S Q be the set of fractions with denominators N (irreducible or not). It is obtained
through multiplication of every integer by the constant 1/N, hence closed under sums and
differences. Moreover, if we identify each k Z with k/N S then S is essentially the set Z
with respect to addition. The numbers ri belong to S because
r1 =

3p1 q2 q3
,
N

r2 =

3p2 q3 q1
,
N

r3 =

3p3 q1 q2
.
N

The partition Q = A B C of Q induces a partition S = A B C of S, with A = A S,


B = B S, C = C S. Clearly A + B , B + C , C + A are disjoint, so this partition has
the properties we consider.
By the uniqueness of the example for Z the sets A , B , C are the congruence classes modulo 3, multiplied by 1/N. Also all multiples of 3/N are in the same set, A , B or C . This holds
for r1 , r2 , r3 in particular as they are all multiples of 3/N. However r1 , r2 , r3 are in different sets
A , B , C since they were chosen from different sets A, B, C. The contradiction ends the proof.
Comment. The uniqueness of the example for Z can also be deduced from the argument in the first
solution.

12

A3. Let a2 , . . . , an be n 1 positive real numbers, where n 3, such that a2 a3 an = 1.

Prove that

(1 + a2 )2 (1 + a3 )3 (1 + an )n > nn .
Solution. The substitution a2 =
into the inequality

x3
x1
x2
, a3 = , . . . , an =
transforms the original problem
x1
x2
xn1

(x1 + x2 )2 (x2 + x3 )3 (xn1 + x1 )n > nn x21 x32 xnn1

()

for all x1 , . . . , xn1 > 0. To prove this, we use the AM-GM inequality for each factor of the
left-hand side as follows:
(x1 + x2 )2
(x2 + x3 )3 =

x2
2

(x3 + x4 )4 =
..
.

x3
3

(xn1 + x1 )n =

(n 1)




+ x3
+ x4

..
.

xn1
n1

3
4

+ x1

n

22 x1 x2
2
33 x22 x3
3
44 x33 x4
..
.

n1 n1
x1 .
nn xn1

Multiplying these inequalities together gives (*), with inequality sign instead of >. However
for the equality to occur it is necessary that x1 = x2 , x2 = 2x3 , . . . , xn1 = (n 1)x1 , implying
x1 = (n 1)!x1 . This is impossible since x1 > 0 and n 3. Therefore the inequality is strict.
Comment. One can avoid the substitution ai = xi /xi1 . Apply the weighted AM-GM inequality to
each factor (1 + ak )k , with the same weights like above, to obtain
k

(1 + ak ) =

1
(k 1)
+ ak
k1

k

kk
ak .
(k 1)k1

Multiplying all these inequalities together gives


(1 + a2 )2 (1 + a3 )3 (1 + an )n nn a2 a3 an = nn .
The same argument as in the proof above shows that the equality cannot be attained.

13

A4.

Let f and g be two nonzero polynomials with integer coefficients and deg f > deg g.
Suppose that for infinitely many primes p the polynomial pf + g has a rational root. Prove
that f has a rational root.
Solution 1. Since deg f > deg g, we have |g(x)/f (x)| < 1 for sufficiently large x; more
precisely, there is a real number R such that |g(x)/f (x)| < 1 for all x with |x| > R. Then for
all such x and all primes p we have





pf (x) + g(x) f (x) p |g(x)| > 0.
|f (x)|

Hence all real roots of the polynomials pf + g lie in the interval [R, R].
Let f (x) = an xn + an1 xn1 + + a0 and g(x) = bm xm + bm1 xm1 + + b0 where
n > m, an 6= 0 and bm 6= 0. Upon replacing f (x) and g(x) by ann1 f (x/an ) and ann1 g(x/an )
respectively, we reduce the problem to the case an = 1. In other words one can assume that f
is monic. Then the leading coefficient of pf + g is p, and if r = u/v is a rational root of pf + g
with (u, v) = 1 and v > 0, then either v = 1 or v = p.
First consider the case when v = 1 infinitely many times. If v = 1 then |u| R, so there
are only finitely many possibilities for the integer u. Therefore there exist distinct primes p
and q for which we have the same value of u. Then the polynomials pf + g and qf + g share
this root, implying f (u) = g(u) = 0. So in this case f and g have an integer root in common.
Now suppose that v = p infinitely many times. By comparing the exponent of p in the
denominators of pf (u/p) and g(u/p) we get m = n 1 and pf (u/p) + g(u/p) = 0 reduces to
an equation of the form

 

n
n1
n
n1
n2
n1
u + an1 pu
+ . . . + a0 p + bn1 u
+ bn2 pu
+ . . . + b0 p
= 0.
The equation above implies that un + bn1 un1 is divisible by p and hence, since (u, p) = 1,
we have u + bn1 = pk with some integer k. On the other hand all roots of pf + g lie in the
interval [R, R], so that
|pk bn1 |
|u|
=
< R,
p
p
|bn1 |
< R + |bn1 |.
|k| < R +
p
Therefore the integer k can attain only finitely many values. Hence there exists an integer k
such that the number pkbpn1 = k bn1
is a root of pf + g for infinitely many primes p. For
p
these primes we have




1
1
1
f k bn1
+ g k bn1
= 0.
p
p
p
So the equation
f (k bn1 x) + xg (k bn1 x) = 0

(1)

has infinitely many solutions of the form x = 1/p. Since the left-hand side is a polynomial, this
implies that (1) is a polynomial identity, so it holds for all real x. In particular, by substituting
x = 0 in (1) we get f (k) = 0. Thus the integer k is a root of f .
In summary the monic polynomial f obtained after the initial reduction always has an
integer root. Therefore the original polynomial f has a rational root.

14
Solution 2. Analogously to the first solution, there exists a real number R such that the
complex roots of all polynomials of the form pf + g lie in the disk |z| R.
For each prime p such that pf + g has a rational root, by Gauss lemma pf + g is the
product of two integer polynomials, one with degree 1 and the other with degree deg f 1.
Since p is a prime, the leading coefficient of one of these factors divides the leading coefficient
of f . Denote that factor by hp .
By narrowing the set of the primes used we can assume that all polynomials hp have the
same degree and the same leading coefficient. Their complex roots lie in the disk |z| R, hence
Vietas formulae imply that all coefficients of all polynomials hp form a bounded set. Since
these coefficients are integers, there are only finitely many possible polynomials hp . Hence there
is a polynomial h such that hp = h for infinitely many primes p.
Finally, if p and q are distinct primes with hp = hq = h then h divides (p q)f . Since
deg h = 1 or deg h = deg f 1, in both cases f has a rational root.
Comment. Clearly the polynomial h is a common factor of f and g. If deg h = 1 then f and g share a
rational root. Otherwise deg h = deg f 1 forces deg g = deg f 1 and g divides f over the rationals.

Solution 3. Like in the first solution, there is a real number R such that the real roots of all
polynomials of the form pf + g lie in the interval [R, R].
Let p1 < p2 < be an infinite sequence of primes so that for every index k the polynomial
pk f + g has a rational root rk . The sequence r1 , r2 , . . . is bounded, so it has a convergent
subsequence rk1 , rk2 , . . .. Now replace the sequences (p1 , p2 , . . . ) and (r1 , r2 , . . . ) by (pk1 , pk2 , . . .)
and (rk1 , rk2 , . . .); after this we can assume that the sequence r1 , r2 , . . . is convergent. Let
= lim rk . We show that is a rational root of f .
k

Over the interval [R, R], the polynomial g is bounded, |g(x)| M with some fixed M.
Therefore



pk f (rk ) + g(rk ) |g(rk )|
M

|f (rk )| = f (rk )
=

0,

pk
pk
pk
and

f () = f

So is a root of f indeed.


lim rk = lim f (rk ) = 0.

Now let uk , vk be relative prime integers for which rk = uvkk . Let a be the leading coefficient
of f , let b = f (0) and c = g(0) be the constant terms of f and g, respectively. The leading
coefficient of the polynomial pk f + g is pk a, its constant term is pk b + c. So vk divides pk a and
uk divides pk b + c. Let pk b + c = uk ek (if pk b + c = uk = 0 then let ek = 1).
We prove that is rational by using the following fact. Let (pn ) and (qn ) be sequences of
integers such that the sequence (pn /qn ) converges. If (pn ) or (qn ) is bounded then lim(pn /qn ) is
rational .
Case 1: There is an infinite subsequence (kn ) of indices such that vkn divides a. Then (vkn )
is bounded, so = limn (ukn /vkn ) is rational.
Case 2: There is an infinite subsequence (kn ) of indices such that vkn does not divide a.
For such indices we have vkn = pkn dkn where dkn is a divisor of a. Then
u kn
b
b
c
pk n b + c
= lim
= lim
+ lim
.
= lim
n vkn
n dkn ekn
n dkn ekn
n pkn dkn ekn
n pkn dkn ekn

= lim

Because the numerator b in the last limit is bounded, is rational.

15

A5. Find all functions f : R R that satisfy the conditions


f (1 + xy) f (x + y) = f (x)f (y) for all x, y R
and f (1) 6= 0.
Solution. The only solution is the function f (x) = x 1, x R.
We set g(x) = f (x) + 1 and show that g(x) = x for all real x. The conditions take the form


g(1 + xy) g(x + y) = g(x) 1 g(y) 1 for all x, y R and g(1) 6= 1.
(1)

Denote C = g(1) 1 6= 0. Setting y = 1 in (1) gives

g(1 x) g(x 1) = C(g(x) 1).

(2)

Set x = 1 in (2) to obtain C(g(1) 1) = 0. Hence g(1) = 1 as C 6= 0. Now plugging in x = 0


and x = 2 yields g(0) = 0 and g(2) = 2 respectively.
We pass on to the key observations
g(x) + g(2 x) = 2 for all x R,
g(x + 2) g(x) = 2 for all x R.

(3)
(4)

Replace x by 1 x in (2), then change x to x in the resulting equation. We obtain the


relations g(x) g(x) = C(g(1 x) 1), g(x) g(x) = C(g(1 + x) 1). Then adding them
up leads to C(g(1 x) + g(1 + x) 2) = 0. Thus C 6= 0 implies (3).
Let u, v be such that u + v = 1. Apply (1) to the pairs (u, v) and (2 u, 2 v):




g(1 + uv) g(1) = g(u) 1 g(v) 1 , g(3 + uv) g(3) = g(2 u) 1 g(2 v) 1 .
Observe that the last two equations have equal right-hand sides by (3). Hence u + v = 1 implies
g(uv + 3) g(uv + 1) = g(3) g(1).
Each x 5/4 is expressible in the form x = uv + 1 with u + v = 1 (the quadratic function
t2 t+(x1) has real roots for x 5/4). Hence g(x+2)g(x) = g(3)g(1) whenever x 5/4.
Because g(x) = x holds for x = 0, 1, 2, setting x = 0 yields g(3) = 3. This proves (4) for x 5/4.
If x > 5/4 then x < 5/4 and so g(2 x) g(x) = 2 by the above. On the other hand (3)
gives g(x) = 2 g(2 x), g(x + 2) = 2 g(x), so that g(x + 2) g(x) = g(2 x) g(x) = 2.
Thus (4) is true for all x R.
Now replace x by x in (3) to obtain g(x) + g(2 + x) = 2. In view of (4) this leads to
g(x) + g(x) = 0, i. e. g(x) = g(x) for all x. Taking this into account, we apply (1) to the
pairs (x, y) and (x, y):




g(1 xy) g(x + y) = g(x) + 1 1 g(y) , g(1 xy) g(x y) = 1 g(x) g(y) + 1 .

Adding up yields g(1 xy) = 1 g(x)g(y). Then g(1 + xy) = 1 + g(x)g(y) by (3). Now the
original equation (1) takes the form g(x + y) = g(x) + g(y). Hence g is additive.
By additvity g(1 + xy) = g(1) + g(xy) = 1 + g(xy); since g(1 + xy) = 1 + g(x)g(y) was
shown above, we also have g(xy) = g(x)g(y) (g is multiplicative). In particular y = x gives
g(x2 ) = g(x)2 0 for all x, meaning that g(x) 0 for x 0. Since g is additive and bounded
from below on [0, +), it is linear; more exactly g(x) = g(1)x = x for all x R.
In summary f (x) = x 1, x R. It is straightforward that this function satisfies the
requirements.

Comment. There are functions that satisfy the given equation but vanish at 1, for instance the
constant function 0 and f (x) = x2 1, x R.

16
Let f : N N be a function, and let f m be f applied m times. Suppose that for
every n N there exists a k N such that f 2k (n) = n + k, and let kn be the smallest such k.
Prove that the sequence k1 , k2 , . . . is unbounded.

A6.

Solution. We restrict attention to the set


S = {1, f (1), f 2(1), . . .}.
Observe that S is unbounded because for every number n in S there exists a k > 0 such
that f 2k (n) = n + k is in S. Clearly f maps S into itself; moreover f is injective on S. Indeed
if f i (1) = f j (1) with i 6= j then the values f m (1) start repeating periodically from some point
on, and S would be finite.
Define g : S S by g(n) = f 2kn (n) = n + kn . We prove that g is injective too. Suppose
that g(a) = g(b) with a < b. Then a + ka = f 2ka (a) = f 2kb (b) = b + kb implies ka > kb . So,
since f is injective on S, we obtain
f 2(ka kb ) (a) = b = a + (ka kb ).
However this contradicts the minimality of ka as 0 < ka kb < ka .
Let T be the set of elements of S that are not of the form g(n) with n S. Note that 1 T
by g(n) > n for n S, so T is non-empty. For each t T denote Ct = {t, g(t), g 2(t), . . .};
call Ct the chain starting at t. Observe that distinct chains are disjoint because g is injective.
Each n S\T has the form n = g(n ) with n < n, n S. Repeated applications of the same
observation show that n Ct for some t T , i. e. S is the disjoint union of the chains Ct .
If f n (1) is in the chain Ct starting at t = f nt (1) then n = nt + 2a1 + + 2aj with
f n (1) = g j (f nt (1)) = f 2aj (f 2aj1 ( f 2a1 (f nt (1)))) = f nt (1) + a1 + + aj .
Hence

n nt
n nt
=t+
.
(1)
2
2
Now we show that T is infinite. We argue by contradiction. Suppose that there are only
finitely many chains Ct1 , . . . , Ctr , starting at t1 < < tr . Fix N. If f n (1) with 1 n N
t
is in Ct then f n (1) = t + nn
tr + N2 by (1). But then the N + 1 distinct natural numbers
2
1, f (1), . . . , f N (1) are all less than tr + N2 and hence N + 1 tr + N2 . This is a contradiction if
N is sufficiently large, and hence T is infinite.
To complete the argument, choose any k in N and consider the k + 1 chains starting at the
first k + 1 numbers in T . Let t be the greatest one among these numbers. Then each of the
chains in question contains a number not exceeding t, and at least one of them does not contain
any number among t + 1, . . . , t + k. So there is a number n in this chain such that g(n) n > k,
i. e. kn > k. In conclusion k1 , k2, . . . is unbounded.
f n (1) = f nt (1) +

17

A7. We say that a function f : Rk R is a metapolynomial if, for some positive integers m
and n, it can be represented in the form

f (x1 , . . . , xk ) = max

min Pi,j (x1 , . . . , xk )

i=1,...,m j=1,...,n

where Pi,j are multivariate polynomials. Prove that the product of two metapolynomials is also
a metapolynomial.
Solution. We use the notation f (x) = f (x1 , . . . , xk ) for x = (x1 , . . . , xk ) and [m] = {1, 2, . . . , m}.
Observe that if a metapolynomial f (x) admits a representation like the one in the statement
for certain positive integers m and n, then they can be replaced by any m m and n n. For
instance, if we want to replace m by m + 1 then it is enough to define Pm+1,j (x) = Pm,j (x) and
note that repeating elements of a set do not change its maximum nor its minimum. So one can
assume that any two metapolynomials are defined with the same m and n. We reserve letters
P and Q for polynomials, so every function called P, Pi,j , Q, Qi,j , . . . is a polynomial function.
We start with a lemma that is useful to change expressions of the form min max fi,j to ones
of the form max min gi,j .
Lemma. Let {ai,j } be real numbers, for all i [m] and j [n]. Then
min max ai,j =

i[m] j[n]

max

min ai,ji ,

j1 ,...,jm [n] i[m]

where the max in the right-hand side is over all vectors (j1 , . . . , jm ) with j1 , . . . , jm [n].
Proof. We can assume for all i that ai,n = max{ai,1 , . . . , ai,n } and am,n = min{a1,n , . . . , am,n }.
The left-hand side is = am,n and hence we need to prove the same for the right-hand side.
If (j1 , j2 , . . . , jm ) = (n, n, . . . , n) then min{a1,j1 , . . . , am,jm } = min{a1,n , . . . , am,n } = am,n which
implies that the right-hand side is am,n . It remains to prove the opposite inequality and
this is equivalent to min{a1,j1 , . . . , am,jm } am,n for all possible (j1 , j2 , . . . , jm ). This is true

because min{a1,j1 , . . . , am,jm } am,jm am,n .
We need to show that the family M of metapolynomials is closed under multiplication, but
it turns out easier to prove more: that it is also closed under addition, maxima and minima.
First we prove the assertions about the maxima and the minima. If f1 , . . . , fr are metapolynomials, assume them defined with the same m and n. Then
1
r
f = max{f1 , . . . , fr } = max{max min Pi,j
, . . . , max min Pi,j
}=
i[m] j[n]

i[m] j[n]

s
max min Pi,j
.

s[r],i[m] j[n]

It follows that f = max{f1 , . . . , fr } is a metapolynomial. The same argument works for the
minima, but first we have to replace min max by max min, and this is done via the lemma.
Another property we need is that if f = max min Pi,j is a metapolynomial then so is f .
Indeed, f = min( min Pi,j ) = min max Pi,j .
To prove M is closed under addition let f = max min Pi,j and g = max min Qi,j . Then
f (x) + g(x) = max min Pi,j (x) + max min Qi,j (x)
i[m] j[n]

i[m] j[n]

= max (min Pi1 ,j (x) + min Qi2 ,j (x)) = max


i1 ,i2 [m] j[n]

j[n]

min

i1 ,i2 [m] j1 ,j2 [n]


Pi1 ,j1 (x) + Qi2 ,j2 (x) ,

and hence f (x) + g(x) is a metapolynomial.


We proved that M is closed under sums, maxima and minima, in particular any function
that can be expressed by sums, max, min, polynomials or even metapolynomials is in M.
We would like to proceed with multiplication along the same lines like with addition, but
there is an essential difference. In general the product of the maxima of two sets is not equal

18
to the maximum of the product of the sets. We need to deal with the fact that a < b and c < d
do not imply ac < bd. However this is true for a, b, c, d 0.
In view of this we decompose each function f (x) into its positive part f + (x) = max{f (x), 0}
and its negative part f (x) = max{0, f (x)}. Note that f = f + f and f + , f M if
f M. The whole problem reduces to the claim that if f and g are metapolynomials with
f, g 0 then f g it is also a metapolynomial.
Assuming this claim, consider arbitrary f, g M. We have
f g = (f + f )(g + g ) = f + g + f + g f g + + f g ,
and hence f g M. Indeed, M is closed under addition, also f + g + , f + g , f g + , f g M
because f + , f , g + , g 0.
It remains to prove the claim. In this case f, g 0, and one can try to repeat the argument
for the sum. More precisely, let f = max min Pij 0 and g = max min Qij 0. Then
+
+
+
f g = max min Pi,j max min Qi,j = max min Pi,j
max min Q+
i,j = max min Pi1 ,j1 Qi2 ,j2 .

Hence it suffices to check that P + Q+ M for any pair of polynomials P and Q. This reduces
to the identity
u+ v + = max{0, min{uv, u, v}, min{uv, uv 2, u2 v}, min{uv, u, u2v}, min{uv, uv 2, v}},
with u replaced by P (x) and v replaced by Q(x). The formula is proved by a case-by-case
analysis. If u 0 or v 0 then both sides equal 0. In case u, v 0, the right-hand side is
clearly uv. To prove the opposite inequality we use that uv equals
min{uv, u, v}
min{uv, uv 2, u2v}
min{uv, u, u2v}
min{uv, uv 2, v}

if
if
if
if

0 u, v 1,
1 u, v,
0 v 1 u,
0 u 1 v.

Comment. The case k = 1 is simpler and can be solved by proving that a function f : R R is a
metapolynomial if and only if it is a piecewise polinomial (and continuos) function.
It is enough to prove that all such functions are metapolynomials, and this easily reduces to the
following case. Given a polynomial P (x) with P (0) = 0, the function f defined by f (x) = P (x) for
x 0 and 0 otherwise is a metapolynomial. For this last claim, it suffices to prove that (x+ )n is a
metapolynomial, and this follows from the formula (x+ )n = max{0, min{xn1 , xn }, min{xn , xn+1 }}.

19

Combinatorics
C1.

Several positive integers are written in a row. Iteratively, Alice chooses two adjacent
numbers x and y such that x > y and x is to the left of y, and replaces the pair (x, y) by either
(y + 1, x) or (x 1, x). Prove that she can perform only finitely many such iterations.
Solution 1. Note first that the allowed operation does not change the maximum M of the
initial sequence. Let a1 , a2 , . . . , an be the numbers obtained at some point of the process.
Consider the sum
S = a1 + 2a2 + + nan .

We claim that S increases by a positive integer amount with every operation. Let the operation
replace the pair (ai , ai+1 ) by a pair (c, ai ), where ai > ai+1 and c = ai+1 +1 or c = ai 1. Then the
new and the old value of S differ by d = (ic+(i+1)ai )(iai +(i+1)ai+1 ) = ai ai+1 +i(cai+1 ).
The integer d is positive since ai ai+1 1 and c ai+1 0.
On the other hand S (1 + 2 + + n)M as ai M for all i = 1, . . . , n. Since S increases
by at least 1 at each step and never exceeds the constant (1 + 2 + + n)M, the process stops
after a finite number of iterations.
Solution 2. Like in the first solution note that the operations do not change the maximum M
of the initial sequence. Now consider the reverse lexicographical order for n-tuples of integers.
We say that (x1 , . . . , xn ) < (y1 , . . . , yn ) if xn < yn , or if xn = yn and xn1 < yn1 , or if xn = yn ,
xn1 = yn1 and xn2 < yn2 , etc. Each iteration creates a sequence that is greater than
the previous one with respect to this order, and no sequence occurs twice during the process.
On the other hand there are finitely many possible sequences because their terms are always
positive integers not exceeding M. Hence the process cannot continue forever.
Solution 3. Let the current numbers be a1 , a2 , . . . , an . Define the score si of ai as the number
of aj s that are less than ai . Call the sequence s1 , s2 , . . . , sn the score sequence of a1 , a2 , . . . , an .
Let us say that a sequence x1 , . . . , xn dominates a sequence y1 , . . . , yn if the first index i
with xi 6= yi is such that xi < yi . We show that after each operation the new score sequence
dominates the old one. Score sequences do not repeat, and there are finitely many possibilities
for them, no more than (n 1)n . Hence the process will terminate.
Consider an operation that replaces (x, y) by (a, x), with a = y + 1 or a = x 1. Suppose
that x was originally at position i. For each j < i the score sj does not increase with the
change because y a and x x. If sj decreases for some j < i then the new score sequence
dominates the old one. Assume that sj stays the same for all j < i and consider si . Since x > y
and y a x, we see that si decreases by at least 1. This concludes the proof.
Comment. All three proofs work if x and y are not necessarily adjacent, and if the pair (x, y) is
replaced by any pair (a, x), with a an integer satisfying
y a x. There is nothing special about
P
the weights 1, 2, . . . , n in the definition of S =P ni=1 iai from the first solution. For any sequence
w1 < w2 < < wn of positive integers, the sum ni=1 wi ai increases by at least 1 with each operation.
Consider the same problem, but letting Alice replace the pair (x, y) by (a, x), where a is any positive
integer less than x. The same conclusion holds in this version, i. e. the process stops eventually. The
solution using the reverse lexicographical order works without any change. The first solution would
require a special set of weights like wi = M i for i = 1, . . . , n.
Comment. The first and the second solutions provide upper bounds for the number of possible
operations, respectively of order M n2 and M n where M is the maximum of the original sequence.
The upper bound (n 1)n in the third solution does not depend on M .

20

C2. Let n 1 be an integer. What is the maximum number of disjoint pairs of elements of the
set {1, 2, . . . , n} such that the sums of the different pairs are different integers not exceeding n?

Solution. Consider x such pairs in {1, 2, . . . , n}. The sum S of the 2x numbers in them is at
least 1+2+ +2x since the pairs are disjoint. On the other hand S n+(n1)+ +(nx+1)
because the sums of the pairs are different and do not exceed n. This gives the inequality
x(x 1)
2x(2x + 1)
nx
,
2
2
 2n1 
which leads to x 2n1
.
Hence
there
are
at
most
pairs with the given properties.
5
5
 2n1 
pairs. First consider the case n = 5k + 3 with
We show a construction
with exactly
5

2n1
k 0, where
= 2k + 1. The pairs are displayed in the following table.
5
Pairs
Sums

3k + 1
3k
2
4
3k + 3 3k + 4

2k + 2
2k
4k + 2

4k + 2 4k + 1
1
3

4k + 3 4k + 4

3k + 3
2k 1
5k + 2

3k + 2
2k + 1
5k + 3

The 2k + 1 pairs involve all numbers from 1 to 4k + 2; their sums are all numbers from 3k + 3
to 5k + 3. The same construction
 2n1  works for n = 5k + 4 and n = 5k + 5 with k 0. In these
cases the required number
of pairs equals 2k + 1 again, and the numbers in the table
5
do not exceed 5k + 3. In the case n = 5k + 2 with k 0 one needs only 2k pairs. They can
be obtained by ignoring the last column of the table (thus removing 5k + 3). Finally, 2k pairs
are also needed for the case n = 5k + 1 with k 0. Now it suffices to ignore the last column
of the table and then subtract 1 from each number in the first row.
Comment. The construction above is not unique. For instance, the following table shows another
set of 2k + 1 pairs for the cases n = 5k + 3, n = 5k + 4, and n = 5k + 5.
Pairs
Sums

1
4k + 1
4k + 2

2
4k 1
4k + 1

k
2k + 3
3k + 3

k+1
4k + 2
5k + 3

k+2
4k
5k + 2

2k + 1
2k + 2
4k + 3

The table for the case n = 5k + 2 would be the same, with the pair (k + 1, 4k + 2) removed. For the
case n = 5k + 1 remove the last column and subtract 2 from each number in the second row.

21

C3. In a 999 999 square table some cells are white and the remaining ones are red. Let T

be the number of triples (C1 , C2 , C3) of cells, the first two in the same row and the last two in
the same column, with C1 and C3 white and C2 red. Find the maximum value T can attain.
4

such triples.
Solution. We prove that in an n n square table there are at most 4n
27
Let row i and column j contain ai and bj white cells respectively, and let R be the set of
red cells. For every red cell (i, j) there are ai bj admissible triples (C1 , C2 , C3 ) with C2 = (i, j),
therefore
X
T =
ai bj .
(i,j)R

We use the inequality 2ab a2 + b2 to obtain


n
n
1 X 2
1X
1X
2
2
(ai + bj ) =
(n ai )ai +
(n bj )b2j .
T
2
2 i=1
2 j=1
(i,j)R

This is because there are n ai red cells in row i and n bj red cells in column j. Now we
maximize the right-hand side.
By the AM-GM inequality we have
 3
4n3
1 2n
1
2
=
,
(n x)x = (2n 2x) x x
2
2 3
27
with equality if and only if x =

2n
.
3

By putting everything together, we get


4n4
n 4n3 n 4n3
+
=
.
2 27
2 27
27

= 666 white cells in each row


If n = 999 then any coloring of the square table with x = 2n
3
and column attains the maximum as all inequalities in the previous argument become equalities.
For example color a cell (i, j) white if i j 1, 2, . . . , 666 (mod 999), and red otherwise.
4
Therefore the maximum value T can attain is T = 4999
.
27
Comment. One can obtain a better preliminary estimate with the Cauchy-Schwarz inequality:

T =

(i,j)R

ai bj

1
2

(i,j)R

a2i

1
2

(i,j)R

It can be used to reach the same conclusion.

b2j =

n
X
(n ai )a2i
i=1

1
!1 n
2
2
X
2

(n bj )bj

.
j=1

22

C4. Players A and B play a game with N 2012 coins and 2012 boxes arranged around a
circle. Initially A distributes the coins among the boxes so that there is at least 1 coin in each
box. Then the two of them make moves in the order B, A, B, A, . . . by the following rules:
On every move of his B passes 1 coin from every box to an adjacent box.
On every move of hers A chooses several coins that were not involved in Bs previous
move and are in different boxes. She passes every chosen coin to an adjacent box.
Player As goal is to ensure at least 1 coin in each box after every move of hers, regardless of
how B plays and how many moves are made. Find the least N that enables her to succeed.
Solution. We argue for a general n 7 instead of 2012 and prove that the required minimum N
is 2n 2. For n = 2012 this gives Nmin = 4022.
a) If N = 2n 2 player A can achieve her goal. Let her start the game with a regular
distribution: n 2 boxes with 2 coins and 2 boxes with 1 coin. Call the boxes of the two kinds
red and white respectively. We claim that on her first move A can achieve a regular distribution
again, regardless of Bs first move M. She acts according as the following situation S occurs
after M or not: The initial distribution contains a red box R with 2 white neighbors, and R
receives no coins from them on move M.
Suppose that S does not occur. Exactly one of the coins c1 and c2 in a given red box X
is involved in M, say c1 . If M passes c1 to the right neighbor of X, let A pass c2 to its left
neighbor, and vice versa. By doing so with all red boxes A performs a legal move M . Thus
M and M combined move the 2 coins of every red box in opposite directions. Hence after M
and M are complete each neighbor of a red box X contains exactly 1 coin that was initially
in X. So each box with a red neighbor is non-empty after M . If initially there is a box X
with 2 white neighbors (X is red and unique) then X receives a coin from at least one of them
on move M since S does not occur. Such a coin is not involved in M , so X is also non-empty
after M . Furthermore each box Y has given away its initial content after M and M . A red
neighbor of Y adds 1 coin to it; a white neighbor adds at most 1 coin because it is not involved
in M . Hence each box contains 1 or 2 coins after M . Because N = 2n 2, such a distribution
is regular.
Now let S occur after move M. Then A leaves untouched the exceptional red box R. With
all remaining red boxes she proceeds like in the previous case, thus making a legal move M .
Box R receives no coins from its neighbors on either move, so there is 1 coin in it after M .
Like above M and M combined pass exactly 1 coin from every red box different from R to
each of its neighbors. Every box except R has a red neighbor different from R, hence all boxes
are non-empty after M . Next, each box Y except R loses its initial content after M and M .
A red neighbor of Y adds at most 1 coin to it; a white neighbor also adds at most 1 coin as
it does not participate in M . Thus each box has 1 or 2 coins after M , and the obtained
distribution is regular.
Player A can apply the described strategy indefinitely, so N = 2n2 enables her to succeed.
b) For N 2n 3 player B can achieve an empty box after some move of A. Let be a
set of consecutive boxes containing a total of N() coins. We call an arc if n 2 and
N() 2 3. Note that 2 by the last condition. Moreover if both extremes of are
non-empty boxes then N() 2, so that N() 2 3 implies 3. Observe also that if
an extreme X of has more than 1 coin then ignoring X yields a shorter arc. It follows that
every arc contains an arc whose extremes have at most 1 coin each.
Given a clockwise labeling 1, 2, . . . , n of the boxes, suppose that boxes 1, 2, . . . , form an
arc , with n 2 and N() 2 3. Suppose also that all n 7 boxes are non-empty.
Then B can move so that an arc with N( ) < N() will appear after any response of A.

23
One may assume exactly 1 coin in boxes 1 and by a previous remark. Let B pass 1 coin
in counterclockwise direction from box 1 and box n, and in clockwise direction from each
remaining box. This leaves N() 2 coins in the boxes of . In addition, due to 3 n 2,
box has exactly 1 coin c, the one received from box 1.
Let player As next move M pass k 2 coins to boxes 1, 2, . . . , from the remaining ones.
Only boxes 1 and can receive such coins, at most 1 each. If k < 2 then after move M boxes
1, 2, . . . , form an arc with N( ) < N(). If k = 2 then M adds a coin to box . Also
M does not move coin c from because c is involved in the previous move of B. In summary
boxes 1, 2, . . . , contain N() coins like before, so they form an arc. However there are 2 coins
now in the extreme of the arc. Ignore to obtain a shorter arc with N( ) < N().
Consider any initial distribution without empty boxes. Since N 2n 3, there are at
least 3 boxes in it with exactly 1 coin. It follows from n 7 that some 2 of them are the
extremes of an arc . Hence B can make the move described above, which leads to an arc
with N( ) < N() after As response. If all boxes in the new distribution are non-empty he
can repeat the same, and so on. Because N() cannot decrease indefinitely, an empty box will
occur after some move of A.

24

C5. The columns and the rows of a 3n 3n square board are numbered 1, 2, . . . , 3n. Every

square (x, y) with 1 x, y 3n is colored asparagus, byzantium or citrine according as the


modulo 3 remainder of x + y is 0, 1 or 2 respectively. One token colored asparagus, byzantium
or citrine is placed on each square, so that there are 3n2 tokens of each color.
Suppose that one can permute the tokens so that each token is moved to a distance of
at most d from its original position, each asparagus token replaces a byzantium token, each
byzantium token replaces a citrine token, and each citrine token replaces an asparagus token.
Prove that it is possible to permute the tokens so that each token is moved to a distance of at
most d + 2 from its original position, and each square contains a token with the same color as
the square.

Solution. Without loss of generality it suffices to prove that the A-tokens can be moved to
distinct A-squares in such a way that each A-token is moved to a distance at most d + 2 from
its original place. This means we need a perfect matching between the 3n2 A-squares and the
3n2 A-tokens such that the distance in each pair of the matching is at most d + 2.
To find the matching, we construct a bipartite graph. The A-squares will be the vertices in
one class of the graph; the vertices in the other class will be the A-tokens.
Split the board into 3 1 horizontal triminos; then each trimino contains exactly one Asquare. Take a permutation of the tokens which moves A-tokens to B-tokens, B-tokens to
C-tokens, and C-tokens to A-tokens, in each case to a distance at most d. For each A-square S,
and for each A-token T , connect S and T by an edge if T , (T ) or 1 (T ) is on the trimino
containing S. We allow multiple edges; it is even possible that the same square and the same
token are connected with three edges. Obviously the lengths of the edges in the graph do not
exceed d + 2. By length of an edge we mean the distance between the A-square and the A-token
it connects.
Each A-token T is connected with the three A-squares whose triminos contain T , (T )
and 1 (T ). Therefore in the graph all tokens are of degree 3. We show that the same is true
for the A-squares. Let S be an arbitrary A-square, and let T1 , T2 , T3 be the three tokens on
the trimino containing S. For i = 1, 2, 3, if Ti is an A-token, then S is connected with Ti ; if Ti
is a B-token then S is connected with 1 (Ti ); finally, if Ti is a C-token then S is connected
with (Ti ). Hence in the graph the A-squares also are of degree 3.
Since the A-squares are of degree 3, from every set S of A-squares exactly 3|S| edges start.
These edges end in at least |S| tokens because the A-tokens also are of degree 3. Hence every
set S of A-squares has at least |S| neighbors among the A-tokens.
Therefore, by Halls marriage theorem, the graph contains a perfect matching between
the two vertex classes. So there is a perfect matching between the A-squares and A-tokens
with edges no longer than d + 2. It follows that the tokens can be permuted as specified in the
problem statement.
Comment 1. In the original problem proposal the board was infinite and there were only two colors.
Having n colors for some positive integer n was an option; we chose n = 3. Moreover, we changed
the board to a finite one to avoid dealing with infinite graphs (although Halls theorem works in the
infinite case as well).
With only two colors Halls theorem is not needed. In this case we split the board into 2 1
dominos, and in the resulting graph all vertices are of degree 2. The graph consists of disjoint cycles
with even length and infinite paths, so the existence of the matching is trivial.
Having more than three colors would make the problem statement more complicated, because we
need a matching between every two color classes of tokens. However, this would not mean a significant
increase in difficulty.

25
Comment 2. According to Wikipedia, the color asparagus (hexadecimal code #87A96B) is a tone
of green that is named after the vegetable. Crayola created this color in 1993 as one of the 16 to
be named in the Name The Color Contest. Byzantium (#702963) is a dark tone of purple. Its first
recorded use as a color name in English was in 1926. Citrine (#E4D00A) is variously described as
yellow, greenish-yellow, brownish-yellow or orange. The first known use of citrine as a color name in
English was in the 14th century.

26

C6. Let k and n be fixed positive integers. In the liars guessing game, Amy chooses integers
x and N with 1 x N. She tells Ben what N is, but not what x is. Ben may then repeatedly
ask Amy whether x S for arbitrary sets S of integers. Amy will always answer with yes or no,
but she might lie. The only restriction is that she can lie at most k times in a row. After he
has asked as many questions as he wants, Ben must specify a set of at most n positive integers.
If x is in this set he wins; otherwise, he loses. Prove that:
a) If n 2k then Ben can always win.
b) For sufficiently large k there exist n 1.99k such that Ben cannot guarantee a win.
Solution. Consider an answer A {yes, no} to a question of the kind Is x in the set S?
We say that A is inconsistent with a number i if A = yes and i 6 S, or if A = no and i S.
Observe that an answer inconsistent with the target number x is a lie.
a) Suppose that Ben has determined a set T of size m that contains x. This is true initially
with m = N and T = {1, 2, . . . , N}. For m > 2k we show how Ben can find a number y T
that is different from x. By performing this step repeatedly he can reduce T to be of size 2k n
and thus win.
Since only the size m > 2k of T is relevant, assume that T = {0, 1, . . . , 2k , . . . , m1}. Ben
begins by asking repeatedly whether x is 2k . If Amy answers no k + 1 times in a row, one
of these answers is truthful, and so x 6= 2k . Otherwise Ben stops asking about 2k at the first
answer yes. He then asks, for each i = 1, . . . , k, if the binary representation of x has a 0 in
the ith digit. Regardless of what the k answers are, they are all inconsistent with a certain
number y {0, 1, . . . , 2k 1}. The preceding answer yes about 2k is also inconsistent with y.
Hence y 6= x. Otherwise the last k + 1 answers are not truthful, which is impossible.
Either way, Ben finds a number in T that
 is different
 from x, and the claim is proven.
k+1
b) We prove that if 1 < < 2 and n = (2 )
1 then Ben cannot guarantee a win.
To complete the proof, then it suffices to take such that 1.99 < < 2 and k large enough so
that


n = (2 )k+1 1 1.99k .
Consider the following strategy for Amy. First she chooses N = n+1 and x {1, 2, . . . , n+1}
arbitrarily. After every answer of hers Amy determines, for each i = 1, 2, . . . , n + 1, the
number mi of consecutive answers she has given by that point that are inconsistent with i. To
decide on her next answer, she then uses the quantity
=

n+1
X

mi .

i=1

No matter what Bens next question is, Amy chooses the answer which minimizes .
We claim that with this strategy will always stay less than k+1 . Consequently no exponent mi in will ever exceed k, hence Amy will never give more than k consecutive answers
inconsistent with some i. In particular this applies to the target number x, so she will never lie
more than k times in a row. Thus, given the claim, Amys strategy is legal. Since the strategy
does not depend on x in any way, Ben can make no deductions about x, and therefore he cannot
guarantee a win.
It remains to show that < k+1 at all times.
Initially
holds

 each mi is 0, so this condition
k+1
k+1
in the beginning due to 1 < < 2 and n = (2 )
1. Suppose that <
at some
point, and Ben has just asked if x S for some set S. According as Amy answers yes or no,
the new value of becomes
X
X
X
X
1 =
1+
mi +1
or
2 =
mi +1 +
1.
iS

iS
/

iS

iS
/

27
Since Amy chooses the option minimizing , the new will equal min(1 , 2 ). Now we have
!
X
X


1
1
1
1 + mi +1 +
= ( + n + 1).
mi +1 + 1
min(1 , 2 ) (1 + 2 ) =
2
2 iS
2
iS
/



Because < k+1, the assumptions < 2 and n = (2 )k+1 1 lead to
1
min(1 , 2 ) < (k+2 + (2 )k+1 ) = k+1 .
2

The claim follows, which completes the solution.


Comment. Given a fixed k, let f (k) denote the minimum value of n for which Ben can guarantee a
victory. The problem asks for a proof that for large k
1.99k f (k) 2k .
A computer search shows that f (k) = 2, 3, 4, 7, 11, 17 for k = 1, 2, 3, 4, 5, 6.

28

C7. There are given 2500 points on a circle labeled 1, 2, . . . , 2500 in some order. Prove that
one can choose 100 pairwise disjoint chords joining some of these points so that the 100 sums
of the pairs of numbers at the endpoints of the chosen chords are equal.
Solution. The proof is based on the following general fact.
Lemma. In a graph G each vertex v has degree dv . Then G contains an independent set S of
vertices such that |S| f (G) where
X 1
.
f (G) =
dv + 1
vG
Proof. Induction on n = |G|. The base n = 1 is clear. For the inductive step choose a vertex v0
in G of minimum degree d. Delete v0 and all of its neighbors v1 , . . . , vd and also all edges with
endpoints v0 , v1 , . . . , vd . This gives a new graph G . By the inductive assumption G contains
an independent set S of vertices such that |S | f (G ). Since no vertex in S is a neighbor
of v0 in G, the set S = S {v0 } is independent in G.
Let dv be the degree of a vertex v in G . Clearly dv dv for every such vertex v, and also
dvi d for all i = 0, 1, . . . , d by the minimal choice of v0 . Therefore
f (G ) =

vG

d
X
X 1
1
d+1
1

=
f
(G)

f
(G)

= f (G) 1.
dv + 1
dv + 1
d
+
1
d
+
1
v
i

i=0
vG

Hence |S| = |S | + 1 f (G ) + 1 f (G), and the induction is complete.



499
We pass on to our problem. For clarity denote n = 2 and draw all chords determined by
the given 2n points. Color each chord with one of the colors 3, 4, . . . , 4n 1 according to the
sum of the numbers at its endpoints. Chords with a common endpoint have different colors.
For each color c consider the following graph Gc . Its vertices are the chords of color c, and two
chords are neighbors in Gc if they intersect. Let f (Gc ) have the same meaning as in the lemma
for all graphs Gc .
Every chord divides the circle into two arcs, and one of them contains m() n 1 given
points. (In particular m() = 0 if joins two consecutive points.) For each i = 0, 1, . . . , n 2
there are 2n chords with m() = i. Such a chord has degree at most i in the respective graph.
Indeed let A1 , . . . , Ai be all points on either arc determined by a chord with m() = i and
color c. Every Aj is an endpoint of at most 1 chord colored c, j = 1, . . . , i. Hence at most
i chords of color c intersect .
It follows that forPeach i = 0, 1, . . . , n 2 the 2n chords with m() = i contribute at
2n
least i+1
to the sum c f (Gc ). Summation over i = 0, 1, . . . , n 2 gives
X
c

f (Gc ) 2n

n1
X
1
i=1

Because there are 4n 3 colors in all, averaging yields a color c such that
n1

n1

2n X 1
1X1
f (Gc )
>
.
4n 3 i=1 i
2 i=1 i
Pn1 1
pairwise disjoint chords of color c, i. e. with the same
By the lemma there are at least 12 i=1
i
Pn1 1
100 for
sum c of the pairs of numbers at their endpoints. It remains to show that 12 i=1
i
499
n = 2 . Indeed we have
n1
2400
400
2k
400 k1
X
X
X
X
1 X1
2
1
>
=1+
>1+
= 201 > 200.
i
i
i
2k
k1+1
i=1
i=1
k=1
k=1
i=2

This completes the solution.

29

Geometry
G1. In the triangle ABC the point J is the center of the excircle opposite to A. This excircle
is tangent to the side BC at M, and to the lines AB and AC at K and L respectively. The
lines LM and BJ meet at F , and the lines KM and CJ meet at G. Let S be the point of
intersection of the lines AF and BC, and let T be the point of intersection of the lines AG
and BC. Prove that M is the midpoint of ST .
Solution. Let = CAB, = ABC and = BCA. The line AJ is the bisector of CAB,
so JAK = JAL = 2 . By AKJ = ALJ = 90 the points K and L lie on the circle
with diameter AJ.
The triangle KBM is isosceles as BK and BM are tangents to the excircle. Since BJ is the
bisector of KBM, we have MBJ = 90 2 and BMK = 2 . Likewise MCJ = 90 2
and CML = 2 . Also BMF = CML, therefore



LF J = MBJ BMF = 90
= = LAJ.
2
2
2
Hence F lies on the circle . (By the angle computation, F and A are on the same side of BC.)
Analogously, G also lies on . Since AJ is a diameter of , we obtain AF J = AGJ = 90 .
A


2 2

K
J

The lines AB and BC are symmetric with respect to the external bisector BF . Because
AF BF and KM BF , the segments SM and AK are symmetric with respect to BF ,
hence SM = AK. By symmetry T M = AL. Since AK and AL are equal as tangents to the
excircle, it follows that SM = T M, and the proof is complete.
Comment. After discovering the circle AF KJLG, there are many other ways to complete the solution. For instance, from the cyclic quadrilaterals JM F S and JM GT one can find T SJ = ST J = 2 .
Another possibility is to use the fact that the lines AS and GM are parallel (both are perpendicular
MS
AG
to the external angle bisector BJ), so M
T = GT = 1.

30

G2.

Let ABCD be a cyclic quadrilateral whose diagonals AC and BD meet at E. The


extensions of the sides AD and BC beyond A and B meet at F . Let G be the point such that
ECGD is a parallelogram, and let H be the image of E under reflection in AD. Prove that
D, H, F , G are concyclic.
Solution. We show first that the triangles F DG and F BE are similar. Since ABCD is cyclic,
the triangles EAB and EDC are similar, as well as F AB and F CD. The parallelogram ECGD
yields GD = EC and CDG = DCE; also DCE = DCA = DBA by inscribed angles.
Therefore
F DG = F DC + CDG = F BA + ABD = F BE,
GD
CE
CD
FD
=
=
=
.
EB
EB
AB
FB

It follows that F DG and F BE are similar, and so F GD = F EB.

D
E

F
Since H is the reflection of E with respect to F D, we conclude that
F HD = F ED = 180 F EB = 180 F GD.
This proves that D, H, F , G are concyclic.
Comment. Points E and G are always in the half-plane determined by the line F D that contains
B and C, but H is always in the other half-plane. In particular, DHF G is cyclic if and only if
F HD + F GD = 180 .

31

G3. In an acute triangle ABC the points D, E and F are the feet of the altitudes through A,
B and C respectively. The incenters of the triangles AEF and BDF are I1 and I2 respectively;
the circumcenters of the triangles ACI1 and BCI2 are O1 and O2 respectively. Prove that I1 I2
and O1 O2 are parallel.
Solution. Let CAB = , ABC = , BCA = . We start by showing that A, B, I1
and I2 are concyclic. Since AI1 and BI2 bisect CAB and ABC, their extensions beyond I1
and I2 meet at the incenter I of the triangle. The points E and F are on the circle with
diameter BC, so AEF = ABC and AF E = ACB. Hence the triangles AEF and ABC
AE
= cos . Because I1 and I are their incenters, we obtain
are similar with ratio of similitude AB
I1 A = IA cos and II1 = IA I1 A = 2IA sin2 2 . By symmetry II2 = 2IB sin2 2 . The law of
sines in the triangle ABI gives IA sin 2 = IB sin 2 . Hence
II1 IA = 2 IA sin 2

2

= 2 IB sin 2

Therefore A, B, I1 and I2 are concyclic, as claimed.

2

= II2 IB.

O1
C

O2

I3

D
I
I1
Q

I2

In addition II1 IA = II2 IB implies that I has the same power with respect to the
circles (ACI1 ), (BCI2 ) and (ABI1 I2 ). Then CI is the radical axis of (ACI1 ) and (BCI2 ); in
particular CI is perpendicular to the line of centers O1 O2 .
Now it suffices to prove that CI I1 I2 . Let CI meet I1 I2 at Q, then it is enough to check
that II1 Q + I1 IQ = 90 . Since I1 IQ is external for the triangle ACI, we have
II1 Q + I1 IQ = II1 Q + (ACI + CAI) = II1 I2 + ACI + CAI.
It remains to note that II1 I2 = 2 from the cyclic quadrilateral ABI1 I2 , and ACI =
CAI = 2 . Therefore II1 Q + I1 IQ = 2 + 2 + 2 = 90 , completing the proof.

,
2

Comment. It follows from the first part of the solution that the common point I3 6= C of the
circles (ACI1 ) and (BCI2 ) is the incenter of the triangle CDE.

32

G4.

Let ABC be a triangle with AB 6= AC and circumcenter O. The bisector of BAC


intersects BC at D. Let E be the reflection of D with respect to the midpoint of BC. The lines
through D and E perpendicular to BC intersect the lines AO and AD at X and Y respectively.
Prove that the quadrilateral BXCY is cyclic.
Solution. The bisector of BAC and the perpendicular bisector of BC meet at P , the midpoint
d (they are different lines as AB 6= AC). In particular OP is perpendicular
of the minor arc BC
to BC and intersects it at M, the midpoint of BC.
Denote by Y the reflexion of Y with respect to OP . Since BY C = BY C, it suffices to
prove that BXCY is cyclic.
A

X
O

M
D

We have
XAP = OP A = EY P.
The first equality holds because OA = OP , and the second one because EY and OP are both
perpendicular to BC and hence parallel. But {Y, Y } and {E, D} are pairs of symmetric points
with respect to OP , it follows that EY P = DY P and hence
XAP = DY P = XY P.
The last equation implies that XAY P is cyclic. By the powers of D with respect to the
circles (XAY P ) and (ABP C) we obtain
XD DY = AD DP = BD DC.
It follows that BXCY is cyclic, as desired.

33
Let ABC be a triangle with BCA = 90 , and let C0 be the foot of the altitude
from C. Choose a point X in the interior of the segment CC0 , and let K, L be the points on
the segments AX, BX for which BK = BC and AL = AC respectively. Denote by M the
intersection of AL and BK. Show that MK = ML.

G5.

Solution. Let C be the reflection of C in the line AB, and let 1 and 2 be the circles
with centers A and B, passing through L and K respectively. Since AC = AC = AL and
BC = BC = BK, both 1 and 2 pass through C and C . By BCA = 90 , AC is tangent
to 2 at C, and BC is tangent to 1 at C. Let K1 6= K be the second intersection of AX and
2 , and let L1 6= L be the second intersection of BX and 1 .
K1
L1

1
C

3
X
L

K
M
A

C0

By the powers of X with respect to 2 and 1 ,


XK XK1 = XC XC = XL XL1 ,
so the points K1 , L, K, L1 lie on a circle 3 .
The power of A with respect to 2 gives
AL2 = AC 2 = AK AK1 ,
indicating that AL is tangent to 3 at L. Analogously, BK is tangent to 3 at K. Hence MK
and ML are the two tangents from M to 3 and therefore MK = ML.

34

G6. Let ABC be a triangle with circumcenter O and incenter I. The points D, E and F on
the sides BC, CA and AB respectively are such that BD + BF = CA and CD + CE = AB.
The circumcircles of the triangles BF D and CDE intersect at P 6= D. Prove that OP = OI.
Solution. By Miquels theorem the circles (AEF ) = A , (BF D) = B and (CDE) = C
have a common point, for arbitrary points D, E and F on BC, CA and AB. So A passes
through the common point P 6= D of B and C .
Let A , B and C meet the bisectors AI, BI and CI at A 6= A , B 6= B and C 6= C
respectively. The key observation is that A , B and C do not depend on the particular choice
of D, E and F , provided that BD + BF = CA, CD + CE = AB and AE + AF = BC hold
true (the last equality follows from the other two). For a proof we need the following fact.
Lemma. Given is an angle with vertex A and measure . A circle through A intersects the
angle bisector at L and sides of the angle at X and Y . Then AX + AY = 2AL cos 2 .
Proof. Note that L is the midpoint of arc \
XLY in and set XL = Y L = u, XY = v. By
Ptolemys theorem AX Y L + AY XL = AL XY , which rewrites as (AX + AY )u = AL v.
Since LXY = 2 and XLY = 180 , we have v = 2 cos 2 u by the law of sines, and the
claim follows.

X

u
L
A

u
v

Apply the lemma to BAC = and the circle = A , which intersects AI at A . This
gives 2AA cos 2 = AE + AF = BC; by symmetry analogous relations hold for BB and CC .
It follows that A , B and C are independent of the choice of D, E and F , as stated.
We use the lemma two more times with BAC = . Let be the circle with diameter AI.
Then X and Y are the tangency points of the incircle of ABC with AB and AC, and hence
AX = AY = 21 (AB + AC BC). So the lemma yields 2AI cos 2 = AB + AC BC. Next,
if is the circumcircle of ABC and AI intersects at M 6= A then {X, Y } = {B, C}, and so
2AM cos 2 = AB + AC by the lemma. To summarize,
2AA cos 2 = BC,

2AI cos 2 = AB + AC BC,

2AM cos 2 = AB + AC.

(*)

These equalities imply AA + AI = AM, hence the segments AM and IA have a common
midpoint. It follows that I and A are equidistant from the circumcenter O. By symmetry
OI = OA = OB = OC , so I, A , B , C are on a circle centered at O.
To prove OP = OI, now it suffices to show that I, A , B , C and P are concyclic. Clearly
one can assume P 6= I, A , B , C .
We use oriented angles to avoid heavy case distinction. The oriented angle between the lines l
and m is denoted by (l, m). We have (l, m) = (m, l) and (l, m) + (m, n) = (l, n)
for arbitrary lines l, m and n. Four distinct non-collinear points U, V, X, Y are concyclic if and
only if (UX, V X) = (UY, V Y ).

35
A
A

B
E

F
I

D
C
B
M

Suppose for the moment that A , B , P, I are distinct and noncollinear; then it is enough to
check the equality (A P, B P ) = (A I, B I). Because A, F, P, A are on the circle A , we have
(A P, F P ) = (A A, F A) = (A I, AB). Likewise (B P, F P ) = (B I, AB). Therefore
(A P, B P ) = (A P, F P ) + (F P, B P ) = (A I, AB) (B I, AB) = (A I, B I).
Here we assumed that P 6= F . If P = F then P 6= D, E and the conclusion follows similarly (use
(A F, B F ) = (A F, EF ) + (EF, DF ) + (DF, B F ) and inscribed angles in A , B , C ).
There is no loss of generality in assuming A , B , P, I distinct and noncollinear. If ABC
is an equilateral triangle then the equalities (*) imply that A , B , C , I, O and P coincide, so
OP = OI. Otherwise at most one of A , B , C coincides with I. If say C = I then OI CI
by the previous reasoning. It follows that A , B 6= I and hence A 6= B . Finally A , B and I
are noncollinear because I, A , B , C are concyclic.
Comment. The proposer remarks that the locus of the points P is an arc of the circle (A B C I).
The reflection I of I in O belongs to ; it is obtained by choosing D, E and F to be the tangency
points of the three excircles with their respective sides. The rest of the circle (A B C I), except I,
can be included in by letting D, E and F vary on the extensions of the sides and assuming signed
lengths. For instance if B is between C and D then the length BD must be taken with a negative
sign. The incenter I corresponds to the limit case where D tends to infinity.

36

G7.

Let ABCD be a convex quadrilateral with non-parallel sides BC and AD. Assume
that there is a point E on the side BC such that the quadrilaterals ABED and AECD are
circumscribed. Prove that there is a point F on the side AD such that the quadrilaterals
ABCF and BCDF are circumscribed if and only if AB is parallel to CD.
Solution. Let 1 and 2 be the incircles and O1 and O2 the incenters of the quadrilaterals ABED and AECD respectively. A point F with the stated property exists only if 1
and 2 are also the incircles of the quadrilaterals ABCF and BCDF .
B

E
O1

O2

F2 F 1

Let the tangents from B to 2 and from C to 1 (other than BC) meet AD at F1 and F2
respectively. We need to prove that F1 = F2 if and only if AB k CD.
Lemma. The circles 1 and 2 with centers O1 and O2 are inscribed in an angle with vertex O.
The points P, S on one side of the angle and Q, R on the other side are such that 1 is the
incircle of the triangle P QO, and 2 is the excircle of the triangle RSO opposite to O. Denote
p = OO1 OO2. Then exactly one of the following relations holds:
OP OR < p < OQ OS,

OP OR > p > OQ OS,

OP OR = p = OQ OS.

Proof. Denote OP O1 = u, OQO1 = v, OO2R = x, OO2S = y, P OQ = 2. Because


P O1 , QO1 , RO2 , SO2 are internal or external bisectors in the triangles P QO and RSO, we have
u + v = x + y (= 90 ).
v

(1)

R
O

x
y O2

O1

S
u

By the law of sines


OP
sin(u + )
=
OO1
sin u
Therefore, since x, u and are acute,
OP OR p

and

OO2
sin(x + )
=
.
OR
sin x

OO2
OP

sin x sin(u + ) sin u sin(x + ) sin(x u) 0 x u.


OO1
OR

Thus OP OR p is equivalent to x u, with OP OR = p if and only if x = u.


Analogously, p OQ OS is equivalent to v y, with p = OQ OS if and only if v = y.
On the other hand x u and v y are equivalent by (1), with x = u if and only if v = y. The
conclusion of the lemma follows from here.


37
Going back to the problem, apply the lemma to the quadruples {B, E, D, F1 }, {A, B, C, D}
and {A, E, C, F2}. Assuming OE OF1 > p, we obtain
OE OF1 > p OB OD < p OA OC > p OE OF2 < p.
In other words, OE OF1 > p implies
OB OD < p < OA OC

and OE OF1 > p > OE OF2 .

Similarly, OE OF1 < p implies


OB OD > p > OA OC

and OE OF1 < p < OE OF2 .

In these cases F1 6= F2 and OB OD 6= OA OC, so the lines AB and CD are not parallel.
There remains the case OE OF1 = p. Here the lemma leads to OB OD = p = OA OC
and OE OF1 = p = OE OF2 . Therefore F1 = F2 and AB k CD.
Comment. The conclusion is also true if BC and AD are parallel. One can prove a limit case of
the lemma for the configuration shown in the figure below, where r1 and r2 are parallel rays starting
at O and O , with O O r1 , r2 and O the midpoint of O O . Two circles with centers O1 and O2
are inscribed in the strip between r1 and r2 . The lines P Q and RS are tangent to the circles, with
P, S on r1 , and Q, R on r2 , so that O, O1 are on the same side of P Q and O, O2 are on different sides
of RS. Denote s = OO1 + OO2 . Then exactly one of the following relations holds:
O P + O R < s < O Q + O S,

O P + O R > s > O Q + O S,

O P + O R = s = O Q + O S.

r2

O
O2
O

O1
P

r1

Once this is established, the proof of the original statement for BC k AD is analogous to the one
in the intersecting case. One replaces products by sums of relevant segments.

38

G8. Let ABC be a triangle with circumcircle and a line without common points with .
Denote by P the foot of the perpendicular from the center of to . The side-lines BC, CA, AB
intersect at the points X, Y, Z different from P . Prove that the circumcircles of the triangles
AXP, BY P and CZP have a common point different from P or are mutually tangent at P .
Solution 1. Let A , B , C and be the circumcircles of triangles AXP, BY P, CZP and ABC
respectively. The strategy of the proof is to construct a point Q with the same power with
respect to the four circles. Then each of P and Q has the same power with respect to A , B , C
and hence the three circles are coaxial. In other words they have another common point P or
the three of them are tangent at P .
We first give a description of the point Q. Let A 6= A be the second intersection of
and A ; define B and C analogously. We claim that AA , BB and CC have a common point.
Once this claim is established, the point just constructed will be on the radical axes of the
three pairs of circles {, A }, {, B }, {, C }. Hence it will have the same power with respect
to , A, B , C .

A
B

B
B
C
X

A
Y

P X

We proceed to prove that AA , BB and CC intersect at one point. Let r be the circumradius of triangle ABC. Define the points X , Y , Z as the intersections of AA , BB , CC with .
Observe that X , Y , Z do exist. If AA is parallel to then A is tangent to ; hence X = P
which is a contradiction. Similarly, BB and CC are not parallel to .
From the powers of the point X with respect to the circles A and we get
X P (X P + P X) = X P X X = X A X A = X O 2 r 2 ,
hence
X P P X = X O 2 r 2 X P 2 = OP 2 r 2 .

We argue analogously for the points Y and Z , obtaining

X P P X = Y P P Y = Z P P Z = OP 2 r 2 = k 2 .

(1)

In these computations all segments are regarded as directed segments. We keep the same
convention for the sequel.
We prove that the lines AA , BB , CC intersect at one point by Cevas theorem. To avoid
distracting remarks we interpret everything projectively, i. e. whenever two lines are parallel
they meet at a point on the line at infinity.

39
Let U, V, W be the intersections of AA , BB , CC with BC, CA, AB respectively. The idea
, it is easier to deal with the cross-ratio
is that although it is difficult to calculate the ratio BU
CU
BU BX
/
because we can send it to the line . With this in mind we apply Menelaus theorem
CU CX
AZ
to the triangle ABC and obtain BX
CY BZ
= 1. Hence Cevas ratio can be expressed as
CX AY
BU BX CV CY AW AZ
BU CV AW

=
/

/
.
CU AV BW
CU CX AV AY BW BZ

C
X

P X

Project the line BC to from A. The cross-ratio between BC and UX equals the cross-ratio
between ZY and X X. Repeating the same argument with the lines CA and AB gives
BU CV AW
ZX ZX XY XY Y Z Y Z

=
/

/
CU AV BW
Y X Y X ZY ZY XZ XZ
and hence

ZX XY Y Z
BU CV AW

= (1)

.
CU AV BW
Y X ZY XZ
The equations (1) reduce the problem to a straightforward computation on the line .
For instance, the transformation t 7 k 2 /t preserves cross-ratio and interchanges the points
X, Y, Z with the points X , Y , Z . Then
BU CV AW
ZX ZZ XY XZ

= (1)
/

/
= 1.
CU AV BW
Y X Y Z ZY ZZ
We proved that Cevas ratio equals 1, so AA , BB , CC intersect at one point Q.
Comment 1. There is a nice projective argument to prove that AX , BY , CZ intersect at one point.
Suppose that and intersect at a pair of complex conjugate points D and E. Consider a projective
transformation that takes D and E to [i; 1, 0] and [i, 1, 0]. Then is the line at infinity, and is
a conic through the special points [i; 1, 0] and [i, 1, 0], hence it is a circle. So one can assume that
AX, BY, CZ are parallel to BC, CA, AB. The involution on taking X, Y, Z to X , Y , Z and leaving
D, E fixed is the involution changing each direction to its perpendicular one. Hence AX, BY, CZ are
also perpendicular to AX , BY , CZ .
It follows from the above that AX , BY , CZ intersect at the orthocenter of triangle ABC.
Comment 2. The restriction that the line does not intersect the circumcricle is unnecessary.
The proof above works in general. In case intersects at D and E point P is the midpoint of DE,
and some equations can be interpreted differently. For instance
X P X X = X A X A = X D X E,
and hence the pairs X X and DE are harmonic conjugates. This means that X , Y , Z are the
harmonic conjugates of X, Y, Z with respect to the segment DE.

40
Solution 2. First we prove that there is an inversion in space that takes and to parallel
circles on a sphere. Let QR be the diameter of whose extension beyond Q passes through P .
Let be the plane carrying our objects. In space, choose a point O such that the line QO is
perpendicular to and P OR = 90 , and apply an inversion with pole O (the radius of the
inversion does not matter). For any object T denote by T the image of T under this inversion.
The inversion takes the plane to a sphere . The lines in are taken to circles through O,
and the circles in also are taken to circles on .
O

Q
Q

Since the line and the circle are perpendicular to the plane OP Q, the circles and
also are perpendicular to this plane. Hence, the planes of the circles and are parallel.
Now consider the circles A X P , B Y P and C Z P . We want to prove that either they
have a common point (on ), different from P , or they are tangent to each other.
C

A1

B1

B
C1

O
Z

The point X is the second intersection of the circles B C O and , other than O. Hence,
the lines OX and B C are coplanar. Moreover, they lie in the parallel planes of and .
Therefore, OX and B C are parallel. Analogously, OY and OZ are parallel to A C and A B .
Let A1 be the second intersection of the circles A X P and , other than A . The segments
A A1 and P X are coplanar, and therefore parallel. Now we know that B C and A A1 are
parallel to OX and X P respectively, but these two segments are perpendicular because OP
is a diameter in . We found that A A1 and B C are perpendicular, hence A A1 is the altitude
in the triangle A B C , starting from A.
Analogously, let B1 and C1 be the second intersections of with the circles B P Y
and C P Z , other than B and C respectively. Then B B1 and C C1 are the other two altitudes in the triangle A B C .

41
Let H be the orthocenter of the triangle A B C . Let W be the second intersection of the
line P H with the sphere , other than P . The point W lies on the sphere , in the plane
of the circle A P X , so W lies on the circle A P X . Similarly, W lies on the circles B P Y
and C P Z as well; indeed W is the second common point of the three circles.
If the line P H is tangent to the sphere then W coincides with P , and P H is the common
tangent of the three circles.

42

Number Theory
N1. Call admissible a set A of integers that has the following property:
If x, y A (possibly x = y) then x2 + kxy + y 2 A for every integer k.
Determine all pairs m, n of nonzero integers such that the only admissible set containing both m
and n is the set of all integers.
Solution. A pair of integers m, n fulfills the condition if and only if gcd(m, n) = 1. Suppose
that gcd(m, n) = d > 1. The set
A = {. . . , 2d, d, 0, d, 2d, . . .}
is admissible, because if d divides x and y then it divides x2 + kxy + y 2 for every integer k.
Also m, n A and A 6= Z.
Now let gcd(m, n) = 1, and let A be an admissible set containing m and n. We use the
following observations to prove that A = Z:
(i) kx2 A for every x A and every integer k.
(ii) (x + y)2 A for all x, y A.
To justify (i) let y = x in the definition of an admissible set; to justify (ii) let k = 2.
Since gcd(m, n) = 1, we also have gcd(m2 , n2 ) = 1. Hence one can find integers a, b such
that am2 + bn2 = 1. It follows from (i) that am2 A and bn2 A. Now we deduce from (ii)
that 1 = (am2 + bn2 )2 A. But if 1 A then (i) implies k A for every integer k.

43

N2. Find all triples (x, y, z) of positive integers such that x y z and
x3 (y 3 + z 3 ) = 2012(xyz + 2).
Solution. First note that x divides 2012 2 = 23 503. If 503 | x then the right-hand side of the
equation is divisible by 5033 , and it follows that 5032 | xyz + 2. This is false as 503 | x. Hence
x = 2m with m {0, 1, 2, 3}. If m 2 then 26 | 2012(xyz + 2). However the highest powers
of 2 dividing 2012 and xyz + 2 = 2m yz + 2 are 22 and 21 respectively. So x = 1 or x = 2,
yielding the two equations
y 3 + z 3 = 2012(yz + 2),

and

y 3 + z 3 = 503(yz + 1).

In both cases the prime 503 = 3 167 + 2 divides y 3 + z 3 . We claim that 503 | y + z. This
is clear if 503 | y, so let 503 y and 503 z. Then y 502 z 502 (mod 503) by Fermats little
theorem. On the other hand y 3 z 3 (mod 503) implies y 3167 z 3167 (mod 503), i. e.
y 501 z 501 (mod 503). It follows that y z (mod 503) as claimed.

Therefore y + z = 503k with k 1. In view of y 3 + z 3 = (y + z) (y z)2 + yz the two
equations take the form
k(y z)2 + (k 4)yz = 8,
k(y z)2 + (k 1)yz = 1.

(1)
(2)

In (1) we have (k 4)yz 8, which implies k 4. Indeed if k > 4 then 1 (k 4)yz 8,


so that y 8 and z 8. This is impossible as y + z = 503k 503. Note next that y 3 + z 3
is even in the first equation. Hence y + z = 503k is even too, meaning that k is even. Thus
k = 2 or k = 4. Clearly (1) has no integer solutions for k = 4. If k = 2 then (1) takes the form
(y + z)2 5yz = 4. Since y + z = 503k = 503 2, this leads to 5yz = 5032 22 4. However
5032 22 4 is not a multiple of 5. Therefore (1) has no integer solutions.
Equation (2) implies 0 (k 1)yz 1, so that k = 1 or k = 2. Also 0 k(y z)2 1,
hence k = 2 only if y = z. However then y = z = 1, which is false in view of y + z 503.
Therefore k = 1 and (2) takes the form (y z)2 = 1, yielding z y = |y z| = 1. Combined
with k = 1 and y + z = 503k, this leads to y = 251, z = 252.
In summary the triple (2, 251, 252) is the only solution.

44

N3. Determine all integers m 2 such that every n with


coefficient

n
m2n

m
3

m
2

divides the binomial

Solution. The integers in question are all prime numbers.


First we check that all primes satisfy the condition,
 and even a stronger one. Namely, if p
n
p
is a prime then every n with 1 n 2 divides p2n . This is true for p = 2 where n = 1 is
the only possibility. For an odd prime p take n [1, p2 ] and consider the following identity of
binomial coefficients:




n1
n
.
=n
(p 2n)
p 2n 1
p 2n
Since p 2n and p is odd, all factors are non-zero. If d = gcd(p 2n, n) then d divides p,
but d n < p and hence d = 1. It follows that p 2n and n are relatively
prime, and so the

n
factor n in the right-hand side divides the binomial coefficient p2n .
Next we show that no composite number m has the stated property. Consider two cases.


n
= k0 = 1 is not divisible
If m = 2k with k > 1, pick n = k. Then m3 n m2 but m2n
by k > 1.

If m is odd then there exist an odd prime p and an integer k 1 with m = p(2k + 1).
Pick n = pk, then m3 n m2 by k 1. However


 
1 pk
(pk 1)(pk 2) (pk (p 1))
n
1
=
=
n m 2n
pk p
p!
is not an integer, because p divides the denominator but not the numerator.

45
An integer a is called friendly if the equation (m2 + n)(n2 + m) = a(m n)3 has a
solution over the positive integers.

N4.

a) Prove that there are at least 500 friendly integers in the set {1, 2, . . . , 2012}.
b) Decide whether a = 2 is friendly.
Solution. a) Every a of the form a = 4k 3 with k 2 is friendly. Indeed the numbers
m = 2k 1 > 0 and n = k 1 > 0 satisfy the given equation with a = 4k 3:


(m2 + n)(n2 + m) = (2k 1)2 + (k 1) (k 1)2 + (2k 1) = (4k 3)k 3 = a(m n)3 .
Hence 5, 9, . . . , 2009 are friendly and so {1, 2, . . . , 2012} contains at least 502 friendly numbers.

b) We show that a = 2 is not friendly. Consider the equation with a = 2 and rewrite its
left-hand side as a difference of squares:

1
(m2 + n + n2 + m)2 (m2 + n n2 m)2 = 2(m n)3 .
4

Since m2 + n n2 m = (m n)(m + n 1), we can further reformulate the equation as



(m2 + n + n2 + m)2 = (m n)2 8(m n) + (m + n 1)2 .

It follows that 8(m n) + (m + n 1)2 is a perfect square. Clearly m > n, hence there is an
integer s 1 such that
(m + n 1 + 2s)2 = 8(m n) + (m + n 1)2 .
Subtracting the squares gives s(m + n 1 + s) = 2(m n). Since m + n 1 + s > m n,
we conclude that s < 2. Therefore the only possibility is s = 1 and m = 3n. However then
the left-hand side of the given equation (with a = 2) is greater than m3 = 27n3 , whereas its
right-hand side equals 16n3 . The contradiction proves that a = 2 is not friendly.

Comment. A computer search shows that there are 561 friendly numbers in {1, 2, . . . , 2012}.

46

N5. For a nonnegative integer n define rad(n) = 1 if n = 0 or n = 1, and rad(n) = p1 p2 pk

where p1 < p2 < < pk are all prime factors of n. Find all polynomials f (x) with nonnegative
integer coefficients such that rad(f (n)) divides rad(f (nrad(n) )) for every nonnegative integer n.

Solution 1. We are going to prove that f (x) = axm for some nonnegative integers a and
m. If f (x) is the zero polynomial we are done, so assume that f (x) has at least one positive
coefficient. In particular f (1) > 0.
Let p be a prime number. The condition is that f (n) 0 (mod p) implies
f (nrad(n) ) 0 (mod p).

(1)

Since rad(nrad(n) ) = rad(n) for all k, repeated applications of the preceding implication show
that if p divides f (n) then
k

f (nrad(n) ) 0

(mod p)

for all k.

The idea is to construct a prime p and a positive integer n such that p 1 divides n and p
divides f (n). In this case, for k large enough p 1 divides rad(n)k . Hence if (p, n) = 1 then
k
nrad(n) 1 (mod p) by Fermats little theorem, so that
k

f (1) f (nrad(n) ) 0 (mod p).

(2)

Suppose that f (x) = g(x)xm with g(0) 6= 0. Let t be a positive integer, p any prime factor
of g(t) and n = (p1)t. So p1 divides n and f (n) = f ((p 1)t) f (t) 0 (mod p), hence
either (p, n) > 1 or (2) holds. If (p, (p1)t) > 1 then p divides t and g(0) g(t) 0 (mod p),
meaning that p divides g(0).
In conclusion we proved that each prime factor of g(t) divides g(0)f (1) 6= 0, and thus the
set of prime factors of g(t) when t ranges through the positive integers is finite. This is known
to imply that g(x) is a constant polynomial, and so f (x) = axm .
Solution 2. Let f (x) be a polynomial with integer coefficients (not necessarily nonnegative)
such that rad(f (n)) divides rad(f (nrad(n) )) for any nonnegative integer n. We give a complete
description of all polynomials with this property. More precisely, we claim that if f (x) is such
a polynomial and is a root of f (x) then so is d for every positive integer d.
Therefore each root of f (x) is zero or a root of unity. In particular, if a root of unity is
a root of f (x) then 1 = d is a root too (for some positive integer d). In the original problem
f (x) has nonnegative coefficients. Then either f (x) is the zero polynomial or f (1) > 0 and
= 0 is the only possible root. In either case f (x) = axm with a and m nonnegative integers.
To prove the claim let be a root of f (x), and let g(x) be an irreducible factor of f (x) such
that g() = 0. If 0 or 1 are roots of g(x) then either = 0 or = 1 (because g(x) is irreducible)
and we are done. So assume that g(0), g(1) 6= 0. By decomposing d as a product of prime
numbers, it is enough to consider the case d = p prime. We argue for p = 2. Since rad(2k ) = 2
for every k, we have
rad(f (2k )) | rad(f (22k )).
Now we prove that g(x) divides f (x2 ). Suppose that this is not the case. Then, since g(x)
is irreducible, there are integer-coefficient polynomials a(x), b(x) and an integer N such that
a(x)g(x) + b(x)f (x2 ) = N.

(3)

Each prime factor p of g(2k ) divides f (2k ), so by rad(f (2k ))|rad(f (22k )) it also divides f (22k ).
From the equation above with x = 2k it follows that p divides N.

47
In summary, each prime divisor of g(2k ) divides N, for all k 0. Let p1 , . . . , pn be the odd
primes dividing N, and suppose that
g(1) = 2 p1 1 pnn .
If k is divisible by (p1 1 +1 pnn +1 ) then
2k 1 (mod p1 1 +1 pnn +1 ),
yielding
g(2k ) g(1) (mod p1 1 +1 pnn +1 ).

It follows that for each i the maximal power of pi dividing g(2k ) and g(1) is the same, namely pi i .
On the other hand, for large enough k, the maximal power of 2 dividing g(2k ) and g(0) 6= 0
is the same. From the above, for k divisible by (p1 1 +1 pnn +1 ) and large enough, we obtain
that g(2k ) divides g(0) g(1). This is impossible because g(0), g(1) 6= 0 are fixed and g(2k ) is
arbitrarily large.
In conclusion, g(x) divides f (x2 ). Recall that is a root of f (x) such that g() = 0; then
f ( 2 ) = 0, i. e. 2 is a root of f (x).
Likewise if is a root of f (x) and p an arbitrary prime then p is a root too. The argument
is completely analogous, in the proof above just replace 2 by p and odd prime by prime
different from p.
Comment. The claim in the second solution can be proved by varying n (mod p) in (1). For instance,
we obtain
f (nrad(n+pk) ) 0 (mod p)
for every positive integer k. One can prove that if (n, p) = 1 then rad(n + pk) runs through all residue
classes r (mod p 1) with (r, p 1) squarefree. Hence if f (n) 0 (mod p) then f (nr ) 0 (mod p)
for all integers r. This implies the claim by an argument leading to the identity (3).

48
n

Let x and y be positive integers. If x2 1 is divisible by 2n y + 1 for every positive


integer n, prove that x = 1.

N6.

Solution. First we prove the following fact: For every positive integer y there exist infinitely
many primes p 3 (mod 4) such that p divides some number of the form 2n y + 1.
Clearly it is enough to consider the case y odd. Let
2y + 1 = pe11 perr
be the prime factorization of 2y + 1. Suppose on the contrary that there are finitely many
primes pr+1 , . . . , pr+s 3 (mod 4) that divide some number of the form 2n y + 1 but do not
divide 2y + 1.
We want to find an n such that pei i ||2n y +1 for 1 i r and pi 2n y +1 for r +1 i r +s.
For this it suffices to take
n = 1 + (pe11 +1 perr +1 p1r+1 p1r+s ),
because then
2n y + 1 2y + 1 (mod pe11 +1 perr +1 p1r+1 p1r+s ).

The last congruence means that pe11 , . . . , perr divide exactly 2n y + 1 and no prime pr+1 , . . . , pr+s
divides 2n y + 1. It follows that the prime factorization of 2n y + 1 consists of the prime powers
pe11 , . . . , perr and powers of primes 1 (mod 4). Because y is odd, we obtain
2n y + 1 pe11 perr 2y + 1 3 (mod 4).
This is a contradiction since n > 1, and so 2n y + 1 1 (mod 4).
Now we proceed to the problem. If p is a prime divisor of 2n y + 1 the problem statement
implies that xd 1 (mod p) for d = 2n . By Fermats little theorem the same congruence
holds for d = p 1, so it must also hold for d = (2n , p 1). For p 3 (mod 4) we have
(2n , p 1) = 2, therefore in this case x2 1 (mod p).
In summary, we proved that every prime p 3 (mod 4) that divides some number of the
form 2n y + 1 also divides x2 1. This is possible only if x = 1, otherwise by the above x2 1
would be a positive integer with infinitely many prime factors.
n

Comment. For each x and each odd prime p the maximal power of p dividing x2 1 for some n is
bounded and hence the same must be true for the numbers 2n y + 1. We infer that p2 divides 2p1 1
for each prime divisor p of 2n y + 1. However trying to reach a contradiction with this conclusion alone
seems hopeless, since it is not even known if there are infinitely many primes p without this property.

49

N7. Find all n N for which there exist nonnegative integers a1 , a2 , . . . , an such that
1
1
2
n
1
1
+
+

+
+
+

+
=
= 1.
2a1 2a2
2an
3a1 3a2
3an

Solution.
numbers a1 , a2 , . . . , an exist if and only if n 1 (mod 4) or n 2 (mod 4).
Pn Such
k
Let k=1 3ak = 1 with a1 , a2 , . . . , an nonnegative integers. Then 1x1 +2x2 + +nxn = 3a
with x1 , . . . , xn powers of 3 and a 0. The right-hand side is odd, and the left-hand side has
the same parity as 1 + 2 + + n. Hence the latter sum is odd, which implies n 1, 2 (mod 4).
Now we prove the converse.
Call feasible a sequence b1 , b2 , . . . , bn if there are nonnegative integers a1 , a2 , . . . , an such that
1
1
1
b2
bn
b1
+ a2 + + an = a1 + a2 + + an = 1.
a
1
2
2
2
3
3
3
Let bk be a term of a feasible sequence b1 , b2 , . . . , bn with exponents a1 , a2 , . . . , an like above,
and let u, v be nonnegative integers with sum 3bk . Observe that
1
2ak +1

1
2ak +1

1
2ak

and

u
3ak +1

v
3ak +1

bk
.
3ak

It follows that the sequence b1 , . . . , bk1 , u, v, bk+1, . . . , bn is feasible. The exponents ai are the
same for the unchanged terms bi , i 6= k; the new terms u, v have exponents ak + 1.
We state the conclusion in reverse. If two terms u, v of a sequence are replaced by one
term u+v
and the obtained sequence is feasible, then the original sequence is feasible too.
3
Denote by n the sequence 1, 2, . . . , n. To show that n is feasible for n 1, 2 (mod 4), we
transform it by n 1 replacements {u, v} 7 u+v
to the one-term sequence 1 . The latter is
3
feasible, with a1 = 0. Note that if m and 2m are terms of a sequence then {m, 2m} 7 m, so
2m can be ignored if necessary.
Let n 16. We prove that n can be reduced to n12 by 12 operations. Write n = 12k + r
where k 1 and 0 r 11. If 0 r 5 then the last 12 terms of n can be partitioned into
2 singletons {12k 6}, {12k} and the following 5 pairs:
{12k 6 i, 12k 6 + i}, i = 1, . . . , 5 r;

{12k j, 12k + j}, j = 1, . . . , r.

(There is only one kind of pairs if r {0, 5}.) One can ignore 12k 6 and 12k since n
contains 6k 3 and 6k. Furthermore the 5 operations {12k 6 i, 12k 6 + i} 7 8k 4 and
{12k j, 12k + j} 7 8k remove the 10 terms in the pairs and bring in 5 new terms equal
to 8k 4 or 8k. All of these can be ignored too as 4k 2 and 4k are still present in the
sequence. Indeed 4k n 12 is equivalent to 8k 12 r, which is true for r {4, 5}. And if
r {0, 1, 2, 3} then n 16 implies k 2, so 8k 12 r also holds. Thus n reduces to n12 .
The case 6 r 11 is analogous. Consider the singletons {12k}, {12k + 6} and the 5 pairs
{12k i, 12k + i}, i = 1, . . . , 11 r;

{12k + 6 j, 12k + 6 + j}, j = 1, . . . , r 6.

Ignore the singletons like before, then remove the pairs via operations {12k i, 12k + i} 7 8k
and {12k + 6 j, 12k + 6 + j} 7 8k + 4. The 5 newly-appeared terms 8k and 8k + 4 can be
ignored too since 4k + 2 n 12 (this follows from k 1 and r 6). We obtain n12 again.
The problem reduces to 2 n 15. In fact n {2, 5, 6, 9, 10, 13, 14} by n 1, 2 (mod 4).
The cases n = 2, 6, 10, 14 reduce to n = 1, 5, 9, 13 respectively because the last even term of n
can be ignored. For n = 5 apply {4, 5} 7 3, then {3, 3} 7 2, then ignore the 2 occurrences
of 2. For n = 9 ignore 6 first, then apply {5, 7} 7 4, {4, 8} 7 4, {3, 9} 7 4. Now ignore
the 3 occurrences of 4, then ignore 2. Finally n = 13 reduces to n = 10 by {11, 13} 7 8 and
ignoring 8 and 12. The proof is complete.

50

N8. Prove that for every prime p > 100 and every integer r there exist two integers a and b
such that p divides a2 + b5 r.
Solution 1. Throughout the solution, all congruence relations are meant modulo p.
Fix p, and let P = {0, 1, . . . , p 1} be
the set of residue classes modulo p. For every r P,
2
5
let Sr = (a, b) P P : a + b r , and let sr = |Sr |. Our aim is to prove sr > 0 for
all r P.
We will use the well-known fact that for every residue class r P and every positive
integer k, there are at most k values x P such that xk r.
Lemma. Let N be the number of quadruples (a, b, c, d) P 4 for which a2 + b5 c2 + d5 . Then
N=

s2r

(a)

rP

and
N p(p2 + 4p 4).

(b)

Proof. (a) For each residue class r there exist exactly sr pairs (a, b) with a2 + b5 r and sr
pairs (c, d) with c2 + d5 r. So there are s2r quadruples with a2 + b5 c2 + d5 r. Taking the
sum over all r P, the statement follows.
(b) Choose an arbitrary pair (b, d) P and look for the possible values of a, c.
1. Suppose that b5 d5 , and let k be the number of such pairs (b, d). The value b can be
chosen in p different ways. For b 0 only d = 0 has this property; for the nonzero values of b
there are at most 5 possible values for d. So we have k 1 + 5(p 1) = 5p 4.
The values a and c must satisfy a2 c2 , so a c, and there are exactly 2p 1 such
pairs (a, c).
2. Now suppose b5 6 d5 . In this case a and c must be distinct. By (a c)(a + c) = d5 b5 ,
the value of a c uniquely determines a + c and thus a and c as well. Hence, there are p 1
suitable pairs (a, c).
Thus, for each of the k pairs (b, d) with b5 d5 there are 2p 1 pairs (a, c), and for each of
the other p2 k pairs (b, d) there are p 1 pairs (a, c). Hence,
N = k(2p 1) + (p2 k)(p 1) = p2 (p 1) + kp p2 (p 1) + (5p 4)p = p(p2 + 4p 4). 
To prove the statement of the problem, suppose that Sr = for some r P; obviously
r 6 0. Let T = x10 : x P \ {0} be the set of nonzero 10th powers modulo p. Since each
residue class is the 10th power of at most 10 elements in P, we have |T | p1
4 by p > 100.
10
10
For every t T , we have Str = . Indeed, if (x, y) Str and t z then
(z 5 x)2 + (z 2 y)5 t1 (x2 + y 5) r,
4 empty sets among S1 , . . . , Sp1 , and there
so (z 5 x, z 2 y) Sr . So, there are at least p1
10
are at most p 4 nonzero values among s0 , s2 , . . . , sp1. Then by the AM-QM inequality we
obtain

2
X
X
1
|P P|2
p4
N=
s2r
sr =
=
> p(p2 + 4p 4),
p4
p4
p4
rP\rT

which is impossible by the lemma.

rP\rT

51
Solution 2. If 5 p 1, then all modulo p residue classes are complete fifth powers and the
statement is trivial. So assume that p = 10k + 1 where k 10. Let g be a primitive root
modulo p.
We will use the following facts:
(F1) If some residue class x is not quadratic then x(p1)/2 1 (mod p).
(F2) For every integer d, as a simple corollary of the summation formula for geometric progressions,
(

2k1
X
2k if 2k d
5di
(mod p).
g
0
if
2k
6
|
d
i=0
Suppose that, contrary to the statement, some modulo p residue class r cannot be expressed
as a2 + b5 . Of course r 6 0 (mod p). By (F1) we have (r b5 )(p1)/2 = (r b5 )5k 1 (mod p)
for all residue classes b.
For t = 1, 2 . . . , k 1 consider the sums
S(t) =

2k1
X

r g 5i

i=0

By the indirect assumption and (F2),


S(t) =

2k1
X
i=0

r (g i )5

5k

g 5ti

2k1
X
i=0

5k

g 5ti .

(1)g 5ti

2k1
X
i=0

g 5ti 0

because 2k cannot divide t.


On the other hand, by the binomial theorem,
!
 

5k
2k1
5k 
X
X X

5k 5kj
j
5i
5ti
j 5k
r 5kj
r
g
g =
(1)
S(t) =
j
j
j=0
i=0
j=0
(



5k
X
5k 5kj 2k if 2k j + t
r

(1)j
(mod p).
j
0
if
2k
6
|
j
+
t
j=0

(mod p)

2k1
X
i=0

g 5(j+t)i

Since 1 j + t < 6k, the number 2k divides j + t only for j = 2k t and j = 4k t. Hence,





5k
5k
k+t
3k+t
t
2k (mod p),
r
r
+
0 S(t) (1)
4k t
2k t




5k
5k
2k
0 (mod p).
r +
4k t
2k t
Taking this for t = 1, 2 and eliminating r, we get



 
 


 

5k
5k
5k
5k
5k
5k
2k
2k
r +

r +
0
4k 2
2k 2
2k 1
4k 1
2k 1
2k 2


 


5k
5k
5k
5k

=
2k 1 4k 2
2k 2 4k 1


2
(5k)!
=
(2k 1)(k + 2) (3k + 2)(4k 1)
(2k 1)!(3k + 2)!(4k 1)!(k + 2)!
(5k)!2 2k(5k + 1)
(mod p).
=
(2k 1)!(3k + 2)!(4k 1)!(k + 2)!
But in the last expression none of the numbers is divisible by p = 10k + 1, a contradiction.

52
Comment 1. The argument in the second solution is valid whenever k 3, that is for all primes
p = 10k + 1 except p = 11. This is an exceptional case when the statement is not true; r = 7 cannot
be expressed as desired.
Comment 2. The statement is true in a more general setting: for every positive integer n, for all
sufficiently large p, each residue class modulo p can be expressed as a2 + bn . Choosing t = 3 would
allow using the Cauchy-Davenport theorem (together with some analysis on the case of equality).
In the literature more general results are known. For instance, the statement easily follows from
the Hasse-Weil bound.

Shortlisted Problems with Solutions

54th International Mathematical Olympiad


Santa Marta, Colombia 2013

Note of Confidentiality

The Shortlisted Problems should be kept


strictly confidential until IMO 2014.

Contributing Countries
The Organizing Committee and the Problem Selection Committee of IMO 2013 thank the following
50 countries for contributing 149 problem proposals.

Argentina, Armenia, Australia, Austria, Belgium, Belarus, Brazil, Bulgaria,


Croatia, Cyprus, Czech Republic, Denmark, El Salvador, Estonia, Finland,
France, Georgia, Germany, Greece, Hungary, India, Indonesia, Iran, Ireland,
Israel, Italy, Japan, Latvia, Lithuania, Luxembourg, Malaysia, Mexico,
Netherlands, Nicaragua, Pakistan, Panama, Poland, Romania, Russia,
Saudi Arabia, Serbia, Slovenia, Sweden, Switzerland, Tajikistan, Thailand,
Turkey, U.S.A., Ukraine, United Kingdom

Problem Selection Committee


Federico Ardila (chairman)
Ilya I. Bogdanov
Geza Kos
Carlos Gustavo Tamm de Ara
ujo Moreira (Gugu)
Christian Reiher

Shortlisted problems

Problems
Algebra
A1.

Let n be a positive integer and let a1 , . . . , an1 be arbitrary real numbers. Define the
sequences u0 , . . . , un and v0 , . . . , vn inductively by u0 u1 v0 v1 1, and
uk`1 uk ` ak uk1 ,

vk`1 vk ` ank vk1

for k 1, . . . , n 1.

Prove that un vn .

(France)
A2. Prove that in any set of 2000 distinct real numbers there exist two pairs a b and c d
with a c or b d, such that

a b

c d 1 100000 .

A3. Let Q0 be the set of positive rational numbers. Let f : Q0


the conditions

(Lithuania)
R be a function satisfying

f pxqf pyq f pxyq and f px ` yq f pxq ` f pyq

for all x, y P Q0 . Given that f paq a for some rational a 1, prove that f pxq x for all
x P Q0 .

(Bulgaria)
A4. Let n be a positive integer, and consider a sequence a1 , a2 , . . . , an of positive integers.
Extend it periodically to an infinite sequence a1 , a2 , . . . by defining an`i ai for all i 1. If
a1 a2 an a1 ` n
and
aai n ` i 1

prove that

for i 1, 2, . . . , n,

a1 ` ` an n2 .
(Germany)
A5. Let Z0 be the set of all nonnegative integers. Find all the functions f : Z0 Z0
satisfying the relation
f pf pf pnqqq f pn ` 1q ` 1

for all n P Z0 .

(Serbia)
A6. Let m 0 be an integer. Find all polynomials P pxq with real coefficients such that
px3 mx2 ` 1qP px ` 1q ` px3 ` mx2 ` 1qP px 1q 2px3 mx ` 1qP pxq
for all real numbers x.
(Serbia)

IMO 2013 Colombia

Combinatorics
C1. Let n be a positive integer. Find the smallest integer k with the following property: Given
any real numbers a1 , . . . , ad such that a1 ` a2 ` ` ad n and 0 ai 1 for i 1, 2, . . . , d, it
is possible to partition these numbers into k groups (some of which may be empty) such that the
sum of the numbers in each group is at most 1.
(Poland)

C2.

In the plane, 2013 red points and 2014 blue points are marked so that no three of the
marked points are collinear. One needs to draw k lines not passing through the marked points and
dividing the plane into several regions. The goal is to do it in such a way that no region contains
points of both colors.
Find the minimal value of k such that the goal is attainable for every possible configuration of
4027 points.
(Australia)

C3. A crazy physicist discovered a new kind of particle which he called an imon, after some of
them mysteriously appeared in his lab. Some pairs of imons in the lab can be entangled, and each
imon can participate in many entanglement relations. The physicist has found a way to perform
the following two kinds of operations with these particles, one operation at a time.
piq If some imon is entangled with an odd number of other imons in the lab, then the physicist
can destroy it.
piiq At any moment, he may double the whole family of imons in his lab by creating a copy I 1
of each imon I. During this procedure, the two copies I 1 and J 1 become entangled if and only if
the original imons I and J are entangled, and each copy I 1 becomes entangled with its original
imon I; no other entanglements occur or disappear at this moment.
Prove that the physicist may apply a sequence of such operations resulting in a family of imons,
no two of which are entangled.
(Japan)

C4. Let n be a positive integer, and let A be a subset of t1, . . . , nu. An A-partition of n into k
parts is a representation of n as a sum n a1 ` ` ak , where the parts a1 , . . . , ak belong to A
and are not necessarily distinct. The number of different parts in such a partition is the number
of (distinct) elements in the set ta1 , a2 , . . . , ak u.
We say that an A-partition of n into k parts is optimal if there is no A-partition
of n into r
?
3
parts with r k. Prove that any optimal A-partition of n contains at most 6n different parts.
(Germany)

C5.

Let r be a positive integer, and let a0 , a1 , . . . be an infinite sequence of real numbers.


Assume that for all nonnegative integers m and s there exists a positive integer n P rm ` 1, m ` rs
such that
am ` am`1 ` ` am`s an ` an`1 ` ` an`s .
Prove that the sequence is periodic, i. e. there exists some p 1 such that an`p an for all n 0.
(India)

Shortlisted problems

C6. In some country several pairs of cities are connected by direct two-way flights. It is possible
to go from any city to any other by a sequence of flights. The distance between two cities is defined
to be the least possible number of flights required to go from one of them to the other. It is known
that for any city there are at most 100 cities at distance exactly three from it. Prove that there is
no city such that more than 2550 other cities have distance exactly four from it.
(Russia)
C7. Let n 2 be an integer. Consider all circular arrangements of the numbers 0, 1, . . . , n; the
n ` 1 rotations of an arrangement are considered to be equal. A circular arrangement is called
beautiful if, for any four distinct numbers 0 a, b, c, d n with a ` c b ` d, the chord joining
numbers a and c does not intersect the chord joining numbers b and d.
Let M be the number of beautiful arrangements of 0, 1, . . . , n. Let N be the number of pairs
px, yq of positive integers such that x ` y n and gcdpx, yq 1. Prove that
M N ` 1.
(Russia)
C8. Players A and B play a paintful game on the real line. Player A has a pot of paint with
four units of black ink. A quantity p of this ink suffices to blacken a (closed) real interval of length
p. In every round, player A picks some positive integer m and provides 1{2m units of ink from the
pot. Player B then picks an integer k and blackens the interval from k{2m to pk ` 1q{2m (some
parts of this interval may have been blackened before). The goal of player A is to reach a situation
where the pot is empty and the interval r0, 1s is not completely blackened.
Decide whether there exists a strategy for player A to win in a finite number of moves.
(Austria)

IMO 2013 Colombia

Geometry
G1.

Let ABC be an acute-angled triangle with orthocenter H, and let W be a point on


side BC. Denote by M and N the feet of the altitudes from B and C, respectively. Denote
by 1 the circumcircle of BW N, and let X be the point on 1 which is diametrically opposite
to W . Analogously, denote by 2 the circumcircle of CW M, and let Y be the point on 2 which
is diametrically opposite to W . Prove that X, Y and H are collinear.

(Thaliand)
G2. Let be the circumcircle of a triangle ABC. Denote by M and N the midpoints of the
sides AB and AC, respectively, and denote by T the midpoint of the arc BC of not containing A.
The circumcircles of the triangles AMT and ANT intersect the perpendicular bisectors of AC
and AB at points X and Y , respectively; assume that X and Y lie inside the triangle ABC. The
lines MN and XY intersect at K. Prove that KA KT .

(Iran)
G3. In a triangle ABC, let D and E be the feet of the angle bisectors of angles A and B,
respectively. A rhombus is inscribed into the quadrilateral AEDB (all vertices of the rhombus
lie on different sides of AEDB). Let be the non-obtuse angle of the rhombus. Prove that
maxt=BAC, =ABCu.

(Serbia)
G4. Let ABC be a triangle with =B =C. Let P and Q be two different points on line AC
such that =P BA =QBA =ACB and A is located between P and C. Suppose that there
exists an interior point D of segment BQ for which P D P B. Let the ray AD intersect the circle
ABC at R A. Prove that QB QR.
(Georgia)
G5. Let ABCDEF be a convex hexagon with AB DE, BC EF , CD F A, and
=A =D =C =F =E =B. Prove that the diagonals AD, BE, and CF are concurrent.
(Ukraine)
G6. Let the excircle of the triangle ABC lying opposite to A touch its side BC at the point A1 .
Define the points B1 and C1 analogously. Suppose that the circumcentre of the triangle A1 B1 C1
lies on the circumcircle of the triangle ABC. Prove that the triangle ABC is right-angled.
(Russia)

Shortlisted problems

Number Theory
N1. Let Z0 be the set of positive integers. Find all functions f : Z0 Z0 such that
m2 ` f pnq | mf pmq ` n

for all positive integers m and n.


(Malaysia)
N2.
Prove that for any pair of positive integers k and n there exist k positive integers
m1 , m2 , . . . , mk such that

2k 1
1
1
1
1`
1`
1 `
.
1`
n
m1
m2
mk
(Japan)
N3. Prove that there exist infinitely many positive integers n such that the largest prime divisor
of n4 ` n2 ` 1 is equal to the largest prime divisor of pn ` 1q4 ` pn ` 1q2 ` 1.

(Belgium)
N4. Determine whether there exists an infinite sequence of nonzero digits a1 , a2 , a3 , . . . and a
positive integer N such that for every integer k N, the number ak ak1 . . . a1 is a perfect square.

(Iran)
N5. Fix an integer k 2. Two players, called Ana and Banana, play the following game of
numbers: Initially, some integer n k gets written on the blackboard. Then they take moves
in turn, with Ana beginning. A player making a move erases the number m just written on the
blackboard and replaces it by some number m1 with k m1 m that is coprime to m. The first
player who cannot move anymore loses.
An integer n k is called good if Banana has a winning strategy when the initial number is n,
and bad otherwise.
Consider two integers n, n1 k with the property that each prime number p k divides n if
and only if it divides n1 . Prove that either both n and n1 are good or both are bad.
(Italy)

N6. Determine all functions f : Q Z satisfying


f

f pxq ` a
b

x ` a
b

for all x P Q, a P Z, and b P Z0 . (Here, Z0 denotes the set of positive integers.)

(Israel)
N7. Let be an irrational positive number, and let m be a positive integer. A pair pa, bq of
positive integers is called good if
arbs btau m.

A good pair pa, bq is called excellent if neither of the pairs pab, bq and pa, baq is good. (As usual,
by txu and rxs we denote the integer numbers such that x 1 txu x and x rxs x ` 1.)
Prove that the number of excellent pairs is equal to the sum of the positive divisors of m.
(U.S.A.)

IMO 2013 Colombia

Solutions
Algebra
A1.

Let n be a positive integer and let a1 , . . . , an1 be arbitrary real numbers. Define the
sequences u0 , . . . , un and v0 , . . . , vn inductively by u0 u1 v0 v1 1, and
uk`1 uk ` ak uk1 ,

vk`1 vk ` ank vk1

for k 1, . . . , n 1.

Prove that un vn .

(France)

Solution 1. We prove by induction on k that

uk

p1q

ai1 . . . ait .

0i1 ...it k,
ij`1 ij 2

Note that we have one trivial summand equal to 1 (which corresponds to t 0 and the empty
sequence, whose product is 1).
For k 0, 1 the sum on the right-hand side only contains the empty product, so (1) holds due
to u0 u1 1. For k 1, assuming the result is true for 0, 1, . . . , k, we have

ai1 . . . ait ak
ai1 . . . ait `
uk`1
0i1 ...it k1,
ij`1 ij 2

0i1 ...it k,
ij`1 ij 2

0i1 ...it k`1,


ij`1 ij 2,

ai1 . . . ait `

ai1 . . . ait

0i1 ...it k`1,


ij`1 ij 2,
kPti1 ,...,it u

kRti1 ,...,it u

ai1 . . . ait ,

0i1 ...it k`1,


ij`1 ij 2

as required.
Applying (1) to the sequence b1 , . . . , bn given by bk ank for 1 k n, we get

ai1 . . . ait .
bi1 . . . bit
vk
0i1 ...it k,
ij`1 ij 2

ni1 ...it nk,


ij ij`1 2

p2q

For k n the expressions (1) and (2) coincide, so indeed un vn .


Solution 2. Define recursively a sequence of multivariate polynomials by
P0 P1 1,

Pk`1 px1 , . . . , xk q Pk px1 , . . . , xk1 q ` xk Pk1 px1 , . . . , xk2 q,

so Pn is a polynomial in n 1 variables for each n 1. Two easy inductive arguments show that
un Pn pa1 , . . . , an1 q,

vn Pn pan1 , . . . , a1 q,

Shortlisted problems solutions

so we need to prove Pn px1 , . . . , xn1 q Pn pxn1 , . . . , x1 q for every positive integer n. The cases
n 1, 2 are trivial, and the cases n 3, 4 follow from P3 px, yq 1 ` x ` y and P4 px, y, zq
1 ` x ` y ` z ` xz.
Now we proceed by induction, assuming that n 5 and the claim hold for all smaller cases.
Using F pa, bq as an abbreviation for P|ab|`1 pxa , . . . , xb q (where the indices a, . . . , b can be either
in increasing or decreasing order),
F pn, 1q F pn, 2q ` x1 F pn, 3q F p2, nq ` x1 F p3, nq
pF p2, n 1q ` xn F p2, n 2qq ` x1 pF p3, n 1q ` xn F p3, n 2qq
pF pn 1, 2q ` x1 F pn 1, 3qq ` xn pF pn 2, 2q ` x1 F pn 2, 3qq
F pn 1, 1q ` xn F pn 2, 1q F p1, n 1q ` xn F p1, n 2q
F p1, nq,
as we wished to show.
Solution 3. Using matrix notation, we can rewrite the recurrence relation as

uk
uk ` ak uk1
uk`1
1 ` ak ak

ak
ak
uk uk1
ak uk1
uk`1 uk

for 1 k n 1, and similarly

1 ` ank ank
pvk`1; vk vk`1 q vk ` ank vk1 ; ank vk1 pvk ; vk1 vk q
ank
ank

1 ` ak ak
for 1 k n 1. Hence, introducing the 2 2 matrices Ak
we have
ak
ak

uk
uk`1
and pvk`1 ; vk vk`1 q pvk ; vk1 vk qAnk .
Ak
uk uk1
uk`1 uk
` 1 `1
for 1 k n 1. Since u1uu
0 and pv1 ; v0 v1 q p1; 0q, we get
0

1
un
and pvn ; vn1 vn q p1; 0q An1 An2 A1 .
An1 An2 A1
0
un un1
It follows that

un
pun q p1; 0q
un un1



1
1
pvn q.
pvn ; vn1 vn q
p1; 0q An1 An2 A1
0
0

Comment 1. These sequences are related to the Fibonacci sequence; when a1 an1 1, we
have uk vk Fk`1 , the pk ` 1qst Fibonacci number. Also, for every positive integer k, the polynomial
Pk px1 , . . . , xk1 q from Solution 2 is the sum of Fk`1 monomials.
Comment 2. One may notice that the condition is equivalent to
uk`1
1`
uk

1`

ak
ak1
1 ` ... `

a2
1 ` a1

and

vk`1
1`
vk

ank
ank`1
1`
an2
1 ` ... `
1 ` an1

so the problem claims that the corresponding continued fractions for un {un1 and vn {vn1 have the same
numerator.

10

IMO 2013 Colombia

Comment 3. An alternative variant of the problem is the following.


Let n be a positive integer and let a1 , . . . , an1 be arbitrary real numbers. Define the sequences
u0 , . . . , un and v0 , . . . , vn inductively by u0 v0 0, u1 v1 1, and
uk`1 ak uk ` uk1 ,

vk`1 ank vk ` vk1

for k 1, . . . , n 1.

Prove that un vn .
All three solutions above can be reformulated to prove this statement; one may prove

u n vn
ai1 . . . ait1
for n 0
0i0 i1 ...it n,
ij`1 ij is odd

or observe that

Here we have

and

uk`1
uk

ak 1
1 0

uk`1
ak `
uk

vk`1
ank `
vk

uk
uk1

ak 1
and pvk`1 ; vk q pvk ; vk1 q
.
1 0
1

ak1 `

rak ; ak1 , . . . , a1 s

1
ak2 ` . . . `

1
a1

1
ank`1 `

rank ; ank`1 , . . . , an1 s,

1
ank`2 ` . . . `

1
an1

so this alternative statement is equivalent to the known fact that the continued fractions ran1 ; an2 , . . . , a1 s
and ra1 ; a2 , . . . , an1 s have the same numerator.

Shortlisted problems solutions

11

A2. Prove that in any set of 2000 distinct real numbers there exist two pairs a b and c d
with a c or b d, such that

a b

1
c d
100000 .

(Lithuania)

Solution. For any set S of n 2000 distinct real numbers, let D1 D2 Dm be the
distances between them, displayed with their multiplicities. Here m npn 1q{2. By rescaling
the numbers, we may assume that the smallest distance D1 between two elements of S is D1 1.
Let D1 1 y x for x, y P S. Evidently Dm v u is the difference between the largest
element v and the smallest element u of S.
If Di`1 {Di 1 ` 105 for some i 1, 2, . . . , m 1 then the required inequality holds, because
0 Di`1 {Di 1 105 . Otherwise, the reverse inequality
Di`1
1
1` 5
Di
10
holds for each i 1, 2, . . . , m 1, and therefore
Dm
D 3 D2
Dm

v u Dm
D1
Dm1
D 2 D1

1
1` 5
10

m1

1 1000 1999 1 19 105 , together with the fact that for all n 1,
`From 1m
n 1 npn
`n 1q{2
1 ` n 1 ` 1 n1 2, we get

19105
105 19
1
1
1` 5

1` 5
219 29 210 500 1000 2 105 ,
10
10
and so v u Dm 2 105 .
Since the distance of x to at least one of the numbers u, v is at least pu vq{2 105 , we have
|x z| 105 .
for some z P tu, vu. Since y x 1, we have either z y x (if z v) or y x z (if z u).
If z y x, selecting a z, b y, c z and d x (so that b d), we obtain

z y
x y
a b
1
5

c d 1 z x 1 z x z x 10 .

Otherwise, if y x z, we may choose a y, b z, c x and d z (so that a c), and obtain



a b
y z
y x
1
5

c d 1 x z 1 x z x z 10 .
The desired result follows.

Comment. As the solution shows, the numbers 2000 and


may be replaced by any n P Z0 and 0 satisfying

1
100000

appearing in the statement of the problem

p1 ` qnpn1q{21 2.

12

IMO 2013 Colombia

A3. Let Q0 be the set of positive rational numbers. Let f : Q0 R be a function satisfying
the conditions

f pxqf pyq f pxyq,


f px ` yq f pxq ` f pyq

(1)
(2)

for all x, y P Q0 . Given that f paq a for some rational a 1, prove that f pxq x for all
x P Q0 .
(Bulgaria)

Solution. Denote by Z0 the set of positive integers.


Plugging x 1, y a into (1) we get f p1q 1. Next, by an easy induction on n we get
from (2) that
f pnxq nf pxq for all n P Z0 and x P Q0 .
(3)
In particular, we have
f pnq nf p1q n for all n P Z0 .

(4)

From (1) again we have f pm{nqf pnq f pmq, so f pqq 0 for all q P Q0 .
Now, (2) implies that f is strictly increasing; this fact together with (4) yields
f pxq f ptxuq txu x 1 for all x 1.
By an easy induction we get from (1) that f pxqn f pxn q, so
?
f pxqn f pxn q xn 1 f pxq n xn 1 for all x 1 and n P Z0 .
This yields
f pxq x for every x 1.

(5)

(Indeed, if x y 1 then xn y n px yqpxn1 ` xn2 y ` ` y n q npx yq, so for a large n


we have xn 1 y n and thus f pxq y.)
Now, (1) and (5) give an f paqn f pan q an , so f pan q an . Now, for x 1 let us choose
n P Z0 such that an x 1. Then by (2) and (5) we get
an f pan q f pxq ` f pan xq x ` pan xq an
and therefore f pxq x for x 1. Finally, for every x P Q0 and every n P Z0 , from (1) and (3)
we get
nf pxq f pnqf pxq f pnxq nf pxq,
which gives f pnxq nf pxq. Therefore f pm{nq f pmq{n m{n for all m, n P Z0 .
Comment. The condition f paq a 1 is essential. Indeed, for b 1 the function f pxq bx2 satisfies (1)
and (2) for all x, y P Q0 , and it has a unique fixed point 1{b 1.

Shortlisted problems solutions

13

A4.

Let n be a positive integer, and consider a sequence a1 , a2 , . . . , an of positive integers.


Extend it periodically to an infinite sequence a1 , a2 , . . . by defining an`i ai for all i 1. If
a1 a2 an a1 ` n

(1)

and
aai n ` i 1

for i 1, 2, . . . , n,

(2)

prove that
a1 ` ` an n2 .
(Germany)
Solution 1. First, we claim that
ai n ` i 1

for i 1, 2, . . . , n.

(3)

Assume contrariwise that i is the smallest counterexample. From an an1 ai n ` i


and aai n ` i 1, taking into account the periodicity of our sequence, it follows that
ai cannot be congruent to i, i ` 1, . . . , n 1, or n

pmod nq.

(4)

Thus our assumption that ai n ` i implies the stronger statement that ai 2n ` 1, which by
a1 ` n an ai gives a1 n ` 1. The minimality of i then yields i 1, and (4) becomes
contradictory. This establishes our first claim.
In particular we now know that a1 n. If an n, then a1 an n and the desired
inequality holds trivially. Otherwise, consider the number t with 1 t n 1 such that
a1 a2 . . . at n at`1 . . . an .

(5)

Since 1 a1 n and aa1 n by (2), we have a1 t and hence an n ` t. Therefore if for each
positive integer i we let bi be the number of indices j P tt ` 1, . . . , nu satisfying aj n ` i, we have
b1 b2 . . . bt bt`1 0.
Next we claim that ai ` bi n for 1 i t. Indeed, by n ` i 1 aai and ai n, each j
with aj n ` i (thus aj aai ) belongs to tai ` 1, . . . , nu, and for this reason bi n ai .
It follows from the definition of the bi s and (5) that
at`1 ` . . . ` an npn tq ` b1 ` . . . ` bt .
Adding a1 ` . . . ` at to both sides and using that ai ` bi n for 1 i t, we get
a1 ` a2 ` ` an npn tq ` nt n2
as we wished to prove.

14

IMO 2013 Colombia

Solution 2. In the first quadrant of an infinite grid, consider the increasing staircase obtained
by shading in dark the bottom ai cells of the ith column for 1 i n. We will prove that there
are at most n2 dark cells.
To do it, consider the n n square S in the first quadrant with a vertex at the origin. Also
consider the n n square directly to the left of S. Starting from its lower left corner, shade in light
the leftmost aj cells of the jth row for 1 j n. Equivalently, the light shading is obtained by
reflecting the dark shading across the line x y and translating it n units to the left. The figure
below illustrates this construction for the sequence 6, 6, 6, 7, 7, 7, 8, 12, 12, 14.

a ai

ai

n+i1

We claim that there is no cell in S which is both dark and light. Assume, contrariwise, that
there is such a cell in column i. Consider the highest dark cell in column i which is inside S. Since
it is above a light cell and inside S, it must be light as well. There are two cases:
Case 1. ai n
If ai n then this dark and light cell is pi, ai q, as highlighted in the figure. However, this is the
pn ` iq-th cell in row ai , and we only shaded aai n ` i light cells in that row, a contradiction.

Case 2. ai n ` 1
If ai n ` 1, this dark and light cell is pi, nq. This is the pn ` iq-th cell in row n and we shaded
an a1 ` n light cells in this row, so we must have i a1 . But a1 aa1 n by (1) and (2), so
i a1 implies ai aa1 n, contradicting our assumption.

We conclude that there are no cells in S which are both dark and light. It follows that the
number of shaded cells in S is at most n2 .
Finally, observe that if we had a light cell to the right of S, then by symmetry we would have
a dark cell above S, and then the cell pn, nq would be dark and light. It follows that the number
of light cells in S equals the number of dark cells outside of S, and therefore the number of shaded
cells in S equals a1 ` ` an . The desired result follows.

Solution 3. As in Solution 1, we first establish that ai n ` i 1 for 1 i n. Now define


ci maxpai , iq for 1 i n and extend the sequence c1 , c2 , . . . periodically modulo n. We claim
that this sequence also satisfies the conditions of the problem.
For 1 i j n we have ai aj and i j, so ci cj . Also an a1 ` n and n 1 ` n imply
cn c1 ` n. Finally, the definitions imply that cci P taai , ai , ai n, iu so cci n ` i 1 by (2) and
(3). This establishes (1) and (2) for c1 , c2 , . . ..

Shortlisted problems solutions

15

Our new sequence has the additional property that


ci i

for i 1, 2, . . . , n,

(6)

which allows us to construct the following visualization: Consider n equally spaced points on a
circle, sequentially labelled 1, 2, . . . , n pmod nq, so point k is also labelled n ` k. We draw arrows
from vertex i to vertices i ` 1, . . . , ci for 1 i n, keeping in mind that ci i by (6). Since
ci n ` i 1 by (3), no arrow will be drawn twice, and there is no arrow from a vertex to itself.
The total number of arrows is

n
n

n`1
number of arrows pci iq
ci
2
i1
i1
Now we show that we never draw both arrows i j and j i for 1 i j n. Assume
contrariwise. This means, respectively, that
i j ci

and

j n ` i cj .

We have n ` i cj c1 ` n by (1), so i c1 . Since c1 n by (3), this implies that ci cc1 n


using (1) and (3). But then, using (1) again, j ci n implies cj cci , which combined with
n ` i cj gives us that n ` i cci . This contradicts (2).
`
This means that the number of arrows is at most n2 , which implies that

n`1
n
n2 .
`
ci
2
2
i1
Recalling that ai ci for 1 i n, the desired inequality follows.

Comment 1. We sketch an alternative proof by induction. Begin by verifying the initial case n 1 and
the simple cases when a1 1, a1 n, or an n. Then, as in Solution 1, consider the index t such that
a1 at n at`1 an . Observe again that a1 t. Define the sequence d1 , . . . , dn1 by
#
ai`1 1 if i t 1
di
ai`1 2 if i t
and extend it periodically modulo n 1. One may verify that this sequence also satisfies the hypotheses
of the problem. The induction hypothesis then gives d1 ` ` dn1 pn 1q2 , which implies that
n

i1

ai a1 `

pdi1 ` 1q `

i2

it`1

pdi1 ` 2q t ` pt 1q ` 2pn tq ` pn 1q2 n2 .

Comment 2. One unusual feature of this problem is that there are many different sequences for which
equality holds. The discovery of such optimal sequences is not difficult, and it is useful in guiding the
steps of a proof.
In fact, Solution 2 gives a complete description of the optimal sequences. Start with any lattice path
P from the lower left to the upper right corner of the n n square S using only steps up and right, such
that the total number of steps along the left and top edges of S is at least n. Shade the cells of S below
P dark, and the cells of S above P light. Now reflect the light shape across the line x y and shift it
up n units, and shade it dark. As Solution 2 shows, the dark region will then correspond to an optimal
sequence, and every optimal sequence arises in this way.

16

IMO 2013 Colombia

A5.

Let Z0 be the set of all nonnegative integers. Find all the functions f : Z0 Z0
satisfying the relation
f pf pf pnqqq f pn ` 1q ` 1
pq

for all n P Z0 .

Answer. There are two such


$

&n ` 1,
f pnq n ` 5,

%
n 3,

(Serbia)
functions: f pnq n ` 1 for all n P Z0 , and
n 0 pmod 4q or n 2 pmod 4q,
n 1 pmod 4q,
n 3 pmod 4q

for all n P Z0 .

(1)

Throughout all the solutions, we write hk pxq to abbreviate the kth iteration of function h, so h0 is
the identity function, and hk pxq loomoon
hp. . . hpxq . . . qq for k 1.
k times

Solution 1. To start, we get from pq that


`

f 4 pnq f pf 3 pnqq f f pn ` 1q ` 1 and f 4 pn ` 1q f 3 pf pn ` 1qq f f pn ` 1q ` 1 ` 1,


thus

f 4 pnq ` 1 f 4 pn ` 1q.

(2)

I. Let us denote by Ri the range of f i ; note that R0 Z0 since f 0 is the identity function.
Obviously, R0 R1 . . . . Next, from (2) we get that if a P R4 then also a ` 1 P R4 . This implies
that Z0 zR4 and hence Z0 zR1 is finite. In particular, R1 is unbounded.
Assume that f pmq f pnq for some distinct m and n. Then from pq we obtain f pm ` 1q
f pn ` 1q; by an easy induction we then get that f pm ` cq f pn ` cq for every c 0. So the
function f pkq is periodic with period |m n| for k m, and thus R1 should be bounded, which is
false. So, f is injective.
II. Denote now Si Ri1 zRi ; all these sets are finite for i 4. On the other hand, by the
injectivity we have n P Si f pnq P Si`1 . By the injectivity again, f implements a bijection
between Si and Si`1 , thus |S1 | |S2 | . . . ; denote this common cardinality by k. If 0 P R3 then
0 f pf pf pnqqq for some n, thus from pq we get f pn ` 1q 1 which is impossible. Therefore
0 P R0 zR3 S1 Y S2 Y S3 , thus k 1.
Next, let us describe the elements b of R0 zR3 S1 Y S2 Y S3. We claim that each such element
satisfies at least one of three conditions piq b 0, piiq b f p0q ` 1, and piiiq b 1 P S1 . Otherwise
b 1 P Z0 , and there exists some n 0 such that f pnq b 1; but then f 3 pn 1q f pnq ` 1 b,
so b P R3 .
This yields
3k |S1 Y S2 Y S3 | 1 ` 1 ` |S1 | k ` 2,
or k 1. Therefore k 1, and the inequality above comes to equality. So we have S1 tau,
S2 tf paqu, and S3 tf 2 paqu for some a P Z0 , and each one of the three options piq, piiq,
and piiiq should be realized exactly once, which means that
ta, f paq, f 2 paqu t0, a ` 1, f p0q ` 1u.

(3)

Shortlisted problems solutions

17

III. From (3), we get a ` 1 P tf paq, f 2 paqu (the case a ` 1 a is impossible). If a ` 1 f 2 paq then
we have f pa ` 1q f 3 paq f pa ` 1q ` 1 which is absurd. Therefore
f paq a ` 1.

(4)

Next, again from (3) we have 0 P ta, f 2 paqu. Let us consider these two cases separately.
Case 1. Assume that a 0, then f p0q f paq a ` 1 1. Also from (3) we get f p1q f 2 paq
f p0q ` 1 2. Now, let us show that f pnq n ` 1 by induction on n; the base cases n 1 are
established. Next, if n 2 then the induction hypothesis implies
n ` 1 f pn 1q ` 1 f 3 pn 2q f 2 pn 1q f pnq,
establishing the step. In this case we have obtained the first of two answers; checking that is
satisfies pq is straightforward.
Case 2. Assume now that f 2 paq 0; then by (3) we get a f p0q ` 1. By (4) we get f pa ` 1q
f 2 paq 0, then f p0q f 3 paq f pa ` 1q ` 1 1, hence a f p0q ` 1 2 and f p2q 3 by (4). To
summarize,
f p0q 1, f p2q 3, f p3q 0.
Now let us prove by induction on m that (1) holds for all n 4k, 4k ` 2, 4k ` 3 with k m and
for all n 4k ` 1 with k m. The base case m 0 is established above. For the step, assume
that m 1. From pq we get f 3 p4m 3q f p4m 2q ` 1 4m. Next, by (2) we have
f p4mq f 4 p4m 3q f 4 p4m 4q ` 1 f 3 p4m 3q ` 1 4m ` 1.
Then by the induction hypothesis together with pq we successively obtain
f p4m 3q f 3 p4m 1q f p4mq ` 1 4m ` 2,
f p4m ` 2q f 3 p4m 4q f p4m 3q ` 1 4m ` 3,
f p4m ` 3q f 3 p4m 3q f p4m 2q ` 1 4m,
thus finishing the induction step.
Finally, it is straightforward to check that the constructed function works:
f 3 p4kq 4k ` 7 f p4k ` 1q ` 1,
f 3 p4k ` 2q 4k ` 1 f p4k ` 3q ` 1,

f 3 p4k ` 1q 4k ` 4 f p4k ` 2q ` 1,
f 3 p4k ` 3q 4k ` 6 f p4k ` 4q ` 1.

Solution 2. I. For convenience, let us introduce the function gpnq f pnq ` 1. Substituting f pnq
instead of n into pq we obtain
`

f 4 pnq f f pnq ` 1 ` 1, or f 4 pnq g 2 pnq.


(5)

Applying f to both parts of pq and using (5) we get


`

f 4 pnq ` 1 f f pn ` 1q ` 1 ` 1 f 4 pn ` 1q.

(6)

Thus, if g 2 p0q f 4 p0q c then an easy induction on n shows that


g 2pnq f 4 pnq n ` c,

n P Z0 .

(7)

18

IMO 2013 Colombia

This relation implies that both f and g are injective: if, say, f pmq f pnq then m ` c
f pmq f 4 pnq n ` c. Next, since gpnq 1 for every n, we have c g 2 p0q 1. Thus from (7)
again we obtain f pnq n and gpnq n for all n P Z0 .
II. Next, application of f and g to (7) yields
4

f pn ` cq f 5 pnq f 4 pf pnqq f pnq ` c and gpn ` cq g 3 pnq gpnq ` c.

(8)

In particular, this means that if m n pmod cq then f pmq f pnq pmod cq. Conversely, if
f pmq f pnq pmod cq then we get m ` c f 4 pmq f 4 pnq n ` c pmod cq. Thus,
m n pmod cq f pmq f pnq pmod cq gpmq gpnq pmod cq.

(9)

Now, let us introduce the function pnq f pnq n gpnq n 1. Set


S

c1

pnq.

n0

Using (8), we get that for every complete residue system n1 , . . . , nc modulo c we also have
S

i1

pni q.

By (9), we get that tf k pnq : n 0, . . . , c 1u and tg k pnq : n 0, . . . , c 1u are complete residue


systems modulo c for all k. Thus we have
2

c
and similarly
c2

c1

n0

c1

3 c1
3 c1
`

` 4


k`1
k
f pnq n
f pnq f pnq
pf k pnqq 4S

n0

k0 n0

k0 n0

1 c1
1 c1
`
`

g 2pnq n
g k`1 pnq g k pnq
pg k pnqq ` 1 2S ` 2c.
k0 n0

k0 n0

Therefore c2 4S 2 2S 2pc2 2cq, or c2 4c. Since c 0, we get c 4. Thus, in view of


(8) it is sufficient to determine the values of f on the numbers 0, 1, 2, 3.
III. Let d gp0q 1. Then gpdq g 2p0q 0 ` c 4. Now, if d 4, then we would
have gpd 4q gpdq 4 0 which is impossible. Thus d P t1, 2, 3u. If d 1 then we have
f p0q gp0q 1 0 which is impossible since f pnq n for all n. If d 3 then gp3q g 2 p0q 4
and hence f p3q 3 which is also impossible. Thus gp0q 2 and hence gp2q g 2 p0q 4.
Next, if gp1q 1 ` 4k for some integer k, then 5 g 2 p1q gp1 ` 4kq gp1q ` 4k 1 ` 8k
which is impossible. Thus, since tgpnq : n 0, 1, 2, 3u is a complete residue system modulo 4, we
get gp1q 3 ` 4k and hence gp3q g 2p1q 4k 5 4k, leading to k 0 or k 1. So, we obtain
iether
f p0q 1, f p1q 2, f p2q 3, f p3q 4,

or f p0q 1, f p1q 6, f p2q 3, f p3q 0,

thus arriving to the two functions listed in the answer.


Finally, one can check that these two function work as in Solution 1. One may simplify the
checking by noticing that (8) allows us to reduce it to n 0, 1, 2, 3.

Shortlisted problems solutions

19

A6. Let m 0 be an integer. Find all polynomials P pxq with real coefficients such that
px3 mx2 ` 1qP px ` 1q ` px3 ` mx2 ` 1qP px 1q 2px3 mx ` 1qP pxq

(1)

for all real numbers x.


(Serbia)
Answer. P pxq tx for any real number t.

Solution. Let P pxq an xn ` ` a0 x0 with an 0. Comparing the coefficients of xn`1 on both


sides gives an pn 2mqpn 1q 0, so n 1 or n 2m.
If n 1, one easily verifies that P pxq x is a solution, while P pxq 1 is not. Since the given
condition is linear in P , this means that the linear solutions are precisely P pxq tx for t P R.
Now assume that n 2m. The polynomial xP px ` 1q px ` 1qP pxq pn 1qan xn `
has degree n, and therefore it has at least one (possibly complex) root r. If r R t0, 1u, define
k P prq{r P pr ` 1q{pr ` 1q. If r 0, let k P p1q. If r 1, let k P p1q. We now
consider the polynomial Spxq P pxq kx. It also satisfies (1) because P pxq and kx satisfy it.
Additionally, it has the useful property that r and r ` 1 are roots.
Let Apxq x3 mx2 ` 1 and Bpxq x3 ` mx2 ` 1. Plugging in x s into (1) implies that:
If s 1 and s are roots of S and s is not a root of A, then s ` 1 is a root of S.

If s and s ` 1 are roots of S and s is not a root of B, then s 1 is a root of S.


Let a 0 and b 1 be such that r a, r a ` 1, . . . , r, r ` 1, . . . , r ` b 1, r ` b are roots of S,
while r a 1 and r ` b ` 1 are not. The two statements above imply that r a is a root of B
and r ` b is a root of A.
Since r a is a root of Bpxq and of Apx ` a ` bq, it is also a root of their greatest common
divisor Cpxq as integer polynomials. If Cpxq was a non-trivial divisor of Bpxq, then B would have
a rational root . Since the first and last coefficients of B are 1, can only be 1 or 1; but
Bp1q m 0 and Bp1q m ` 2 0 since n 2m.
Therefore Bpxq Apx ` a ` bq. Writing c a ` b 1 we compute
0 Apx ` cq Bpxq p3c 2mqx2 ` cp3c 2mqx ` c2 pc mq.
Then we must have 3c 2m c m 0, which gives m 0, a contradiction. We conclude that
f pxq tx is the only solution.
Solution 2. Multiplying (1) by x, we rewrite it as
xpx3 mx2 ` 1qP px ` 1q ` xpx3 ` mx2 ` 1qP px 1q rpx ` 1q ` px 1qs px3 mx ` 1qP pxq.
After regrouping, it becomes
px3 mx2 ` 1qQpxq px3 ` mx2 ` 1qQpx 1q,

(2)

where Qpxq xP px ` 1q px ` 1qP pxq. If deg P 2 then deg Q deg P , so Qpxq has a finite
multiset of complex roots, which we denote RQ . Each root is taken with its multiplicity. Then the
multiset of complex roots of Qpx 1q is RQ ` 1 tz ` 1 : z P RQ u.

20

IMO 2013 Colombia

Let tx1 , x2 , x3 u and ty1 , y2 , y3 u be the multisets of roots of the polynomials Apxq x3 mx2 ` 1
and Bpxq x3 ` mx2 ` 1, respectively. From (2) we get the equality of multisets
tx1 , x2 , x3 u Y RQ ty1 , y2 , y3u Y pRQ ` 1q.
For every r P RQ , since r ` 1 is in the set of the right hand side, we must have r ` 1 P RQ or
r ` 1 xi for some i. Similarly, since r is in the set of the left hand side, either r 1 P RQ or
r yi for some i. This implies that, possibly after relabelling y1 , y2 , y3 , all the roots of (2) may
be partitioned into three chains of the form tyi , yi ` 1, . . . , yi ` ki xi u for i 1, 2, 3 and some
integers k1 , k2, k3 0.
Now we analyze the roots of the polynomial Aa pxq x3 ` ax2 ` 1. Using calculus or elementary
methods, we find that the local extrema of Aa pxq occur at x 0 and x 2a{3; their values are
Aa p0q 1 0 and Aa p2a{3q 1 ` 4a3 {27, which is positive for integers a 1 and negative for
integers a 2. So when a P Z, Aa has three real roots if a 2 and one if a 1.
Now, since yi xi P Z for i 1, 2, 3, the cubics Am and Am must have the same number of
real roots. The previous analysis then implies that m 1 or m 1. Therefore the real root of
3
2
A1 pxq x3 ` x2 ` 1 and the
` real
root1 of A1 pxq x x ` 1 must differ by an integer. But this
3
is impossible,
A1 2 8 and A1 p1q 1 so 1.5 1, while A1 p1q 1
` 1 because
5
and A1 2 8 , so 1 0.5.
It follows that deg P 1. Then, as shown in Solution 1, we conclude that the solutions are
P pxq tx for all real numbers t.

Shortlisted problems solutions

21

Combinatorics
C1. Let n be a positive integer. Find the smallest integer k with the following property: Given
any real numbers a1 , . . . , ad such that a1 ` a2 ` ` ad n and 0 ai 1 for i 1, 2, . . . , d, it
is possible to partition these numbers into k groups (some of which may be empty) such that the
sum of the numbers in each group is at most 1.
(Poland)
Answer. k 2n 1.

Solution 1. If d 2n 1 and a1 a2n1 n{p2n 1q, then each group in such a partition
can contain at most one number, since 2n{p2n 1q 1. Therefore k 2n 1. It remains to show
that a suitable partition into 2n 1 groups always exists.
We proceed by induction on d. For d 2n 1 the result is trivial. If d 2n, then since
pa1 ` a2 q ` . . . ` pa2n1 ` a2n q n
we may find two numbers ai , ai`1 such that ai ` ai`1 1. We merge these two numbers into
one new number ai ` ai`1 . By the induction hypothesis, a suitable partition exists for the d 1
numbers a1 , . . . , ai1 , ai ` ai`1 , ai`2 , . . . , ad . This induces a suitable partition for a1 , . . . , ad .
Solution 2. We will show that it is even possible to split the sequence a1 , . . . , ad into 2n 1
contiguous groups so that the sum of the numbers in each groups does not exceed 1. Consider a
segment S of length n, and partition it into segments S1 , . . . , Sd of lengths a1 , . . . , ad , respectively,
as shown below. Consider a second partition of S into n equal parts by n 1 empty dots.
a1

a2

a3

a4 a5

a6

a7

a8 a9

a10

Assume that the n 1 empty dots are in segments Si1 , . . . , Sin1 . (If a dot is on the boundary
of two segments, we choose the right segment). These n 1 segments are distinct because they
have length at most 1. Consider the partition:
ta1 , . . . , ai1 1 u, tai1 u, tai1 `1 , . . . , ai2 1 u, tai2 u, . . . tain1 u, tain1 `1 , . . . , ad u.
In the example above, this partition is ta1 , a2 u, ta3 u, ta4 , a5 u, ta6 u, H, ta7 u, ta8 , a9 , a10 u. We claim
that in this partition, the sum of the numbers in this group is at most 1.
For the sets tait u this is obvious since ait 1. For the sets tait ` 1, . . . , ait`1 1 u this follows
from the fact that the corresponding segments lie between two neighboring empty dots, or between
an endpoint of S and its nearest empty dot. Therefore the sum of their lengths cannot exceed 1.
Solution 3. First put all numbers greater than 21 in their own groups. Then, form the remaining
groups as follows: For each group, add new ai s one at a time until their sum exceeds 12 . Since the
last summand is at most 12 , this group has sum at most 1. Continue this procedure until we have
used all the ai s. Notice that the last group may have sum less than 21 . If the sum of the numbers
in the last two groups is less than or equal to 1, we merge them into one group. In the end we are
left with m groups. If m 1 we are done. Otherwise the first m 2 have sums greater than 12 and
the last two have total sum greater than 1. Therefore n pm 2q{2 ` 1 so m 2n 1 as desired.

22

IMO 2013 Colombia

Comment 1. The original proposal asked for the minimal value of k when n 2.
Comment 2. More generally, one may ask the same question for real numbers between 0 and 1 whose
sum is a real number r. In this case the smallest value of k is k r2rs 1, as Solution 3 shows.
Solutions 1 and 2 lead to the slightly weaker bound k 2rrs 1. This is actually the optimal bound
for partitions into consecutive groups, which are the ones contemplated in these two solutions. To see
this, assume that r is not an integer and let c pr ` 1 rrsq{p1 ` rrsq. One easily checks that 0 c 21
and rrsp2cq ` prrs 1qp1 cq r, so the sequence
2c, 1 c, 2c, 1 c, . . . , 1 c, 2c
of 2rrs 1 numbers satisfies the given conditions. For this sequence, the only suitable partition into
consecutive groups is the trivial partition, which requires 2rrs 1 groups.

Shortlisted problems solutions

23

C2.

In the plane, 2013 red points and 2014 blue points are marked so that no three of the
marked points are collinear. One needs to draw k lines not passing through the marked points and
dividing the plane into several regions. The goal is to do it in such a way that no region contains
points of both colors.
Find the minimal value of k such that the goal is attainable for every possible configuration of
4027 points.
(Australia)
Answer. k 2013.

Solution 1. Firstly, let us present an example showing that k 2013. Mark 2013 red and 2013
blue points on some circle alternately, and mark one more blue point somewhere in the plane. The
circle is thus split into 4026 arcs, each arc having endpoints of different colors. Thus, if the goal is
reached, then each arc should intersect some of the drawn lines. Since any line contains at most
two points of the circle, one needs at least 4026{2 2013 lines.
It remains to prove that one can reach the goal using 2013 lines. First of all, let us mention
that for every two points A and B having the same color, one can draw two lines separating these
points from all other ones. Namely, it suffices to take two lines parallel to AB and lying on different
sides of AB sufficiently close to it: the only two points between these lines will be A and B.
Now, let P be the convex hull of all marked points. Two cases are possible.
Case 1. Assume that P has a red vertex A. Then one may draw a line separating A from all the
other points, pair up the other 2012 red points into 1006 pairs, and separate each pair from the
other points by two lines. Thus, 2013 lines will be used.
Case 2. Assume now that all the vertices of P are blue. Consider any two consecutive vertices
of P , say A and B. One may separate these two points from the others by a line parallel to AB.
Then, as in the previous case, one pairs up all the other 2012 blue points into 1006 pairs, and
separates each pair from the other points by two lines. Again, 2013 lines will be used.
Comment 1. Instead of considering the convex hull, one may simply take a line containing two marked
points A and B such that all the other marked points are on one side of this line. If one of A and B is
red, then one may act as in Case 1; otherwise both are blue, and one may act as in Case 2.

Solution 2. Let us present a different proof of the fact that k 2013 suffices. In fact, we will
prove a more general statement:
If n points in the plane, no three of which are collinear, are colored in red and blue arbitrarily,
then it suffices to draw tn{2u lines to reach the goal.
We proceed by induction on n. If n 2 then the statement is obvious. Now assume that n 3,
and consider a line containing two marked points A and B such that all the other marked points
are on one side of ; for instance, any line containing a side of the convex hull works.
Remove for a moment the points A and B. By the induction hypothesis, for the remaining
configuration it suffices to draw tn{2u 1 lines to reach the goal. Now return the points A and B
back. Three cases are possible.
Case 1. If A and B have the same color, then one may draw a line parallel to and separating A
and B from the other points. Obviously, the obtained configuration of tn{2u lines works.
Case 2. If A and B have different colors, but they are separated by some drawn line, then again
the same line parallel to works.

24

IMO 2013 Colombia

Case 3. Finally, assume that A and B have different colors and lie in one of the regions defined by
the drawn lines. By the induction assumption, this region contains no other points of one of the
colors without loss of generality, the only blue point it contains is A. Then it suffices to draw
a line separating A from all other points.
Thus the step of the induction is proved.
Comment 2. One may ask a more general question, replacing the numbers 2013 and 2014 by any
positive integers m and n, say with m n. Denote the answer for this problem by f pm, nq.
One may show along the lines of Solution 1 that m f pm, nq m ` 1; moreover, if m is even then
f pm, nq m. On the other hand, for every odd m there exists an N such that f pm, nq m for all
m n N , and f pm, nq m ` 1 for all n N .

Shortlisted problems solutions

25

C3. A crazy physicist discovered a new kind of particle which he called an imon, after some of
them mysteriously appeared in his lab. Some pairs of imons in the lab can be entangled, and each
imon can participate in many entanglement relations. The physicist has found a way to perform
the following two kinds of operations with these particles, one operation at a time.
piq If some imon is entangled with an odd number of other imons in the lab, then the physicist
can destroy it.
piiq At any moment, he may double the whole family of imons in his lab by creating a copy I 1
of each imon I. During this procedure, the two copies I 1 and J 1 become entangled if and only if
the original imons I and J are entangled, and each copy I 1 becomes entangled with its original
imon I; no other entanglements occur or disappear at this moment.
Prove that the physicist may apply a sequence of such operations resulting in a family of imons,
no two of which are entangled.
(Japan)
Solution 1. Let us consider a graph with the imons as vertices, and two imons being connected
if and only if they are entangled. Recall that a proper coloring of a graph G is a coloring of its
vertices in several colors so that every two connected vertices have different colors.
Lemma. Assume that a graph G admits a proper coloring in n colors (n 1). Then one may
perform a sequence of operations resulting in a graph which admits a proper coloring in n 1
colors.
Proof. Let us apply repeatedly operation piq to any appropriate vertices while it is possible. Since
the number of vertices decreases, this process finally results in a graph where all the degrees are
even. Surely this graph also admits a proper coloring in n colors 1, . . . , n; let us fix this coloring.
Now apply the operation piiq to this graph. A proper coloring of the resulting graph in n
colors still exists: one may preserve the colors of the original vertices and color the vertex I 1 in
a color k ` 1 pmod nq if the vertex I has color k. Then two connected original vertices still have
different colors, and so do their two connected copies. On the other hand, the vertices I and I 1
have different colors since n 1.
All the degrees of the vertices in the resulting graph are odd, so one may apply operation piq
to delete consecutively all the vertices of color n one by one; no two of them are connected by
an edge, so their degrees do not change during the process. Thus, we obtain a graph admitting a
proper coloring in n 1 colors, as required. The lemma is proved.
l
Now, assume that a graph G has n vertices; then it admits a proper coloring in n colors.
Applying repeatedly the lemma we finally obtain a graph admitting a proper coloring in one color,
that is a graph with no edges, as required.
Solution 2. Again, we will use the graph language.
I. We start with the following observation.
Lemma. Assume that a graph G contains an isolated vertex A, and a graph G is obtained from G
by deleting this vertex. Then, if one can apply a sequence of operations which makes a graph with
no edges from G , then such a sequence also exists for G.
Proof. Consider any operation applicable to G resulting in a graph G1 ; then there exists a sequence
of operations applicable to G and resulting in a graph G1 differing from G1 by an addition of an
isolated vertex A. Indeed, if this operation is of type piq, then one may simply repeat it in G.

26

IMO 2013 Colombia

Otherwise, the operation is of type piiq, and one may apply it to G and then delete the vertex A1
(it will have degree 1).
Thus one may change the process for G into a corresponding process for G step by step. l
In view of this lemma, if at some moment a graph contains some isolated vertex, then we may
simply delete it; let us call this operation piiiq.
II. Let V tA01 , . . . , A0n u be the vertices of the initial graph. Let us describe which graphs can
appear during our operations. Assume that operation piiq was applied m times. If these were
the only operations applied, then the resulting graph Gm
n has the set of vertices which can be
enumerated as
Vnm tAji : 1 i n, 0 j 2m 1u,

where A0i is the common ancestor of all the vertices Aji , and the binary expansion of j (adjoined
with some zeroes at the left to have m digits) keeps the history of this vertex: the dth digit from
the right is 0 if at the dth doubling the ancestor of Aji was in the original part, and this digit is 1
if it was in the copy.
Next, the two vertices Aji and Ak in Gm
n are connected with an edge exactly if either (1) j
and there was an edge between A0i and A0k (so these vertices appeared at the same application of
operation piiq); or (2) i k and the binary expansions of j and differ in exactly one digit (so
their ancestors became connected as a copy and the original vertex at some application of piiq).
Now, if some operations piq were applied during the process, then simply some vertices in Gm
n
disappeared. So, in any case the resulting graph is some induced subgraph of Gm
n.
III. Finally, we will show that from each (not necessarily induced) subgraph of Gm
n one can obtain
a graph with no vertices by applying operations piq, piiq and piiiq. We proceed by induction on n;
the base case n 0 is trivial.
For the induction step, let us show how to apply several operations so as to obtain a graph
containing no vertices of the form Ajn for j P Z. We will do this in three steps.
Step 1. We apply repeatedly operation piq to any appropriate vertices while it is possible. In the
resulting graph, all vertices have even degrees.
Step 2. Apply operation piiq obtaining a subgraph of Gm`1
with all degrees being odd. In this
n
j
graph, we delete one by one all the vertices An where the sum of the binary digits of j is even; it
is possible since there are no edges between such vertices, so all their degrees remain odd. After
that, we delete all isolated vertices.
Step 3. Finally, consider any remaining vertex Ajn (then the sum of digits of j is odd). If its
degree is odd, then we simply delete it. Otherwise, since Ajn is not isolated, we consider any vertex
adjacent to it. It has the form Ajk for some k n (otherwise it would have the form An , where
has an even digit sum; but any such vertex has already been deleted at Step 2). No neighbor of Ajk
was deleted at Steps 2 and 3, so it has an odd degree. Then we successively delete Ajk and Ajn .
Notice that this deletion does not affect the applicability of this step to other vertices, since
no two vertices Aji and Ak for different j, with odd digit sum are connected with an edge. Thus
we will delete all the remaining vertices of the form Ajn , obtaining a subgraph of Gm`1
n1 . The
application of the induction hypothesis finishes the proof.
Comment. In fact, the graph Gm
n is a Cartesian product of G and the graph of an m-dimensional
hypercube.

Shortlisted problems solutions

27

C4. Let n be a positive integer, and let A be a subset of t1, . . . , nu. An A-partition of n into k

parts is a representation of n as a sum n a1 ` ` ak , where the parts a1 , . . . , ak belong to A


and are not necessarily distinct. The number of different parts in such a partition is the number
of (distinct) elements in the set ta1 , a2 , . . . , ak u.
We say that an A-partition of n into k parts is optimal if there is no A-partition
of n into r
?
parts with r k. Prove that any optimal A-partition of n contains at most 3 6n different parts.
(Germany)

Solution 1. If there are no A-partitions of n, the result is vacuously true. Otherwise, let kmin
be the minimum number of parts in an A-partition of n, and let n a1 ` ` akmin be an
optimal partition. Denote by s the number of different parts in this partition, so we can write
S ta1 , . . ?
. , akmin u tb1 , . . . , bs u for some pairwise different numbers b1 bs in A.
3
If s 6n, we will prove that there exist subsets X and Y of S such that |X| |Y | and
xPX x
yPY y. Then, deleting the elements of Y from our partition and adding the elements of
X to it, we obtain an A-partition of n into less than kmin parts, which is the desired contradiction.
For each positive integer k s, we consider the k-element subset
k
S1,0
: tb1 , . . . , bk u

k
as well as the following k-element subsets Si,j
of S:

(
k
Si,j
: b1 , . . . , bki , bki`j`1 , bsi`2 , . . . , bs ,

i 1, . . . , k,

j 1, . . . , s k.

Pictorially, if we represent the elements of S by a sequence of dots in increasing order, and represent
a subset of S by shading in the appropriate dots, we have:
k

looooooomooooooon
looooomooooon
Si,j
looooomooooon
looomooon
j

ki

skj

i1

k
Denote by ki,j the sum of elements in Si,j
. Clearly, k1,0 is the minimum sum of a k-element
subset of S. Next, for all appropriate indices i and j we have

ki,j ki,j`1 ` bki`j`1 bki`j`2 ki,j`1

and ki,sk ki`1,1 ` bki bki`1 ki`1,1 .

Therefore
1 k1,0 k1,1 k1,2 k1,sk k2,1 k2,sk k3,1 kk,sk n.
To see this in the picture, we start with the k leftmost points marked. At each step, we look for
the rightmost point which can move to the right, and move it one unit to the right. We continue
until the k rightmost points are marked. As we do this, the corresponding sums clearly increase.
For each k we have found kps kq ` 1 different integers of the form ki,j between 1 and n. As
we vary k, the total number of integers we are considering is
s

sps ` 1q sps ` 1qp2s ` 1q


sps2 ` 5q
s3
kps kq ` 1 s

`s

n.
2
6
6
6
k1

Since they are between 1 and n, at least two of these integers are equal. Consequently, there exist
1
k
1 k k 1 s and X Si,j
as well as Y Sik1 ,j 1 such that

x
y, but |X| k k 1 |Y |,
xPX

as required. The result follows.

yPY

28

IMO 2013 Colombia

Solution 2. Assume, to the contrary, that the statement is false, and choose the minimum
number n for which it fails. So there exists a set A t1, . . . , nu together with an optimal Apartition n a1 ` ` akmin of n refuting our statement, where, of course, kmin is the minimum
number of parts in an A-partition of n. Again, ?
we define S ta1 , . . . , akmin u tb1 , . . . , bs u with
b1 bs ; by our assumption we have s 3 6n 1. Without loss of generality we assume
that akmin bs . Let us distinguish two cases.

Case 1. bs sps1q
` 1.
2
Consider the partition n bs a1 ` ` akmin 1 , which is clearly a minimum A-partition
3
of n bs with at least s 1 1 different parts. Now, from n s6 we obtain
n bs n

so s 1

a
3

sps 1q
s3 sps 1q
ps 1q3
1

1
,
2
6
2
6

6pn bs q, which contradicts the choice of n.

Case 2. bs sps1q
.
2
Set b0 0, 0,0 0, and i,j b1 ` `bi1 `bj for 1 i j s. There are sps1q
`1 bs such
2
sums; so at least two of them, say i,j and i1 ,j 1 , are congruent modulo bs (where pi, jq pi1 , j 1 q).
This means that i,j i1 ,j 1 rbs for some integer r. Notice that for i j k s we have
0 i,k i,j bk bj bs ,
so the indices i and i1 are distinct, and we may assume that i i1 . Next, we observe that
i,j i1 ,j 1 pbi1 bj 1 q ` bj ` bi1 `1 ` ` bi1 and bi1 bj 1 imply
bs bj 1 i,j i1 ,j 1 pi i1 qbs ,
so 0 r i i1 1.
Thus, we may remove the i terms of i,j in our A-partition, and replace them by the i1 terms
of i1 ,j 1 and r terms equal to bs , for a total of r ` i1 i terms. The result is an A-partition of n
into a smaller number of parts, a contradiction.
Comment. The original proposal also contained a second part, showing that the estimate appearing in
the problem has the correct order of magnitude:
?
For every positive integer n, there exist a set A and an optimal A-partition of n that contains t 3 2nu
different parts.
The Problem Selection Committee removed this statement from the problem, since it seems to be less
suitable for the
? competiton; but for completeness we provide an outline of its proof here.
Let k t 3 2nu 1. The statement is trivial for n 4, so we assume n 4 and hence k 1. Let
n
h t n1
k u. Notice that h k 1.
Now let A t1, . . . , hu, and set a1 h, a2 h 1, . . . , ak h k ` 1, and ak`1 n pa1 ` ` ak q.
It is not difficult to prove that ak ak`1 1, which shows that
n a1 ` . . . ` ak`1
is an A-partition of n into k ` 1 different parts. Since
? kh n, any A-partition of n has at least k ` 1 parts.
Therefore our A-partition is optimal, and it has t 3 2nu distinct parts, as desired.

Shortlisted problems solutions

29

C5.

Let r be a positive integer, and let a0 , a1 , . . . be an infinite sequence of real numbers.


Assume that for all nonnegative integers m and s there exists a positive integer n P rm ` 1, m ` rs
such that
am ` am`1 ` ` am`s an ` an`1 ` ` an`s .
Prove that the sequence is periodic, i. e. there exists some p 1 such that an`p an for all n 0.
(India)

Solution. For every indices m n we will denote Spm, nq am ` am`1 ` ` an1 ; thus
Spn, nq 0. Let us start with the following lemma.
Lemma. Let b0 , b1 , . . . be an infinite sequence. Assume that for every nonnegative integer m there
exists a nonnegative integer n P rm ` 1, m ` rs such that bm bn . Then for every indices k
there exists an index t P r, ` r 1s such that bt bk . Moreover, there are at most r distinct
numbers among the terms of pbi q.
Proof. To prove the first claim, let us notice that there exists an infinite sequence of indices
k1 k, k2 , k3 , . . . such that bk1 bk2 bk and ki ki`1 ki ` r for all i 1. This sequence
is unbounded from above, thus it hits each segment of the form r, `r 1s with k, as required.
To prove the second claim, assume, to the contrary, that there exist r ` 1 distinct numbers
bi1 , . . . , bir`1 . Let us apply the first claim to k i1 , . . . , ir`1 and maxti1 , . . . , ir`1 u; we obtain
that for every j P t1, . . . , r ` 1u there exists tj P rs, s ` r 1s such that btj bij . Thus the segment
rs, s ` r 1s should contain r ` 1 distinct integers, which is absurd.
l
Setting s 0 in the problem condition, we see that the sequence pai q satisfies the condition of the lemma, thus it attains at most r distinct values. Denote by Ai the ordered r-tuple
pai , . . . , ai`r1q; then among Ai s there are at most r r distinct tuples, so for every k 0 two of the
tuples Ak , Ak`1 , . . . , Ak`rr are identical. This means that there exists a positive integer p r r such
that the equality Ad Ad`p holds infinitely many times. Let D be the set of indices d satisfying
this relation.
Now we claim that D coincides with the set of all nonnegative integers. Since D is unbounded,
it suffices to show that d P D whenever d ` 1 P D. For that, denote bk Spk, p ` kq. The
sequence b0 , b1 , . . . satisfies the lemma conditions, so there exists an index t P rd ` 1, d ` rs such
that Spt, t ` pq Spd, d ` pq. This last relation rewrites as Spd, tq Spd ` p, t ` pq. Since
Ad`1 Ad`p`1 , we have Spd ` 1, tq Spd ` p ` 1, t ` pq, therefore we obtain
ad Spd, tq Spd ` 1, tq Spd ` p, t ` pq Spd ` p ` 1, t ` pq ad`p
and thus Ad Ad`p , as required.
Finally, we get Ad Ad`p for all d, so in particular ad ad`p for all d, QED.
Comment 1. In the present proof, the upper bound for the minimal period length is r r . This bound is
not sharp; for instance, one may improve it to pr 1qr for r 3..
On the other hand, this minimal length may happen to be greater than r. For instance, it is easy to
check that the sequence with period p3, 3, 3, 3, 3, 1, 1, 1q satisfies the problem condition for r 7.
Comment 2. The conclusion remains true even if the problem condition only holds for every s N for
some positive integer N . To show that, one can act as follows. Firstly, the sums of the form Spi, i ` N q
attain at most r values, as well as the sums of the form Spi, i`N `1q. Thus the terms ai Spi, i ` N ` 1q
Spi ` 1, i ` N ` 1q attain at most r 2 distinct values. Then, among the tuples Ak , Ak`N , . . . , Ak`r2r N two

30

IMO 2013 Colombia

are identical, so for some p r 2r the set D td : Ad Ad`N p u is infinite. The further arguments apply
almost literally, with p being replaced by N p.
After having proved that such a sequence is also necessarily periodic, one may reduce the bound for
the minimal period length to r r essentially by verifying that the sequence satisfies the original version
of the condition.

Shortlisted problems solutions

31

C6. In some country several pairs of cities are connected by direct two-way flights. It is possible
to go from any city to any other by a sequence of flights. The distance between two cities is defined
to be the least possible number of flights required to go from one of them to the other. It is known
that for any city there are at most 100 cities at distance exactly three from it. Prove that there is
no city such that more than 2550 other cities have distance exactly four from it.
(Russia)
Solution. Let us denote by dpa, bq the distance between the cities a and b, and by
Si paq tc : dpa, cq iu
the set of cities at distance exactly i from city a.
Assume that for some city x the set D S4 pxq has size at least 2551. Let A S1 pxq. A
subset A1 of A is said to be substantial, if every city in D can be reached from x with four flights
while passing through some
member of A1 ; in other terms, every city in D has distance 3 from
1
some member of A , or D aPA1 S3 paq. For instance, A itself is substantial. Now let us fix some
substantial subset A of A having the minimal cardinality m |A |.
Since
mp101 mq 50 51 2550,
there has to be a city a P A such that |S3 paq X D| 102 m. As |S3 paq| 100, we obtain
that S3 paq may contain at most 100 p102 mq m 2 cities c with dpc, xq 3. Let us
denote by T tc P S3 paq : dpx, cq 3u the set of all such cities, so |T | m 2. Now, to get a
contradiction, we will construct m 1 distinct elements in T , corresponding to m 1 elements of
the set Aa A ztau.

Firstly, due to the minimality of A , for each y P Aa there exists some city dy P D which can
only be reached with four flights from x by passing through y. So, there is a way to get from x to
dy along xyby cy dy for some cities by and cy ; notice that dpx, by q 2 and dpx, cy q 3 since this
path has the minimal possible length.
Now we claim that all 2pm 1q cities of the form by , cy with y P Aa are distinct. Indeed,
no by may coincide with any cz since their distances from x are different. On the other hand, if
one had by bz for y z, then there would exist a path of length 4 from x to dz via y, namely
xybz cz dz ; this is impossible by the choice of dz . Similarly, cy cz for y z.

So, it suffices to prove that for every y P Aa , one of the cities by and cy has distance 3
from a (and thus belongs to T ). For that, notice that dpa, yq 2 due to the path axy, while
dpa, dy q dpx, dy q dpx, aq 3. Moreover, dpa, dy q 3 by the choice of dy ; thus dpa, dy q 3.
Finally, in the sequence dpa, yq, dpa, by q, dpa, cy q, dpa, dy q the neighboring terms differ by at most 1,
the first term is less than 3, and the last one is greater than 3; thus there exists one which is equal
to 3, as required.

Comment 1. The upper bound 2550 is sharp. This can be seen by means of various examples; one of
them is the Roman Empire: it has one capital, called Rome, that is connected to 51 semicapitals by
internally disjoint paths of length 3. Moreover, each of these semicapitals is connected to 50 rural cities
by direct flights.
Comment 2. Observe that, under the conditions of the problem, there exists no bound for the size
of S1 pxq or S2 pxq.

32

IMO 2013 Colombia

Comment
] numbers 100 and 2550 appearing in the statement of the problem may be replaced
Y 3. 2The
pn`1q
for any positive integer n. Still more generally, one can also replace the pair p3, 4q of
by n and
4

distances under consideration by any pair pr, sq of positive integers satisfying r s 32 r.


To adapt the above proof to this situation, one takes A Ssr pxq and defines the concept of substantiality as before. Then one takes A to be a minimal substantial subset of A, and for each y P A one
fixes an element dy P Ss pxq which is only reachable from x by a path of length s by passing through y.
As before, it suffices to show that for distinct a, y P A and a path y y0 y1 . . . yr dy , at least
one of the cities y0 , . . . , yr1 has distance r from a. This can be done as above; the relation s 32 r is
used here to show that dpa, Yy0 q r.]
2
Moreover, the estimate pn`1q
is also sharp for every positive integer n and every positive integers
4
r, s with r s 23 r. This may be shown by an example similar to that in the previous comment.

Shortlisted problems solutions

33

C7. Let n 2 be an integer. Consider all circular arrangements of the numbers 0, 1, . . . , n; the

n ` 1 rotations of an arrangement are considered to be equal. A circular arrangement is called


beautiful if, for any four distinct numbers 0 a, b, c, d n with a ` c b ` d, the chord joining
numbers a and c does not intersect the chord joining numbers b and d.
Let M be the number of beautiful arrangements of 0, 1, . . . , n. Let N be the number of pairs
px, yq of positive integers such that x ` y n and gcdpx, yq 1. Prove that
M N ` 1.
(Russia)
Solution 1. Given a circular arrangement of r0, ns t0, 1, . . . , nu, we define a k-chord to be
a (possibly degenerate) chord whose (possibly equal) endpoints add up to k. We say that three
chords of a circle are aligned if one of them separates the other two. Say that m 3 chords
are aligned if any three of them are aligned. For instance, in Figure 1, A, B, and C are aligned,
while B, C, and D are not.
A

B
C
D

Figure 1

u
0

v
n

C
t

Figure 2

nt

Claim. In a beautiful arrangement, the kchords are aligned for any integer k.
Proof. We proceed by induction. For n 3 the statement is trivial. Now let n 4, and proceed
by contradiction. Consider a beautiful arrangement S where the three kchords A, B, C are not
aligned. If n is not among the endpoints of A, B, and C, then by deleting n from S we obtain
a beautiful arrangement Sztnu of r0, n 1s, where A, B, and C are aligned by the induction
hypothesis. Similarly, if 0 is not among these endpoints, then deleting 0 and decreasing all the
numbers by 1 gives a beautiful arrangement Szt0u where A, B, and C are aligned. Therefore
both 0 and n are among the endpoints of these segments. If x and y are their respective partners,
we have n 0 ` x k n ` y n. Thus 0 and n are the endpoints of one of the chords; say it
is C.
Let D be the chord formed by the numbers u and v which are adjacent to 0 and n and on the
same side of C as A and B, as shown in Figure 2. Set t u ` v. If we had t n, the nchords A,
B, and D would not be aligned in the beautiful arrangement Szt0, nu, contradicting the induction
hypothesis. If t n, then the t-chord from 0 to t cannot intersect D, so the chord C separates t
and D. The chord E from t to n t does not intersect C, so t and n t are on the same side of C.
But then the chords A, B, and E are not aligned in Szt0, nu, a contradiction. Finally, the case
t n is equivalent to the case t n via the beauty-preserving relabelling x n x for 0 x n,
which sends t-chords to p2n tqchords. This proves the Claim.

Having established the Claim, we prove the desired result by induction. The case n 2 is
trivial. Now assume that n 3. Let S be a beautiful arrangement of r0, ns and delete n to obtain

34

IMO 2013 Colombia

the beautiful arrangement T of r0, n 1s. The nchords of T are aligned, and they contain every
point except 0. Say T is of Type 1 if 0 lies between two of these nchords, and it is of Type 2
otherwise; i.e., if 0 is aligned with these nchords. We will show that each Type 1 arrangement
of r0, n 1s arises from a unique arrangement of r0, ns, and each Type 2 arrangement of r0, n 1s
arises from exactly two beautiful arrangements of r0, ns.
If T is of Type 1, let 0 lie between chords A and B. Since the chord from 0 to n must be
aligned with A and B in S, n must be on the other arc between A and B. Therefore S can be
recovered uniquely from T . In the other direction, if T is of Type 1 and we insert n as above,
then we claim the resulting arrangement S is beautiful. For 0 k n, the kchords of S are also
kchords of T , so they are aligned. Finally, for n k 2n, notice that the nchords of S are
parallel by construction, so there is an antisymmetry axis such that x is symmetric to n x with
respect to for all x. If we had two kchords which intersect, then their reflections across would
be two p2n kq-chords which intersect, where 0 2n k n, a contradiction.
If T is of Type 2, there are two possible positions for n in S, on either side of 0. As above, we
check that both positions lead to beautiful arrangements of r0, ns.

Hence if we let Mn be the number of beautiful arrangements of r0, ns, and let Ln be the number
of beautiful arrangements of r0, n 1s of Type 2, we have
Mn pMn1 Ln1 q ` 2Ln1 Mn1 ` Ln1 .

It then remains to show that Ln1 is the number of pairs px, yq of positive integers with x ` y n
and gcdpx, yq 1. Since n 3, this number equals pnq #tx : 1 x n, gcdpx, nq 1u.
To prove this, consider a Type 2 beautiful arrangement of r0, n 1s. Label the positions
0, . . . , n 1 pmod nq clockwise around the circle, so that number 0 is in position 0. Let f piq be
the number in position i; note that f is a permutation of r0, n 1s. Let a be the position such
that f paq n 1.
Since the nchords are aligned with 0, and every point is in an nchord, these chords are all
parallel and
f piq ` f piq n
for all i.
Similarly, since the pn 1qchords are aligned and every point is in an pn 1qchord, these chords
are also parallel and
f piq ` f pa iq n 1
for all i.
Therefore f pa iq f piq 1 for all i; and since f p0q 0, we get
f pakq k

for all k.

(1)

Recall that this is an equality modulo n. Since f is a permutation, we must have pa, nq 1. Hence
Ln1 pnq.
To prove equality, it remains to observe that the labeling (1) is beautiful. To see this, consider
four numbers w, x, y, z on the circle with w ` y x ` z. Their positions around the circle satisfy
pawq ` payq paxq ` pazq, which means that the chord from w to y and the chord from
x to z are parallel. Thus (1) is beautiful, and by construction it has Type 2. The desired result
follows.

Shortlisted problems solutions

35

Solution 2. Notice that there are exactly N irreducible fractions f1 fN in p0, 1q whose
denominator is at most n, since the pair px, yq with x ` y n and px, yq 1 corresponds to the
fraction x{px ` yq. Write fi abii for 1 i N.
We begin by constructing N ` 1 beautiful arrangements. Take any P p0, 1q which is not one
of the above N fractions. Consider a circle of perimeter 1. Successively mark points 0, 1, 2, . . . , n
where 0 is arbitrary, and the clockwise distance from i to i`1 is . The point k will be at clockwise
distance tku from 0, where tru denotes the fractional part of r. Call such a circular arrangement
cyclic and denote it by Apq. If the clockwise order of the points is the same in Ap1 q and Ap2 q,
we regard them as the same circular arrangement. Figure 3 shows the cyclic arrangement Ap3{5`q
of r0, 13s where 0 is very small.
2

12

10
4
5
9
0

13

11

Figure 3
If 0 a, b, c, d n satisfy a ` c b ` d, then a ` c b ` d, so the chord from a to c is
parallel to the chord from b to d in Apq. Hence in a cyclic arrangement all kchords are parallel.
In particular every cyclic arrangement is beautiful.
Next we show that there are exactly N ` 1 distinct cyclic arrangements. To see this, let us
see how Apq changes as we increase from 0 to 1. The order of points p and q changes precisely
when we cross a value f such that tpf u tqf u; this can only happen if f is one of the N
fractions f1 , . . . , fN . Therefore there are at most N ` 1 different cyclic arrangements.
To show they are all distinct, recall that fi ai {bi and let 0 be a very small number. In
bi q
the arrangement Apfi ` q, point k lands at kai pmod
` k. Therefore the points are grouped
bi
bi 1
1
into bi clusters next to the points 0, bi , . . . , bi of the circle. The cluster following bki contains the
numbers congruent to ka1
modulo bi , listed clockwise in increasing order. It follows that the first
i
number after 0 in Apfi ` q is bi , and the first number after 0 which is less than bi is a1
pmod bi q,
i
which uniquely determines ai . In this way we can recover fi from the cyclic arrangement. Note
also that Apfi ` q is not the trivial arrangement where we list 0, 1, . . . , n in order clockwise. It
follows that the N ` 1 cyclic arrangements Apq, Apf1 ` q, . . . , ApfN ` q are distinct.
Let us record an observation which will be useful later:
if fi fi`1 then 0 is immediately after bi`1 and before bi in Apq.

(2)

Indeed, we already observed that bi is the first number after 0 in Apfi ` q Apq. Similarly we
see that bi`1 is the last number before 0 in Apfi`1 q Apq.

36

IMO 2013 Colombia

Finally, we show that any beautiful arrangement of r0, ns is cyclic by induction on n. For n 2
the result is clear. Now assume that all beautiful arrangements of r0, n 1s are cyclic, and consider
a beautiful arrangement A of r0, ns. The subarrangement An1 Aztnu of r0, n 1s obtained by
deleting n is cyclic; say An1 An1 pq.
Let be between the consecutive fractions pq11 pq22 among the irreducible fractions of dei
i`1
for
nominator at most n 1. There is at most one fraction ni in p pq11 , pq22 q, since ni n1
n
0 i n 1.
Case 1. There is no fraction with denominator n between

p1
q1

and

p2
.
q2

In this case the only cyclic arrangement extending An1 pq is An pq. We know that A and
An pq can only differ in the position of n. Assume n is immediately after x and before y in An pq.
Since the neighbors of 0 are q1 and q2 by (2), we have x, y 1.
y

x1

n1
y1

Figure 4
In An pq the chord from n 1 to x is parallel and adjacent to the chord from n to x 1, so n 1
is between x 1 and x in clockwise order, as shown in Figure 4. Similarly, n 1 is between y
and y 1. Therefore x, y, x 1, n 1, and y 1 occur in this order in An pq and hence in A
(possibly with y x 1 or x y 1).
Now, A may only differ from An pq in the location of n. In A, since the chord from n 1
to x and the chord from n to x 1 do not intersect, n is between x and n 1. Similarly, n is
between n 1 and y. Then n must be between x and y and A An pq. Therefore A is cyclic as
desired.
Case 2. There is exactly one i with

p1
q1

i
n

p2
.
q2

In this case there exist two cyclic arrangements An p1 q and An p2 q of the numbers 0, . . . , n
extending An1 pq, where pq11 1 ni and ni 2 pq22 . In An1 pq, 0 is the only number
between q2 and q1 by (2). For the same reason, n is between q2 and 0 in An p1 q, and between 0
and q1 in An p2 q.
Letting x q2 and y q1 , the argument of Case 1 tells us that n must be between x and y
in A. Therefore A must equal An p1 q or An p2 q, and therefore it is cyclic.
This concludes the proof that every beautiful arrangement is cyclic. It follows that there are
exactly N ` 1 beautiful arrangements of r0, ns as we wished to show.

Shortlisted problems solutions

37

C8. Players A and B play a paintful game on the real line. Player A has a pot of paint with
four units of black ink. A quantity p of this ink suffices to blacken a (closed) real interval of length
p. In every round, player A picks some positive integer m and provides 1{2m units of ink from the
pot. Player B then picks an integer k and blackens the interval from k{2m to pk ` 1q{2m (some
parts of this interval may have been blackened before). The goal of player A is to reach a situation
where the pot is empty and the interval r0, 1s is not completely blackened.
Decide whether there exists a strategy for player A to win in a finite number of moves.
(Austria)
Answer. No. Such a strategy for player A does not exist.
Solution. We will present a strategy for player B that guarantees that the interval r0, 1s is completely blackened, once the paint pot has become empty.
At the beginning of round r, let xr denote the largest real number for which the interval
between 0 and xr has already been blackened; for completeness we define x1 0. Let m be the
integer picked by player A in this round; we define an integer yr by
yr
yr ` 1
xr
.
m
2
2m
Note that I0r ryr {2m , pyr ` 1q{2m s is the leftmost interval that may be painted in round r and
that still contains some uncolored point.
Player B now looks at the next interval I1r rpyr ` 1q{2m , pyr ` 2q{2m s. If I1r still contains an
uncolored point, then player B blackens the interval I1r ; otherwise he blackens the interval I0r . We
make the convention that, at the beginning of the game, the interval r1, 2s is already blackened;
thus, if yr ` 1 2m , then B blackens I0r .
Our aim is to estimate the amount of ink used after each round. Firstly, we will prove by
induction that, if before rth round the segment r0, 1s is not completely colored, then, before this
move,
piq the amount of ink used for the segment r0, xr s is at most 3xr ; and
piiq for every m, B has blackened at most one interval of length 1{2m to the right of xr .
Obviously, these conditions are satisfied for r 0. Now assume that they were satisfied before
the rth move, and consider the situation after this move; let m be the number A has picked at
this move.
If B has blackened the interval I1r at this move, then xr`1 xr , and piq holds by the induction
hypothesis. Next, had B blackened before the rth move any interval of length 1{2m to the right
of xr , this interval would necessarily coincide with I1r . By our strategy, this cannot happen. So,
condition piiq also remains valid.
Assume now that B has blackened the interval I0r at the rth move, but the interval r0, 1s still
contains uncolored parts (which means that I1r is contained in r0, 1s). Then condition piiq clearly
remains true, and we need to check piq only. In our case, the intervals I0r and I1r are completely
colored after the rth move, so xr`1 either reaches the right endpoint of I1 or moves even further
to the right. So, xr`1 xr ` for some 1{2m .
Next, any interval blackened by B before the rth move which intersects pxr , xr`1 q should be
contained in rxr , xr`1 s; by piiq, all such intervals have different lengths not exceeding 1{2m , so
the total amount of ink used for them is less than 2{2m . Thus, the amount of ink used for the
segment r0, xr`1 s does not exceed the sum of 2{2m , 3xr (used for r0, xr s), and 1{2m used for the

38

IMO 2013 Colombia

segment I0r . In total it gives at most 3pxr ` 1{2m q 3pxr ` q 3xr`1 . Thus condition piq is also
verified in this case. The claim is proved.
Finally, we can perform the desired estimation. Consider any situation in the game, say after the
pr1qst move; assume that the segment r0, 1s is not completely black. By piiq, in the segment rxr , 1s
player B has colored several segments of different lengths; all these lengths are negative powers
of 2 not exceeding 1 xr ; thus the total amount of ink used for this interval is at most 2p1 xr q.
Using piq, we obtain that the total amount of ink used is at most 3xr ` 2p1 xr q 3. Thus the
pot is not empty, and therefore A never wins.
Comment 1. Notice that this strategy works even if the pot contains initially only 3 units of ink.
Comment 2. There exist other strategies for B allowing him to prevent emptying the pot before the
whole interval is colored. On the other hand, let us mention some idea which does not work.
Player B could try a strategy in which the set of blackened points in each round is an interval of
the type r0, xs. Such a strategy cannot work (even if there is more ink available). Indeed, under the
assumption that B uses such a strategy, let us prove by induction on s the following statement:
For any positive integer s, player A has a strategy picking only positive integers m s in which,
if player B ever paints a point x 1 1{2s then after some move, exactly the interval r0, 1 1{2s s is
blackened, and the amount of ink used up to this moment is at least s{2.
For the base case s 1, player A just picks m 1 in the first round. If for some positive integer k
player A has such a strategy, for s ` 1 he can first rescale his strategy to the interval r0, 1{2s (sending in
each round half of the amount of ink he would give by the original strategy). Thus, after some round, the
interval r0, 1{2 1{2s`1 s becomes blackened, and the amount of ink used is at least s{4. Now player A
picks m 1{2, and player B spends 1{2 unit of ink to blacken the interval r0, 1{2s. After that, player A
again rescales his strategy to the interval r1{2, 1s, and player B spends at least s{4 units of ink to blacken
the interval r1{2, 1 1{2s`1 s, so he spends in total at least s{4 ` 1{2 ` s{4 ps ` 1q{2 units of ink.
Comment 3. In order to avoid finiteness issues, the statement could be replaced by the following one:
Players A and B play a paintful game on the real numbers. Player A has a paint pot with
four units of black ink. A quantity p of this ink suffices to blacken a (closed) real interval of
length p. In the beginning of the game, player A chooses (and announces) a positive integer
N . In every round, player A picks some positive integer m N and provides 1{2m units
of ink from the pot. The player B picks an integer k and blackens the interval from k{2m
to pk ` 1q{2m (some parts of this interval may happen to be blackened before). The goal of
player A is to reach a situation where the pot is empty and the interval r0, 1s is not completely
blackened.
Decide whether there exists a strategy for player A to win.
However, the Problem Selection Committee believes that this version may turn out to be harder than the
original one.

Shortlisted problems solutions

39

Geometry
G1.

Let ABC be an acute-angled triangle with orthocenter H, and let W be a point on


side BC. Denote by M and N the feet of the altitudes from B and C, respectively. Denote
by 1 the circumcircle of BW N, and let X be the point on 1 which is diametrically opposite
to W . Analogously, denote by 2 the circumcircle of CW M, and let Y be the point on 2 which
is diametrically opposite to W . Prove that X, Y and H are collinear.
(Thaliand)
Solution. Let L be the foot of the altitude from A, and let Z be the second intersection point of
circles 1 and 2 , other than W . We show that X, Y , Z and H lie on the same line.
Due to =BNC =BMC 90 , the points B, C, N and M are concyclic; denote their circle
by 3 . Observe that the line W Z is the radical axis of 1 and 2 ; similarly, BN is the radical axis
of 1 and 3 , and CM is the radical axis of 2 and 3 . Hence A BN X CM is the radical center
of the three circles, and therefore W Z passes through A.
Since W X and W Y are diameters in 1 and 2 , respectively, we have =W ZX =W ZY 90 ,
so the points X and Y lie on the line through Z, perpendicular to W Z.
A
2
Y
M

N
H

The quadrilateral BLHN is cyclic, because it has two opposite right angles. From the power
of A with respect to the circles 1 and BLHN we find AL AH AB AN AW AZ. If H lies
AZ
AL
on the line AW then this implies H Z immediately. Otherwise, by AH
AW
the triangles AHZ

and AW L are similar. Then =HZA =W LA 90 , so the point H also lies on the line XY Z.
Comment. The original proposal also included a second statement:
Let P be the point on 1 such that W P is parallel to CN , and let Q be the point on 2 such
that W Q is parallel to BM . Prove that P , Q and H are collinear if and only if BW CW
or AW K BC.
The Problem Selection Committee considered the first part more suitable for the competition.

40

IMO 2013 Colombia

G2. Let be the circumcircle of a triangle ABC. Denote by M and N the midpoints of the
sides AB and AC, respectively, and denote by T the midpoint of the arc BC of not containing A.
The circumcircles of the triangles AMT and ANT intersect the perpendicular bisectors of AC
and AB at points X and Y , respectively; assume that X and Y lie inside the triangle ABC. The
lines MN and XY intersect at K. Prove that KA KT .
(Iran)

Solution 1. Let O be the center of , thus O MY X NX. Let be the perpendicular bisector
of AT (it also passes through O). Denote by r the operation of reflection about . Since AT is the
angle bisector of =BAC, the line rpABq is parallel to AC. Since OM K AB and ON K AC, this
means that the line rpOMq is parallel to the line ON and passes through O, so rpOMq ON.
Finally, the circumcircle of the triangle AMT is symmetric about , so rpq . Thus the
point M maps to the common point of ON with the arc AMT of that is, rpMq X.
Similarly, rpNq Y . Thus, we get rpMNq XY , and the common point K of MN nd XY
lies on . This means exactly that KA KT .
A

N
O

Solution 2. Let L be the second common point of the line AC with the circumcircle of
the triangle AMT . From the cyclic quadrilaterals ABT C and AMT L we get =BT C 180
=BAC =MT L, which implies =BT M =CT L. Since AT is an angle bisector in these
quadrilaterals, we have BT T C and MT T L. Thus the triangles BT M and CT L are
congruent, so CL BM AM.
Let X 1 be the common point of the line NX with the external bisector of =BAC; notice
that it lies outside the triangle ABC. Then we have =T AX 1 90 and X 1 A X 1 C, so we
get =X 1 AM 90 ` =BAC{2 180 =X 1 AC 180 =X 1 CA =X 1 CL. Thus the
triangles X 1 AM and X 1 CL are congruent, and therefore
=MX 1 L =AX 1 C ` p=CX 1 L =AX 1 Mq =AX 1 C 180 2=X 1 AC =BAC =MAL.

This means that X 1 lies on .


Thus we have =T XN =T XX 1 =T AX 1 90 , so T X k AC. Then =XT A =T AC
=T AM, so the cyclic quadrilateral MAT X is an isosceles trapezoid. Similarly, NAT Y is an
isosceles trapezoid, so again the lines MN and XY are the reflections of each other about the
perpendicular bisector of AT . Thus K belongs to this perpendicular bisector.

Shortlisted problems solutions

41
A
X

X
Y

T
L

Comment. There are several different ways of showing that the points X and M are symmetrical with
respect to . For instance, one can show that the quadrilaterals AM ON and T XOY are congruent. We
chose Solution 1 as a simple way of doing it. On the other hand, Solution 2 shows some other interesting
properties of the configuration.
Let us define Y 1 , analogously to X 1 , as the common point of M Y and the external bisector of =BAC.
One may easily see that in general the lines M N and X 1 Y 1 (which is the external bisector of =BAC)
do not intersect on the perpendicular bisector of AT . Thus, any solution should involve some argument
using the choice of the intersection points X and Y .

42

IMO 2013 Colombia

G3.

In a triangle ABC, let D and E be the feet of the angle bisectors of angles A and B,
respectively. A rhombus is inscribed into the quadrilateral AEDB (all vertices of the rhombus
lie on different sides of AEDB). Let be the non-obtuse angle of the rhombus. Prove that
maxt=BAC, =ABCu.
(Serbia)

Solution 1. Let K, L, M, and N be the vertices of the rhombus lying on the sides AE, ED, DB,
and BA, respectively. Denote by dpX, Y Zq the distance from a point X to a line Y Z. Since D
and E are the feet of the bisectors, we have dpD, ABq dpD, ACq, dpE, ABq dpE, BCq, and
dpD, BCq dpE, ACq 0, which implies
dpD, ACq ` dpD, BCq dpD, ABq and dpE, ACq ` dpE, BCq dpE, ABq.
Since L lies on the segment DE and the relation dpX, ACq ` dpX, BCq dpX, ABq is linear in X
inside the triangle, these two relations imply
dpL, ACq ` dpL, BCq dpL, ABq.

(1)

Denote the angles as in the figure below, and denote a KL. Then we have dpL, ACq a sin
and dpL, BCq a sin . Since KLMN is a parallelogram lying on one side of AB, we get
dpL, ABq dpL, ABq ` dpN, ABq dpK, ABq ` dpM, ABq apsin ` sin q.
Thus the condition (1) reads
sin ` sin sin ` sin .

(2)

E
K

If one of the angles and is non-acute, then the desired inequality is trivial. So we assume
that , {2. It suffices to show then that =NKL maxt, u.
Assume, to the contrary, that maxt, u. Since ` =CKN ` , by our
assumption we obtain p q ` . Similarly, . Next, since KN k ML, we have
` , so {2. Similarly, {2. Finally, by {2 and {2, we
obtain
sin sin and sin sin .

This contradicts (2).

Comment. One can see that the equality is achieved if for every rhombus inscribed into the
quadrilateral AEDB.

Shortlisted problems solutions

43

G4. Let ABC be a triangle with =B =C. Let P and Q be two different points on line AC

such that =P BA =QBA =ACB and A is located between P and C. Suppose that there
exists an interior point D of segment BQ for which P D P B. Let the ray AD intersect the circle
ABC at R A. Prove that QB QR.
(Georgia)

Solution 1. Denote by the circumcircle of the triangle ABC, and let =ACB . Note
that the condition =CBA implies 90 . Since =P BA , the line P B is tangent
A
PP D
the triangles P AD and P DC are similar, and
to , so P A P C P B 2 P D 2. By PP D
C
=ADP =DCP .
Next, since =ABQ =ACB, the triangles ABC and AQB are also similar. Then =AQB
=ABC =ARC, which means that the points D, R, C, and Q are concyclic. Therefore =DRQ
=DCQ =ADP .

Figure 1
Now from =ARB =ACB and =P DB =P BD 2 we get
=QBR =ADB =ARB =ADP ` =P DB =ARB =DRQ ` =QRB,
so the triangle QRB is isosceles, which yields QB QR.
Solution 2. Again, denote by the circumcircle of the triangle ABC. Denote =ACB . Since
=P BA , the line P B is tangent to .
Let E be the second intersection point of BQ with . If V 1 is any point on the ray CE
beyond E, then =BEV 1 180 =BEC 180 =BAC =P AB; together with =ABQ
=P BA this shows firstly, that the rays BA and CE intersect at some point V , and secondly
that the triangle V EB is similar to the triangle P AB. Thus we have =BV E =BP A. Next,
=AEV =BEV =P AB =ABQ =AQB; so the triangles P BQ and V AE are also
similar.
Let P H be an altitude in the isosceles triangle P BD; then BH HD. Let G be the intersection
point of P H and AB. By the symmetry with respect to P H, we have =BDG =DBG
=BEA; thus DG k AE and hence BG
BD
. Thus the points G and D correspond to each other
GA
DE
in the similar triangles P AB and V EB, so =DV B =GP B 90 =P BQ 90 =V AE.
Thus V D K AE.

44

IMO 2013 Colombia

Let T be the common point of V D and AE, and let DS be an altitude in the triangle BDR.
The points S and T are the feet of corresponding altitudes in the similar triangles ADE and BDR,
so BS
TATE . On the other hand, the points T and H are feet of corresponding altitudes in the
SR
BH
BH
similar triangles V AE and P BQ, so TATE HQ
. Thus BS
TATE HQ
, and the triangles BHS
SR
and BQR are similar.
Finally, SH is a median in the right-angled triangle SBD; so BH HS, and hence BQ QR.
R

H
G

Q
T
E

Figure 2
Solution 3. Denote by and O the circumcircle of the triangle ABC and its center, respectively.
From the condition =P BA =BCA we know that BP is tangent to .
Let E be the second point of intersection of and BD. Due to the isosceles triangle BDP ,
the tangent of at E is parallel to DP and consequently it intersects BP at some point L. Of
course, P D k LE. Let M be the midpoint of BE, and let H be the midpoint of BR. Notice that
=AEB =ACB =ABQ =ABE, so A lies on the perpendicular bisector of BE; thus the
points L, A, M, and O are collinear. Let 1 be the circle with diameter BO. Let Q1 HO X BE;
since HO is the perpendicular bisector of BR, the statement of the problem is equivalent to
Q1 Q.
Consider the following sequence of projections (see Fig. 3).
1.
2.
3.
4.
5.

Project
Project
Project
Scale
Project

the line BE to the line LB through the center A. (This maps Q to P .)


the line LB to BE in parallel direction with LE. (P D.)
the line BE to the circle through its point A. (D R.)
by the ratio 21 from the point B to the circle 1 . (R H.)
1 to the line BE through its point O. (H Q1 .)

We prove that the composition of these transforms, which maps the line BE to itself, is the
identity. To achieve this, it suffices to show three fixed points. An obvious fixed point is B which
is fixed by all the transformations above. Another fixed point is M, its path being M L
E E M M.

Shortlisted problems solutions

45

B
H

U
M
Q

X
Q

P
Y

E
L

Figure 3
Figure 4
In order to show a third fixed point, draw a line parallel with LE through A; let that line
intersect BE, LB and at X, Y and Z A, respectively (see Fig. 4). We show that X is a
fixed point. The images of X at the first three transformations are X Y X Z. From
=XBZ =EAZ =AEL =LBA =BZX we can see that the triangle XBZ is isosceles.
Let U be the midpoint of BZ; then the last two transformations do Z U X, and the point X
is fixed.
Comment. Verifying that the point E is fixed seems more natural at first, but it appears to be less
straightforward. Here we outline a possible proof.
Let the images of E at the first three transforms above be F , G and I. After comparing the angles
depicted in Fig. 5 (noticing that the quadrilateral AF BG is cyclic) we can observe that the tangent LE
of is parallel to BI. Then, similarly to the above reasons, the point E is also fixed.

G
Q
A

F
P

E
L

Figure 5

46

IMO 2013 Colombia

G5.

Let ABCDEF be a convex hexagon with AB DE, BC EF , CD F A, and


=A =D =C =F =E =B. Prove that the diagonals AD, BE, and CF are concurrent.
(Ukraine)

In all three solutions, we denote =A =D =C =F =E =B and assume without loss


of generality that 0.
Solution 1. Let x AB DE, y CD F A, z EF BC. Consider the points P, Q,
and R such that the quadrilaterals CDEP , EF AQ, and ABCR are parallelograms. We compute
=P EQ =F EQ ` =DEP =E p180 =F q ` p180 =Dq =E
`

360 =D =E =F 21 =A ` =B ` =C =D =E =F {2.

Similarly, =QAR =RCP {2.

x
z

A
Q
P

y
y
F

R
E

If 0, since RCP is isosceles, R P . Therefore AB k RC P C k ED, so ABDE is a


parallelogram. Similarly, BCEF and CDF A are parallelograms. It follows that AD, BE and CF
meet at their common midpoint.
Now assume 0. Since P EQ, QAR, and RCP are isosceles and have the same angle
at the apex, we have P EQ QAR RCP with ratios of similarity y : z : x. Thus
P QR is similar to the triangle with sidelengths y, z, and x.

(1)

Next, notice that


RQ
z
RA

QP
y
AF
and, using directed angles between rays,
>pRQ, QP q >pRQ, QEq ` >pQE, QP q
>pRQ, QEq ` >pRA, RQq >pRA, QEq >pRA, AF q.
Thus P QR F AR. Since F A y and AR z, (1) then implies that F R x. Similarly
F P x. Therefore CRF P is a rhombus.
We conclude that CF is the perpendicular bisector of P R. Similarly, BE is the perpendicular
bisector of P Q and AD is the perpendicular bisector of QR. It follows that AD, BE, and CF are
concurrent at the circumcenter of P QR.

Shortlisted problems solutions

47

Solution 2. Let X CD X EF , Y EF X AB, Z AB X CD, X 1 F A X BC, Y 1


BC X DE, and Z 1 DE X F A. From =A ` =B ` =C 360 ` {2 we get =A ` =B 180
and =B ` =C 180, so Z and X 1 are respectively on the opposite sides of BC and AB from the
hexagon. Similar conclusions hold for X, Y , Y 1 , and Z 1 . Then
=Y ZX =B ` =C 180 =E ` =F 180 =Y 1 Z 1 X 1 ,
and similarly =ZXY =Z 1 X 1 Y 1 and =XY Z =X 1 Y 1 Z 1 , so XY Z X 1Y 1 Z 1 . Thus there is
a rotation `R which
sends XY Z to`a triangle
with sides
parallel
to X 1 Y 1 Z 1 . Since AB DE
`


we have R AB DE. Similarly, R CD F A and R EF BC. Therefore


`

0 AB ` BC ` CD ` DE ` EF ` F A AB ` CD ` EF ` R AB ` CD ` EF .
If R is a rotation by 180 , then any two opposite sides of our hexagon are equal and parallel,
so the three diagonals meet at their common midpoint. Otherwise, we must have

AB ` CD ` EF 0 ,

or else we would have two vectors with different directions whose sum is 0 .
X

B
O

M
C

O1

T
Y

O2

O3
F
Z

Y
D
X



This allows us to consider a triangle LMN with LM EF , MN AB, and NL CD. Let O
be the circumcenter of LMN and consider the points O1 , O2 , O3 such that AO1B, CO2 D,
and EO3 F are translations of MON, NOL, and LOM, respectively. Since F O3 and AO1
are translations of MO, quadrilateral AF O3 O1 is a parallelogram and O3 O1 F A CD NL.
Similarly, O1 O2 LM and O2 O3 MN. Therefore O1O2 O3 LMN. Moreover, by means
of the rotation R one may check that these triangles have the same orientation.
Let T be the circumcenter of O1 O2 O3 . We claim that AD, BE, and CF meet at T . Let
us show that C, T , and F are collinear. Notice that CO2 O2 T T O3 O3 F since they are
all equal to the circumradius of LMN. Therefore T O3F and CO2T are isosceles. Using
directed angles between rays again, we get
>pT F, T O3q >pF O3 , F T q

and

>pT O2 , T Cq >pCT, CO2 q.

(2)

Also, T and O are the circumcenters of the congruent triangles O1O2 O3 and LMN so we have
>pT O3 , T O2q >pON, OMq. Since CO2 and F O3 are translations of NO and MO respectively,
this implies
>pT O3 , T O2 q >pCO2 , F O3 q.
(3)

48

IMO 2013 Colombia

Adding the three equations in (2) and (3) gives


>pT F, T Cq >pCT, F T q >pT F, T Cq
which implies that T is on CF . Analogous arguments show that it is on AD and BE also. The
desired result follows.
Solution 3. Place the hexagon on the complex plane, with A at the origin and vertices labelled
clockwise. Now A, B, C, D, E, F represent the corresponding complex numbers. Also consider
the complex numbers a, b, c, a1 , b1 , c1 given by B A a, D C b, F E c, E D a1 ,
A F b1 , and C B c1 . Let k |a|{|b|. From a{b1 kei=A and a1 {b kei=D we get that
pa1 {aqpb1 {bq ei and similarly pb1 {bqpc1 {cq ei and pc1 {cqpa1 {aq ei . It follows that a1 ar,
b1 br, and c1 cr for a complex number r with |r| 1, as shown below.
a
B

cr

a + cr

0 A

C
W
W
W
W

br
F
c

br

c(r 1)

E
br c

ar

D
D
D a + b + cr = c(r 1)
D

We have
0 a ` cr ` b ` ar ` c ` br pa ` b ` cqp1 ` rq.

If r 1, then the hexagon is centrally symmetric and its diagonals intersect at its center of
symmetry. Otherwise
a ` b ` c 0.
Therefore

A 0,

B a,

C a ` cr,

D cpr 1q,

E br c,

F br.

Now consider a point W on AD given by the complex number cpr 1q, where is a real number
with 0 1. Since D A, we have r 1, so we can define s 1{pr 1q. From rr |r|2 1
we get
r
1
r

s.
1`s
r1
r rr
1r
Now,
W is on BE cpr 1q a k a pbr cq bpr 1q c as k b
a b as k b ap ` sq k b.
One easily checks that r 1 implies that ` s 0 since s is not real. On the other hand,
W on CF cpr 1q ` br k br pa ` crq apr 1q c ` bp1 ` sq k a
a b bs k a bp ` sq k a b k ap ` sq,

where in the last step we use that p ` sqp ` sq | ` s|2 P R0 . We conclude that AD X BE
CF X BE, and the desired result follows.

Shortlisted problems solutions

49

G6. Let the excircle of the triangle ABC lying opposite to A touch its side BC at the point A1 .
Define the points B1 and C1 analogously. Suppose that the circumcentre of the triangle A1 B1 C1
lies on the circumcircle of the triangle ABC. Prove that the triangle ABC is right-angled.
(Russia)
Solution 1. Denote the circumcircles of the triangles ABC and A1 B1 C1 by and , respectively.
Denote the midpoint of the arc CB of containing A by A0 , and define B0 as well as C0 analogously.
By our hypothesis the centre Q of lies on .
Lemma. One has A0 B1 A0 C1 . Moreover, the points A, A0 , B1 , and C1 are concyclic. Finally,
the points A and A0 lie on the same side of B1 C1 . Similar statements hold for B and C.
Proof. Let us consider the case A A0 first. Then the triangle ABC is isosceles at A, which
implies AB1 AC1 while the remaining assertions of the Lemma are obvious. So let us suppose
A A0 from now on.
By the definition of A0 , we have A0 B A0 C. It is also well known and easy to show that BC1
CB1 . Next, we have =C1 BA0 =ABA0 =ACA0 =B1 CA0 . Hence the triangles A0 BC1
and A0 CB1 are congruent. This implies A0 C1 A0 B1 , establishing the first part of the Lemma.
It also follows that =A0 C1 A =A0 B1 A, as these are exterior angles at the corresponding vertices
C1 and B1 of the congruent triangles A0 BC1 and A0 CB1 . For that reason the points A, A0 , B1 ,
and C1 are indeed the vertices of some cyclic quadrilateral two opposite sides of which are AA0
and B1 C1 .
l
Now we turn to the solution. Evidently the points A1 , B1 , and C1 lie interior to some semicircle
arc of , so the triangle A1 B1 C1 is obtuse-angled. Without loss of generality, we will assume that
its angle at B1 is obtuse. Thus Q and B1 lie on different sides of A1 C1 ; obviously, the same holds
for the points B and B1 . So, the points Q and B are on the same side of A1 C1 .
Notice that the perpendicular bisector of A1 C1 intersects at two points lying on different
sides of A1 C1 . By the first statement from the Lemma, both points B0 and Q are among these
points of intersection; since they share the same side of A1 C1 , they coincide (see Figure 1).
B00000(=
(= Q)
Q)
B
B

A11111
A

C11111
C
A

B1111
B

A0
C0

Figure 1

50

IMO 2013 Colombia

Now, by the first part of the Lemma again, the lines QA0 and QC0 are the perpendicular
bisectors of B1 C1 and A1 B1 , respectively. Thus
=C1 B0 A1 =C1 B0 B1 ` =B1 B0 A1 2=A0 B0 B1 ` 2=B1 B0 C0 2=A0 B0 C0 180 =ABC,
recalling that A0 and C0 are the midpoints of the arcs CB and BA, respectively.
On the other hand, by the second part of the Lemma we have
=C1 B0 A1 =C1 BA1 =ABC.
From the last two equalities, we get =ABC 90 , whereby the problem is solved.

Solution 2. Let Q again denote the centre of the circumcircle of the triangle A1 B1 C1 , that lies
on the circumcircle of the triangle ABC. We first consider the case where Q coincides with one
of the vertices of ABC, say Q B. Then BC1 BA1 and consequently the triangle ABC is
isosceles at B. Moreover we have BC1 B1 C in any triangle, and hence BB1 BC1 B1 C;
similarly, BB1 B1 A. It follows that B1 is the centre of and that the triangle ABC has a right
angle at B.
So from now on we may suppose Q R tA, B, Cu. We start with the following well known fact.
Lemma. Let XY Z and X 1 Y 1 Z 1 be two triangles with XY X 1 Y 1 and Y Z Y 1 Z 1 .
piq If XZ X 1 Z 1 and =Y ZX =Y 1 Z 1 X 1 , then =ZXY ` =Z 1 X 1 Y 1 180 .
piiq If =Y ZX ` =X 1 Z 1 Y 1 180 , then =ZXY =Y 1 X 1 Z 1 .
Proof. For both parts, we may move the triangle XY Z through the plane until Y Y 1 and Z Z 1 .
Possibly after reflecting one of the two triangles about Y Z, we may also suppose that X and X 1
lie on the same side of Y Z if we are in case piq and on different sides if we are in case piiq. In both
cases, the points X, Z, and X 1 are collinear due to the angle condition (see Fig. 2). Moreover we
have X X 1 , because in case piq we assumed XZ X 1 Z 1 and in case piiq these points even lie
on different sides of Y Z. Thus the triangle XX 1 Y is isosceles at Y . The claim now follows by
considering the equal angles at its base.
l
Y =Y

Y =Y

Z = Z

Figure 2(i)

Z = Z

Figure 2(ii)

Relabeling the vertices of the triangle ABC if necessary we may suppose that Q lies in the
interior of the arc AB of not containing C. We will sometimes use tacitly that the six triangles QBA1 , QA1 C, QCB1 , QB1 A, QC1 A, and QBC1 have the same orientation.
As Q cannot be the circumcentre of the triangle ABC, it is impossible that QA QB QC
and thus we may also suppose that QC QB. Now the above Lemma piq is applicable to the
triangles QB1 C and QC1 B, since QB1 QC1 and B1 C C1 B, while =B1 CQ =C1 BQ holds
as both angles appear over the same side of the chord QA in (see Fig. 3). So we get
=CQB1 ` =BQC1 180 .

(1)

Shortlisted problems solutions

51

We claim that QC QA. To see this, let us assume for the sake of a contradiction that
QC QA. Then arguing similarly as before but now with the triangles QA1 C and QC1 A we get
=A1 QC ` =C1 QA 180 .
Adding this equation to (1), we get =A1 QB1 ` =BQA 360 , which is absurd as both summands
lie in the interval p0 , 180q.
This proves QC QA; so the triangles QA1 C and QC1 A are congruent their sides being equal,
which in turn yields
=A1 QC =C1 QA.

(2)

Finally our Lemma piiq is applicable to the triangles QA1 B and QB1 A. Indeed we have QA1 QB1
and A1 B B1 A as usual, and the angle condition =A1 BQ ` =QAB1 180 holds as A and B
lie on different sides of the chord QC in . Consequently we have
=BQA1 =B1 QA.

(3)

From (1) and (3) we get


p=B1 QC ` =B1 QAq ` p=C1 QB =BQA1 q 180 ,
i.e. =CQA ` =A1 QC1 180 . In light of (2) this may be rewritten as 2=CQA 180 and as Q
lies on this implies that the triangle ABC has a right angle at B.
Q
Q
B

A11111
A
C11111
C
A

B11111
B

Figure 3

Comment 1.
acute-angled.

One may also check that Q is in the interior of if and only if the triangle ABC is

Comment 2. The original proposal asked to prove the converse statement as well: if the triangle ABC
is right-angled, then the point Q lies on its circumcircle. The Problem Selection Committee thinks that
the above simplified version is more suitable for the competition.

52

IMO 2013 Colombia

Number Theory
N1. Let Z0 be the set of positive integers. Find all functions f : Z0 Z0 such that
m2 ` f pnq | mf pmq ` n
for all positive integers m and n.
(Malaysia)
Answer. f pnq n.

Solution 1. Setting m n 2 tells us that 4 ` f p2q | 2f p2q ` 2. Since 2f p2q ` 2 2p4 ` f p2qq, we
must have 2f p2q ` 2 4 ` f p2q, so f p2q 2. Plugging in m 2 then tells us that 4 ` f pnq | 4 ` n,
which implies that f pnq n for all n.
Setting m n gives n2 ` f pnq | nf pnq ` n, so nf pnq ` n n2 ` f pnq which we rewrite as
pn 1qpf pnq nq 0. Therefore f pnq n for all n 2. This is trivially true for n 1 also.
It follows that f pnq n for all n. This function obviously satisfies the desired property.

Solution 2. Setting m f pnq we get f pnqpf pnq`1q | f pnqf pf pnqq`n. This implies that f pnq | n
for all n.
Now let m be any positive integer, and let p 2m2 be a prime number. Note that p mf pmq
also. Plugging in n pmf pmq we learn that m2 `f pnq divides p. Since m2 `f pnq cannot equal 1,
it must equal p. Therefore p m2 f pnq | n p mf pmq. But p mf pmq p 2pp m2 q, so
we must have p mf pmq p m2 , i.e., f pmq m.
Solution 3. Plugging m 1 we obtain 1 ` f pnq f p1q ` n, so f pnq n ` c for the constant c
f p1q1. Assume that f pnq n for some fixed n. When m is large enough (e.g. m maxpn, c`1q)
we have
mf pmq ` n mpm ` cq ` n 2m2 2pm2 ` f pnqq,
so we must have mf pmq ` n m2 ` f pnq. This implies that

0 f pnq n mpf pmq mq,


which is impossible for m |f pnq n|. It follows that f is the identity function.

Shortlisted problems solutions

53

N2.

Prove that for any pair of positive integers k and n there exist k positive integers
m1 , m2 , . . . , mk such that
2k 1

1`
n

1
1`
m1

1
1
1`
1 `
.
m2
mk
(Japan)

Solution 1. We proceed by induction on k. For k 1 the statement is trivial. Assuming we


have proved it for k j 1, we now prove it for k j.
Case 1. n 2t 1 for some positive integer t.

Observe that

2j 1
2pt ` 2j1 1q
2t
1`

2t 1
2t
2t 1

1
2j1 1
1`
.
1`
t
2t 1

By the induction hypothesis we can find m1 , . . . , mj1 such that


2j1 1

1`
t

1
1`
m1

1
1
1`
1 `
,
m2
mj1

so setting mj 2t 1 gives the desired expression.


Case 2. n 2t for some positive integer t.

Now we have

2t ` 2j 1 2t ` 2j 2
2j 1

1`
2t
2t ` 2j 2
2t

1`

1
2t ` 2j 2

2j1 1
1`
,
t

noting that 2t ` 2j 2 0. Again, we use that


2j1 1
1`

1
1`
m1

1
1
1`
1 `
.
m2
mj1

Setting mj 2t ` 2j 2 then gives the desired expression.

Solution 2. Consider the base 2 expansions of the residues of n 1 and n modulo 2k :


n 1 2a1 ` 2a2 ` ` 2ar pmod 2k q

where 0 a1 a2 . . . ar k 1,

n 2b1 ` 2b2 ` ` 2bs pmod 2k q

where 0 b1 b2 . . . bs k 1.

Since 1 20 ` 21 ` ` 2k1 pmod 2k q, we have ta1 , . . . , ar u Y tb1 . . . , bs u t0, 1, . . . , k 1u and


r ` s k. Write
Sp 2ap ` 2ap`1 ` ` 2ar
b1

b2

Tq 2 ` 2 ` ` 2

bq

for 1 p r,

for 1 q s.

54

IMO 2013 Colombia

Also set Sr`1 T0 0. Notice that S1 ` Ts 2k 1 and n ` Ts 0 pmod 2k q. We have


1`

2k 1
n ` S1 ` Ts
n ` S1 ` Ts n ` Ts

n
n
n ` Ts
n

s
r

n ` Sp ` Ts n ` Tq

n ` Sp`1 ` Ts q1 n ` Tq1
p1

1`
p1

2ap
n ` Sp`1 ` Ts

1`
q1

2bq
n ` Tq1

so if we define
mp

n ` Sp`1 ` Ts
2ap

for 1 p r

and

mr`q

n ` Tq1
2bq

for 1 q s,

the desired equality holds. It remains to check that every mi is an integer. For 1 p r we have
n ` Sp`1 ` Ts n ` Ts 0 pmod 2ap q
and for 1 q r we have
The desired result follows.

n ` Tq1 n ` Ts 0 pmod 2bq q.

Shortlisted problems solutions

55

N3. Prove that there exist infinitely many positive integers n such that the largest prime divisor
of n4 ` n2 ` 1 is equal to the largest prime divisor of pn ` 1q4 ` pn ` 1q2 ` 1.

(Belgium)

Solution. Let pn be the largest prime divisor of n4 ` n2 ` 1 and let qn be the largest prime divisor
of n2 ` n ` 1. Then pn qn2 , and from
n4 ` n2 ` 1 pn2 ` 1q2 n2 pn2 n ` 1qpn2 ` n ` 1q ppn 1q2 ` pn 1q ` 1qpn2 ` n ` 1q
it follows that pn maxtqn , qn1 u for n 2. Keeping in mind that n2 n ` 1 is odd, we have
gcdpn2 ` n ` 1, n2 n ` 1q gcdp2n, n2 n ` 1q gcdpn, n2 n ` 1q 1.
Therefore qn qn1 .
To prove the result, it suffices to show that the set
S tn P Z2 | qn qn1 and qn qn`1 u
is infinite, since for each n P S one has
pn maxtqn , qn1 u qn maxtqn , qn`1 u pn`1 .
Suppose on the contrary that S is finite. Since q2 7 13 q3 and q3 13 7 q4 , the set S
is non-empty. Since it is finite, we can consider its largest element, say m.
Note that it is impossible that qm qm`1 qm`2 . . . because all these numbers are positive
integers, so there exists a k m such that qk qk`1 (recall that qk qk`1 ). Next observe that it
is impossible to have qk qk`1 qk`2 . . . , because qpk`1q2 pk`1 maxtqk , qk`1 u qk`1 , so
let us take the smallest k ` 1 such that q q`1 . By the minimality of we have q1 q ,
so P S. Since k ` 1 k m, this contradicts the maximality of m, and hence S is indeed
infinite.
Comment. Once the factorization of n4 ` n2 ` 1 is found and the set S is introduced, the problem is
mainly about ruling out the case that
qk qk`1 qk`2 . . .

(1)

might hold for some k P Z0 . In the above solution, this is done by observing qpk`1q2 maxpqk , qk`1 q.
Alternatively one may notice that (1) implies that qj`2 qj 6 for j k ` 1, since every prime greater
than 3 is congruent to 1 or 1 modulo 6. Then there is some integer C 0 such that qn 3n C for
all n k.
Now let the integer t be sufficiently large (e.g. t maxtk ` 1, C ` 3u) and set p qt1 2t. Then
p | pt 1q2 ` pt 1q ` 1 implies that p | pp tq2 ` pp tq ` 1, so p and qpt are prime divisors of
pp tq2 ` pp tq ` 1. But p t t 1 k, so qpt qt1 p and p qpt p2 pp tq2 ` pp tq ` 1,
a contradiction.

56

IMO 2013 Colombia

N4. Determine whether there exists an infinite sequence of nonzero digits a1 , a2 , a3 , . . . and a
positive integer N such that for every integer k N, the number ak ak1 . . . a1 is a perfect square.
(Iran)

Answer. No.
Solution. Assume that a1 , a2 , a3 , . . . is such a sequence. For each positive integer k, let yk
ak ak1 . . . a1 . By the assumption, for each k N there exists a positive integer xk such that
yk x2k .
I. For every n, let 5n be the greatest power of 5 dividing xn . Let us show first that 2n n for
every positive integer n N.
Assume, to the contrary, that there exists a positive integer n N such that 2n n, which
yields

yn
yn`1 an`1 an . . . a1 10n an`1 ` an an1 . . . a1 10n an`1 ` yn 52n 2n 5n2n an`1 ` 2n .
5

Since 5 {| yn {52n , we obtain n`1 n n n ` 1. By the same arguments we obtain that


n n`1 n`2 . . . . Denote this common value by .
Now, for each k n we have
pxk`1 xk qpxk`1 ` xk q x2k`1 x2k yk`1 yk ak`1 10k .
`1
One of`the numbers xk`1 xk and
since otherwise one would have
xk`1 ` xk is not divisible by 5
`1
5
| pxk`1 xk q ` pxk`1 ` xk q 2xk`1 . On the other hand, we have 5k | pxk`1 xk qpxk`1 ` xk q,
so 5k divides one of these two factors. Thus we get
?
5k maxtxk`1 xk , xk`1 ` xk u 2xk`1 2 yk`1 2 10pk`1q{2 ,

which implies 52k 4 52 10k`1 , or p5{2qk 40 52 . The last inequality is clearly false for
sufficiently large values of k. This contradiction shows that 2n n for all n N.
II. Consider now any integer k maxtN{2, 2u. Since 22k`1 2k ` 1 and 22k`2 2k ` 2,
we have 2k`1 k ` 1 and 2k`2 k ` 1. So, from y2k`2 a2k`2 102k`1 ` y2k`1 we obtain
52k`2 | y2k`2 y2k`1 a2k`2 102k`1 and thus 5 | a2k`2 , which implies a2k`2 5. Therefore,
px2k`2 x2k`1 qpx2k`2 ` x2k`1 q x22k`2 x22k`1 y2k`2 y2k`1 5 102k`1 22k`1 52k`2 .
Setting Ak x2k`2 {5k`1 and Bk x2k`1 {5k`1 , which are integers, we obtain
pAk Bk qpAk ` Bk q 22k`1 .

(1)

Both Ak and Bk are odd, since otherwise y2k`2 or y2k`1 would be a multiple of 10 which is false
by a1 0; so one of the numbers Ak Bk and Ak ` Bk is not divisible by 4. Therefore (1) yields
Ak Bk 2 and Ak ` Bk 22k , hence Ak 22k1 ` 1 and thus
x2k`2 5k`1 Ak 10k`1 2k2 ` 5k`1 10k`1,
since k 2. This implies that y2k`2 102k`2 which contradicts the fact that y2k`2 contains 2k ` 2
digits. The desired result follows.

Shortlisted problems solutions

57

Solution 2. Again, we assume that a sequence a1 , a2 , a3 , . . . satisfies the problem conditions,


introduce the numbers xk and yk as in the previous solution, and notice that
yk`1 yk pxk`1 xk qpxk`1 ` xk q 10k ak`1

(2)

for all k N. Consider any such k. Since a1 0, the numbers xk and xk`1 are not multiples of 10,
and therefore the numbers pk xk`1 xk and qk xk`1 ` xk cannot be simultaneously multiples
of 20, and hence one of them is not divisible either by 4 or by 5. In view of (2), this means that
the other one is divisible by either 5k or by 2k1. Notice also that pk and qk have the same parity,
so both are even.
?
On the other hand, we have x2k`1 x2k ` 10k ak`1 x2k ` 10k 2x2k , so xk`1 {xk 2, which
implies that
qk
2
2
1
6.
(3)
1`
1` ?
pk
xk`1 {xk 1
21
Thus, if one of the numbers pk and qk is divisible by 5k , then we have
p5k q2
6
k
and hence p5{2q 60 which is false for sufficiently large k. So, assuming that k is large, we get
that 2k1 divides one of the numbers pk and qk . Hence
10k`1 10k ak`1 pk qk

tpk , qk u t2k1 5rk bk , 2 5krk ck u with nonnegative integers bk , ck , rk such that bk ck ak`1 .

Moreover, from (3) we get

so

1
2k1 5rk bk

6
kr
2 5 k ck
36

k
2
52rk
5

k ` c1 rk k ` c2

4
2 5krk ck

and 6 k1 r
2
5 k bk
9

for 21 log5

Consequently, for C c2 c1 ` 1 0 we have

`5
2

k
5
52rk ,
2

1 and some constants c2 c1 .

pk ` 1q rk`1 k rk ` C.

(4)
(5)

Next, we will use the following easy lemma.


s
Lemma. Let s be a positive integer. Then 5s`2 5s pmod 10s q.
s
s
s
Proof. Eulers theorem gives 52 1 pmod 2s q, so 5s`2 5s 5s p52 1q is divisible by 2s and 5s .
Now, for every large k we have
pk ` qk
xk`1
5rk 2k2 bk ` 5krk ck 5krk ck pmod 10rk q
(6)
2
since rk k 2 by (4); hence yk`1 52pkrk q c2k pmod 10rk q. Let us consider some large integer s,
and choose the minimal k such that
2pk rk q s ` 2s ; it exists by (4). Set d 2pk rk q ps ` 2s q.
`
By (4) we have 2s 2pk rk q 2 2 rk 2c1 ; if s is large this implies rk s, so (6) also holds
modulo 10s . Then (6) and the lemma give
s

yk`1 52pkrk q c2k 5s`2 5d c2k 5s 5d c2k

pmod 10s q.

(7)

By (5) and the minimality of k we have d 2C, so 5d c2k 52C 81 D. Using 54 103 we obtain
5s 5d c2k 103s{4 D 10s1

for sufficiently large s. This, together with (7), shows that the sth digit from the right in yk`1,
which is as , is zero. This contradicts the problem condition.

58

IMO 2013 Colombia

N5.

Fix an integer k 2. Two players, called Ana and Banana, play the following game of
numbers: Initially, some integer n k gets written on the blackboard. Then they take moves
in turn, with Ana beginning. A player making a move erases the number m just written on the
blackboard and replaces it by some number m1 with k m1 m that is coprime to m. The first
player who cannot move anymore loses.
An integer n k is called good if Banana has a winning strategy when the initial number is n,
and bad otherwise.
Consider two integers n, n1 k with the property that each prime number p k divides n if
and only if it divides n1 . Prove that either both n and n1 are good or both are bad.
(Italy)
Solution 1. Let us first observe that the number appearing on the blackboard decreases after
every move; so the game necessarily ends after at most n steps, and consequently there always has
to be some player possessing a winning strategy. So if some n k is bad, then Ana has a winning
strategy in the game with starting number n.
More precisely, if n k is such that there is a good integer m with n m k and
gcdpm, nq 1, then n itself is bad, for Ana has the following winning strategy in the game with
initial number n: She proceeds by first playing m and then using Bananas strategy for the game
with starting number m.
Otherwise, if some integer n k has the property that every integer m with n m k and
gcdpm, nq 1 is bad, then n is good. Indeed, if Ana can make a first move at all in the game with
initial number n, then she leaves it in a position where the first player has a winning strategy, so
that Banana can defeat her.
In particular, this implies that any two good numbers have a nontrivial common divisor. Also,
k itself is good.
For brevity, we say that n x is a move if n and x are two coprime integers with n x k.
Claim 1. If n is good and n1 is a multiple of n, then n1 is also good.
Proof. If n1 were bad, there would have to be some move n1 x, where x is good. As n1 is a
multiple of n this implies that the two good numbers n and x are coprime, which is absurd.
l

Claim 2. If r and s denote two positive integers for which rs k is bad, then r 2 s is also bad.
Proof. Since rs is bad, there is a move rs x for some good x. Evidently x is coprime to r 2 s as
well, and hence the move r 2 s x shows that r 2 s is indeed bad.
l

Claim 3. If p k is prime and n k is bad, then np is also bad.


Proof. Otherwise we choose a counterexample with n being as small as possible. In particular, np
is good. Since n is bad, there is a move n x for some good x. Now np x cannot be a
valid move, which tells us that x has to be divisible by p. So we can write x pr y, where r and y
denote some positive integers, the latter of which is not divisible by p.
Note that y 1 is impossible, for then we would have x pr and the move x k would
establish that x is bad. In view of this, there is a least power y of y that is at least as large
as k. Since the numbers np and y are coprime and the former is good, the latter has to be
x
n
bad. Moreover, the minimality of implies y ky py pr1
pr1
. So pr1 y n and
consequently all the numbers y , py , . . . , pr y pppr1 y q are bad due to the minimal choice
of n. But now by Claim 1 the divisor x of pr y cannot be good, whereby we have reached a
contradiction that proves Claim 3.
l

Shortlisted problems solutions

59

We now deduce the statement of the problem from these three claims. To this end, we call two
integers a, b k similar if they are divisible by the same prime numbers not exceeding k. We are
to prove that if a and b are similar, then either both of them are good or both are bad. As in this
case the product ab is similar to both a and b, it suffices to show the following: if c k is similar
to some of its multiples d, then either both c and d are good or both are bad.
Assuming that this is not true in general, we choose a counterexample pc0 , d0 q with d0 being
as small as possible. By Claim 1, c0 is bad whilst d0 is good. Plainly d0 is strictly greater than c0
and hence the quotient dc00 has some prime factor p. Clearly p divides d0 . If p k, then p
divides c0 as well due to the similarity, and hence d0 is actually divisible by p2 . So dp0 is good by
the contrapositive of Claim 2. Since c0 | dp0 , the pair pc0 , dp0 q contradicts the supposed minimality
of d0 . This proves p k, but now we get the same contradiction using Claim 3 instead of Claim 2.
Thereby the problem is solved.
Solution 2. We use the same analysis of the game of numbers as in the first five paragraphs of
the first solution. Let us call a prime number p small in case p k and big otherwise. We again
call two integers similar if their sets of small prime factors coincide.
Claim 4. For each integer b k having some small prime factor, there exists an integer x
similar to it with b x k and having no big prime factors.
Proof. Unless b has a big prime factor we may simply choose x b. Now let p and q denote a
small and a big prime factor of b, respectively. Let a be the product of all small prime factors
of b. Further define n to be the least nonnegative integer for which the number x pn a is at
least as large as k. It suffices to show that b x. This is clear in case n 0, so let us assume
n 0 from now on. Then we have x pk due to the minimality of n, p a because p divides a
by construction, and k q. Therefore x aq and, as the right hand side is a product of distinct
prime factors of b, this implies indeed x b.
l

Let us now assume that there is a pair pa, bq of similar numbers such that a is bad and b is
good. Take such a pair with maxpa, bq being as small as possible. Since a is bad, there exists a
move a r for some good r. Since the numbers k and r are both good, they have a common
prime factor, which necessarily has to be small. Thus Claim 4 is applicable to r, which yields
an integer r 1 similar to r containing small prime factors only and satisfying r r 1 k. Since
maxpr, r 1 q r a maxpa, bq the number r 1 is also good. Now let p denote a common prime
factor of the good numbers r 1 and b. By our construction of r 1 , this prime is small and due to
the similarities it consequently divides a and r, contrary to a r being a move. Thereby the
problem is solved.
Comment 1. Having reached Claim 4 of Solution 2, there are various other ways to proceed. For
instance, one may directly obtain the following fact, which seems to be interesting in its own right:

Claim 5. Any two good numbers have a common small prime factor.
Proof. Otherwise there exists a pair pb, b1 q of good numbers with b1 b k all of whose common prime
factors are big. Choose such a pair with b1 being as small as possible. Since b and k are both good, there
has to be a common prime factor p of b and k. Evidently p is small and thus it cannot divide b1 , which in
turn tells us b1 b. Applying Claim 4 to b we get an integer x with b x k that is similar to b and has
no big prime divisors at all. By our assumption, b1 and x are coprime, and as b1 is good this implies that
x is bad. Consequently there has to be some move x b such that b is good. But now all the small
prime factors of b also appear in x and thus they cannot divide b . Therefore the pair pb , bq contradicts
the supposed minimality of b1 .
l

60

IMO 2013 Colombia

From that point, it is easy to complete the solution: assume that there are two similar integers a and b
such that a is bad and b is good. Since a is bad, there is a move a b1 for some good b1 . By Claim 5,
there is a small prime p dividing b and b1 . Due to the similarity of a and b, the prime p has to divide a
as well, but this contradicts the fact that a b1 is a valid move. Thereby the problem is solved.
Comment 2. There are infinitely many good numbers, e.g. all multiples of k. The increasing sequence
b0 , b1 , . . . , of all good numbers may be constructed recursively as follows:
Start with b0 k.
If bn has just been defined for some n 0, then bn`1 is the smallest number b bn that is coprime
to none of b0 , . . . , bn .
This construction can be used to determine the set of good numbers for any specific k as explained in the
next comment. It is already clear that if k p is a prime power, then a number b k is good if and
only if it is divisible by p.
Comment 3. Let P 1 denote the product of all small prime numbers. Then any two integers a, b k
that are congruent modulo P are similar. Thus the infinite word Wk pXk , Xk`1 , . . .q defined by
#
A if i is bad
Xi
B if i is good
for all i k is periodic and the length of its period divides P . As the prime power example shows, the
true period can sometimes be much smaller than P . On the other hand, there are cases where the period
is rather large; e.g., if k 15, the sequence of good numbers begins with 15, 18, 20, 24, 30, 36, 40, 42, 45
and the period of W15 is 30.
Comment 4. The original proposal contained two questions about the game of numbers, namely paq to
show that if two numbers have the same prime factors then either both are good or both are bad, and pbq
to show that the word Wk introduced in the previous comment is indeed periodic. The Problem Selection
Committee thinks that the above version of the problem is somewhat easier, even though it demands to
prove a stronger result.

Shortlisted problems solutions

61

N6. Determine all functions f : Q Z satisfying


f

f pxq ` a
b

x ` a
b

for all x P Q, a P Z, and b P Z0 . (Here, Z0 denotes the set of positive integers.)

(1)

(Israel)

Answer. There are three kinds of such functions, which are: all constant functions, the floor
function, and the ceiling function.
Solution 1. I. We start by verifying that these functions do indeed satisfy (1). This is clear for
all constant functions. Now consider any triple px, a, bq P Q Z Z0 and set
Yx ` a]
q
.
b
This means that q is an integer and bq x ` a bpq ` 1q. It follows that bq txu ` a bpq ` 1q
holds as well, and thus we have
^ Y
Z
txu ` a
x ` a]

,
b
b
meaning that the floor function does indeed satisfy (1). One can check similarly that the ceiling
function has the same property.
II. Let us now suppose conversely that the function f : Q Z satisfies (1) for all px, a, bq P
Q Z Z0 . According to the behaviour of the restriction of f to the integers we distinguish two
cases.
Case 1: There is some m P Z such that f pmq m.
Write f pmq C and let P t1, `1u and b denote the sign and absolute value of f pmq m,
respectively. Given any integer r, we may plug the triple pm, rb C, bq into (1), thus getting
f prq f pr q. Starting with m and using induction in both directions, we deduce from this that
the equation f prq C holds for all integers r. Now any rational number y can be written in the
form y pq with pp, qq P ZZ0 , and substituting pC p, pC, qq into (1) we get f pyq f p0q C.
Thus f is the constant function whose value is always C.
Case 2: One has f pmq m for all integers m.
Note that now the special case b 1 of (1) takes a particularly simple form, namely
Defining f

`1
2

f pxq ` a f px ` aq

for all px, aq P Q Z.

(2)

we proceed in three steps.

Step A. We show that P t0, 1u.


`

`1
If 0, we may plug 12 , , 1 2 into (1),
` 1 obtaining 0 f p0q f 2 . In the contrary
case 1 we argue similarly using the triple 2 , 1, 2 1 .

Step B. We show that f pxq for all rational numbers x with 0 x 1.


Assume that this fails and pick some rational number ab P p0, 1q with minimal b such that f p ab q .
Obviously,
` 1 a1 b gcdpa, bq 1 and b 2. If b is even, then a has to be odd and we can substitute
, 2 , 2 into (1), which yields
2

a
` pa 1q{2
f
.
(3)
f
b{2
b

62

IMO 2013 Colombia

Recall that 0 pa 1q{2 b{2. Thus, in both cases 0 and 1, the left-hand part of (3)
equals either by the minimality of b, or by f pq . A contradiction. `

Thus b has to be odd, so b 2k ` 1 for some k 1. Applying (1) to 12 , k, b we get

1
`k
f
.
(4)
f
b
2
Since a and b are coprime, there exist integers r P t1, 2, . . . , bu and m such that ra mb k ` .
Note that we actually have 1 r b, since the right hand side is not a multiple of b. If m
is negative, then we have ra mb b k ` , which is absurd. Similarly, m r leads to
ra mb br br 0, which
impossible; so we must have 0 m r 1.
` k` is likewise

We finally substitute b , m, r into (1) and use (4) to learn


f

` m
r

a
b

But as above one may see that the left hand side has to equal due to the minimality of b. This
contradiction concludes our step B.
Step C. Now notice that if 0, then f pxq txu holds for all rational x with 0 x 1 and
hence by (2) this even holds for all rational numbers x. Similarly, if 1, then f pxq rxs holds
for all x P Q. Thereby the problem is solved.
Comment 1. An alternative treatment of Steps B and C from the second case, due to the proposer,
proceeds as follows. Let square brackets indicate the floor function in case 0 and the ceiling function
if 1. We are to prove that f pxq rxs holds for all x P Q, and because of Step A and (2) we already
know this in case 2x P Z. Applying (1) to p2x, 0, 2q we get

f p2xq
f pxq f
,
2
and by the previous observation this yields

f p2xq
f pxq
2

for all x P Q.

(5)

for all px, nq P Q Z0 .

(6)

An easy induction now shows


f p2n xq
f pxq
2n

Now suppose first that x is not an integer but can be written in the form pq with p P Z and q P Z0 both
being odd. Let d denote the multiplicative order of 2 modulo q and let m be any large integer. Plugging
n dm into (6) and using (2) we get
f pxq

f p2dm xq
f pxq ` p2dm 1qx
f pxq x

x
`
.
2dm
2dm
2dm

Since x is not an integer, the square bracket function is continuous at x; hence as m tends to infinity the
above fomula gives f pxq rxs. To completetheargument
just need to observe that if some y P Q
we
y
`y
rys
rys
satisfies f pyq rys, then (5) yields f 2 f 2 2 2 .

Shortlisted problems solutions

63

Solution 2. Here we just give another argument for the second case of the above solution. Again
we use equation (2). It follows that the set S of all zeros of f contains for each x P Q exactly one
term from the infinite sequence . . . , x 2, x 1, x, x ` 1, x ` 2, . . . .
Next we claim that
if pp, qq P Z Z0 and

p
q

P S, then

p
q`1

P S holds as well.

(7)

` p
`
To see this we just plug pq , p, q ` 1 into (1), thus getting f q`1
f pq 0.
From this we get that
if x, y P Q, x y 0, and x P S, then y P S.
Indeed, if we write x

p
q

and y

r
s

(8)

with p, q, r, s P Z0 , then ps qr and (7) tells us




pr
pr
pr
r
p
f
f
... f
f
.
0f
q
qr
qr ` 1
ps
s
Essentially the same argument also establishes that
if x, y P Q, x y 0, and x P S, then y P S.

(9)

From (8) and (9) we get 0 P S p1, `1q and hence the real number suppSq exists and
satisfies 0 1.

Let us assume that we actually had 0 1. Note that f pxq 0 if x P p0, q X Q by (8),
and f pxq 1 if x P p, 1q X Q by (9) and (2). Let K denote the unique positive integer satisfying
1`
, and thus there is a
K 1 pK ` 1q. The first of these two inequalities entails K`1
` 1`
rational number x P , K`1 . Setting y pK ` 1qx 1 and substituting py, 1, K ` 1q into (1) we
learn

f pyq ` 1
y`1
f
f
f pxq.
K `1
K `1

Since x 1 and 0 y , this simplifies to


f

1
K `1

1.

1
1
But, as 0 K`1
, this is only possible if K`1
and f pq 1. From this, however, we get
the contradiction

1
f pq ` 0
`0
0f
f
f pq 1.
f
pK ` 1q2
K `1
K `1

Thus our assumption 0 1 has turned out to be wrong and it follows that P t0, 1u. If
0, then we have S p1, 0s, whence S p1, 0s X Q, which in turn yields f pxq rxs for all
x P Q due to (2). Similarly, 1 entails S r0, 1q X Q and f pxq txu for all x P Q. Thereby
the solution is complete.

64

IMO 2013 Colombia

Comment 2. It seems that all solutions to this problems involve some case distinction separating the
constant solutions from the unbounded ones, though the descriptions of the cases may be different
depending on the work that has been done at the beginning of the solution. For instance, these two cases
can also be f is periodic on the integers and f is not periodic on the integers. The case leading to
the unbounded solutions appears to be the harder one.
In most approaches, the cases leading to the two functions x txu and x rxs can easily be
treated parallelly, but sometimes it may be useful to know that there is some symmetry in the problem
interchanging these two functions. Namely, if a function f : Q Z satisfies (1), then so does the
function g : Q Z defined by gpxq f pxq for all x P Q. For that reason, we could have restricted
our attention to the case 0 in the first solution and, once P t0, 1u had been obtained, to the case
0 in the second solution.

Shortlisted problems solutions

65

N7.

Let be an irrational positive number, and let m be a positive integer. A pair pa, bq of
positive integers is called good if
arbs btau m.
pq

A good pair pa, bq is called excellent if neither of the pairs pab, bq and pa, baq is good. (As usual,
by txu and rxs we denote the integer numbers such that x 1 txu x and x rxs x ` 1.)
Prove that the number of excellent pairs is equal to the sum of the positive divisors of m.
(U.S.A.)
Solution. For positive integers a and b, let us denote
f pa, bq arbs btau.

We will deal with various values of m; thus it is convenient to say that a pair pa, bq is m-good or
m-excellent if the corresponding conditions are satisfied.
To start, let us investigate how the values f pa ` b, bq and f pa, b ` aq are related to f pa, bq. If
tau ` tbu 1, then we have tpa ` bqu tau ` tbu and rpa ` bqs ras ` rbs 1, so
f pa ` b, bq pa ` bqrbs bptau ` tbuq f pa, bq ` bprbs tbuq f pa, bq ` b
and
f pa, b ` aq aprbs ` ras 1q pb ` aqtau f pa, bq ` apras 1 tauq f pa, bq.
Similarly, if tau ` tbu 1 then one obtains
f pa ` b, bq f pa, bq and f pa, b ` aq f pa, bq ` a.
So, in both cases one of the numbers f pa ` b, aq and f pa, b ` aq is equal to f pa, bq while the other
is greater than f pa, bq by one of a and b. Thus, exactly one of the pairs pa ` b, bq and pa, b ` aq is
excellent (for an appropriate value of m).
Now let us say that the pairs pa ` b, bq and pa, b ` aq are the children of the pair pa, bq, while
this pair is their parent. Next, if a pair pc, dq can be obtained from pa, bq by several passings from a
parent to a child, we will say that pc, dq is a descendant of pa, bq, while pa, bq is an ancestor of pc, dq
(a pair is neither an ancestor nor a descendant of itself). Thus each pair pa, bq has two children,
it has a unique parent if a b, and no parents otherwise. Therefore, each pair of distinct positive
integers has a unique ancestor of the form pa, aq; our aim is now to find how many m-excellent
descendants each such pair has.
Notice now that if a pair pa, bq is m-excellent then minta, bu m. Indeed, if a b then
f pa, aq a m, so the statement is valid. Otherwise, the pair pa, bq is a child of some pair pa1 , b1 q. If
b b1 and a a1 `b1 , then we should have m f pa, bq f pa1 , b1 q`b1 , so b b1 mf pa1 , b1 q m.
Similarly, if a a1 and b b1 ` a1 then a m.
Let us consider the set Sm of all pairs pa, bq such that f pa, bq m and minta, bu m. Then
all the ancestors of the elements in Sm are again in Sm , and each element in Sm either is of the
form pa, aq with a m, or has a unique ancestor of this form. From the arguments above we see
that all m-excellent pairs lie in Sm .
We claim now that the set Sm is finite. Indeed, assume, for instance, that it contains infinitely
many pairs pc, dq with d 2m. Such a pair is necessarily a child of pc, d cq, and thus a descendant
of some pair pc, d1 q with m d1 2m. Therefore, one of the pairs pa, bq P Sm with m b 2m

66

IMO 2013 Colombia

has infinitely many descendants in Sm , and all these descendants have the form pa, b ` kaq with k
a positive integer. Since f pa, b ` kaq does not decrease as k grows, it becomes constant for k k0 ,
where k0 is some positive integer. This means that tau ` tpb ` kaqu 1 for all k k0 . But this
yields 1 tpb ` kaqu tpb ` k0 aqu ` pk k0 qtau for all k k0 , which is absurd.
Similarly, one can prove that Sm contains finitely many pairs pc, dq with c 2m, thus finitely
many elements at all.
We are now prepared for proving the following crucial lemma.
Lemma. Consider any pair pa, bq with f pa, bq m. Then the number gpa, bq of its m-excellent
descendants is equal to the number hpa, bq of ways to represent the number t m f pa, bq as
t ka ` b with k and being some nonnegative integers.
Proof. We proceed by induction on the number N of descendants of pa, bq in Sm . If N 0 then
clearly gpa, bq 0. Assume that hpa, bq 0; without loss of generality, we have a b. Then,
clearly, m f pa, bq a, so f pa, b ` aq f pa, bq ` a m and a m, hence pa, b ` aq P Sm which
is impossible. Thus in the base case we have gpa, bq hpa, bq 0, as desired.
Now let N 0. Assume that f pa ` b, bq f pa, bq ` b and f pa, b ` aq f pa, bq (the other case
is similar). If f pa, bq ` b m, then by the induction hypothesis we have
gpa, bq gpa ` b, bq ` gpa, b ` aq hpa ` b, bq ` hpa, b ` aq.
Notice that both pairs pa ` b, bq and pa, b ` aq are descendants of pa, bq and thus each of them has
strictly less descendants in Sm than pa, bq does.
Next, each one of the hpa ` b, bq representations of m f pa ` b, bq m b f pa, bq as the sum
1
k pa ` bq ` 1 b provides the representation m f pa, bq ka ` b with k k 1 k 1 ` 1 ` 1 .
Similarly, each one of the hpa, b ` aq representations of m f pa, b ` aq m f pa, bq as the sum
k 1 a ` 1 pb ` aq provides the representation m f pa, bq ka ` b with k k 1 ` 1 1 . This
correspondence is obviously bijective, so
hpa, bq hpa ` b, bq ` hpa, b ` aq gpa, bq,
as required.
Finally, if f pa, bq`b m then pa`b, bq is m-excellent, so gpa, bq 1`gpa, b`aq 1`hpa, b`aq
by the induction hypothesis. On the other hand, the number m f pa, bq b has a representation
0 a ` 1 b and sometimes one more representation as ka ` 0 b; this last representation exists
simultaneously with the representation m f pa, b ` aq ka ` 0 pb ` aq, so hpa, bq 1 ` hpa, b ` aq
as well. Thus in this case the step is also proved.
l
Now it is easy to finish the solution. There exists a unique m-excellent pair of the form pa, aq,
and each other m-excellent pair pa, bq has a unique ancestor of the form px, xq with x m. By the
lemma, for every x m the number of its m-excellent descendants is hpx, xq, which is the number
of ways to represent m f px, xq m x as kx ` x (with nonnegative integer k and ). This
number is 0 if x {| m, and m{x otherwise. So the total number of excellent pairs is
1`
as required.

m
1`
d
d,
x
x|m, xm
d|m, d1
d|m

Shortlisted problems solutions

67

Comment. Let us present a sketch of an outline of a different solution. The plan is to check that the
number of excellent pairs does not depend on the (irrational) number , and to find this number for some
appropriate value of . For that, we first introduce some geometrical language. We deal only with the
excellent pairs pa, bq with a b.

Part I. Given an irrational positive , for every positive integer n we introduce two integral points F pnq
pn, tnuq and C pnq pn, rnsq on the coordinate plane Oxy. Then pq reads as rOF paqC pbqs m{2;
here rs stands for the signed area. Next, we rewrite in these terms the condition on a pair pa, bq to be

excellent. Let , `
, and be the lines determined by the equations y x, y x ` 1, and y x 1,
respectively.
a). Firstly, we deal with all excellent pairs pa, bq with a b. Given some value of a, all the points C such
that rOF paqCs m{2 lie on some line f paq; if there exist any good pairs pa, bq at all, this line has to
contain at least one integral point, which happens exactly when gcdpa, tauq | m.
Let P paq be the point of intersection of `
and f paq, and let p paq be its abscissa; notice that p paq
is irrational if it is nonzero. Now, if pa, bq is good, then the point C pbq lies on f paq, which means that
the point of f paq with abscissa b lies between and `
and is integral. If in addition the pair pa, b aq
is not good, then the point of f paq with abscissa b a lies above `
(see Fig. 1). Thus, the pair pa, bq
with b a is excellent exactly when p paq lies between b a and b, and the point of f paq with abscissa b
is integral (which means that this point is C pbq).
Notice now that, if p paq a, then the number of excellent pairs of the form pa, bq (with b a) is
gcdpa, tauq.

C
(b)
C
C(b)
(b)
C
(b)
P (a)

F(a)
(a)
F

C
(b)
C
C(b)
(b)
C
(b)

Q
(b)
Q
Q(b)
(b)
Q
(b)

C
(a)
C
C(a)
(a)
C
(a)

(a)
ff(a)

F
F
F(a)
(a)
(a)

ba

Figure 1

F
F
F(b)
(b)
(b)

(b)
cc(b)

b ab

Figure 2

b). Analogously, considering the pairs pa, bq with a b, we fix the value of b, introduce the line c pbq
containing all the points F with rOF C pbqs m{2, assume that this line contains an integral point
(which means gcdpb, rbsq | m), and denote the common point of c pbq and
by Q pbq, its abscissa
being q pbq. Similarly to the previous case, we obtain that the pair pa, bq is excellent exactly when q paq
lies between a b and a, and the point of c pbq with abscissa a is integral (see Fig. 2). Again, if q pbq b,
then the number of excellent pairs of the form pa, bq (with a b) is gcdpb, rbsq.

Part II, sketchy. Having obtained such a description, one may check how the number of excellent pairs
changes as grows. (Having done that, one may find this number
for
one appropriate value of ; for
`
1
instance, it is relatively easy to make this calculation for P 1, 1 ` m .)

Consider, for the initial value of , some excellent pair pa, tq with a t. As grows, this pair
eventually stops being excellent; this happens when the point Q ptq passes through F paq. At the same
moment, the pair pa ` t, tq becomes excellent instead.
This process halts when the point Q ptq eventually disappears, i.e. when passes through the ratio
of the coordinates of the point T C ptq. Hence, the point T afterwards is regarded as F ptq. Thus, all
the old excellent pairs of the form pa, tq with a t disappear; on the other hand, the same number of
excellent pairs with the first element being t just appear.

68

IMO 2013 Colombia

Similarly, if some pair pt, bq with t b is initially -excellent, then at some moment it stops being
excellent when P ptq passes through C pbq; at the same moment, the pair pt, b tq becomes excellent. This
process eventually stops when b t t. At this moment, again the second element of the pair becomes
fixed, and the first one starts to increase.
These ideas can be made precise enough to show that the number of excellent pairs remains unchanged,
as required.
We should warn the reader that the rigorous elaboration of Part II is technically quite involved, mostly
by the reason that the set of moments when the collection of excellent pairs changes is infinite. Especially
much care should be applied to the limit points of this set, which are exactly the points when the line
passes through some point of the form C pbq.

The same ideas may be explained in an algebraic language instead of a geometrical one; the same
technicalities remain in this way as well.

Problems short list


with solutions

Shortlisted Problems with Solutions

55th International Mathematical Olympiad


Cape Town, South Africa, 2014

Note of Confidentiality

The shortlisted problems should be kept


strictly confidential until IMO 2015.

Contributing Countries
The Organising Committee and the Problem Selection Committee of IMO 2014 thank the
following 43 countries for contributing 141 problem proposals.

Australia, Austria, Belgium, Benin, Bulgaria, Colombia, Croatia,


Cyprus, Czech Republic, Denmark, Ecuador, Estonia, Finland,
France, Georgia, Germany, Greece, Hong Kong, Hungary, Iceland,
India, Indonesia, Iran, Ireland, Japan, Lithuania, Luxembourg,
Malaysia, Mongolia, Netherlands, Nigeria, Pakistan, Russia,
Saudi Arabia, Serbia, Slovakia, Slovenia, South Korea, Thailand,
Turkey, Ukraine, United Kingdom, U.S.A.

Problem Selection Committee


Johan Meyer
Ilya I. Bogdanov
Geza Kos
Waldemar Pompe
Christian Reiher
Stephan Wagner

IMO 2014 South Africa

Problems
Algebra
A1.

Let z0 z1 z2 be an infinite sequence of positive integers. Prove that there


exists a unique integer n 1 such that
zn

z0 ` z1 ` ` zn
zn`1 .
n
(Austria)

A2. Define the function f : p0, 1q p0, 1q by


#
x`
f pxq
x2

1
2

if x 21 ,
if x 21 .

Let a and b be two real numbers such that 0 a b 1. We define the sequences an and bn
by a0 a, b0 b, and an f pan1 q, bn f pbn1 q for n 0. Show that there exists a positive
integer n such that
pan an1 qpbn bn1 q 0.
(Denmark)

A3. For a sequence x1 , x2 , . . . , xn of real numbers, we define its price as


max |x1 ` ` xi |.

1in

Given n real numbers, Dave and George want to arrange them into a sequence with a
low price. Diligent Dave checks all possible ways and finds the minimum possible price D.
Greedy George, on the other hand, chooses x1 such that |x1 | is as small as possible; among
the remaining numbers, he chooses x2 such that |x1 ` x2 | is as small as possible, and so on.
Thus, in the ith step he chooses xi among the remaining numbers so as to minimise the value
of |x1 ` x2 ` ` xi |. In each step, if several numbers provide the same value, George chooses
one at random. Finally he gets a sequence with price G.
Find the least possible constant c such that for every positive integer n, for every collection
of n real numbers, and for every possible sequence that George might obtain, the resulting
values satisfy the inequality G cD.
(Georgia)
A4. Determine all functions f : Z Z satisfying
for all integers m and n.

f f pmq ` n ` f pmq f pnq ` f p3mq ` 2014


(Netherlands)

Shortlisted problems

A5. Consider all polynomials P pxq with real coefficients that have the following property:
for any two real numbers x and y one has

|y 2 P pxq| 2 |x| if and only if |x2 P pyq| 2 |y| .


Determine all possible values of P p0q.

(Belgium)

A6. Find all functions f : Z Z such that


n2 ` 4f pnq f pf pnqq2
for all n P Z.

(United Kingdom)

IMO 2014 South Africa

Combinatorics
C1. Let n points be given inside a rectangle R such that no two of them lie on a line parallel
to one of the sides of R. The rectangle R is to be dissected into smaller rectangles with sides
parallel to the sides of R in such a way that none of these rectangles contains any of the given
points in its interior. Prove that we have to dissect R into at least n ` 1 smaller rectangles.
(Serbia)
m
C2. We have 2 sheets of paper, with the number 1 written on each of them. We perform
the following operation. In every step we choose two distinct sheets; if the numbers on the two
sheets are a and b, then we erase these numbers and write the number a ` b on both sheets.
Prove that after m2m1 steps, the sum of the numbers on all the sheets is at least 4m .
(Iran)
C3. Let n 2 be an integer. Consider an n n chessboard divided into n2 unit squares.
We call a configuration of n rooks on this board happy if every row and every column contains
exactly one rook. Find the greatest positive integer k such that for every happy configuration
of rooks, we can find a k k square without a rook on any of its k 2 unit squares.
(Croatia)
C4. Construct a tetromino by attaching two 2 1 dominoes along their longer sides such
that the midpoint of the longer side of one domino is a corner of the other domino. This
construction yields two kinds of tetrominoes with opposite orientations. Let us call them Sand Z-tetrominoes, respectively.

S-tetrominoes

Z-tetrominoes

Assume that a lattice polygon P can be tiled with S-tetrominoes. Prove than no matter
how we tile P using only S- and Z-tetrominoes, we always use an even number of Z-tetrominoes.
(Hungary)
C5. Consider n 3 lines in the plane such that no two lines are parallel and no three have a
common point. These lines divide the plane into polygonal
let F be the set of regions
Pa regions;
T
having finite area. Prove that it is possible to colour
n{2 of the lines blue in such a way
that no region in F has a completely blue boundary. (For a real number x, rxs denotes the
least integer which is not smaller than x.)
(Austria)

Shortlisted problems

C6. We are given an infinite deck of cards, each with a real number on it. For every real
number x, there is exactly one card in the deck that has x written on it. Now two players draw
disjoint sets A and B of 100 cards each from this deck. We would like to define a rule that
declares one of them a winner. This rule should satisfy the following conditions:
1. The winner only depends on the relative order of the 200 cards: if the cards are laid down
in increasing order face down and we are told which card belongs to which player, but
not what numbers are written on them, we can still decide the winner.
2. If we write the elements of both sets in increasing order as A ta1 , a2 , . . . , a100 u and
B tb1 , b2 , . . . , b100 u, and ai bi for all i, then A beats B.
3. If three players draw three disjoint sets A, B, C from the deck, A beats B and B beats C,
then A also beats C.
How many ways are there to define such a rule? Here, we consider two rules as different if there
exist two sets A and B such that A beats B according to one rule, but B beats A according to
the other.
(Russia)
C7. Let M be a set of n 4 points in the plane, no three of which are collinear. Initially these
points are connected with n segments so that each point in M is the endpoint of exactly two
segments. Then, at each step, one may choose two segments AB and CD sharing a common
interior point and replace them by the segments AC and BD if none of them is present at this
moment. Prove that it is impossible to perform n3 {4 or more such moves.
(Russia)
C8. A card deck consists of 1024 cards. On each card, a set of distinct decimal digits is
written in such a way that no two of these sets coincide (thus, one of the cards is empty). Two
players alternately take cards from the deck, one card per turn. After the deck is empty, each
player checks if he can throw out one of his cards so that each of the ten digits occurs on an
even number of his remaining cards. If one player can do this but the other one cannot, the
one who can is the winner; otherwise a draw is declared.
Determine all possible first moves of the first player after which he has a winning strategy.
(Russia)
C9. There are n circles drawn on a piece of paper in such a way that any two circles
intersect in two points, and no three circles pass through the same point. Turbo the snail slides
along the circles in the following fashion. Initially he moves on one of the circles in clockwise
direction. Turbo always keeps sliding along the current circle until he reaches an intersection
with another circle. Then he continues his journey on this new circle and also changes the
direction of moving, i.e. from clockwise to anticlockwise or vice versa.
Suppose that Turbos path entirely covers all circles. Prove that n must be odd.
(India)

IMO 2014 South Africa

Geometry
G1.

The points P and Q are chosen on the side BC of an acute-angled triangle ABC so
that =P AB =ACB and =QAC =CBA. The points M and N are taken on the rays AP
and AQ, respectively, so that AP P M and AQ QN. Prove that the lines BM and CN
intersect on the circumcircle of the triangle ABC.
(Georgia)
G2. Let ABC be a triangle. The points K, L, and M lie on the segments BC, CA, and AB,
respectively, such that the lines AK, BL, and CM intersect in a common point. Prove that it
is possible to choose two of the triangles ALM, BMK, and CKL whose inradii sum up to at
least the inradius of the triangle ABC.
(Estonia)
G3. Let and O be the circumcircle and the circumcentre of an acute-angled triangle ABC
with AB BC. The angle bisector of =ABC intersects at M B. Let be the circle
with diameter BM. The angle bisectors of =AOB and =BOC intersect at points P and Q,
respectively. The point R is chosen on the line P Q so that BR MR. Prove that BR k AC.
(Here we always assume that an angle bisector is a ray.)
(Russia)
G4. Consider a fixed circle with three fixed points A, B, and C on it. Also, let us fix
a real number P p0, 1q. For a variable point P R tA, B, Cu on , let M be the point on
the segment CP such that CM CP . Let Q be the second point of intersection of the
circumcircles of the triangles AMP and BMC. Prove that as P varies, the point Q lies on a
fixed circle.
(United Kingdom)

G5. Let ABCD be a convex quadrilateral with =B =D 90 . Point H is the foot of


the perpendicular from A to BD. The points S and T are chosen on the sides AB and AD,
respectively, in such a way that H lies inside triangle SCT and
=SHC =BSC 90 ,

=T HC =DT C 90 .

Prove that the circumcircle of triangle SHT is tangent to the line BD.
(Iran)
G6. Let ABC be a fixed acute-angled triangle. Consider some points E and F lying on
the sides AC and AB, respectively, and let M be the midpoint of EF . Let the perpendicular
bisector of EF intersect the line BC at K, and let the perpendicular bisector of MK intersect
the lines AC and AB at S and T , respectively. We call the pair pE, F q interesting, if the
quadrilateral KSAT is cyclic.
Suppose that the pairs pE1 , F1 q and pE2 , F2 q are interesting. Prove that
E1 E2
F1 F2

.
AB
AC
(Iran)
G7. Let ABC be a triangle with circumcircle and incentre I. Let the line passing through I
and perpendicular to CI intersect the segment BC and the arc BC (not containing A) of at
points U and V , respectively. Let the line passing through U and parallel to AI intersect AV
at X, and let the line passing through V and parallel to AI intersect AB at Y . Let W and Z be
the midpoints of AX and BC, respectively. Prove that if the points I, X, and Y are collinear,
then the points I, W , and Z are also collinear.
(U.S.A.)

Shortlisted problems

Number Theory
N1. Let n 2 be an integer, and let An be the set
An t2n 2k | k P Z, 0 k nu.
Determine the largest positive integer that cannot be written as the sum of one or more (not
necessarily distinct) elements of An .
(Serbia)
N2. Determine all pairs px, yq of positive integers such that
a
3
7x2 13xy ` 7y 2 |x y| ` 1 .

(U.S.A.)
N3. A coin is called a Cape Town coin if its value is 1{n for some positive integer n. Given
a collection of Cape Town coins of total value at most 99 ` 21 , prove that it is possible to split
this collection into at most 100 groups each of total value at most 1.
(Luxembourg)
N4. Let n 1 be a given integer. Prove that infinitely many terms of the sequence pak qk1 ,
defined by
Z k^
n
,
ak
k
are odd. (For a real number x, txu denotes the largest integer not exceeding x.)
(Hong Kong)
N5. Find all triples pp, x, yq consisting of a prime number p and two positive integers x and y
such that xp1 ` y and x ` y p1 are both powers of p.
(Belgium)
N6. Let a1 a2 an be pairwise coprime positive integers with a1 being prime
and a1 n ` 2. On the segment I r0, a1 a2 an s of the real line, mark all integers that are
divisible by at least one of the numbers a1 , . . . , an . These points split I into a number of smaller
segments. Prove that the sum of the squares of the lengths of these segments is divisible by a1 .
(Serbia)
N7. Let c 1 be an integer. Define a sequence of positive integers by a1 c and
an`1 a3n 4c a2n ` 5c2 an ` c
for all n 1. Prove that for each integer n 2 there exists a prime number p dividing an but
none of the numbers a1 , . . . , an1 .
(Austria)
N8. For every real number x, let }x} denote the distance between x and the nearest integer.
Prove that for every pair pa, bq of positive integers there exist an odd prime p and a positive
integer k satisfying

a b a ` b
` `

pk pk pk 1.
(Hungary)

10

IMO 2014 South Africa

Solutions
Algebra
A1.

Let z0 z1 z2 be an infinite sequence of positive integers. Prove that there


exists a unique integer n 1 such that
zn

z0 ` z1 ` ` zn
zn`1 .
n

p1q
(Austria)

Solution. For n 1, 2, . . . define


dn pz0 ` z1 ` ` zn q nzn .
The sign of dn indicates whether the first inequality in (1) holds; i.e., it is satisfied if and only
if dn 0.
Notice that
nzn`1 pz0 ` z1 ` ` zn q pn ` 1qzn`1 pz0 ` z1 ` ` zn ` zn`1 q dn`1 ,
so the second inequality in (1) is equivalent to dn`1 0. Therefore, we have to prove that there
is a unique index n 1 that satisfies dn 0 dn`1 .
By its definition the sequence d1 , d2 , . . . consists of integers and we have
d1 pz0 ` z1 q 1 z1 z0 0.
From
`
`

dn`1 dn pz0 ` ` zn ` zn`1 q pn ` 1qzn`1 pz0 ` ` zn q nzn npzn zn`1 q 0


we can see that dn`1 dn and thus the sequence strictly decreases.

Hence, we have a decreasing sequence d1 d2 . . . of integers such that its first element d1
is positive. The sequence must drop below 0 at some point, and thus there is a unique index n,
that is the index of the last positive term, satisfying dn 0 dn`1 .
Comment. Omitting the assumption that z1 , z2 , . . . are integers allows the numbers dn to be all
positive. In such cases the desired n does not exist. This happens for example if zn 2 21n for all
integers n 0.

Shortlisted problems solutions

11

A2. Define the function f : p0, 1q p0, 1q by


#
x`
f pxq
x2

if x 21 ,
if x 21 .

1
2

Let a and b be two real numbers such that 0 a b 1. We define the sequences an and bn
by a0 a, b0 b, and an f pan1 q, bn f pbn1 q for n 0. Show that there exists a positive
integer n such that
pan an1 qpbn bn1 q 0.
(Denmark)
Solution. Note that
if x

1
2

f pxq x

1
2

and
f pxq x x2 x 0

if x 21 . So if we consider p0, 1q as being divided into the two subintervals I1 p0, 21 q and
I2 r 21 , 1q, the inequality
`
`

pan an1 qpbn bn1 q f pan1 q an1 f pbn1 q bn1 0


holds if and only if an1 and bn1 lie in distinct subintervals.
Let us now assume, to the contrary, that ak and bk always lie in the same subinterval.
Consider the distance dk |ak bk |. If both ak and bk lie in I1 , then

dk`1 |ak`1 bk`1 | ak ` 21 bk 21 dk .

If, on the other hand, ak and bk both lie in I2 , then minpak , bk q 21 and maxpak , bk q
minpak , bk q ` dk 21 ` dk , which implies

dk`1 |ak`1 bk`1 | a2k b2k pak bk qpak ` bk q |ak bk | 21 ` 21 ` dk dk p1 ` dk q dk .


This means that the difference dk is non-decreasing, and in particular dk d0 0 for all k.
We can even say more. If ak and bk lie in I2 , then
dk`2 dk`1 dk p1 ` dk q dk p1 ` d0 q.
If ak and bk both lie in I1 , then ak`1 and bk`1 both lie in I2 , and so we have
dk`2 dk`1p1 ` dk`1 q dk`1p1 ` d0 q dk p1 ` d0 q.
In either case, dk`2 dk p1 ` d0 q, and inductively we get
d2m d0 p1 ` d0 qm .
For sufficiently large m, the right-hand side is greater than 1, but since a2m , b2m both lie in
p0, 1q, we must have d2m 1, a contradiction.
Thus there must be a positive integer n such that an1 and bn1 do not lie in the same
subinterval, which proves the desired statement.

12

IMO 2014 South Africa

A3. For a sequence x1 , x2 , . . . , xn of real numbers, we define its price as


max |x1 ` ` xi |.

1in

Given n real numbers, Dave and George want to arrange them into a sequence with a
low price. Diligent Dave checks all possible ways and finds the minimum possible price D.
Greedy George, on the other hand, chooses x1 such that |x1 | is as small as possible; among
the remaining numbers, he chooses x2 such that |x1 ` x2 | is as small as possible, and so on.
Thus, in the ith step he chooses xi among the remaining numbers so as to minimise the value
of |x1 ` x2 ` ` xi |. In each step, if several numbers provide the same value, George chooses
one at random. Finally he gets a sequence with price G.
Find the least possible constant c such that for every positive integer n, for every collection
of n real numbers, and for every possible sequence that George might obtain, the resulting
values satisfy the inequality G cD.
(Georgia)
Answer. c 2.

Solution. If the initial numbers are 1, 1, 2, and 2, then Dave may arrange them as
1, 2, 2, 1, while George may get the sequence 1, 1, 2, 2, resulting in D 1 and G 2. So
we obtain c 2.
Therefore, it remains to prove that G 2D. Let x1 , x2 , . . . , xn be the numbers Dave and
George have at their disposal. Assume that Dave and George arrange them into sequences
d1 , d2, . . . , dn and g1 , g2 , . . . , gn , respectively. Put
M max |xi |,
1in

S |x1 ` ` xn |,

and N maxtM, Su.

We claim that
D S,
M
,
and
D
2
G N maxtM, Su.
These inequalities yield the desired estimate, as G maxtM, Su maxtM, 2Su 2D.
The inequality (1) is a direct consequence of the definition of the price.
To prove (2), consider an index i with |di | M. Then we have

M |di | pd1 ` ` di q pd1 ` ` di1 q |d1 ` ` di | ` |d1 ` ` di1 | 2D,

(1)
(2)
(3)

as required.
It remains to establish (3). Put hi g1 ` g2 ` ` gi . We will prove by induction on
i that |hi | N. The base case i 1 holds, since |h1 | |g1 | M N. Notice also that
|hn | S N.
For the induction step, assume that |hi1 | N. We distinguish two cases.
Case 1. Assume that no two of the numbers gi , gi`1 , . . . , gn have opposite signs.
Without loss of generality, we may assume that they are all nonnegative. Then one has
hi1 hi hn , thus
(
|hi | max |hi1 |, |hn | N.
Case 2. Among the numbers gi , gi`1 , . . . , gn there are positive and negative ones.

Shortlisted problems solutions

13

Then there exists some index j i such that hi1 gj 0. By the definition of Georges
sequence we have
(
|hi | |hi1 ` gi | |hi1 ` gj | max |hi1 |, |gj | N.
Thus, the induction step is established.

Comment 1. One can establish the weaker inequalities D


result also follows.

M
2

and G D `

M
2

from which the

Comment 2. One may ask a more specific question to find the maximal suitable c if the number n
is fixed. For n 1 or 2, the answer is c 1. For n 3, the answer is c 32 , and it is reached e.g.,
for the collection 1, 2, 4. Finally, for n 4 the answer is c 2. In this case the arguments from the
solution above apply, and the answer is reached e.g., for the same collection 1, 1, 2, 2, augmented
by several zeroes.

14

IMO 2014 South Africa

A4. Determine all functions f : Z Z satisfying

for all integers m and n.

f f pmq ` n ` f pmq f pnq ` f p3mq ` 2014

(1)
(Netherlands)

Answer. There is only one such function, namely n 2n ` 1007.

Solution. Let f be a function satisfying (1). Set C 1007 and define the function g : Z Z
by gpmq f p3mq f pmq ` 2C for all m P Z; in particular, gp0q 2C. Now (1) rewrites as
`

f f pmq ` n gpmq ` f pnq


for all m, n P Z. By induction in both directions it follows that
`

f tf pmq ` n tgpmq ` f pnq

(2)

holds for all m, n, t P Z. Applying this, for any r P Z, to the triples r, 0, f p0q and 0, 0, f prq
in place of pm, n, tq we obtain
`

f p0qgprq f f prqf p0q f p0q f prqgp0q .


Now if f p0q vanished, then gp0q 2C 0 would entail that f vanishes identically, contrary
is some
to (1). Thus f p0q 0 and the previous equation yields gprq f prq, where fgp0q
p0q
nonzero constant.
So the definition of g reveals f p3mq p1 ` qf pmq 2C, i.e.,
`

f p3mq p1 ` q f pmq
(3)

for all m P Z, where

2C
.

By induction on k this implies

f p3k mq p1 ` qk f pmq

(4)

f pn ` tdq f pnq ` td

(5)

for all integers k 0 and m.


Since 3 2014, there exists by (1) some value d f paq attained by f that is not divisible
by 3. Now by (2) we have f pn ` tdq f pnq ` tgpaq f pnq ` tf paq, i.e.,

for all n, t P Z.
Let us fix any positive integer k with d | p3k 1q, which is possible, since gcdp3, dq 1.
E.g., by the EulerFermat theorem, we may take k p|d|q. Now for each m P Z we get
f p3k mq f pmq ` p3k 1qm
`
`

from (5), which in view of (4) yields p1 ` qk 1 f pmq p3k 1qm. Since 0,
the right hand side does not vanish for m 0, wherefore the first factor on the left hand side
cannot vanish either. It follows that
f pmq

p3k 1q
m`.
p1 ` qk 1

Shortlisted problems solutions

15

So f is a linear function, say f pmq Am ` for all m P Z with some constant A P Q. Plugging
this into (1) one obtains pA2 2Aqm ` pA 2Cq 0 for all m, which is equivalent to the
conjunction of
A2 2A

and

A 2C .

(6)

The first equation is equivalent to A P t0, 2u, and as C 0 the second one gives
A2

and

C.

(7)

This shows that f is indeed the function mentioned in the answer and as the numbers found
in (7) do indeed satisfy the equations (6) this function is indeed as desired.
Comment 1. One may see that 2. A more pedestrian version of the above solution starts with
a direct proof of this fact, that can be obtained by substituting some special values into (1), e.g., as
follows.
Set D f p0q. Plugging m 0 into (1) and simplifying, we get
f pn ` Dq f pnq ` 2C

(8)

for all n P Z. In particular, for n 0, D, 2D we obtain f pDq 2C ` D, f p2Dq f pDq` 2C 4C ` D,


and f p3Dq f p2Dq ` 2C 6C ` D. So substituting m D and n r D into (1) and applying (8)
with n r D afterwards we learn
`

f pr ` 2Cq ` 2C ` D f prq 2C ` p6C ` Dq ` 2C ,

i.e., f pr ` 2Cq f prq ` 4C. By induction in both directions it follows that


f pn ` 2Ctq f pnq ` 4Ct

(9)

holds for all n, t P Z.

Claim. If a and b denote two integers with the property that f pn ` aq f pnq ` b holds for all n P Z,
then b 2a.
Proof. Applying induction in both directions to the assumption we get f pn ` taq f pnq ` tb for all
n, t P Z. Plugging pn, tq p0, 2Cq into this equation and pn, tq p0, aq into (9) we get f p2aCq f p0q
2bC 4aC, and, as C 0, the claim follows.
l
Now by (1), for any m P Z, the numbers a f pmq and b f p3mq f pmq ` 2C have the property
mentioned in the claim, whence we have
`

f p3mq C 3 f pmq C .

In view of (3) this tells us indeed that 2.


Now the solution may be completed as above, but due to our knowledge of 2 we get the
desired formula f pmq 2m ` C directly without having the need to go through all linear functions.
Now it just remains to check that this function does indeed satisfy (1).
Comment 2. It is natural to wonder what happens if one replaces the number 2014 appearing in
the statement of the problem by some arbitrary integer B.
If B is odd, there is no such function, as can be seen by using the same ideas as in the above
solution.
If B 0 is even, however, then the only such function is given by n 2n`B{2. In case 3 B this
was essentially proved above, but for the general case one more idea seems to be necessary. Writing
B 3 k with some integers and k such that 3 k one can obtain f pnq 2n ` B{2 for all n that
are divisible by 3 in the same manner as usual; then one may use the formula f p3nq 3f pnq B to
establish the remaining cases.

16

IMO 2014 South Africa

Finally, in case B 0 there are more solutions than just the function n 2n. It can be shown
that all these other functions are periodic; to mention just one kind of example, for any even integers
r and s the function
#
r if n is even,
f pnq
s if n is odd,
also has the property under discussion.

Shortlisted problems solutions

17

A5. Consider all polynomials P pxq with real coefficients that have the following property:
for any two real numbers x and y one has

|y 2 P pxq| 2 |x| if and only if |x2 P pyq| 2 |y| .


Determine all possible values of P p0q.

(1)
(Belgium)

Answer. The set of possible values of P p0q is p8, 0q Y t1u.


Solution.
Part I. We begin by verifying that these numbers are indeed possible values of P p0q. To see
that each negative real numberC can be P p0q, it suffices to check that for every C 0 the
2
polynomial P pxq 2xC ` C has the property described in the statement of the problem.

Due to symmetry it is enough for this purpose to prove |y 2 P pxq| 2 |x| for any two real
numbers x and y. In fact we have
x2
x2 p|x| Cq2
`
` 2 |x|
` 2 |x| 2 |x| ,
|y P pxq| y `
C
C
C
2

where in the first estimate equality can only hold if |x| C, whilst in the second one it can
only hold if x 0. As these two conditions cannot be met at the same time, we have indeed
|y 2 P pxq| 2 |x|.
To show that P p0q 1 is possible as well, we verify that the polynomial P pxq x2 ` 1
satisfies (1). Notice that for all real numbers x and y we have
|y 2 P pxq| 2 |x| py 2 x2 1q2 4x2
`
`

0 py 2 px 1q2 px ` 1q2 y 2
0 py x ` 1qpy ` x 1qpx ` 1 yqpx ` 1 ` yq
`
`

0 px ` yq2 1 1 px yq2 .

Since this inequality is symmetric in x and y, we are done.

Part II. Now we show that no values other than those mentioned in the answer are possible
for P p0q. To reach this we let P denote any polynomial satisfying (1) and P p0q 0; as we shall
see, this implies P pxq x2 ` 1 for all real x, which is actually more than what we want.
First step: We prove that P is even.
By (1) we have

|y 2 P pxq| 2 |x| |x2 P pyq| 2 |y| |y 2 P pxq| 2 |x|


for all real numbers x and y. Considering just the equivalence of the first and third statement
and taking into account that y 2 may vary through R0 we infer that

P pxq 2 |x|, P pxq ` 2 |x| X R0 P pxq 2 |x|, P pxq ` 2 |x| X R0

holds for all x P R. We claim that there are infinitely many real numbers x such that
P pxq ` 2 |x| 0. This holds in fact for any real polynomial with P p0q 0; in order to see
this, we may assume that the coefficient of P appearing in front of x is nonnegative. In this
case the desired inequality holds for all sufficiently small positive real numbers.
For such numbers x satisfying P pxq ` 2 |x| 0 we have P pxq ` 2 |x| P pxq ` 2 |x| by
the previous displayed formula, and hence also P pxq P pxq. Consequently the polynomial
P pxq P pxq has infinitely many zeros, wherefore it has to vanish identically. Thus P is
indeed even.

18

IMO 2014 South Africa

Second step: We prove that P ptq 0 for all t P R.


Let us assume for a moment that there exists a real number t 0 with P ptq 0. Then
there is some open interval I around t such that |P pyq| 2 |y| holds for all y P I. Plugging
x 0 into (1) we learn that y 2 P p0q holds for all y P I, which is clearly absurd. We have
thus shown P ptq 0 for all t 0.
In combination with P p0q 0 this informs us that our claim could only fail if P p0q 0. In
this case there is by our first step a polynomial Qpxq such that P pxq x2 Qpxq. Applying (1)
to x 0 and an arbitrary y 0 we get |y Qpyq| 2, which is surely false when y is sufficiently
small.
Third step: We prove that P is a quadratic polynomial.
a
Notice that P cannot be constant, for otherwise if x P p0q and y is sufficiently large, the
first part of (1) is false whilst the second part is true. So the degree n of P has to be at least 1.
By our first step n has to be even as well, a
whence in particular n 2. `a
a

Now assume that n 4. Plugging y P pxq into (1) we get x2 P


P pxq 2 P pxq
and hence
a
`a

P
P pxq x2 ` 2 P pxq

for all real x. Choose positive real numbers x0 , a, and b such that if x P px0 , 8q, then axn
P pxq bxn ; this is indeed possible, for if d 0 denotes the leading coefficient of P , then
d, whence for instance the numbers a d2 and b 2d work provided that x0 is
lim P pxq
n
x8 x
chosen large enough.
Now for all sufficiently large real numbers x we have
a

`a
2
P pxq x2 ` 2 P pxq xn{2 ` 2b1{2 xn{2 ,
an{2`1 xn {2 aP pxqn{2 P
i.e.

1 ` 2b1{2
,
an{2`1
which is surely absurd. Thus P is indeed a quadratic polynomial.
xpn

2 nq{2

Fourth step: We prove that P pxq x2 ` 1.


In the light of our first three steps there are?two real numbers a 0 and b such that P pxq
ax2 ` b. Now if x is large ?
enough and y a x, the left part of (1) holds and the right part
2 2
reads |p1 a qx b| 2 a x. In view of the fact that a 0 this is only possible if a 1.
Finally, substituting y x ` 1 with x 0 into (1) we get
|2x ` 1 b| 2x |2x ` 1 ` b| 2x ` 2 ,
i.e.,
b P r1, 4x ` 1s b P r4x 3, 1s

for all x 0. Choosing x large enough, we can achieve that at least one of these two statements
holds; then both hold, which is only possible if b 1, as desired.
Comment 1. There are some issues with this problem in that its most natural solutions seem to
use some basic facts from analysis, such as the continuity of polynomials or the intermediate value
theorem. Yet these facts are intuitively obvious and implicitly clear to the students competing at this
level of difficulty, so that the Problem Selection Committee still thinks that the problem is suitable
for the IMO.
Comment 2. It seems that most solutions will in the main case, where P p0q is nonnegative, contain
an argument that is somewhat asymptotic in nature showing that P is quadratic, and some part
narrowing that case down to P pxq x2 ` 1.

Shortlisted problems solutions

19

Comment 3. It is also possible to skip the first step and start with the second step directly, but
then one has to work a bit harder to rule out the case P p0q 0. Let us sketch one possibility of doing
this: Take the auxiliary polynomial Qpxq such that P pxq xQpxq. Applying (1) to x 0 and an
arbitrary y 0 we get |Qpyq| 2. Hence we either have Qpzq 2 for all real z or Qpzq 2 for all
real z. In particular there is some P t1, `1u such that P pq 2 and P pq 2. Substituting
x into (1) we learn
|y 2 P pq| 2 |1 P pyq| 2 |y| |y 2 P pq| 2 .
But for y

P pq the first statement is true, whilst the third one is false.

Also, if one has not obtained the evenness of P before embarking on the fourth step, one needs to
work a bit harder there, but not in a way that is likely to cause major difficulties.

Comment 4. Truly curious people may wonder about the set of all polynomials having property (1).
As explained in the solution above, P pxq x2 ` 1 is the only one with P p0q 1. On the other hand,
it is not hard to notice that for negative P p0q there are more possibilities than those mentioned above.
E.g., as remarked by the proposer, if a and b denote two positive real `numbers with ab 1 and Q
denotes a polynomial attaining nonnegative values only, then P pxq ax2 ` b ` Qpxq works.
More generally, it may be proved that if P pxq satisfies (1) and P p0q 0, then P pxq 2 |x| holds
for all x P R so that one just considers the equivalence of two false statements. One may generate all
such polynomials P by going through all combinations of a solution of the polynomial equation
x ApxqBpxq ` CpxqDpxq
and a real E 0, and setting

for each of them.

P pxq Apxq2 ` Bpxq2 ` Cpxq2 ` Dpxq2 ` E

20

IMO 2014 South Africa

A6. Find all functions f : Z Z such that


n2 ` 4f pnq f pf pnqq2
for all n P Z.

(1)
(United Kingdom)

Answer. The possibilities are:


f pnq n ` 1 for all n;
#
n ` 1,
n a,
or, for some a 1, f pnq
n ` 1, n a;
$

n 0,
&n ` 1,
or f pnq 0,
n 0,

%
n ` 1, n 0.

Solution 1.
Part I. Let us first check that each of the functions above really satisfies the given functional
equation. If f pnq n ` 1 for all n, then we have
n2 ` 4f pnq n2 ` 4n ` 4 pn ` 2q2 f pn ` 1q2 f pf pnqq2 .
If f pnq n ` 1 for n a and f pnq n ` 1 otherwise, then we have the same identity for
n a and
n2 ` 4f pnq n2 4n ` 4 p2 nq2 f p1 nq2 f pf pnqq2
otherwise. The same applies to the third solution (with a 0), where in addition one has
02 ` 4f p0q 0 f pf p0qq2.
Part II. It remains to prove that these are really the only functions that satisfy our functional equation. We do so in three steps:
Step 1: We prove that f pnq n ` 1 for n 0.
Consider the sequence pak q given by ak f k p1q for k 0. Setting n ak in (1), we get
a2k ` 4ak`1 a2k`2 .
Of course, a0 1 by definition. Since a22 1 ` 4a1 is odd, a2 has to be odd as well, so we set
a2 2r ` 1 for some r P Z. Then a1 r 2 ` r and consequently
a23 a21 ` 4a2 pr 2 ` rq2 ` 8r ` 4.
Since 8r ` 4 0, a23 pr 2 ` rq2 , so the difference between a23 and pr 2 ` rq2 is at least the
distance from pr 2 ` rq2 to the nearest even square (since 8r ` 4 and r 2 ` r are both even). This
implies that

|8r ` 4| a23 pr 2 ` rq2 pr 2 ` rq2 pr 2 ` r 2q2 4pr 2 ` r 1q,


(for r 0 and r 1, the estimate is trivial, but this does not matter). Therefore, we ave
4r 2 |8r ` 4| 4r ` 4.

Shortlisted problems solutions

21

If |r| 4, then
4r 2 16|r| 12|r| ` 16 8|r| ` 4 ` 4|r| ` 4 |8r ` 4| 4r ` 4,
a contradiction. Thus |r| 4. Checking all possible remaining values of r, we find that
pr 2 ` rq2 ` 8r ` 4 is only a square in three cases: r 3, r 0 and r 1. Let us now
distinguish these three cases:
r 3, thus a1 6 and a2 5. For each k 1, we have
b
ak`2 a2k ` 4ak`1,

and the sign needs to be chosen in such a way that a2k`1 ` 4ak`2 is again a square. This
yields a3 4, a4 3, a5 2, a6 1, a7 0, a8 1, a9 2. At this point
we have reached a contradiction, since f p1q f pa0 q a1 6 and at the same time
f p1q f pa8 q a9 2.

r 0, thus a1 0 and a2 1. Then a23 a21 ` 4a2 4, so a3 2. This, however,


is a contradiction again, since it gives us f p1q f pa0 q a1 0 and at the same time
f p1q f pa2 q a3 2.
r 1, thus a1 2 and a2 3. We prove by induction that ak k ` 1 for all k 0
in this case, which we already know for k 2 now. For the induction step, assume that
ak1 k and ak k ` 1. Then
a2k`1 a2k1 ` 4ak k 2 ` 4k ` 4 pk ` 2q2 ,
so ak`1 pk ` 2q. If ak`1 pk ` 2q, then
a2k`2 a2k ` 4ak`1 pk ` 1q2 4k 8 k 2 2k 7 pk 1q2 8.
The latter can only be a square if k 4 (since 1 and 9 are the only two squares whose
difference is 8). Then, however, a4 5, a5 6 and a6 1, so
a27 a25 ` 4a6 36 4,
but neither 32 nor 40 is a perfect square. Thus ak`1 k ` 2, which completes our
induction. This also means that f pnq f pan1 q an n ` 1 for all n 1.
Step 2: We prove that either f p0q 1, or f p0q 0 and f pnq 0 for n 0.
Set n 0 in (1) to get
4f p0q f pf p0qq2.
This means that f p0q 0. If f p0q 0, then f pnq 0 for all n 0, since we would otherwise
have
n2 n2 ` 4f pnq f pf pnqq2 f p0q2 0.
If f p0q 0, then we know that f pf p0qq f p0q ` 1 from the first step, so

which yields f p0q 1.

`
2
4f p0q f p0q ` 1 ,

22

IMO 2014 South Africa


Step 3: We discuss the values of f pnq for n 0.

Lemma. For every n 1, we have f pnq n ` 1 or f pnq n ` 1. Moreover, if f pnq


n ` 1 for some n 1, then also f pn ` 1q n ` 2.
Proof. We prove this statement by strong induction on n. For n 1, we get
1 ` 4f p1q f pf p1qq2.

Thus f p1q needs to be nonnegative. If f p1q 0, then f pf p1qq f p0q 1, so f p0q 1


(by our second step). Otherwise, we know that f pf p1qq f p1q ` 1, so
`
2
1 ` 4f p1q f p1q ` 1 ,
which yields f p1q 2 and thus establishes the base case. For the induction step, we consider
two cases:
If f pnq n, then

f pf pnqq2 pnq2 ` 4f pnq n2 4n pn 2q2 ,

so |f pf pnqq| n 3 (for n 2, this case cannot even occur). If f pf pnqq 0, then we


already know from the first two steps that f pf pf pnqqq f pf pnqq ` 1, unless perhaps
if f p0q 0 and f pf pnqq 0. However, the latter would imply f pnq 0 (as shown in
Step 2) and thus n 0, which is impossible. If f pf pnqq 0, we can apply the induction
hypothesis to f pf pnqq. In either case, f pf pf pnqqq f pf pnqq ` 1. Therefore,
`
2
f pnq2 ` 4f pf pnqq f pf pf pnqqq2 f pf pnqq ` 1 ,
which gives us

`
2
n2 f pnq2 f pf pnqq ` 1 4f pf pnqq f pf pnqq2 ` 6|f pf pnqq| ` 1
pn 3q2 ` 6pn 3q ` 1 n2 8,
a contradiction.
Thus, we are left with the case that f pnq n. Now we argue as in the previous
case: if f pnq 0, then f pf pnqq f pnq ` 1 by the first two steps, since f p0q 0
and f pnq 0 would imply n 0 (as seen in Step 2) and is thus impossible. If
f pnq 0, we can apply the induction hypothesis, so in any case we can infer that
f pf pnqq f pnq ` 1. We obtain
`
2
pnq2 ` 4f pnq f pnq ` 1 ,
so either

`
2
n2 f pnq2 2f pnq ` 1 f pnq 1 ,

which gives us f pnq n ` 1, or

`
2
n2 f pnq2 6f pnq ` 1 f pnq 3 8.

Since 1 and 9 are the only perfect squares whose difference is 8, we must have n 1,
which we have already considered.
Finally, suppose that f pnq n ` 1 for some n 2. Then

f pn ` 1q2 f pf pnqq2 pnq2 ` 4f pnq pn 2q2 ,

so f pn` 1q pn 2q. However, we already know that f pn` 1q n` 2 or f pn` 1q n,


so f pn ` 1q n ` 2.
l

Shortlisted problems solutions

23

Combining everything we know, we find the solutions as stated in the answer:


One solution is given by f pnq n ` 1 for all n.
If f pnq is not always equal to n ` 1, then there is a largest integer m (which cannot be
positive) for which this is not the case. In view of the lemma that we proved, we must
then have f pnq n ` 1 for any integer n m. If m a 0, we obtain f pnq n ` 1
for n a (and f pnq n ` 1 otherwise). If m 0, we have the additional possibility
that f p0q 0, f pnq n ` 1 for negative n and f pnq n ` 1 for positive n.
Solution 2. Let us provide an alternative proof for Part II, which also proceeds in several
steps.
Step 1. Let a be an arbitrary integer and b f paq. We first concentrate on the case where
|a| is sufficiently large.
1. If b 0, then (1) applied to a yields a2 f pf paqq2, thus
f paq 0

a f p0q.

(2)

From now on, we set D |f p0q|. Throughout Step 1, we will assume that a R tD, 0, Du,
thus b 0.
2. From (1), noticing that f pf paqq and a have the same parity, we get

`
2
0 4|b| f pf paqq2 a2 a2 |a| 2 4|a| 4.
Hence we have

|b| |f paq| |a| 1

for a R tD, 0, Du.

(3)

For the rest of Step 1, we also assume that |a| E maxtD ` 2, 10u. Then by (3) we
have |b| D ` 1 and thus |f pbq| D.
3. Set c f pbq; by (3), we have |c| |b| 1. Thus (1) yields
`
2
a2 ` 4b c2 |b| 1 ,
which implies

`
2
`
2
`
2
a2 |b| 1 4|b| |b| 3 8 |b| 4

because |b| |a| 1 9. Thus (3) can be refined to


|a| ` 3 |f paq| |a| 1

for |a| E.

Now, from c2 a2 ` 4b with |b| P r|a| 1, |a| ` 3s we get c2 pa 2q2 ` d, where


d P t16, 12, 8, 4, 0, 4, 8u. Since |a 2| 8, this can happen only if c2 pa 2q2 ,
which in turn yields b a ` 1. To summarise,
f paq 1 a

for |a| E.

(4)

We have shown that, with at most finitely many exceptions, f paq 1 a. Thus it will be
convenient for our second step to introduce the sets
(
(
`

Z` a P Z : f paq a ` 1 , Z a P Z : f paq 1 a , and Z0 Zz Z` Y Z .

24

IMO 2014 South Africa


Step 2. Now we investigate the structure of the sets Z` , Z , and Z0 .
4. Note that f pE `1q 1pE `1q. If f pE `1q E `2, then E `1 P Z` . Otherwise we have
f p1`Eq E; then the original equation (1) with n E `1 gives us pE 1q2 f pEq2 ,
so f pEq pE 1q. By (4) this may happen only if f pEq 1 E, so in this case
E P Z` . In any case we find that Z` .
5. Now take any a P Z` . We claim that every integer x a also lies in Z` . We proceed by
induction on x, the base case x a being covered by our assumption. For the induction
step, assume that f px 1q x and plug n x 1 into (1). We get f pxq2 px ` 1q2 , so
either f pxq x ` 1 or f pxq px ` 1q.

Assume that f pxq px ` 1q and x 1, since otherwise we already have f pxq x ` 1.


Plugging n x into (1), we obtain f px 1q2 px 2q2 8, which may happen only if
x2 3 and f px1q 1. Plugging n x1 into (1), we get f p1q2 px`1q2 4,
which in turn may happen only if x ` 1 P t2, 0, 2u.
Thus x P t1, 5u and at the same time x P t3, 1, 1u, which gives us x 1. Since this
has already been excluded, we must have f pxq x ` 1, which completes our induction.

6. Now we know that either Z` Z (if Z` is not bounded below), or Z` ta P Z : a a0 u,


where a0 is the smallest element of Z` . In the former case, f pnq n ` 1 for all n P Z,
which is our first solution. So we assume in the following that Z` is bounded below and
has a smallest element a0 .
If Z0 , then we have f pxq x ` 1 for x a0 and f pxq 1 x for x a0 . In
particular, f p0q 1 in any case, so 0 P Z` and thus a0 0. Thus we end up with the
second solution listed in the answer. It remains to consider the case where Z0 .
7. Assume that there exists some a P Z0 with b f paq R Z0 , so that f pbq 1 b. Then we
have a2 ` 4b p1 bq2 , so either a2 pb 1q2 or a2 pb 3q2 8. In the former case
we have b 1 a, which is impossible by our choice of a. So we get a2 pb 3q2 8,
which implies f pbq 1 b and |a| 1, |b 3| 3.

If b 0, then we have f pbq 1, so b P Z` and therefore a0 0; hence a 1. But then


f paq 0 a ` 1, so a P Z` , which is impossible.
If b 6, then we have f p6q 5, so f p5q2 16 and f p5q P t4, 4u. Then f pf p5qq2
25 ` 4f p5q P t9, 41u, so f p5q 4 and 5 P Z` . This implies a0 5, which
contradicts our assumption that 1 a R Z` .

8. Thus we have shown that f pZ0 q Z0 , and Z0 is finite. Take any element c P Z0 , and
consider the sequence defined by ci f i pcq. All elements of the sequence pci q lie in Z0 ,
hence it is bounded. Choose an index k for which |ck | is maximal, so that in particular
|ck`1 | |ck | and |ck`2| |ck |. Our functional equation (1) yields
p|ck | 2q2 4 |ck |2 4|ck | c2k ` 4ck`1 c2k`2 .
Since ck and ck`2 have the same parity and |ck`2 | |ck |, this leaves us with three possibilities: |ck`2 | |ck |, |ck`2 | |ck | 2, and |ck | 2 2, ck`2 0.
If |ck`2 | |ck | 2, then f pck q ck`1 1 |ck |, which means that ck P Z or ck P Z` ,
and we reach a contradiction.
If |ck`2 | |ck |, then ck`1 0, thus c2k`3 4ck`2. So either ck`3 0 or (by maximality
of |ck`2 | |ck |) ci 0 for all i. In the former case, we can repeat the entire argument

Shortlisted problems solutions

25

with ck`2 in the place of ck . Now |ck`4 | |ck`2 | is not possible any more since ck`3 0,
leaving us with the only possibility |ck | 2 |ck`2 | 2 2.
Thus we know now that either all ci are equal to 0, or |ck | 4. If ck 4, then either
ck`1 0 and |ck`2 | |ck | 4, or ck`2 0 and ck`1 4. From this point onwards, all
elements of the sequence are either 0 or 4.
Let cr be the last element of the sequence that is not equal to 0 or 4 (if such an element
exists). Then cr`1 , cr`2 P t4, 0, 4u, so
c2r c2r`2 4cr`1 P t16, 0, 16, 32u,
which gives us a contradiction. Thus all elements of the sequence are equal to 0 or 4,
and since the choice of c0 c was arbitrary, Z0 t4, 0, 4u.
9. Finally, we show that 4 R Z0 and 4 R Z0 . Suppose that 4 P Z0 . Then in particular a0
(the smallest element of Z` ) cannot be less than 4, since this would imply 4 P Z` . So
3 P Z , which means that f p3q 4. Then 25 p3q2 ` 4f p3q f pf p3qq2 f p4q2 ,
so f p4q 5 R Z0 , and we reach a contradiction.
Suppose that 4 P Z0 . The only possible values for f p4q that are left are 0 and 4. Note
that 4f p0q f pf p0qq2 , so f p0q 0. If f p4q 0, then we get 16 p4q2 ` 0 f p0q2 ,
thus f p0q 4. But then f pf p4qq R Z0 , which is impossible. Thus f p4q 4, which
gives us 0 p4q2 ` 4f p4q f pf p4qq2 16, and this is clearly absurd.
Now we are left with Z0 t0u and f p0q 0 as the only possibility. If 1 P Z , then
f p1q 0, so 1 12 ` 4f p1q f pf p1qq2 f p0q2 0, which is another contradiction. Thus
1 P Z` , meaning that a0 1. On the other hand, a0 0 would imply 0 P Z` , so we can
only have a0 1. Thus Z` comprises all positive integers, and Z comprises all negative
integers. This gives us the third solution.

Comment. All solutions known to the Problem Selection Committee are quite lengthy and technical,
as the two solutions presented here show. It is possible to make the problem easier by imposing
additional assumptions, such as f p0q 0 or f pnq 1 for all n 0, to remove some of the technicalities.

26

IMO 2014 South Africa

Combinatorics
C1. Let n points be given inside a rectangle R such that no two of them lie on a line parallel
to one of the sides of R. The rectangle R is to be dissected into smaller rectangles with sides
parallel to the sides of R in such a way that none of these rectangles contains any of the given
points in its interior. Prove that we have to dissect R into at least n ` 1 smaller rectangles.
(Serbia)
Solution 1. Let k be the number of rectangles in the dissection. The set of all points that
are corners of one of the rectangles can be divided into three disjoint subsets:
A, which consists of the four corners of the original rectangle R, each of which is the
corner of exactly one of the smaller rectangles,
B, which contains points where exactly two of the rectangles have a common corner
(T-junctions, see the figure below),
C, which contains points where four of the rectangles have a common corner (crossings,
see the figure below).

Figure 1: A T-junction and a crossing


We denote the number of points in B by b and the number of points in C by c. Since each
of the k rectangles has exactly four corners, we get
4k 4 ` 2b ` 4c.
It follows that 2b 4k 4, so b 2k 2.
Each of the n given points has to lie on a side of one of the smaller rectangles (but not
of the original rectangle R). If we extend this side as far as possible along borders between
rectangles, we obtain a line segment whose ends are T-junctions. Note that every point in B
can only be an endpoint of at most one such segment containing one of the given points, since
it is stated that no two of them lie on a common line parallel to the sides of R. This means
that
b 2n.
Combining our two inequalities for b, we get
2k 2 b 2n,
thus k n ` 1, which is what we wanted to prove.

Shortlisted problems solutions

27

Solution 2. Let k denote the number of rectangles. In the following, we refer to the directions
of the sides of R as horizontal and vertical respectively. Our goal is to prove the inequality
k n ` 1 for fixed n. Equivalently, we can prove the inequality n k 1 for each k, which
will be done by induction on k. For k 1, the statement is trivial.
Now assume that k 1. If none of the line segments that form the borders between the
rectangles is horizontal, then we have k 1 vertical segments dividing R into k rectangles. On
each of them, there can only be one of the n points, so n k 1, which is exactly what we
want to prove.
Otherwise, consider the lowest horizontal line h that contains one or more of these line
segments. Let R1 be the rectangle that results when everything that lies below h is removed
from R (see the example in the figure below).
The rectangles that lie entirely below h form blocks of rectangles separated by vertical line
segments. Suppose there are r blocks and ki rectangles in the ith block. The left and right
border of each block has to extend further upwards beyond h. Thus we can move any points
that lie on these borders upwards, so that they now lie inside R1 . This can be done without
violating the conditions, one only needs to make sure that they do not get to lie on a common
horizontal line with one of the other given points.
All other borders between rectangles in the ith block have to lie entirely below h. There are
ki 1 such line segments, each of which can contain at most one of the given points. Finally,
there can be one point that lies on h. All other points have to lie in R1 (after moving some of
them as explained in the previous paragraph).

R
h

Figure 2: Illustration of the inductive argument


We see that R1 is divided into k
to R1 , we find that there are at most

i1

ki rectangles. Applying the induction hypothesis

r
r

ki 1 ` pki 1q ` 1 k r
k
i1

i1

points. Since r 1, this means that n k 1, which completes our induction.

28

IMO 2014 South Africa

C2. We have 2m sheets of paper, with the number 1 written on each of them. We perform
the following operation. In every step we choose two distinct sheets; if the numbers on the two
sheets are a and b, then we erase these numbers and write the number a ` b on both sheets.
Prove that after m2m1 steps, the sum of the numbers on all the sheets is at least 4m .
(Iran)
Solution. Let Pk be the product of the numbers on the sheets after k steps.
Suppose that in the pk ` 1qth step the numbers a and b are replaced by a` b. In the product,
the number ab is replaced by pa ` bq2 , and the other factors do not change. Since pa ` bq2 4ab,
we see that Pk`1 4Pk . Starting with P0 1, a straightforward induction yields
Pk 4 k

for all integers k 0; in particular

m1

Pm2m1 4m2

p2m q2 ,

so by the AMGM inequality, the sum of the numbers written on the sheets after m2m1 steps
is at least
a
m
2m 2 Pm2m1 2m 2m 4m .

Comment 1. It is possible to achieve the sum 4m in m2m1 steps. For example, starting from 2m
equal numbers on the sheets, in 2m1 consecutive steps we can double all numbers. After m such
doubling rounds we have the number 2m on every sheet.
Comment 2. There are several versions of the solution above. E.g., one may try to assign to each
positive integer n a weight wn in such a way that the sum of the weights of the numbers written on
the sheets increases, say, by at least 2 in each step. For this purpose, one needs the inequality
2wa`b wa ` wb ` 2

(1)

to be satisfied for all positive integers a and b.


Starting from w1 1 and trying to choose the weights as small as possible, one may find that
these weights can be defined as follows: For every positive integer n, one chooses k to be the maximal
integer such that n 2k , and puts

n
n
(2)
wn k ` k min d ` d .
dPZ0
2
2

Now, in order to prove that these weights satisfy (1), one may take arbitrary positive integers a and b,
. Then one has
and choose an integer d 0 such that wa`b d ` a`b
2d

a`b
b
a
2wa`b 2d ` 2 d pd 1q ` d1 ` pd 1q ` d1 ` 2 wa ` wb ` 2.
2
2
2

Since the initial sum of the weights was 2m , after m2m1 steps the sum is at least pm ` 1q2m . To
finish the solution, one may notice that by (2) for every positive integer a one has
a
wa m ` m ,
i.e., a 2m pm ` wa q.
(3)
2
So the sum of the numbers a1 , a2 , . . . , a2m on the sheets can be estimated as

i1

ai

i1

2 pm ` wai q m2 2 ` 2

i1

wai m4m ` pm ` 1q4m 4m ,

as required.
For establishing the inequalities (1) and (3), one may also use the convexity argument, instead of
the second definition of wn in (2).
One may check that log2 n wn log2 n ` 1; thus, in some rough sense, this approach is obtained
by taking the logarithm of the solution above.

Shortlisted problems solutions

29

Comment 3. An intuitive strategy to minimise the sum of numbers is that in every step we choose
the two smallest numbers. We may call this the greedy strategy. In the following paragraphs we prove
that the greedy strategy indeed provides the least possible sum of numbers.
Claim. Starting from any sequence x1 , . . . , xN of positive real numbers on N sheets, for any number
k of steps, the greedy strategy achieves the lowest possible sum of numbers.
Proof. We apply induction on k; for k 1 the statement is obvious. Let k 2, and assume that the
claim is true for smaller values.
`

Every sequence of k steps can be encoded as S pi1 , j1 q, . . . , pik , jk q , where, for r 1, 2, . . . , k,


the numbers ir and jr are the indices of the two sheets that are chosen in the r th step. The resulting
final sum will be some linear combination of x1 , . . . , xN , say, c1 x1 ` ` cN xN with positive integers
c1 , . . . , cN that depend on S only. Call the numbers pc1 , . . . , cN q the characteristic vector of S.
`

Choose a sequence S0 pi1 , j1 q, . . . , pik , jk q of steps that produces the minimal sum, starting
from x1 , . . . , xN , and let pc1 , . . . , cN q be the characteristic vector of S. We may assume that the sheets
are indexed in such an order that c1 c2 cN . If the sheets (and the numbers) are permuted by
a permutation of the indices p1, 2, . . . , N q and then the same steps are performed, we can obtain the
N

sum
ct xptq . By the rearrangement inequality, the smallest possible sum can be achieved when the
t1

numbers px1 , . . . , xN q are in non-decreasing order. So we can assume that also x1 x2 xN .

Let be the largest index with c1 c , and let the r th step be the first step for which cir c1
or cjr c1 . The role of ir and jr is symmetrical, so we can assume cir c1 and thus ir . We show
that cjr c1 and jr hold, too.
Before the r th step, on the ir th sheet we had the number xir . On the jr th sheet there was a linear
combination that contains the number xjr with a positive integer coefficient, and possibly some other
terms. In the r th step, the number xir joins that linear combination. From this point, each sheet
contains a linear combination of x1 , . . . , xN , with the coefficient of xjr being not smaller than the
coefficient of xir . This is preserved to the end of the procedure, so we have cjr cir . But cir c1 is
maximal among the coefficients, so we have cjr cir c1 and thus jr .
Either from cjr cir c1 or from the arguments in the previous paragraph we can see that none
of the ir th and the jr th sheets were used before step r. Therefore, the final linear combination of the
numbers does not change if the step pir , jr q is performed first: the sequence of steps
`

S1 pir , jr q, pi1 , j1 q, . . . , pir1 , jr1 q, pir`1 , jr`1 q, . . . , piN , jN q


also produces the same minimal sum at the end. Therefore, we can replace S0 by S1 and we may
assume that r 1 and ci1 cj1 c1 .

As i1 j1 , we can see that 2 and c1 c2 ci1 cj1 . Let be such a permutation of the
indices p1, 2, . . . , N q that exchanges 1, 2 with ir , jr and does not change the remaining indices. Let
`

S2 ppi1 q, pj1 qq, . . . , ppiN q, pjN qq .

Since cpiq ci for all indices i, this sequence of steps produces the same, minimal sum. Moreover, in
the first step we chose xpi1 q x1 and xpj1 q x2 , the two smallest numbers.

Hence, it is possible to achieve the optimal sum if we follow the greedy strategy in the first step.
By the induction hypothesis, following the greedy strategy in the remaining steps we achieve the
optimal sum.

30

IMO 2014 South Africa

C3. Let n 2 be an integer. Consider an n n chessboard divided into n2 unit squares.

We call a configuration of n rooks on this board happy if every row and every column contains
exactly one rook. Find the greatest positive integer k such that for every happy configuration
of rooks, we can find a k k square without a rook on any of its k 2 unit squares.
(Croatia)
Answer.

X?
\
n1 .

Solution. Let be a positive integer. We will show that (i) if n 2 then each happy
configuration contains an empty square, but (ii) if n 2 then there exists a happy
configuration not containing such a square. These two statements together yield the answer.
(i). Assume that n 2 . Consider any happy configuration. There exists a row R containing
a rook in its leftmost square. Take consecutive rows with R being one of them. Their union
U contains exactly rooks. Now remove the n 2 1 leftmost columns from U (thus at least
one rook is also removed). The remaining part is an 2 rectangle, so it can be split into
squares of size , and this part contains at most 1 rooks. Thus one of these squares is
empty.
(ii). Now we assume that n 2 . Firstly, we will construct a happy configuration with no
empty square for the case n 2 . After that we will modify it to work for smaller values
of n.
Let us enumerate the rows from bottom to top as well as the columns from left to right
by the numbers 0, 1, . . . , 2 1. Every square will be denoted, as usual, by the pair pr, cq of
its row and column numbers. Now we put the rooks on all squares of the form pi ` j, j ` iq
with i, j 0, 1, . . . , 1 (the picture below represents this arrangement for 3). Since each
number from 0 to 2 1 has a unique representation of the form i ` j (0 i, j 1), each
row and each column contains exactly one rook.
8
7
6
5
4
3
2
1
0

r
r
r
r
r r r
r
r
0 1

2 3

4 5

Next, we show that each square A on the board contains a rook. Consider such a
square A, and consider consecutive rows the union of which contains A. Let the lowest of
these rows have number p ` q with 0 p, q 1 (notice that p ` q 2 ). Then the
rooks in this union are placed in the columns with numbers q ` p, pq ` 1q ` p, . . . , p 1q ` p,
p ` 1, ` pp ` 1q, . . . , pq 1q ` p ` 1, or, putting these numbers in increasing order,
p ` 1, ` pp ` 1q, . . . , pq 1q ` pp ` 1q, q ` p, pq ` 1q ` p, . . . , p 1q ` p.
One readily checks that the first number in this list is at most 1 (if p 1, then q 0,
and the first listed number is q ` p 1), the last one is at least p 1q, and the difference
between any two consecutive numbers is at most . Thus, one of the consecutive columns
intersecting A contains a number listed above, and the rook in this column is inside A, as
required. The construction for n 2 is established.

Shortlisted problems solutions

31

It remains to construct a happy configuration of rooks not containing an empty square


for n 2 . In order to achieve this, take the construction for an 2 2 square described above
and remove the 2 n bottom rows together with the 2 n rightmost columns. We will have
a rook arrangement with no empty square, but several rows and columns may happen to
be empty. Clearly, the number of empty rows is equal to the number of empty columns, so one
can find a bijection between them, and put a rook on any crossing of an empty row and an
empty column corresponding to each other.
Comment. Part (i) allows several different proofs. E.g., in the last paragraph of the solution, it
suffices to deal only with the case n 2 ` 1. Notice now that among the four corner squares, at
least one is empty. So the rooks in its row and in its column are distinct. Now, deleting this row and
column we obtain an 2 2 square with 2 1 rooks in it. This square can be partitioned into 2
squares of size , so one of them is empty.

32

IMO 2014 South Africa

C4. Construct a tetromino by attaching two 2 1 dominoes along their longer sides such

that the midpoint of the longer side of one domino is a corner of the other domino. This
construction yields two kinds of tetrominoes with opposite orientations. Let us call them Sand Z-tetrominoes, respectively.

S-tetrominoes

Z-tetrominoes

Assume that a lattice polygon P can be tiled with S-tetrominoes. Prove than no matter
how we tile P using only S- and Z-tetrominoes, we always use an even number of Z-tetrominoes.
(Hungary)
Solution 1. We may assume that polygon P is the union of some squares of an infinite
chessboard. Colour the squares of the chessboard with two colours as the figure below illustrates.

Observe that no matter how we tile P , any S-tetromino covers an even number of black
squares, whereas any Z-tetromino covers an odd number of them. As P can be tiled exclusively
by S-tetrominoes, it contains an even number of black squares. But if some S-tetrominoes and
some Z-tetrominoes cover an even number of black squares, then the number of Z-tetrominoes
must be even.
Comment. An alternative approach makes use of the following two colourings, which are perhaps
somewhat more natural:

Let s1 and s2 be the number of S-tetrominoes of the first and second type (as shown in the figure above)
respectively that are used in a tiling of P . Likewise, let z1 and z2 be the number of Z-tetrominoes of
the first and second type respectively. The first colouring shows that s1 ` z2 is invariant modulo 2, the
second colouring shows that s1 ` z1 is invariant modulo 2. Adding these two conditions, we find that
z1 ` z2 is invariant modulo 2, which is what we have to prove. Indeed, the sum of the two colourings
(regarding white as 0 and black as 1 and adding modulo 2) is the colouring shown in the solution.

Shortlisted problems solutions

33

Solution 2. Let us assign coordinates to the squares of the infinite chessboard in such a way
that the squares of P have nonnegative coordinates only, and that the first coordinate increases
as one moves to the right, while the second coordinate increases as one moves upwards. Write
the integer 3i p3qj into the square with coordinates pi, jq, as in the following figure:
..
.

81
27
9
3
1

..
.

81
27
9
3

..
.

81
27
9


81
27


81



The sum of the numbers written into four squares that can be covered by an S-tetromino
is either of the form
`

3i p3qj 1 ` 3 ` 3 p3q ` 32 p3q 32 3i p3qj


(for the first type of S-tetrominoes), or of the form
`

3i p3qj 3 ` 3 p3q ` p3q ` p3q2 0,

and thus divisible by 32. For this reason, the sum of the numbers written into the squares
of P , and thus also the sum of the numbers covered by Z-tetrominoes in the second covering,
is likewise divisible by 32. Now the sum of the entries of a Z-tetromino is either of the form
`

3i p3qj 3 ` 32 ` p3q ` 3 p3q 0


(for the first type of Z-tetrominoes), or of the form
`

3i p3qj 1 ` p3q ` 3 p3q ` 3 p3q2 16 3i p3qj ,

i.e., 16 times an odd number. Thus in order to obtain a total that is divisible by 32, an even
number of the latter kind of Z-tetrominoes needs to be used. Rotating everything by 90 , we
find that the number of Z-tetrominoes of the first kind is even as well. So we have even proven
slightly more than necessary.
Comment 1. In the second solution, 3 and 3 can be replaced by other combinations as well.
For example, for any positive integer a 3 pmod 4q, we can write ai paqj into the square with
coordinates pi, jq and apply the same argument.
Comment 2. As the second solution shows, we even have the stronger result that the parity of the
number of each of the four types of tetrominoes in a tiling of P by S- and Z-tetrominoes is an invariant
of P . This also remains true if there is no tiling of P that uses only S-tetrominoes.

34

IMO 2014 South Africa

C5. Consider n 3 lines in the plane such that no two lines are parallel and no three have a

common point. These lines divide the plane into polygonal


let F be the set of regions
T
Pa regions;
of
the
lines blue in such a way
having finite area. Prove that it is possible to colour
n{2
that no region in F has a completely blue boundary. (For a real number x, rxs denotes the
least integer which is not smaller than x.)
(Austria)
Solution. Let L be the given set of lines. Choose a maximal (by inclusion) subset B L such
that when we colour the lines
Paof B Tblue, no region in F has a completely blue boundary. Let
|B| k. We claim that k
n{2 .
Let us colour all the
lines
of
LzB red. Call a point blue if it is the intersection of two blue
`k
lines. Then there are 2 blue points.
Now consider any red line . By the maximality of B, there exists at least one region A P F
whose only red side lies on . Since A has at least three sides, it must have at least one blue
vertex. Let us take one such vertex and associate it to .
Since each blue point belongs to four regions (some of which may be unbounded),
` it is
associated to at most four red lines. Thus the total number of red lines is at most 4 k2 . On
the other hand, this number is n k, so
n k 2kpk 1q, thus n 2k 2 k 2k 2 ,
T
Pa
and finally k
n{2 , which gives the desired result.

Comment 1. The constant factor in the estimate can be improved in different ways; we sketch
two of them below. On the other hand, the Problem Selection Committee is not aware of any results
?
showing that it is sometimes impossible to colour k lines satisfying the desired condition for k " n.
In this situation we find it more suitable to keep the original formulation of the problem.
T
Pa
1. Firstly, we show that in the proof above one has in fact k |B|
2n{3 .
Let us make weighted associations as follows. Let a region A whose only red side lies on have
k vertices, so that k 2 of them are blue. We associate each of these blue vertices to , and put the
1
weight k2
on each such association. So the sum of the weights of all the associations is exactly n k.
Now, one may check that among the four regions adjacent to a blue vertex v, at most two are triangles. This means that the sum of the weights of all associations involving v is at most 1 ` 1 ` 21 ` 12 3.
This leads to the estimate

k
nk 3
,
2
or
2n 3k2 k 3k2 ,
T
Pa
which yields k
2n{3 .
?
2. Next, we even show that k |B| r n s. For this, we specify the process of associating points
to red lines in one more different way.
Call a point red if it lies on a red line as well as on a blue line. Consider any red line , and take an
arbitrary region A P F whose only red side lies on . Let r 1 , r, b1 , . . . , bk be its vertices in clockwise
order with r 1 , r P ; then the points r 1 , r are red, while all the points b1 , . . . , bk are blue. Let us
associate to the red point r and the blue point b1 . One may notice that to each pair of a red point r
and a blue point b, at most one red line can be associated, since there is at most one region A having
r and b as two clockwise consecutive vertices.
We claim now that at most two red lines are associated to each blue point b; this leads to the
desired bound

k
nk 2

n k2 .
2

Shortlisted problems solutions

35

Assume, to the contrary, that three red lines 1 , 2 , and 3 are associated to the same blue point b.
Let r1 , r2 , and r3 respectively be the red points associated to these lines; all these points are distinct.
The point b defines four blue rays, and each point ri is the red point closest to b on one of these rays.
So we may assume that the points r2 and r3 lie on one blue line passing through b, while r1 lies on
the other one.
1

r1
r3
A

r2

Now consider the region A used to associate r1 and b with 1 . Three of its clockwise consecutive
vertices are r1 , b, and either r2 or r3 (say, r2 ). Since A has only one red side, it can only be the
triangle r1 br2 ; but then both 1 and 2 pass through r2 , as well as some blue line. This is impossible
by the problem assumptions.
Comment 2. The condition that the lines be non-parallel is essentially not used in the solution, nor
in the previous comment; thus it may be omitted.

36

IMO 2014 South Africa

C6. We are given an infinite deck of cards, each with a real number on it. For every real
number x, there is exactly one card in the deck that has x written on it. Now two players draw
disjoint sets A and B of 100 cards each from this deck. We would like to define a rule that
declares one of them a winner. This rule should satisfy the following conditions:
1. The winner only depends on the relative order of the 200 cards: if the cards are laid down
in increasing order face down and we are told which card belongs to which player, but
not what numbers are written on them, we can still decide the winner.
2. If we write the elements of both sets in increasing order as A ta1 , a2 , . . . , a100 u and
B tb1 , b2 , . . . , b100 u, and ai bi for all i, then A beats B.
3. If three players draw three disjoint sets A, B, C from the deck, A beats B and B beats C,
then A also beats C.
How many ways are there to define such a rule? Here, we consider two rules as different if there
exist two sets A and B such that A beats B according to one rule, but B beats A according to
the other.
(Russia)
Answer. 100.
Solution 1. We prove a more general statement for sets of cardinality n (the problem being
the special case n 100, then the answer is n). In the following, we write A B or B A for
A beats B.
Part I. Let us first define n different rules that satisfy the conditions. To this end, fix an
index k P t1, 2, . . . , nu. We write both A and B in increasing order as A ta1 , a2 , . . . , an u and
B tb1 , b2 , . . . , bn u and say that A beats B if and only if ak bk . This rule clearly satisfies all
three conditions, and the rules corresponding to different k are all different. Thus there are at
least n different rules.
Part II. Now we have to prove that there is no other way to define such a rule. Suppose
that our rule satisfies the conditions, and let k P t1, 2, . . . , nu be minimal with the property
that
Ak t1, 2, . . . , k, n ` k ` 1, n ` k ` 2, . . . , 2nu Bk tk ` 1, k ` 2, . . . , n ` ku.
Clearly, such a k exists, since this holds for k n by assumption. Now consider two disjoint sets
X tx1 , x2 , . . . , xn u and Y ty1 , y2 , . . . , yn u, both in increasing order (i.e., x1 x2 xn
and y1 y2 yn ). We claim that X Y if (and only if this follows automatically)
xk yk .
To prove this statement, pick arbitrary real numbers ui , vi , wi R X Y Y such that
u1 u2 uk1 minpx1 , y1q,

maxpxn , yn q vk`1 vk`2 vn ,

and
xk v1 v2 vk w1 w2 wn uk uk`1 un yk ,
and set
Then

U tu1 , u2, . . . , un u, V tv1 , v2 , . . . , vn u, W tw1 , w2, . . . , wn u.

ui yi and xi vi for all i, so U Y and X V by the second condition.

Shortlisted problems solutions

37

The elements of U Y W are ordered in the same way as those of Ak1 Y Bk1 , and since
Ak1 Bk1 by our choice of k, we also have U W (if k 1, this is trivial).
The elements of V Y W are ordered in the same way as those of Ak Y Bk , and since
Ak Bk by our choice of k, we also have V W .
It follows that
X V W U Y,
so X Y by the third condition, which is what we wanted to prove.
Solution 2. Another possible approach to Part II of this problem is induction on n. For
n 1, there is trivially only one rule in view of the second condition.
In the following, we assume that our claim (namely, that there are no possible rules other
than those given in Part I) holds for n1 in place of n. We start with the following observation:
Claim. At least one of the two relations
`
`

t2u Y t2i 1 | 2 i nu t1u Y t2i | 2 i nu


and

holds.

t2i 1 | 1 i n 1u Y t2nu t2i | 1 i n 1u Y t2n 1u

Proof. Suppose that the first relation does not hold. Since our rule may only depend on the
relative order, we must also have
`
`

t2u Y t3i 2 | 2 i n 1u Y t3n 2u t1u Y t3i 1 | 2 i n 1u Y t3nu .


Likewise, if the second relation does not hold, then we must also have
`
`

t1u Y t3i 1 | 2 i n 1u Y t3nu t3u Y t3i | 2 i n 1u Y t3n 1u .

Now condition 3 implies that


`
`

t2u Y t3i 2 | 2 i n 1u Y t3n 2u t3u Y t3i | 2 i n 1u Y t3n 1u ,


which contradicts the second condition.

Now we distinguish two cases, depending on which of the two relations actually holds:
`
`

First case: t2u Y t2i 1 | 2 i nu t1u Y t2i | 2 i nu .


Let A ta1 , a2 , . . . , an u and B tb1 , b2 , . . . , bn u be two disjoint sets, both in increasing
order. We claim that the winner can be decided only from the values of a2 , . . . , an and b2 , . . . , bn ,
while a1 and b1 are actually irrelevant. Suppose that this was not the case, and assume without
loss of generality that a2 b2 . Then the relative order of a1 , a2 , . . . , an , b2 , . . . , bn is fixed, and
the position of b1 has to decide the winner. Suppose that for some value b1 x, B wins, while
for some other value b1 y, A wins.
Write Bx tx, b2 , . . . , bn u and By ty, b2 , . . . , bn u, and let 0 be smaller than half the
distance between any two of the numbers in Bx Y By Y A. For any set M, let M be the set
obtained by adding/subtracting to all elements of M. By our choice of , the relative order
of the elements of pBy ` q Y A is still the same as for By Y A, while the relative order of the
elements of pBx q Y A is still the same as for Bx Y A. Thus A Bx , but A By ` .
Moreover, if y x, then Bx By ` by condition 2, while otherwise the relative order of

38

IMO 2014 South Africa

the elements in pBx q Y pBy ` q is the same as for the two sets t2u Y t2i 1 | 2 i nu
and t1u Y t2i | 2 i nu, so that Bx By ` . In either case, we obtain
A Bx By ` A,
which contradicts condition 3.
So we know now that the winner does not depend on a1 , b1 . Therefore, we can define a new
rule on sets of cardinality n 1 by saying that A B if and only if A Y tau B Y tbu for
some a, b (or equivalently, all a, b) such that a min A, b min B and A Y tau and B Y tbu
are disjoint. The rule satisfies all conditions again, so by the induction hypothesis, there
exists an index i such that A B if and only if the ith smallest element of A is less than the
ith smallest element of B. This implies that C D if and only if the pi ` 1qth smallest element
of C is less than the pi ` 1qth smallest element of D, which completes our induction.
`
`

Second case: t2i 1 | 1 i n 1u Y t2nu t2i | 1 i n 1u Y t2n 1u .


Set A ta | a P Au for any A R. For any two disjoint sets A, B R of cardinality n,
we write A B to mean pBq pAq. It is easy to see that defines a rule to determine
a winner that satisfies the three conditions of our problem as well as the relation of the first
case. So it follows in the same way as in the first case that for some i, A B if and only if
the ith smallest element of A is less than the ith smallest element of B, which is equivalent to
the condition that the ith largest element of A is greater than the ith largest element of B.
This proves that the original rule also has the desired form.
Comment. The problem asks for all possible partial orders on the set of n-element subsets of R such
that any two disjoint sets are comparable, the order relation only depends on the relative order of the
elements, and ta1 , a2 , . . . , an u tb1 , b2 , . . . , bn u whenever ai bi for all i.
As the proposer points out, one may also ask for all total orders on all n-element subsets of R
(dropping the condition of disjointness and requiring that ta1 , a2 , . . . , an u tb1 , b2 , . . . , bn u whenever
ai bi for all i). It turns out that the number of possibilities in this case is n!, and all possible total
orders are obtained in the following way. Fix a permutation P Sn . Let A ta1 , a2 , . . . , an u and
B tb1 , b2 , . . . , bn u be two subsets of R with a1 a2 an and b1 b2 bn . Then we say
that A B if and only if pap1q , . . . , apnq q is lexicographically greater than pbp1q , . . . , bpnq q.
It seems, however, that this formulation adds rather more technicalities to the problem than
additional ideas.

Shortlisted problems solutions

This page is intentionally left blank

39

40

IMO 2014 South Africa

C7. Let M be a set of n 4 points in the plane, no three of which are collinear. Initially these

points are connected with n segments so that each point in M is the endpoint of exactly two
segments. Then, at each step, one may choose two segments AB and CD sharing a common
interior point and replace them by the segments AC and BD if none of them is present at this
moment. Prove that it is impossible to perform n3 {4 or more such moves.
(Russia)
Solution. A line is said to be red if it contains two points of M. As no three points of M are
collinear,
`n n2 each red line determines a unique pair of points of M. Moreover, there are precisely
2 red lines. By the value of a segment we mean the number of red lines intersecting it
2
in its interior, and the value of a set of segments is defined to be the sum of the values of its
elements. We will prove that piq the value of the initial set of segments is smaller than n3 {2
and that piiq each step decreases the value of the set of segments present by at least 2. Since
such a value can never be negative, these two assertions imply the statement of the problem.
To show piq we just need to observe that each segment has a value that is smaller than n2 {2.
Thus the combined value of the n initial segments is indeed below n n2 {2 n3 {2.
It remains to establish piiq. Suppose that at some moment we have two segments AB
and CD sharing an interior point S, and that at the next moment we have the two segments
AC and BD instead. Let XAB denote the set of red lines intersecting the segment AB in
its interior and let the sets XAC , XBD , and XCD be defined similarly. We are to prove that
|XAC | ` |XBD | ` 2 |XAB | ` |XCD |.
As a first step in this direction, we claim that
|XAC Y XBD | ` 2 |XAB Y XCD | .

(1)

Indeed, if g is a red line intersecting, e.g. the segment AC in its interior, then it has to
intersect the triangle ACS once again, either in the interior of its side AS, or in the interior of
its side CS, or at S, meaning that it belongs to XAB or to XCD (see Figure 1). Moreover, the
red lines AB and CD contribute to XAB Y XCD but not to XAC Y XBD . Thereby (1) is proved.
h

h
D
B
g

D
B

D
B

Figure 1

Figure 2

Figure 3

Similarly but more easily one obtains


|XAC X XBD | |XAB X XCD | .

(2)

Indeed, a red line h appearing in XAC X XBD belongs, for similar reasons as above, also to
XAB X XCD . To make the argument precise, one may just distinguish the cases S P h (see
Figure 2) and S R h (see Figure 3). Thereby (2) is proved.
Adding (1) and (2) we obtain the desired conclusion, thus completing the solution of this
problem.

Shortlisted problems solutions

41

Comment 1. There is a problem belonging to the folklore, in the solution of which one may use the
same kind of operation:
Given n red and n green points in the plane, prove that one may draw n nonintersecting segments
each of which connects a red point with a green point.
A standard approach to this problem consists in taking n arbitrary segments connecting the red
points with the green points, and to perform the same operation as in the above proposal whenever
an intersection occurs. Now each time one performs such a step, the total length of the segments that
are present decreases due to the triangle inequality. So, as there are only finitely many possibilities
for the set of segments present, the process must end at some stage.
In the above proposal, however, considering the sum of the Euclidean lengths of the segment that
are present does not seem to help much, for even though it shows that the process must necessarily
terminate after some finite number of steps, it does not seem to easily yield any upper bound on the
number of these steps that grows polynomially with n.
One may regard the concept of the value of a segment introduced in the above solution as an
appropriately discretised version of Euclidean length suitable for obtaining such a bound.
The Problem Selection Committee still believes the problem to be sufficiently original for the
competition.
Comment 2. There are some other essentially equivalent ways of presenting the same solution. E.g.,
put M tA1 , A2 , . . . , An u, denote the set of segments present at any moment by te1 , e2 , . . . , en u, and
called a triple pi, j, kq of indices with i j intersecting, if the line Ai Aj intersects the segment ek . It
may then be shown that the number S of intersecting triples satisfies 0 S n3 at the beginning
and decreases by at least 4 in each step.
Comment 3. It is not difficult to construct an example where cn2 moves are possible (for some
absolute constant c 0). It would be interesting to say more about the gap between cn2 and cn3 .

42

IMO 2014 South Africa

C8.

A card deck consists of 1024 cards. On each card, a set of distinct decimal digits is
written in such a way that no two of these sets coincide (thus, one of the cards is empty). Two
players alternately take cards from the deck, one card per turn. After the deck is empty, each
player checks if he can throw out one of his cards so that each of the ten digits occurs on an
even number of his remaining cards. If one player can do this but the other one cannot, the
one who can is the winner; otherwise a draw is declared.
Determine all possible first moves of the first player after which he has a winning strategy.
(Russia)
Answer. All the moves except for taking the empty card.
Solution. Let us identify each card with the set of digits written on it. For any collection of
cards C1 , C2 , . . . , Ck denote by their sum the set C1 C2 Ck consisting of all elements
belonging to an odd number of the Ci s. Denote the first and the second player by F and S,
respectively.
Since each digit is written on exactly 512 cards, the sum of all the cards is . Therefore,
at the end of the game the sum of all the cards of F will be the same as that of S; denote this
sum by C. Then the player who took C can throw it out and get the desired situation, while
the other one cannot. Thus, the player getting card C wins, and no draw is possible.
Now, given a nonempty card B, one can easily see that all the cards can be split into 512
pairs of the form pX, X Bq because pX BqB X. The following lemma shows a property
of such a partition that is important for the solution.
Lemma. Let B be some card. Let us choose 512 cards so that exactly one card is chosen
from every pair pX, X Bq. Then the sum of all chosen cards is either or B.
Proof. Let b be some element of B. Enumerate the pairs; let Xi be the card not containing b
in the ith pair, and let Yi be the other card in this pair. Then the sets Xi are exactly all the
sets not containing b, therefore each digit a b is written on exactly 256 of these cards, so
X1 X2 X512 . Now, if we replace some summands in this sum by the other
elements from their pairs, we will simply add B several times to this sum, thus the sum will
either remain unchanged or change by B, as required.
l
Now we consider two cases.
Case 1. Assume that F takes the card on his first move. In this case, we present a
winning strategy for S.
Let S take an arbitrary card A. Assume that F takes card B after that; then S takes A B.
Split all 1024 cards into 512 pairs of the form pX, X Bq; we call two cards in one pair partners.
Then the four cards taken so far form two pairs p, Bq and pA, A Bq belonging to F and S,
respectively. On each of the subsequent moves, when F takes some card, S should take the
partner of this card in response.
Consider the situation at the end of the game. Let us for a moment replace card A belonging
to S by . Then he would have one card from each pair; by our lemma, the sum of all these
cards would be either or B. Now, replacing back by A we get that the actual sum of the
cards of S is either A or A B, and he has both these cards. Thus S wins.
Case 2. Now assume that F takes some card A on his first move. Let us present a
winning strategy for F in this case.
Assume that S takes some card B on his first move; then F takes A B. Again, let
us split all the cards into pairs of the form pX, X Bq; then the cards which have not been
taken yet form several complete pairs and one extra element (card has not been taken while
its partner B has). Now, on each of the subsequent moves, if S takes some element from a

Shortlisted problems solutions

43

complete pair, then F takes its partner. If S takes the extra element, then F takes an arbitrary
card Y , and the partner of Y becomes the new extra element.
Thus, on his last move S is forced to take the extra element. After that player F has cards
A and A B, player S has cards B and , and F has exactly one element from every other
pair. Thus the situation is the same as in the previous case with roles reversed, and F wins.
Finally, if S takes on his first move then F denotes any card which has not been taken
yet by B and takes A B. After that, the same strategy as above is applicable.
Comment 1. If one wants to avoid the unusual question about the first move, one may change the
formulation as follows. (The difficulty of the problem would decrease somewhat.)
A card deck consists of 1023 cards; on each card, a nonempty set of distinct decimal digits is
written in such a way that no two of these sets coincide. Two players alternately take cards from
the deck, one card per turn. When the deck is empty, each player checks if he can throw out one of
his cards so that for each of the ten digits, he still holds an even number of cards with this digit. If
one player can do this but the other one cannot, the one who can is the winner; otherwise a draw is
declared.
Determine which of the players (if any) has a winning strategy.
The winner in this version is the first player. The analysis of the game from the first two paragraphs
of the previous solution applies to this version as well, except for the case C in which the result
is a draw. Then the strategy for S in Case 1 works for F in this version: the sum of all his cards at
the end is either A or A B, thus nonempty in both cases.
Comment 2. Notice that all the cards form a vector space over F2 , with the operation of addition.
Due to the automorphisms of this space, all possibilities for Fs first move except are equivalent.
The same holds for the response by S if F takes the card on his first move.
Comment 3. It is not that hard to show that in the initial game, F has a winning move, by the
idea of strategy stealing.
Namely, assume that S has a winning strategy. Let us take two card decks and start two games, in
which S will act by his strategy. In the first game, F takes an arbitrary card A1 ; assume that S takes
some B1 in response. Then F takes the card B1 at the second game; let the response by S be A2 .
Then F takes A2 in the first game and gets a response B2 , and so on.
This process stops at some moment when in the second game S takes Ai A1 . At this moment
the players hold the same sets of cards in both games, but with roles reversed. Now, if some cards
remain in the decks, F takes an arbitrary card from the first deck starting a similar cycle.
At the end of the game, player Fs cards in the first game are exactly player Ss cards in the second
game, and vice versa. Thus in one of the games F will win, which is impossible by our assumption.
One may notice that the strategy in Case 2 is constructed exactly in this way from the strategy
in Case 1. This is possible since every response by S wins if F takes the card on his first move.

44

IMO 2014 South Africa

C9.

There are n circles drawn on a piece of paper in such a way that any two circles
intersect in two points, and no three circles pass through the same point. Turbo the snail slides
along the circles in the following fashion. Initially he moves on one of the circles in clockwise
direction. Turbo always keeps sliding along the current circle until he reaches an intersection
with another circle. Then he continues his journey on this new circle and also changes the
direction of moving, i.e. from clockwise to anticlockwise or vice versa.
Suppose that Turbos path entirely covers all circles. Prove that n must be odd.
(India)
Solution 1. Replace every cross (i.e. intersection of two circles) by two small circle arcs that
indicate the direction in which the snail should leave the cross (see Figure 1.1). Notice that
the placement of the small arcs does not depend on the direction of moving on the curves; no
matter which direction the snail is moving on the circle arcs, he will follow the same curves
(see Figure 1.2). In this way we have a set of curves, that are the possible paths of the snail.
Call these curves snail orbits or just orbits. Every snail orbit is a simple closed curve that has
no intersection with any other orbit.
anticlockwise

anticlockwise

clockwise

clockwise

anticlockwise

anticlockwise

clockwise
clockwise

Figure 1.1

Figure 1.2

We prove the following, more general statement.


pq In any configuration of n circles such that no two of them are tangent, the
number of snail orbits has the same parity as the number n. (Note that it is not
assumed that all circle pairs intersect.)
This immediately solves the problem.
Let us introduce the following operation that will be called flipping a cross. At a cross,
remove the two small arcs of the orbits, and replace them by the other two arcs. Hence, when
the snail arrives at a flipped cross, he will continue on the other circle as before, but he will
preserve the orientation in which he goes along the circle arcs (see Figure 2).
a

Figure 2
Consider what happens to the number of orbits when a cross is flipped. Denote by a, b, c,
and d the four arcs that meet at the cross such that a and b belong to the same circle. Before
the flipping a and b were connected to c and d, respectively, and after the flipping a and b are
connected to d and c, respectively.
The orbits passing through the cross are closed curves, so each of the arcs a, b, c, and d is
connected to another one by orbits outside the cross. We distinguish three cases.
Case 1: a is connected to b and c is connected to d by the orbits outside the cross (see
Figure 3.1).

Shortlisted problems solutions

45

We show that this case is impossible. Remove the two small arcs at the cross, connect a
to b, and connect c to d at the cross. Let be the new closed curve containing a and b, and
let be the new curve that connects c and d. These two curves intersect at the cross. So one
of c and d is inside and the other one is outside . Then the two closed curves have to meet
at least one more time, but this is a contradiction, since no orbit can intersect itself.
a

a
d

a
d

a
d

a
d

?!
b

Figure 3.1

Figure 3.2

Figure 3.3

Case 2: a is connected to c and b is connected to d (see Figure 3.2).


Before the flipping a and c belong to one orbit and b and d belong to another orbit. Flipping
the cross merges the two orbits into a single orbit. Hence, the number of orbits decreases by 1.
Case 3: a is connected to d and b is connected to c (see Figure 3.3).
Before the flipping the arcs a, b, c, and d belong to a single orbit. Flipping the cross splits
that orbit in two. The number of orbits increases by 1.
As can be seen, every flipping decreases or increases the number of orbits by one, thus
changes its parity.
Now flip every cross, one by one. Since every pair of circles has 0 or 2 intersections, the
number of crosses is even. Therefore, when all crosses have been flipped, the original parity of
the number of orbits is restored. So it is sufficient to prove pq for the new configuration, where
all crosses are flipped. Of course also in this new configuration the (modified) orbits are simple
closed curves not intersecting each other.
Orient the orbits in such a way that the snail always moves anticlockwise along the circle
arcs. Figure 4 shows the same circles as in Figure 1 after flipping all crosses and adding
orientation. (Note that this orientation may be different from the orientation of the orbit as a
planar curve; the orientation of every orbit may be negative as well as positive, like the middle
orbit in Figure 4.) If the snail moves around an orbit, the total angle change in his moving
direction, the total curvature, is either `2 or 2, depending on the orientation of the orbit.
Let P and N be the number of orbits with positive and negative orientation, respectively. Then
the total curvature of all orbits is pP Nq 2.

change ()

Figure 4

Figure 5

Double-count the total curvature of all orbits. Along every circle the total curvature is 2.
At every cross, the two turnings make two changes with some angles having the same absolute
value but opposite signs, as depicted in Figure 5. So the changes in the direction at the crosses
cancel out. Hence, the total curvature is n 2.
Now we have pP Nq 2 n 2, so P N n. The number of (modified) orbits is
P ` N, that has a same parity as P N n.

46

IMO 2014 South Africa

Solution 2. We present a different proof of pq.


We perform a sequence of small modification steps on the configuration of the circles in
such a way that at the end they have no intersection at all (see Figure 6.1). We use two kinds
of local changes to the structure of the orbits (see Figure 6.2):
Type-1 step: An arc of a circle is moved over an arc of another circle; such a step creates
or removes two intersections.
Type-2 step: An arc of a circle is moved through the intersection of two other circles.

Type-1

Type-2

Figure 6.1

Figure 6.2

We assume that in every step only one circle is moved, and that this circle is moved over at
most one arc or intersection point of other circles.
We will show that the parity of the number of orbits does not change in any step. As every
circle becomes a separate orbit at the end of the procedure, this fact proves pq.
Consider what happens to the number of orbits when a Type-1 step is performed. The two
intersection points are created or removed in a small neighbourhood. Denote some points of the
two circles where they enter or leave this neighbourhood by a, b, c, and d in this order around
the neighbourhood; let a and b belong to one circle and let c and d belong to the other circle.
The two circle arcs may have the same or opposite orientations. Moreover, the four end-points
of the two arcs are connected by the other parts of the orbits. This can happen in two ways
without intersection: either a is connected to d and b is connected to c, or a is connected to b
and c is connected to d. Altogether we have four cases, as shown in Figure 7.
d

Figure 7
We can see that the number of orbits is changed by 2 or `2 in the leftmost case when the
arcs have the same orientation, a is connected to d, and b is connected to c. In the other three
cases the number of orbits is not changed. Hence, Type-1 steps do not change the parity of the
number of orbits.
Now consider a Type-2 step. The three circles enclose a small, triangular region; by the
step, this triangle is replaced by another triangle. Again, the modification of the orbits is done
in some small neighbourhood; the structure does not change outside. Each side of the triangle
shaped region can be convex or concave; the number of concave sides can be 0, 1, 2 or 3, so
there are 4 possible arrangements of the orbits inside the neighbourhood, as shown in Figure 8.

Shortlisted problems solutions


a

47

all convex

1 concave

e
d

e
d

2 concave

3 concave

Figure 8
Denote the points where the three circles enter or leave the neighbourhood by a, b, c, d,
e, and f in this order around the neighbourhood. As can be seen in Figure 8, there are only
two essentially different cases; either a, c, e are connected to b, d, f , respectively, or a, c, e are
connected to f, b, d, respectively. The step either preserves the set of connections or switches
to the other arrangement. Obviously, in the earlier case the number of orbits is not changed;
therefore we have to consider only the latter case.
The points a, b, c, d, e, and f are connected by the orbits outside, without intersection. If
a was connected to c, say, then this orbit would isolate b, so this is impossible. Hence, each of
a, b, c, d, e and f must be connected either to one of its neighbours or to the opposite point.
If say a is connected to d, then this orbit separates b and c from e and f , therefore b must be
connected to c and e must be connected to f . Altogether there are only two cases and their
reverses: either each point is connected to one of its neighbours or two opposite points are
connected and the the remaining neigh boring pairs are connected to each other. See Figure 9.
a

e
c

e
c

e
c

e
c

Figure 9
We can see that if
changed by `2 or 2.
orbits are re-arranged,
parity. This completes

only neighbouring points are connected, then the number of orbits is


If two opposite points are connected (a and d in the figure), then the
but their number is unchanged. Hence, Type-2 steps also preserve the
the proof of pq.

Solution 3. Like in the previous solutions, we do not need all circle pairs to intersect but we
assume that the circles form a connected set. Denote by C and P the sets of circles and their
intersection points, respectively.
The circles divide the plane into several simply connected, bounded regions and one unbounded region. Denote the set of these regions by R. We say that an intersection point or
a region is odd or even if it is contained inside an odd or even number of circles, respectively.
Let Podd and Rodd be the sets of odd intersection points and odd regions, respectively.
Claim.
|Rodd | |Podd | n

pmod 2q.

p1q

Proof. For each circle c P C, denote by Rc , Pc , and Xc the number of regions inside c, the
number of intersection points inside c, and the number of circles intersecting c, respectively.
The circles divide each other into several arcs; denote by Ac the number of such arcs inside c.
By double counting the regions and intersection points inside the circles we get

|Rodd |
Rc pmod 2q and |Podd |
Pc pmod 2q.
cPC

cPC

48

IMO 2014 South Africa

For each circle c, apply Eulers polyhedron theorem to the (simply connected) regions in c.
There are 2Xc intersection points on c; they divide the circle into 2Xc arcs. The polyhedron
theorem yields pRc ` 1q ` pPc ` 2Xc q pAc ` 2Xc q ` 2, considering the exterior of c as a single
region. Therefore,
Rc ` Pc Ac ` 1.
p2q
Moreover, we have four arcs starting from every interior points inside c and a single arc
starting into the interior from each intersection point on the circle. By double-counting the
end-points of the interior arcs we get 2Ac 4Pc ` 2Xc , so
Ac 2Pc ` Xc .

p3q

The relations (2) and (3) together yield


Rc Pc Xc ` 1.

p4q

By summing up (4) for all circles we obtain

Rc Pc
Xc ` |C|,
cPC

cPC

cPC

which yields
|Rodd | |Podd |
Notice that in
pair, so

cPC

Xc ` n

pmod 2q.

p5q

Xc each intersecting circle pair is counted twice, i.e., for both circles in the

cPC

cPC

Xc 0

pmod 2q,
l

which finishes the proof of the Claim.

Now insert the same small arcs at the intersections as in the first solution, and suppose that
there is a single snail orbit b.
First we show that the odd regions are inside the curve b, while the even regions are outside.
Take a region r P R and a point x in its interior, and draw a ray y, starting from x, that does
not pass through any intersection point of the circles and is neither tangent to any of the circles.
As is well-known, x is inside the curve b if and only if y intersects b an odd number of times
(see Figure 10). Notice that if an arbitrary circle c contains x in its interior, then c intersects y
at a single point; otherwise, if x is outside c, then c has 2 or 0 intersections with y. Therefore,
y intersects b an odd number of times if and only if x is contained in an odd number of circles,
so if and only if r is odd.
y

x
r

Figure 10
Now consider an intersection point p of two circles c1 and c2 and a small neighbourhood
around p. Suppose that p is contained inside k circles.

Shortlisted problems solutions

49

We have four regions that meet at p. Let r1 be the region that lies outside both c1 and c2 ,
let r2 be the region that lies inside both c1 and c2 , and let r3 and r4 be the two remaining
regions, each lying inside exactly one of c1 and c2 . The region r1 is contained inside the same
k circles as p; the region r2 is contained also by c1 and c2 , so by k ` 2 circles in total; each of
the regions r3 and r4 is contained inside k ` 1 circles. After the small arcs have been inserted
at p, the regions r1 and r2 get connected, and the regions r3 and r4 remain separated at p (see
Figure 11). If p is an odd point, then r1 and r2 are odd, so two odd regions are connected at p.
Otherwise, if p is even, then we have two even regions connected at p.
r1
c1
r3

c2
p
r4
r2

Figure 11

Figure 12

Consider the system of odd regions and their connections at the odd points as a graph.
In this graph the odd regions are the vertices, and each odd point establishes an edge that
connects two vertices (see Figure 12). As b is a single closed curve, this graph is connected and
contains no cycle, so the graph is a tree. Then the number of vertices must be by one greater
than the number of edges, so
|Rodd | |Podd | 1.
p9q
The relations (1) and (9) together prove that n must be odd.
Comment. For every odd n there exists at least one configuration of n circles with a single snail orbit.

Figure 13 shows a possible configuration with 5 circles. In general, if a circle is rotated by k 360
n
(k 1, 2, . . . , n 1q around an interior point other than the centre, the circle and its rotated copies
together provide a single snail orbit.

Figure 13

50

IMO 2014 South Africa

Geometry
G1.

The points P and Q are chosen on the side BC of an acute-angled triangle ABC so
that =P AB =ACB and =QAC =CBA. The points M and N are taken on the rays AP
and AQ, respectively, so that AP P M and AQ QN. Prove that the lines BM and CN
intersect on the circumcircle of the triangle ABC.
(Georgia)

Solution 1. Denote by S the intersection point of the lines BM and CN. Let moreover
=QAC =CBA and =P AB =ACB. From these equalities it follows that the
triangles ABP and CAQ are similar (see Figure 1). Therefore we obtain
BP
BP
AQ
NQ

.
PM
PA
QC
QC
Moreover,
=BP M ` =CQN .

Hence the triangles BP M and NQC are similar. This gives =BMP =NCQ, so the triangles BP M and BSC are also similar. Thus we get
=CSB =BP M ` 180 =BAC ,

which completes the solution.

A

+

Q P

S
N

Q P

K
N

Figure 1

Figure 2

Solution 2. As in the previous solution, denote by S the intersection point of the lines BM
and NC. Let moreover the circumcircle of the triangle ABC intersect the lines AP and AQ
again at K and L, respectively (see Figure 2).
Note that =LBC =LAC =CBA and similarly =KCB =KAB =BCA. It implies
that the lines BL and CK meet at a point X, being symmetric to the point A with respect
to the line BC. Since AP P M and AQ QN, it follows that X lies on the line MN.
Therefore, using Pascals theorem for the hexagon ALBSCK, we infer that S lies on the
circumcircle of the triangle ABC, which finishes the proof.
Comment. Both solutions can be modified to obtain a more general result, with the equalities
AP P M
replaced by

and

AQ QN

QN
AP

.
PM
AQ

Shortlisted problems solutions

51

G2. Let ABC be a triangle. The points K, L, and M lie on the segments BC, CA, and AB,
respectively, such that the lines AK, BL, and CM intersect in a common point. Prove that it
is possible to choose two of the triangles ALM, BMK, and CKL whose inradii sum up to at
least the inradius of the triangle ABC.
(Estonia)
Solution. Denote

BK
CL
AM
,
b
,
c
.
KC
LA
MB
By Cevas theorem, abc 1, so we may, without loss of generality, assume that a 1. Then at
least one of the numbers b or c is not greater than 1. Therefore at least one of the pairs pa, bq,
pb, cq has its first component not less than 1 and the second one not greater than 1. Without
loss of generality, assume that 1 a and b 1.
Therefore, we obtain bc 1 and 1 ca, or equivalently
a

AM
LA
MB
BK

and

.
MB
CL
AM
KC
The first inequality implies that the line passing through M and parallel to BC intersects the
segment AL at a point X (see Figure 1). Therefore the inradius of the triangle ALM is not
less than the inradius r1 of triangle AMX.
Similarly, the line passing through M and parallel to AC intersects the segment BK at
a point Y , so the inradius of the triangle BMK is not less than the inradius r2 of the triangle BMY . Thus, to complete our solution, it is enough to show that r1 ` r2 r, where r is
the inradius of the triangle ABC. We prove that in fact r1 ` r2 r.
C

r1
A

r
r2
M

Figure 1
Since MX k BC, the dilation with centre A that takes M to B takes the incircle of the
triangle AMX to the incircle of the triangle ABC. Therefore
AM
r1

,
and similarly
r
AB
Adding these equalities gives r1 ` r2 r, as required.

r2
MB

.
r
AB

Comment. Alternatively, one can use Desargues theorem instead of Cevas theorem, as follows:
The lines AB, BC, CA dissect the plane into seven regions. One of them is bounded, and amongst
the other six, three are two-sided and three are three-sided. Now define the points P BC X LM ,
Q CA X M K, and R AB X KL (in the projective plane). By Desargues theorem, the points P ,
Q, R lie on a common line . This line intersects only unbounded regions. If we now assume (without
loss of generality) that P , Q and R lie on in that order, then one of the segments P Q or QR lies
inside a two-sided region. If, for example, this segment is P Q, then the triangles ALM and BM K
will satisfy the statement of the problem for the same reason.

52

IMO 2014 South Africa

G3. Let and O be the circumcircle and the circumcentre of an acute-angled triangle ABC
with AB BC. The angle bisector of =ABC intersects at M B. Let be the circle
with diameter BM. The angle bisectors of =AOB and =BOC intersect at points P and Q,
respectively. The point R is chosen on the line P Q so that BR MR. Prove that BR k AC.
(Here we always assume that an angle bisector is a ray.)
(Russia)
Solution. Let K be the midpoint of BM, i.e., the centre of . Notice that AB BC implies
K O. Clearly, the lines OM and OK are the perpendicular bisectors of AC and BM,
respectively. Therefore, R is the intersection point of P Q and OK.
Let N be the second point of intersection of with the line OM. Since BM is a diameter
of , the lines BN and AC are both perpendicular to OM. Hence BN k AC, and it suffices to
prove that BN passes through R. Our plan for doing this is to interpret the lines BN, OK,
and P Q as the radical axes of three appropriate circles.
Let be the circle with diameter BO. Since =BNO =BKO 90 , the points N and K
lie on .
Next we show that the points O, K, P , and Q are concyclic. To this end, let D and E
be the midpoints of BC and AB, respectively. Clearly, D and E lie on the rays OQ and OP ,
respectively. By our assumptions about the triangle ABC, the points B, E, O, K, and D
lie in this order on . It follows that =EOR =EBK =KBD =KOD, so the line
KO externally bisects the angle P OQ. Since the point K is the centre of , it also lies on
the perpendicular bisector of P Q. So K coincides with the midpoint of the arc P OQ of the
circumcircle of triangle P OQ.
Thus the lines OK, BN, and P Q are pairwise radical axes of the circles , , and . Hence
they are concurrent at R, as required.
R

P
Q

E
E

K
A

Shortlisted problems solutions

53

G4.

Consider a fixed circle with three fixed points A, B, and C on it. Also, let us fix
a real number P p0, 1q. For a variable point P R tA, B, Cu on , let M be the point on
the segment CP such that CM CP . Let Q be the second point of intersection of the
circumcircles of the triangles AMP and BMC. Prove that as P varies, the point Q lies on a
fixed circle.
(United Kingdom)

Solution 1. Throughout the solution, we denote by >pa, bq the directed angle between the
lines a and b.
Let D be the point on the segment AB such that BD BA. We will show that either
Q D, or >pDQ, QBq >pAB, BCq; this would mean that the point Q varies over the
constant circle through D tangent to BC at B, as required.
Denote the circumcircles of the triangles AMP and BMC by A and B , respectively. The
lines AP , BC, and MQ are pairwise radical axes of the circles , A , and B , thus either they
are parallel, or they share a common point X.
Assume that these lines are parallel (see Figure 1). Then the segments AP , QM, and BC
have a common perpendicular bisector; the reflection in this bisector maps the segment CP
to BA, and maps M to Q. Therefore, in this case Q lies on AB, and BQ{AB CM{CP
BD{AB; so we have Q D.
P

A
A

D
Q
Q

D=
Q
D
=Q

M
M
X
B

C
B

Figure 1

Figure 2

Now assume that the lines AP , QM, and BC are concurrent at some point X (see Figure 2).
Notice that the points A, B, Q, and X lie on a common circle by Miquels theorem
applied to the triangle XP C. Let us denote by Y the symmetric image of X about the
perpendicular bisector of AB. Clearly, Y lies on , and the triangles Y AB and XBA are
congruent. Moreover, the triangle XP C is similar to the triangle XBA, so it is also similar to
the triangle Y AB.
Next, the points D and M correspond to each other in similar triangles Y AB and XP C,
since BD{BA CM{CP . Moreover, the triangles Y AB and XP C are equi-oriented, so
>pMX, XP q >pDY, Y Aq. On the other hand, since the points A, Q, X, and Y lie on , we
have >pQY, Y Aq >pMX, XP q. Therefore, >pQY, Y Aq >pDY, Y Aq, so the points Y , D,
and Q are collinear.
Finally, we have >pDQ, QBq >pY Q, QBq >pY A, ABq >pAB, BXq >pAB, BCq,
as desired.

54

IMO 2014 South Africa

Comment. In the original proposal, was supposed to be an arbitrary real number distinct from 0

and 1, and the point M was defined by CM CP . The Problem Selection Committee decided to
add the restriction P p0, 1q in order to avoid a large case distinction.

Solution 2. As in the previous solution, we introduce the radical centre X AP X BC X MQ


of the circles A , B , and . Next, we also notice that the points A, Q, B, and X lie on a
common circle .
If the point P lies on the arc BAC of , then the point X is outside , thus the point Q
belongs to the ray XM, and therefore the points P , A, and Q lie on the same side of BC.
Otherwise, if P lies on the arc BC not containing A, then X lies inside , so M and Q lie on
different sides of BC; thus again Q and A lie on the same side of BC. So, in each case the
points Q and A lie on the same side of BC.
P

A
A
M
Q
Q

X
B
C

Figure 3
Now we prove that the ratio
QB
QB
QX

sin =QBC
QX sin =QBX
is constant. Since the points A, Q, B, and X are concyclic, we have
QX
AX

.
sin =QBX
sin =ABC
Next, since the points B, Q, M, and C are concyclic, the triangles XBQ and XMC are similar,
so
QB
CM
CP

.
QX
CX
CX
Analogously, the triangles XCP and XAB are also similar, so
AB
CP

.
CX
AX
Therefore, we obtain
AB
AX
AB
QB

,
sin =QBC
AX sin =ABC
sin =ABC
so this ratio is indeed constant. Thus the circle passing through Q and tangent to BC at B is
also constant, and Q varies over this fixed circle.

Shortlisted problems solutions

55

Comment. It is not hard to guess that the desired circle should be tangent to BC at B. Indeed, the
second paragraph of this solution shows that this circle lies on one side of BC; on the other hand, in
the limit case P B, the point Q also coincides with B.

Solution 3. Let us perform an inversion centred at C. Denote by X 1 the image of a point X


under this inversion.
The circle maps to the line 1 passing through the constant points A1 and B 1 , and containing the variable point P 1 . By the problem condition, the point M varies over the circle
which is the homothetic image of with centre C and coefficient . Thus M 1 varies over the
constant line 1 k A1 B 1 which is the homothetic image of A1 B 1 with centre C and coefficient 1{,
and M 1 X CP 1 . Next, the circumcircles A and B of the triangles AMP and BMC map
to the circumcircle A1 of the triangle A1 M 1 P 1 and to the line B 1 M 1 , respectively; the point Q
thus maps to the second point of intersection of B 1 M 1 with A1 (see Figure 4).
C

A
A

Q
Q
V


J

Figure 4
Let J be the (constant) common point of the lines 1 and CA1 , and let be the (constant)
line through J parallel to CB 1 . Let V be the common point of the lines and B 1 M 1 . Applying
Pappus theorem to the triples pC, J, A1 q and pV, B 1 , M 1 q we get that the points CB 1 X JV ,
JM 1 X A1 B 1 , and CM 1 X A1 V are collinear. The first two of these points are ideal, hence so is
the third, which means that CM 1 k A1 V .
Now we have >pQ1 A1 , A1 P 1 q >pQ1 M 1 , M 1 P 1q =pV M 1 , A1 V q, which means that the
triangles B 1 Q1 A1 and B 1 A1 V are similar, and pB 1 A1 q2 B 1 Q1 B 1 V . Thus Q1 is the image of V
under the second (fixed) inversion with centre B 1 and radius B 1 A1 . Since V varies over the
constant line , Q1 varies over some constant circle . Thus, applying the first inversion back
we get that Q also varies over some fixed circle.
One should notice that this last circle is not a line; otherwise would contain C, and thus
would contain the image of C under the second inversion. This is impossible, since CB 1 k .

56

IMO 2014 South Africa

Let ABCD be a convex quadrilateral with =B =D 90 . Point H is the foot of


the perpendicular from A to BD. The points S and T are chosen on the sides AB and AD,
respectively, in such a way that H lies inside triangle SCT and

G5.

=SHC =BSC 90 ,

=T HC =DT C 90 .

Prove that the circumcircle of triangle SHT is tangent to the line BD.
(Iran)
Solution. Let the line passing through C and perpendicular to the line SC intersect the line AB
at Q (see Figure 1). Then
=SQC 90 =BSC 180 =SHC ,
which implies that the points C, H, S, and Q lie on a common circle. Moreover, since SQ is a
diameter of this circle, we infer that the circumcentre K of triangle SHC lies on the line AB.
Similarly, we prove that the circumcentre L of triangle CHT lies on the line AD.
A

S
T
D
K

H
H

B
C
L

Figure 1
In order to prove that the circumcircle of triangle SHT is tangent to BD, it suffices to show
that the perpendicular bisectors of HS and HT intersect on the line AH. However, these two
perpendicular bisectors coincide with the angle bisectors of angles AKH and ALH. Therefore,
in order to complete the solution, it is enough (by the bisector theorem) to show that
AK
AL

.
KH
LH

p1q

We present two proofs of this equality.


First proof. Let the lines KL and HC intersect at M (see Figure 2). Since KH KC
and LH LC, the points H and C are symmetric to each other with respect to the line KL.
Therefore M is the midpoint of HC. Denote by O the circumcentre of quadrilateral ABCD.
Then O is the midpoint of AC. Therefore we have OM k AH and hence OM K BD. This
together with the equality OB OD implies that OM is the perpendicular bisector of BD
and therefore BM DM.
Since CM K KL, the points B, C, M, and K lie on a common circle with diameter KC.
Similarly, the points L, C, M, and D lie on a circle with diameter LC. Thus, using the sine
law, we obtain
sin =ALK
DM CK
CK
KH
AK

,
AL
sin =AKL
CL BM
CL
LH

Shortlisted problems solutions

57

which finishes the proof of p1q.


A

O
D
K

H
H

K
B

H
N

C
L

Figure 2

Figure 3

Second proof. If the points A, H, and C are collinear, then AK AL and KH LH, so
the equality p1q follows. Assume therefore that the points A, H, and C do not lie in a line and
consider the circle passing through them (see Figure 3). Since the quadrilateral ABCD is
cyclic,
=BAC =BDC 90 =ADH =HAD .
Let N A be the intersection point of the circle and the angle bisector of =CAH. Then
AN is also the angle bisector of =BAD. Since H and C are symmetric to each other with
respect to the line KL and HN NC, it follows that both N and the centre of lie on the
line KL. This means that the circle is an Apollonius circle of the points K and L. This
immediately yields p1q.
Comment. Either proof can be used to obtain the following generalised result:
Let ABCD be a convex quadrilateral and let H be a point in its interior with =BAC =DAH. The
points S and T are chosen on the sides AB and AD, respectively, in such a way that H lies inside
triangle SCT and
=SHC =BSC 90 , =T HC =DT C 90 .
Then the circumcentre of triangle SHT lies on the line AH (and moreover the circumcentre of triangle SCT lies on AC).

58

IMO 2014 South Africa

G6.

Let ABC be a fixed acute-angled triangle. Consider some points E and F lying on
the sides AC and AB, respectively, and let M be the midpoint of EF . Let the perpendicular
bisector of EF intersect the line BC at K, and let the perpendicular bisector of MK intersect
the lines AC and AB at S and T , respectively. We call the pair pE, F q interesting, if the
quadrilateral KSAT is cyclic.
Suppose that the pairs pE1 , F1 q and pE2 , F2 q are interesting. Prove that
E1 E2
F1 F2

.
AB
AC
(Iran)

Solution 1. For any interesting pair pE, F q, we will say that the corresponding triangle EF K
is also interesting.
Let EF K be an interesting triangle. Firstly, we prove that =KEF =KF E =A, which
also means that the circumcircle 1 of the triangle AEF is tangent to the lines KE and KF .
Denote by the circle passing through the points K, S, A, and T . Let the line AM intersect
the line ST and the circle (for the second time) at N and L, respectively (see Figure 1).
Since EF k T S and M is the midpoint of EF , N is the midpoint of ST . Moreover, since K
and M are symmetric to each other with respect to the line ST , we have =KNS =MNS
=LNT . Thus the points K and L are symmetric to each other with respect to the perpendicular
bisector of ST . Therefore KL k ST .
Let G be the point symmetric to K with respect to N. Then G lies on the line EF , and we
may assume that it lies on the ray MF . One has
=KGE =KNS =SNM =KLA 180 =KSA
(if K L, then the angle KLA is understood to be the angle between AL and the tangent
to at L). This means that the points K, G, E, and S are concyclic. Now, since KSGT is a
parallelogram, we obtain =KEF =KSG 180 =T KS =A. Since KE KF , we also
have =KF E =KEF =A.
After having proved this fact, one may finish the solution by different methods.
A

E
E
M
S

E1
F2

G
N
N

B
B

E2

F1
Z1 Z2

T
L

Figure 1

K2 K1

Figure 2

First method. We have just proved that all interesting triangles are similar to each other.
This allows us to use the following lemma.

Shortlisted problems solutions

59

Lemma. Let ABC be an arbitrary triangle. Choose two points E1 and E2 on the side AC, two
points F1 and F2 on the side AB, and two points K1 and K2 on the side BC, in a way that the
triangles E1 F1 K1 and E2 F2 K2 are similar. Then the six circumcircles of the triangles AEi Fi ,
BFi Ki , and CEi Ki (i 1, 2) meet at a common point Z. Moreover, Z is the centre of the
spiral similarity that takes the triangle E1 F1 K1 to the triangle E2 F2 K2 .
Proof. Firstly, notice that for each i 1, 2, the circumcircles of the triangles AEi Fi , BFi Ki ,
and CKi Ei have a common point Zi by Miquels theorem. Moreover, we have
>pZi Fi , Zi Ei q >pAB, CAq , >pZi Ki , Zi Fi q >pBC, ABq ,

>pZi Ei , Zi Ki q >pCA, BCq .

This yields that the points Z1 and Z2 correspond to each other in similar triangles E1 F1 K1
and E2 F2 K2 . Thus, if they coincide, then this common point is indeed the desired centre of a
spiral similarity.
Finally, in order to show that Z1 Z2 , one may notice that >pAB, AZ1 q >pE1 F1 , E1 Z1 q
>pE2 F2 , E2 Z2 q >pAB, AZ2 q (see Figure 2). Similarly, one has >pBC, BZ1 q >pBC, BZ2 q
and >pCA, CZ1 q >pCA, CZ2 q. This yields Z1 Z2 .
l
Now, let P and Q be the feet of the perpendiculars from B and C onto AC and AB,
respectively, and let R be the midpoint of BC (see Figure 3). Then R is the circumcentre
of the cyclic quadrilateral BCP Q. Thus we obtain =AP Q =B and =RP C =C, which
yields =QP R =A. Similarly, we show that =P QR =A. Thus, all interesting triangles are
similar to the triangle P QR.
A

A
F1

P
P
F2

E2
E1

Z
B

K1

K2

Figure 3

Figure 4

Denote now by Z the common point of the circumcircles of AP Q, BQR, and CP R. Let
E1 F1 K1 and E2 F2 K2 be two interesting triangles. By the lemma, Z is the centre of any
spiral similarity taking one of the triangles E1 F1 K1 , E2 F2 K2 , and P QR to some other of them.
Therefore the triangles ZE1 E2 and ZF1 F2 are similar, as well as the triangles ZE1 F1 and ZP Q.
Hence
E1 E2
ZE1
ZP

.
F1 F2
ZF1
ZQ
Moreover, the equalities =AZQ =AP Q =ABC 180 =QZR show that the point Z
lies on the line AR (see Figure 4). Therefore the triangles AZP and ACR are similar, as well
as the triangles AZQ and ABR. This yields
ZP RB
AZ AB
AB
ZP

,
ZQ
RC ZQ
AC AZ
AC
which completes the solution.

60

IMO 2014 South Africa

Second method. Now we will start from the fact that 1 is tangent to the lines KE and KF
(see Figure 5). We prove that if pE, F q is an interesting pair, then
AE AF
`
2 cos =A.
AB AC

(1)

Let Y be the intersection point of the segments BE and CF . The points B, K, and C are
collinear, hence applying Pascals theorem to the degenerated hexagon AF F Y EE, we infer
that Y lies on the circle 1 .
Denote by Z the second intersection point of the circumcircle of the triangle BF Y with
the line BC (see Figure 6). By Miquels theorem, the points C, Z, Y , and E are concyclic.
Therefore we obtain
BF AB ` CE AC BY BE ` CY CF BZ BC ` CZ BC BC 2 .
On the other hand, BC 2 AB 2 ` AC 2 2AB AC cos =A, by the cosine law. Hence
pAB AF q AB ` pAC AEq AC AB 2 ` AC 2 2AB AC cos =A ,
which simplifies to the desired equality (1).
Let now pE1 , F1 q and pE2 , F2 q be two interesting pairs of points. Then we get
AE1 AF1
AE2 AF2
`

`
,
AB
AC
AB
AC
which gives the desired result.
A
E

M
S
F

Y
F

C
B

Figure 6

Figure 5

Third method. Again, we make use of the fact that all interesting triangles are similar (and
equi-oriented). Let us put the picture onto a complex plane such that A is at the origin, and
identify each point with the corresponding complex number.
Let EF K be any interesting triangle. The equalities =KEF =KF E =A yield that the
ratio KE
is the same for all interesting triangles. This in turn means that the numbers E,
F E
F , and K satisfy the linear equation
K E ` F,

where 1 .

(2)

Shortlisted problems solutions

61

Now let us choose the points X and Y on the rays AB and AC, respectively, so that
=CXA =AY B =A =KEF (see Figure 7). Then each of the triangles AXC and Y AB
is similar to any interesting triangle, which also means that
C A ` X X

and B Y ` A Y.

(3)

Moreover, one has X{Y C{B.


Since the points E, F , and K lie on AC, AB, and BC, respectively, one gets
E Y,

F X,

and K B ` p1 qC

for some real , , and . In view of (3), the equation (2) now reads B ` p1 qC K
E ` F B ` C, or
p qB p ` 1qC.
Since the nonzero complex numbers B and C have different arguments, the coefficients in the
brackets vanish, so and 1 . Therefore,
E
F
`
` 1.
Y
X

(4)

Now, if pE1 , F1 q and pE2 , F2 q are two distinct interesting pairs, one may apply (4) to both
pairs. Subtracting, we get
E1 E2
F2 F1

,
Y
X

B
E1 E2
Y
.

F2 F1
X
C

so

Taking absolute values provides the required result.


Y

C
E
K

Figure 7

Comment 1. One may notice that the triangle P QR is also interesting.


Comment 2. In order to prove that =KEF =KF E =A, one may also use the following
well-known fact:
Let AEF be a triangle with AE AF , and let K be the common point of the symmedian taken from A
and the perpendicular bisector of EF . Then the lines KE and KF are tangent to the circumcircle 1
of the triangle AEF .
In this case, however, one needs to deal with the case AE AF separately.

62

IMO 2014 South Africa

Solution 2. Let pE, F q be an interesting pair. This time we prove that


AM
cos =A .
AK

(5)

As in Solution 1, we introduce the circle passing through the points K, S, A, and T , together
with the points N and L at which the line AM intersect the line ST and the circle for the
second time, respectively. Let moreover O be the centre of (see Figures 8 and 9). As in
Solution 1, we note that N is the midpoint of ST and show that KL k ST , which implies
=F AM =EAK.
A

E
A
M
F

O
O
M

N
B
T

K
L

F
T
B

Figure 8

E
S

N
K =L

Figure 9

Suppose now that K L (see Figure 8). Then KL k ST , and consequently the lines KM
and KL are perpendicular. It implies that the lines LO and KM meet at a point X lying on the
circle . Since the lines ON and XM are both perpendicular to the line ST , they are parallel
to each other, and hence =LON =LXK =MAK. On the other hand, =OLN =MKA,
so we infer that triangles NOL and MAK are similar. This yields
ON
ON
AM

cos =T ON cos =A .
AK
OL
OT
If, on the other hand, K L, then the points A, M, N, and K lie on a common line, and
this line is the perpendicular bisector of ST (see Figure 9). This implies that AK is a diameter
of , which yields AM 2OK 2NK 2ON. So also in this case we obtain
AM
2ON

cos =T ON cos =A .
AK
2OT
Thus (5) is proved.
Let P and Q be the feet of the perpendiculars from B and C onto AC and AB, respectively
(see Figure 10). We claim that the point M lies on the line P Q. Consider now the composition
of the dilatation with factor cos =A and centre A, and the reflection with respect to the angle
bisector of =BAC. This transformation is a similarity that takes B, C, and K to P , Q, and M,
respectively. Since K lies on the line BC, the point M lies on the line P Q.

Shortlisted problems solutions

63
A

E
E
P
P
M
Q

Figure 10
Suppose that E P . Then also F Q, and by Menelaus theorem, we obtain
AQ F M EP

1.
F Q EM AP
Using the similarity of the triangles AP Q and ABC, we infer that
EP
AP
AB

,
FQ
AQ
AC

and hence

EP
FQ

.
AB
AC

The last equality holds obviously also in case E P , because then F Q. Moreover, since
the line P Q intersects the segment EF , we infer that the point E lies on the segment AP if
and only if the point F lies outside of the segment AQ.
Let now pE1 , F1 q and pE2 , F2 q be two interesting pairs. Then we obtain
E1 P
F1 Q

AB
AC

and

E2 P
F2 Q

.
AB
AC

If P lies between the points E1 and E2 , we add the equalities above, otherwise we subtract
them. In any case we obtain
F1 F2
E1 E2

,
AB
AC
which completes the solution.

64

IMO 2014 South Africa

G7. Let ABC be a triangle with circumcircle and incentre I. Let the line passing through I
and perpendicular to CI intersect the segment BC and the arc BC (not containing A) of at
points U and V , respectively. Let the line passing through U and parallel to AI intersect AV
at X, and let the line passing through V and parallel to AI intersect AB at Y . Let W and Z be
the midpoints of AX and BC, respectively. Prove that if the points I, X, and Y are collinear,
then the points I, W , and Z are also collinear.
(U.S.A.)
Solution 1. We start with some general observations. Set =A{2, =B{2, =C{2.
Then obviously ` ` 90 . Since =UIC 90 , we obtain =IUC ` . Therefore
=BIV =IUC =IBC =BAI =BY V , which implies that the points B, Y , I,
and V lie on a common circle (see Figure 1).
Assume now that the points I, X and Y are collinear. We prove that =Y IA 90 .
Let the line XU intersect AB at N. Since the lines AI, UX, and V Y are parallel, we get
NX
YN
VU
XU

,
AI
YA
VI
AI
implying NX XU. Moreover, =BIU =BNU. This implies that the quadrilateral BUIN is cyclic, and since BI is the angle bisector of =UBN, we infer that NI UI.
Thus in the isosceles triangle NIU, the point X is the midpoint of the base NU. This gives
=IXN 90 , i.e., =Y IA 90 .
A

x
N

S
V

Figure 1
Let S be the midpoint of the segment V C. Let moreover T be the intersection point of the
lines AX and SI, and set x =BAV =BCV . Since =CIA 90 ` and SI SC, we
obtain
=T IA 180 =AIS 90 =CIS 90 x x =T AI ,
which implies that T I T A. Therefore, since =XIA 90 , the point T is the midpoint
of AX, i.e., T W .

To complete our solution, it remains to show that the intersection point of the lines IS
and BC coincide with the midpoint of the segment BC. But since S is the midpoint of the
segment V C, it suffices to show that the lines BV and IS are parallel.

Shortlisted problems solutions

65

Since the quadrilateral BY IV is cyclic, =V BI =V Y I =Y IA 90 . This implies that


BV is the external angle bisector of the angle ABC, which yields =V AC =V CA. Therefore
2 x 2 ` x, which gives ` x. Hence =SCI , so =V SI 2.
On the other hand, =BV C 180 =BAC 180 2, which implies that the lines BV
and IS are parallel. This completes the solution.
Solution 2. As in Solution 1, we first prove that the points B, Y , I, V lie on a common circle
and =Y IA 90 . The remaining part of the solution is based on the following lemma, which
holds true for any triangle ABC, not necessarily with the property that I, X, Y are collinear.
Lemma. Let ABC be the triangle inscribed in a circle and let I be its incentre. Assume
that the line passing through I and perpendicular to the line AI intersects the side AB at the
point Y . Let the circumcircle of the triangle BY I intersect the circle for the second time
at V , and let the excircle of the triangle ABC opposite to the vertex A be tangent to the
side BC at E. Then
=BAV =CAE .
?
Proof. Let be the composition of the inversion with centre A and radius AB AC, and the
symmetry with respect to AI. Clearly, interchanges B and C.
Let J be the excentre of the triangle ABC opposite to A (see Figure 2). Then we have
=JAC =BAI and =JCA 90 ` =BIA, so the triangles ACJ and AIB are similar,
and therefore AB AC AI AJ. This means that interchanges I and J. Moreover, since
Y lies on AB and =AIY 90 , the point Y 1 pY q lies on AC, and =JY 1 A 90 . Thus
maps the circumcircle of the triangle BY I to a circle 1 with diameter JC.
Finally, since V lies on both and , the point V 1 pV q lies on the line pq AB as
well as on 1 , which in turn means that V 1 E. This implies the desired result.
l
A

W
I

X
X

E
B

V
J

Figure 2

Figure 3

Now we turn to the solution of the problem.


Assume that the incircle 1 of the triangle ABC is tangent to BC at D, and let the
excircle 2 of the triangle ABC opposite to the vertex A touch the side BC at E (see Figure 3).
The homothety with centre A that takes 2 to 1 takes the point E to some point F , and the

66

IMO 2014 South Africa

tangent to 1 at F is parallel to BC. Therefore DF is a diameter of 1 . Moreover, Z is the


midpoint of DE. This implies that the lines IZ and F E are parallel.
Let K Y I X AE. Since =Y IA 90 , the lemma yields that I is the midpoint of XK.
This implies that the segments IW and AK are parallel. Therefore, the points W , I and Z are
collinear.
Comment 1. The properties =Y IA 90 and V A V C can be established in various ways. The
main difficulty of the problem seems to find out how to use these properties in connection to the points
W and Z.
In Solution 2 this principal part is more or less covered by the lemma, for which we have presented
a direct proof. On the other hand, this lemma appears to be a combination of two well-known facts;
let us formulate them in terms of the lemma statement.
Let the line IY intersect AC at P (see Figure 4). The first fact states that the circumcircle of
the triangle V Y P is tangent to the segments AB and AC, as well as to the circle . The second fact
states that for such a circle, the angles BAV and CAE are equal.
The awareness of this lemma may help a lot in solving this problem; so the Jury might also consider
a variation of the proposed problem, for which the lemma does not seem to be useful; see Comment 3.

X
X

W
I

X
P

Y
B
2

2
V

Figure 4

Figure 5

Comment 2. The proposed problem stated the equivalence: the point I lies on the line XY if and
only if I lies on the line W Z. Here we sketch the proof of the if part (see Figure 5).
As in Solution 2, let BC touch the circles 1 and 2 at D and E, respectively. Since IZ k AE and W
lies on IZ, the line DX is also parallel to AE. Therefore, the triangles XU P and AIQ are similar.
Moreover, the line DX is symmetric to AE with respect to I, so IP IQ, where P U V X XD and
Q U V X AE. Thus we obtain
UX
UP
UP
UV

.
VI
IA
IQ
IP
So the pairs IU and P V are harmonic conjugates, and since =U DI 90 , we get =V DB =BDX
=BEA. Therefore the point V 1 symmetric to V with respect to the perpendicular bisector of BC lies
on the line AE. So we obtain =BAV =CAE.

Shortlisted problems solutions

67

The rest can be obtained by simply reversing the arguments in Solution 2. The points B, V , I, and Y
are concyclic. The lemma implies that =Y IA 90 . Moreover, the points B, U , I, and N , where
N U X X AB, lie on a common circle, so IN IU . Since IY K U N , the point X 1 IY X U N is
the midpoint of U N . But in the trapezoid AY V I, the line XU is parallel to the sides AI and Y V , so
N X U X 1 . This yields X X 1 .
The reasoning presented in Solution 1 can also be reversed, but it requires a lot of technicalities.
Therefore the Problem Selection Committee proposes to consider only the only if part of the original
proposal, which is still challenging enough.
Comment 3. The Jury might also consider the following variation of the proposed problem.
Let ABC be a triangle with circumcircle and incentre I. Let the line through I perpendicular to CI
intersect the segment BC and the arc BC (not containing A) of at U and V , respectively. Let the
line through U parallel to AI intersect AV at X. Prove that if the lines XI and AI are perpendicular,
then the midpoint of the segment AC lies on the line XI (see Figure 6).

M
I

V
Figure 6

Figure 7

Since the solution contains the arguments used above, we only sketch it.
Let N XU X AB (see Figure 7). Then =BN U =BAI =BIU , so the points B, U , I, and N lie
on a common circle. Therefore IU IN , and since IX K N U , it follows that N X XU .
Now set Y XI X AB. The equality N X XU implies that
XU
NX
YX
VX

,
VA
AI
AI
YI
and therefore Y V k AI. Hence =BY V =BAI =BIV , so the points B, V , I, Y are concyclic.
Next we have IY K Y V , so =IBV 90 . This implies that BV is the external angle bisector of the
angle ABC, which gives =V AC =V CA.
So in order to show that M XI X AC is the midpoint of AC, it suffices to prove that =V M C 90 .
But this follows immediately from the observation that the points V , C, M , and I are concyclic, as
=M IV =Y BV 180 =ACV .
The converse statement is also true, but its proof requires some technicalities as well.

68

IMO 2014 South Africa

Number Theory
N1. Let n 2 be an integer, and let An be the set
An t2n 2k | k P Z, 0 k nu.
Determine the largest positive integer that cannot be written as the sum of one or more (not
necessarily distinct) elements of An .
(Serbia)
Answer. pn 2q2n ` 1.
Solution 1.
Part I. First we show that every integer greater than pn 2q2n ` 1 can be represented as
such a sum. This is achieved by induction on n.
For n 2, the set An consists of the two elements 2 and 3. Every positive integer m except
for 1 can be represented as the sum of elements of An in this case: as m 2 ` 2 ` ` 2 if m
is even, and as m 3 ` 2 ` 2 ` ` 2 if m is odd.
Now consider some n 2, and take an integer m pn 2q2n ` 1. If m is even, then consider
m
pn 2q2n ` 2

pn 2q2n1 ` 1 pn 3q2n1 ` 1.
2
2
By the induction hypothesis, there is a representation of the form
m
p2n1 2k1 q ` p2n1 2k2 q ` ` p2n1 2kr q
2
for some ki with 0 ki n 1. It follows that
m p2n 2k1 `1 q ` p2n 2k2 `1 q ` ` p2n 2kr `1 q,
giving us the desired representation as a sum of elements of An . If m is odd, we consider
pn 2q2n ` 1 p2n 1q
m p2n 1q

pn 3q2n1 ` 1.
2
2
By the induction hypothesis, there is a representation of the form
m p2n 1q
p2n1 2k1 q ` p2n1 2k2 q ` ` p2n1 2kr q
2
for some ki with 0 ki n 1. It follows that
m p2n 2k1 `1 q ` p2n 2k2 `1 q ` ` p2n 2kr `1 q ` p2n 1q,
giving us the desired representation of m once again.
Part II. It remains to show that there is no representation for pn 2q2n ` 1. Let N be
the smallest positive integer that satisfies N 1 pmod 2n q, and which can be represented as a
sum of elements of An . Consider a representation of N, i.e.,
N p2n 2k1 q ` p2n 2k2 q ` ` p2n 2kr q,

(1)

where 0 k1 , k2 , . . . , kr n. Suppose first that two of the terms in the sum are the same, i.e.,
ki kj for some i j. If ki kj n 1, then we can simply remove these two terms to get a
representation for
N 2p2n 2n1 q N 2n

Shortlisted problems solutions

69

as a sum of elements of An , which contradicts our choice of N. If ki kj k n 1, replace


the two terms by 2n 2k`1, which is also an element of An , to get a representation for
N 2p2n 2k q ` 2n 2k`1 N 2n .
This is a contradiction once again. Therefore, all ki have to be distinct, which means that
2k1 ` 2k2 ` ` 2kr 20 ` 21 ` 22 ` ` 2n1 2n 1.
On the other hand, taking (1) modulo 2n , we find
2k1 ` 2k2 ` ` 2kr N 1 pmod 2n q.
Thus we must have 2k1 ` 2k2 ` ` 2kr 2n 1, which is only possible if each element of
t0, 1, . . . , n 1u occurs as one of the ki . This gives us
N n2n p20 ` 21 ` ` 2n1 q pn 1q2n ` 1.
In particular, this means that pn 2q2n ` 1 cannot be represented as a sum of elements of An .
Solution 2. The fact that m pn 2q2n ` 1 cannot be represented as a sum of elements
of An can also be shown in other ways. We prove the following statement by induction on n:
Claim. If a, b are integers with a 0, b 1, and a ` b n, then a2n ` b cannot be written as
a sum of elements of An .
Proof. The claim is clearly true for n 2 (since a 0, b 1 is the only possibility). For
n 2, assume that there exist integers a, b with a 0, b 1 and a ` b n as well as elements
m1 , m2 , . . . , mr of An such that
a2n ` b m1 ` m2 ` ` mr .
We can suppose, without loss of generality, that m1 m2 mr . Let be the largest
index for which m 2n 1 ( 0 if m1 2n 1). Clearly, and b must have the same parity.
Now
pa q2n ` pb ` q m`1 ` m`2 ` ` mr
and thus

b`
m`1 m`2
mr

`
` `
.
2
2
2
2
Note that m`1 {2, m`2 {2, . . . , mr {2 are elements of An1 . Moreover, a and pb ` q{2 are
integers, and pb ` q{2 1. If a was negative, then we would have
pa q2n1 `

a2n ` b p2n 1q pa ` 1qp2n 1q a2n ` 2n a 1,


thus n a ` b ` 1 2n , which is impossible. So a 0. By the induction hypothesis, we
n 1, which gives us a contradiction, since
must have a ` b`
2
a`

b`
a ` b ` 1 a ` b 1 n 1.
2

Considering the special case a n 2, b 1 now completes the proof.

70

IMO 2014 South Africa

Solution 3. Denote by Bn the set of all positive integers that can be written as a sum of
elements of An . In this solution, we explicitly describe all the numbers in Bn by an argument
similar to the first solution.
For a positive integer n, we denote by 2 pnq the sum of its digits in the binary representation.
Notice that every positive integer m has a unique representation of the form m s2n t with
some positive integer s and 0 t 2n 1.
Lemma. For any two integers s 1 and 0 t 2n 1, the number m s2n t belongs to Bn
if and only if s 2 ptq.
Proof. For t 0, the statement of the Lemma is obvious, since m 2s p2n 2n1 q.
Now suppose that t 1, and let
t 2k1 ` ` 2k

p0 k1 k n 1,

2 ptqq

be its binary expansion. If s , then m P Bn since


n

m ps q2 ` p2 tq 2ps q p2 2

n1

q`

p2n 2ki q.

i1

Assume now that there exist integers s and t with 1 s 2 ptq and 0 t 2n 1 such
that the number m s2n t belongs to Bn . Among all such instances, choose the one for
which m is smallest, and let
d

i1

p2n 2i q

p0 i n 1q

n1 j

2 2n 1,
be the corresponding representation. If all the i s are distinct, then di1 2i j0
d i
so one has s d and t i1 2 , whence s d 2 ptq; this is impossible. Therefore, two of
the i s must be equal, say d1 d . Then m 2p2n 2d q 2n , so s 2.
Now we claim that the number m1 m 2n ps 1q2n t also belongs to Bn , which
contradicts the minimality assumption. Indeed, one has
p2n 2d1 q ` p2n 2d q 2p2n 2d q 2n ` p2n 2d `1 q,
so
1

d2

i1

p2n 2i q ` p2n 2d `1 q

is the desired representation of m1 (if d n 1, then the last summand is simply omitted).
This contradiction finishes the proof.
l
By our lemma, the largest number M which does not belong to Bn must have the form
mt p2 ptq 1q2n t
for some t with 1 t 2n 1, so M is just the largest of these numbers. For t0 2n 1 we
have mt0 pn 1q2n p2n 1q pn 2q2n ` 1; for every other value of t one has 2 ptq n 1,
thus mt pptq 1q2n pn 2q2n mt0 . This means that M mt0 pn 2q2n ` 1.

Shortlisted problems solutions

71

N2. Determine all pairs px, yq of positive integers such that


a
3
7x2 13xy ` 7y 2 |x y| ` 1 .

(1)
(U.S.A.)

Answer. Either px, yq p1, 1q or tx, yu tm3 ` m2 2m 1, m3 ` 2m2 m 1u for some


positive integer m 2.

Solution. Let px, yq be any pair of positive integers solving (1). We shall prove that it appears
in the list displayed above. The converse assertion that all these pairs do actually satisfy (1)
either may be checked directly by means of a somewhat laborious calculation, or it can be seen
by going in reverse order through the displayed equations that follow.
In case x y the given equation reduces to x2{3 1, which is equivalent to x 1, whereby
he have found the first solution.
To find the solutions with x y we may assume x y due to symmetry. Then the integer
n x y is positive and (1) may be rewritten as
a
3
7py ` nq2 13py ` nqy ` 7y 2 n ` 1 .
Raising this to the third power and simplifying the result one obtains
y 2 ` yn n3 4n2 ` 3n ` 1 .
To complete the square on the left hand side, we multiply by 4 and add n2 , thus getting
p2y ` nq2 4n3 15n2 ` 12n ` 4 pn 2q2 p4n ` 1q .
This shows that the cases n 1 and n 2 are impossible, whence n 2, and 4n ` 1 is the
square of the rational number 2y`n
. Consequently, it has to be a perfect square, and, since it
n2
is odd as well, there has to exist some nonnegative integer m such that 4n ` 1 p2m ` 1q2 , i.e.
n m2 ` m .
Notice that n 2 entails m 2. Substituting the value of n just found into the previous
displayed equation we arrive at
p2y ` m2 ` mq2 pm2 ` m 2q2 p2m ` 1q2 p2m3 ` 3m2 3m 2q2 .
Extracting square roots and taking 2m3 ` 3m2 3m 2 pm 1qp2m2 ` 5m ` 2q 0 into
account we derive 2y ` m2 ` m 2m3 ` 3m2 3m 2, which in turn yields
y m3 ` m2 2m 1 .
Notice that m 2 implies that y pm3 1q ` pm 2qm is indeed positive, as it should be. In
view of x y ` n y ` m2 ` m it also follows that
x m3 ` 2m2 m 1 ,
and that this integer is positive as well.
Comment. Alternatively one could ask to find all pairs px, yq of not necessarily positive integers
solving (1). The answer to that question is a bit nicer than the answer above: the set of solutions are
now described by
tx, yu tm3 ` m2 2m 1, m3 ` 2m2 m 1u ,

where m varies through Z. This may be shown using essentially the same arguments as above. We
finally observe that the pair px, yq p1, 1q, that appears to be sporadic above, corresponds to m 1.

72

IMO 2014 South Africa

N3. A coin is called a Cape Town coin if its value is 1{n for some positive integer n. Given
a collection of Cape Town coins of total value at most 99 ` 21 , prove that it is possible to split
this collection into at most 100 groups each of total value at most 1.
(Luxembourg)
Solution. We will show that for every positive integer N any collection of Cape Town coins
of total value at most N 21 can be split into N groups each of total value at most 1. The
problem statement is a particular case for N 100.
We start with some preparations. If several given coins together have a total value also of
the form k1 for a positive integer k, then we may merge them into one new coin. Clearly, if the
resulting collection can be split in the required way then the initial collection can also be split.
After each such merging, the total number of coins decreases, thus at some moment we
come to a situation when no more merging is possible. At this moment, for every even k there
is at most one coin of value k1 (otherwise two such coins may be merged), and for every odd
k 1 there are at most k 1 coins of value k1 (otherwise k such coins may also be merged).
Now, clearly, each coin of value 1 should form a single group; if there are d such coins then
we may remove them from the collection and replace N by N d. So from now on we may
assume that there are no coins of value 1.
Finally, we may split all the coins in the following way. For each k 1, 2, . . . , N we put all
1
1
and 2k
into a group Gk ; the total value of Gk does not exceed
the coins of values 2k1
p2k 2q

1
1
`
1.
2k 1 2k

1
It remains to distribute the small coins of values which are less than 2N
; we will add them one
by one. In each step, take any remaining small coin. The total value of coins` in the groups at
1
this moment is at most N 21 , so there exists a group of total value at most N1 N 12 1 2N
;
thus it is possible to put our small coin into this group. Acting so, we will finally distribute all
the coins.

Comment 1. The algorithm may be modified, at least the step where one distributes the coins of
1
1
values 2N
. One different way is to put into Gk all the coins of values p2k1q2
s for all integer s 0.
One may easily see that their total value also does not exceed 1.
Comment 2. The original proposal also contained another part, suggesting to show that a required
splitting may be impossible if the total value of coins is at most 100. There are many examples of
such a collection, e.g. one may take 98 coins of value 1, one coin of value 21 , two coins of value 13 , and
four coins of value 51 .
The Problem Selection Committee thinks that this part is less suitable for the competition.

Shortlisted problems solutions

73

N4. Let n 1 be a given integer. Prove that infinitely many terms of the sequence pak qk1 ,
defined by

^
nk
ak
,
k
Z

are odd. (For a real number x, txu denotes the largest integer not exceeding x.)
(Hong Kong)
nm m

Solution 1. If n is odd, let k nm for m 1, 2, . . .. Then ak n


, which is odd for
each m.
Henceforth, assume that n is even, say n 2t for some integer t 1. Then, for any m 2,
m
m
m
the integer n2 2m 2m p22 m t2 1q has an odd prime divisor p, since 2m m 1. Then,
for k p 2m , we have
m
nk pn2 qp p2m qp p2p qm 2m ,

where the congruences are taken modulo p (recall that 2p 2 pmod pq, by Fermats little
nk
lies strictly
theorem). Also, from nk 2m nk nk ` 2m pp 1q, we see that the fraction
k
nk 2m
nk ` 2m pp 1q
between the consecutive integers
and
, which gives
p 2m
p 2m
Z k^
nk 2m
n

.
k
p 2m
k

n
1
nk
nk 2m
2m

is
an
odd
integer,
since
the
integer
1 is odd
We finally observe that
p 2m
p
2m
(recall that k m). Note that for different values of m, we get different values of k, due to the
different powers of 2 in the prime factorisation of k.

Solution 2. Treat the (trivial) case when n is odd as in Solution 1.


Now assume that n is even and n 2. Let p be a prime divisor of n 1.
i
Proceed by induction on i to prove that pi`1 is a divisor of np 1 for every i 0. The case
i 0 is true by the way in which p is chosen. Suppose the result is true for some i 0. The
factorisation
i`1
i
i
i
i
np 1 pnp 1qrnp pp1q ` np pp2q ` ` np ` 1s,
together with the fact that each of the p terms between the square brackets is congruent to 1
modulo p, Zimplies
that the result is also true for i ` 1.
i
i^
np 1
np

, an odd integer for each i 1.


Hence
pi
pi
i
Finally, we consider the case n 2. We observe that 3 4i is a divisor of 234 4i for every
i
i
i 1: Trivially, 4i is a divisor of 234 4i , since 3 4i 2i. ZFurthermore,
since 234 and 4i are
^
i
i
i
34i
234
234 4i
234 2i 1
i

both congruent to 1 modulo 3, we have 3 2 4 . Hence,

,
3 4i
3 4i
3
which is odd for every i 1.
Comment. The case n even and n 2 can also be solved by recursively defining the sequence pki qi1
by k1 1 and ki`1 nki 1 for i 1. Then pki q is strictly increasing and it follows (by induction
on i) that ki | nki 1 for all i 1, so the ki are as desired.
The case n 2 can also be solved as follows: Let i 2. By Bertrands postulate, there exists a
i
i
prime number p such that 22 1 p 2i 22 . This gives
i

p 2i 22 2p 2i .

(1)

74

IMO 2014 South Africa


i

Also, we have that p 2i is a divisor of 2p2 22 , hence, using (1), we get that
Z

i ^
i
i
i
i
2p2
2p2 i 22 i ` p
2p2 22 ` p 2i
,

p 2i
p 2i
p

which is an odd integer.

Solution 3. Treat the (trivial) case when n is odd as in Solution 1.


Let n be even, and let p be a prime divisor of n ` 1. Define the sequence pai qi1 by
(
ai min a P Z0 : 2i divides ap ` 1 .

Recall that there exists a with 1 a 2i such that ap 1 pmod 2i q, so each ai satisfies
1 ai 2i . This implies that ai p ` 1 p 2i . Also, ai 8 as i 8, whence there are
infinitely many i such that ai ai`1 . From now on, we restrict ourselves only to these i.
i
Notice that p is a divisor of np ` 1, which, in turn, divides np2 Z1. It follows
that p 2i is a
^
i
i
np2 pai p ` 1q
np2
p2i

divisor of n pai p ` 1q, and we consequently see that the integer


p 2i
p 2i
i
is odd, since 2i`1 divides np2 , but not ai p ` 1.

Shortlisted problems solutions

75

N5. Find all triples pp, x, yq consisting of a prime number p and two positive integers x and y
such that xp1 ` y and x ` y p1 are both powers of p.

(Belgium)

(
(
Answer. pp, x, yq P p3, 2, 5q, p3, 5, 2q Y p2, n, 2k nq | 0 n 2k .

Solution 1. For p 2, clearly all pairs of two positive integers x and y whose sum is a power
of 2 satisfy the condition. Thus we assume in the following that p 2, and we let a and b be
positive integers such that xp1 ` y pa and x ` y p1 pb . Assume further, without loss of
generality, that x y, so that pa xp1 ` y x ` y p1 pb , which means that a b (and
thus pa | pb ).
Now we have
pb y p1 ` x ppa xp1 qp1 ` x.
We take this equation modulo pa and take into account that p 1 is even, which gives us
2

0 xpp1q ` x pmod pa q.
2

If p | x, then pa | x, since xpp1q 1 ` 1 is not divisible by p in this case. However, this is


impossible, since x xp1 pa . Thus we know that p x, which means that
2 1

pa | xpp1q
2

` 1 xppp2q ` 1.

By Fermats little theorem, xpp1q 1 pmod pq, thus p divides x`1. Let pr be the highest
power of p that divides x ` 1. By the binomial theorem, we have
ppp2q
ppp 2q
ppp2q
p1qppp2qk px ` 1qk .
x

k
k0

Except for the terms corresponding to k 0, k 1 and k 2, all terms in the sum are clearly
divisible by p3r and thus by pr`2 . The remaining terms are

ppp 2qpp2 2p 1q
px ` 1q2 ,
2

which is divisible by p2r`1 and thus also by pr`2 ,


ppp 2qpx ` 1q,

which is divisible by pr`1 , but not pr`2 by our choice of r, and the final term 1 corresponding
to k 0. It follows that the highest power of p that divides xppp2q ` 1 is pr`1 .
On the other hand, we already know that pa divides xppp2q ` 1, which means that a r ` 1.
Moreover,
pr x ` 1 xp1 ` y pa .

Hence we either have a r or a r ` 1.


If a r, then x y 1 needs to hold in the inequality above, which is impossible for
p 2. Thus a r ` 1. Now since pr x ` 1, we get
x

x2 ` x
xp1 ` y
pa
pa

r p,
x`1
x`1
x`1
p

so we must have x p 1 for p to divide x ` 1.


It follows that r 1 and a 2. If p 5, we obtain

pa xp1 ` y pp 1q4 pp2 2p ` 1q2 p3pq2 p2 pa ,

a contradiction. So the only case that remains is p 3, and indeed x 2 and y pa xp1 5
satisfy the conditions.

76

IMO 2014 South Africa

Comment 1. In this solution, we are implicitly using a special case of the following lemma known
as lifting the exponent:
Lemma. Let n be a positive integer, let p be an odd prime, and let vp pmq denote the exponent of the
highest power of p that divides m.
If x and y are integers not divisible by p such that p | x y, then we have
vp pxn y n q vp px yq ` vp pnq.
Likewise, if x and y are integers not divisible by p such that p | x ` y, then we have
vp pxn ` y n q vp px ` yq ` vp pnq.
Comment 2. There exist various ways of solving the problem involving the lifting the exponent
lemma. Let us sketch another one.
The cases x y and p | x are ruled out easily, so we assume that p 2, x y, and p x. In this
case we also have pa pb and p | x ` 1.
Now one has
y p xp ypy p1 ` xq xpxp1 ` yq 0 pmod pa q,
so by the lemma mentioned above one has pa1 | y x and hence y x ` tpa1 for some positive
integer t. Thus one gets
xpxp2 ` 1q xp1 ` x pxp1 ` yq py xq pa1 pp tq.
The factors on the left-hand side are coprime. So if p | x, then xp2 ` 1 | p t, which is impossible
since x xp2 ` 1. Therefore, p x, and thus x | p t. Since p | x ` 1, the only remaining case is
x p 1, t 1, and y pa1 ` p 1. Now the solution can be completed in the same way as before.

Solution 2. Again, we can focus on the case that p 2. If p | x, then also p | y. In this case,
let pk and p be the highest powers of p that divide x and y respectively, and assume without
loss of generality that k . Then pk divides x ` y p1 while pk`1 does not, but pk x ` y p1,
which yields a contradiction. So x and y are not divisible by p. Fermats little theorem yields
0 xp1 ` y 1 ` y pmod pq, so y 1 pmod pq and for the same reason x 1 pmod pq.
In particular, x, y p 1 and thus xp1 ` y 2pp 1q p, so xp1 ` y and y p1 ` x are
both at least equal to p2 . Now we have
xp1 y

pmod p2 q

and

y p1 x pmod p2 q.

These two congruences, together with the EulerFermat theorem, give us


1 xppp1q pyqp y p xy

pmod p2 q.

Since x y 1 pmod pq, x y is divisible by p, so px yq2 is divisible by p2 . This means


that
px ` yq2 px yq2 ` 4xy 4 pmod p2 q,

so p2 divides px ` y 2qpx ` y ` 2q. We already know that x ` y 2 pmod pq, so x ` y 2


4 0 pmod pq. This means that p2 divides x ` y ` 2.
Using the same notation as in the first solution, we subtract the two original equations to
obtain
pb pa y p1 xp1 ` x y py xqpy p2 ` y p3x ` ` xp2 1q.
(1)
The second factor is symmetric in x and y, so it can be written as a polynomial of the elementary
symmetric polynomials x ` y and xy with integer coefficients. In particular, its value modulo

Shortlisted problems solutions

77

p2 is characterised by the two congruences xy 1 pmod p2 q and x ` y 2 pmod p2 q. Since


both congruences are satisfied when x y 1, we must have
y p2 ` y p3x ` ` xp2 1 p1qp2 ` p1qp3 p1q ` ` p1qp2 1

pmod p2 q,

which simplifies to y p2 ` y p3x ` ` xp2 1 p pmod p2 q. Thus the second factor in (1)
is divisible by p, but not p2 .
This means that pa1 has to divide the other factor y x. It follows that
0 xp1 ` y xp1 ` x xpx ` 1qpxp3 xp4 ` ` 1q pmod pa1 q.
Since x 1 pmod pq, the last factor is xp3 xp4 ` ` 1 p 2 pmod pq and in particular
not divisible by p. We infer that pa1 | x ` 1 and continue as in the first solution.
Comment. Instead of reasoning by means of elementary symmetric polynomials, it is possible to
provide a more direct argument as well. For odd r, px ` 1q2 divides pxr ` 1q2 , and since p divides
x ` 1, we deduce that p2 divides pxr ` 1q2 . Together with the fact that xy 1 pmod p2 q, we obtain
0 y r pxr ` 1q2 x2r y r ` 2xr y r ` y r xr ` 2 ` y r

pmod p2 q.

We apply this congruence with r p 2 2k (where 0 k pp 2q{2) to find that


xk y p2k ` xp2k y k pxyqk pxp22k ` y p22k q 1k p2q 2 pmod p2 q.
Summing over all k yields
y p2 ` y p3 x ` ` xp2 1
once again.

p1
2

p2q 1 p

pmod p2 q

78

IMO 2014 South Africa

N6.

Let a1 a2 an be pairwise coprime positive integers with a1 being prime


and a1 n ` 2. On the segment I r0, a1 a2 an s of the real line, mark all integers that are
divisible by at least one of the numbers a1 , . . . , an . These points split I into a number of smaller
segments. Prove that the sum of the squares of the lengths of these segments is divisible by a1 .
(Serbia)
Solution 1. Let A a1 an . Throughout the solution, all intervals will be nonempty and
have integer end-points. For any interval X, the length of X will be denoted by |X|.
Define the following two families of intervals:
S rx, ys : x y are consecutive marked points

(
T rx, ys : x y are integers, 0 x A 1, and no point is marked in px, yq

We are interested in computing

XPS

|X|2 modulo a1 .

Note that the number A is marked, so in the definition of T the condition y A is enforced
without explicitly prescribing it.
Assign weights to the intervals` in T , depending only on their lengths. The weight of an
arbitrary interval Y P T will be w |Y | , where
wpkq

1 if k 1,
2 if k 2 .

Consider an arbitrary interval X P S and its sub-intervals Y P T . Clearly, X has one


sub-interval of length |X|, two sub-intervals of length |X| 1 and so on; in general X has
|X| d ` 1 sub-intervals of length d for every d 1, 2, . . . , |X|. The sum of the weights of the
sub-intervals of X is

Y PT , Y X

|X|
`

`
p|X| d ` 1q wpdq |X| 1 ` p|X| 1q ` p|X| 2q ` ` 1 2 |X|2 .
w |Y |
d1

Since the intervals in S are non-overlapping, every interval Y P T is a sub-interval of a single


interval X P S. Therefore,

w |Y | .
(1)
w |Y |
|X|2
XPS

XPS

Y PT , Y X

Y PT

For every d 1, 2, . . . , a1 , we count how many intervals in T are of length d. Notice that
the multiples of a1 are all marked, so the lengths of the intervals in S and T cannot exceed a1 .
Let x be an arbitrary integer with 0 x A 1 and consider the interval rx, x ` ds. Let r1 ,
. . . , rn be the remainders of x modulo a1 , . . . , an , respectively. Since a1 , . . . , an are pairwise
coprime, the number x is uniquely identified by the sequence pr1 , . . . , rn q, due to the Chinese
remainder theorem.
For every i 1, . . . , n, the property that the interval px, x`dq does not contain any multiple
of ai is equivalent with ri ` d ai , i.e. ri P t0, 1, . . . , ai du, so there are ai d ` 1 choices for
the number ri for each i. Therefore, the number of the remainder sequences pr1 , . . . , rn q that
satisfy rx, x ` ds P T is precisely pa1 ` 1 dq pan ` 1 dq. Denote this product by f pdq.

Shortlisted problems solutions

79

Now we can group the last sum in (1) by length of the intervals. As we have seen, for every
d 1, . . . , a1 there are f pdq intervals Y P T with |Y | d. Therefore, (1) can be continued as

XPS

|X|

Y PT

a1
a1

`
f pdq f p1q.
f pdq wpdq 2
w |Y |

(2)

d1

d1

Having the formula (2), the solution can be finished using the following well-known fact:
Lemma. If p is a prime, F pxq is a polynomial with integer coefficients, and deg F p 2, then
p

F pxq is divisible by p.

x1

Proof. Obviously, it is sufficient to prove the lemma for monomials of the form xk with k p2.
Apply induction on k. If k 0 then F 1, and the statement is trivial.
Let 1 k p 2, and assume that the lemma is proved for all lower degrees. Then

p
p
k

k
`
1
0 pk`1
x
xk`1 px 1qk`1
p1qk

x1
x1 0

p
p
p
k1

k k ` 1
k
xk pmod pq.
x pk ` 1q
p1q
x `
pk ` 1q

x1
x1
x1
0
Since 0 k ` 1 p, this proves

x1

xk 0 pmod pq.

In (2), by applying the lemma to the polynomial f and the prime a1 , we obtain that

a1

d1

f pdq

is divisible by
a1 . 2The term f p1q a1 an is also divisible by a1 ; these two facts together
prove that
|X| is divisible by a1 .
XPS

Comment 1. With suitable sets of weights, the same method can be used to sum up other expressions
on the lengths
of3the segments. For example, wp1q 1 and wpkq 6pk 1q for k 2 can be used to
|X| and to prove that this sum is divisible by a1 if a1 is a prime with a1 n ` 3. See
compute
XPS

also Comment 2 after the second solution.

Solution 2. The conventions from the first paragraph of the first solution are still in force.
We shall prove the following more general statement:
pq Let p denote a prime number, let p a1 a2 an be n pairwise
coprime positive integers, and let d be an integer with 1 d p n. Mark all
integers that are divisible by at least one of the numbers a1 , . . . , an on the interval
I r0, a1a2 an s of the real line. These points split I into a number of smaller
k `

bi
segments, say of lengths b1 , . . . , bk . Then the sum
is divisible by p.
d
i1

` `
Applying pq to d 1 and d 2 and using the equation x2 2 x2 ` x1 , one easily gets
the statement of the problem.
To prove pq itself, we argue by induction
on n. The base case n 1 follows from the
`p
known fact that the binomial coefficient d is divisible by p whenever 1 d p 1.
Let us now assume that n 2, and that the statement is known whenever n 1 rather
than n coprime integers are given together with some integer d P r1, p n ` 1s. Suppose that

80

IMO 2014 South Africa

n1
ai and A A1 an .
the numbers p a1 a2 an and d are as above. Write A1 i1
Mark the points on the real axis divisible by one of the numbers a1 , . . . , an1 green and those
divisible by an red. The green points divide r0, A1 s into certain sub-intervals, say J1 , J2 , . . . ,
and J .
To translate intervals we use the notation ra, bs ` m ra ` m, b ` ms whenever a, b, m P Z.
For each i P t1, 2, . . . , u let Fi be the family of intervals into which the red points partition
the intervals Ji , Ji ` A1 , . . . , and Ji ` pan 1qA1 . We are to prove that

|X|
d
i1 XPF
i

is divisible by p.
Let us fix any index i with 1 i for a while. Since the numbers A1 and an are coprime
by hypothesis, the numbers 0, A1 , . . . , pan 1qA1 form a complete system of residues modulo an .
Moreover, we have |Ji | p an , as in particular all multiples of p are green. So each of the
intervals Ji , Ji ` A1 , . . . , and Ji ` pan 1qA1 contains at most one red point. More precisely,
for each j P t1, . . . , |Ji | 1u there is exactly one amongst those intervals containing a red point
splitting it into an interval of length j followed by an interval of length |Ji | j, while the
remaining an |Ji | ` 1 such intervals have no red points in their interiors. For these reasons


|X|
|Ji |
|Ji | 1
1
` pan |Ji | ` 1q
` `
2
d
d
d
d
XPFi

|Ji |
|Ji |
|Ji |
pd ` 1q
` pan d ` 1q
2
d`1
d
d`1

|Ji |
|Ji |
.
` pan d ` 1q
p1 dq
d
d`1
So it remains to prove that

|Ji |
|Ji |
` pan d ` 1q
p1 dq
d
d`1
i1
i1
is divisible by p. By the induction hypothesis, however, it is even true that both summands
are divisible by p, for 1 d d ` 1 p pn 1q. This completes the proof of pq and hence
the solution of the problem.
Comment 2. `The statement pq can also be proved by the method of the first solution, using the
weights wpxq x2
d2 .

Shortlisted problems solutions

This page is intentionally left blank

81

82

IMO 2014 South Africa

N7. Let c 1 be an integer. Define a sequence of positive integers by a1 c and


an`1 a3n 4c a2n ` 5c2 an ` c
for all n 1. Prove that for each integer n 2 there exists a prime number p dividing an but
none of the numbers a1 , . . . , an1 .
(Austria)
Solution. Let us define x0 0 and xn an {c for all integers n 1. It is easy to see that the
sequence pxn q thus obtained obeys the recursive law
xn`1 c2 px3n 4x2n ` 5xn q ` 1

(1)

for all integers n 0. In particular, all of its terms are positive integers; notice that x1 1
and x2 2c2 ` 1. Since
xn`1 c2 xn pxn 2q2 ` c2 xn ` 1 xn

(2)

holds for all integers n 0, it is also strictly increasing. Since xn`1 is by (1) coprime to c for
any n 0, it suffices to prove that for each n 2 there exists a prime number p dividing xn
but none of the numbers x1 , . . . , xn1 . Let us begin by establishing three preliminary claims.
Claim 1. If i j pmod mq holds for some integers i, j 0 and m 1, then xi xj pmod xm q
holds as well.
Proof. Evidently, it suffices to show xi`m xi pmod xm q for all integers i 0 and m 1. For
this purpose we may argue for fixed m by induction on i using x0 0 in the base case i 0.
Now, if we have xi`m xi pmod xm q for some integer i, then the recursive equation (1) yields
xi`m`1 c2 px3i`m 4x2i`m ` 5xi`m q ` 1 c2 px3i 4x2i ` 5xi q ` 1 xi`1

pmod xm q ,

which completes the induction.

Claim 2. If the integers i, j 2 and m 1 satisfy i j pmod mq, then xi xj pmod x2m q
holds as well.
Proof. Again it suffices to prove xi`m xi pmod x2m q for all integers i 2 and m 1. As
above, we proceed for fixed m by induction on i. The induction step is again easy using (1),
but this time the base case i 2 requires some calculation. Set L 5c2 . By (1) we have
xm`1 Lxm ` 1 pmod x2m q, and hence
x3m`1 4x2m`1 ` 5xm`1 pLxm ` 1q3 4pLxm ` 1q2 ` 5pLxm ` 1q
p3Lxm ` 1q 4p2Lxm ` 1q ` 5pLxm ` 1q 2 pmod x2m q ,
which in turn gives indeed xm`2 2c2 ` 1 x2 pmod x2m q.

Claim 3. For each integer n 2, we have xn x1 x2 xn2 .

Proof. The cases n 2 and n 3 are clear. Arguing inductively, we assume now that
the claim holds for some n 3. Recall that x2 3, so by monotonicity and (2) we get
xn x3 x2 px2 2q2 ` x2 ` 1 7. It follows that
xn`1 x3n 4x2n ` 5xn 7x2n 4x2n x2n xn xn1 ,
which by the induction hypothesis yields xn`1 x1 x2 xn1 , as desired.

Shortlisted problems solutions

83

Now we direct our attention to the problem itself: let any integer n 2 be given. By Claim 3
there exists a prime number p appearing with a higher exponent in the prime factorisation of xn
than in the prime factorisation of x1 xn2 . In particular, p | xn , and it suffices to prove that
p divides none of x1 , . . . , xn1 .
Otherwise let k P t1, . . . , n 1u be minimal such that p divides xk . Since xn1 and xn are
coprime by (1) and x1 1, we actually have 2 k n 2. Write n qk ` r with some
integers q 0 and 0 r k. By Claim 1 we have xn xr pmod xk q, whence p | xr . Due to
the minimality of k this entails r 0, i.e. k | n.
Thus from Claim 2 we infer
xn xk pmod x2k q .
Now let 1 be maximal with the property p | xk . Then x2k is divisible by p`1 and by our
choice of p so is xn . So by the previous congruence xk is a multiple of p`1 as well, contrary to
our choice of . This is the final contradiction concluding the solution.

84

IMO 2014 South Africa

N8. For every real number x, let }x} denote the distance between x and the nearest integer.

Prove that for every pair pa, bq of positive integers there exist an odd prime p and a positive
integer k satisfying

a b a ` b
` `

(1)
pk pk pk 1.
X

Solution. Notice first that x `


have

\
1

(Hungary)
X

\
is an integer nearest to x, so }x} x ` 12 x. Thus we
Z
^
1
x`
x }x}.
(2)
2

For every rational number r and every prime number p, denote by vp prq the exponent of p
in the prime factorisation of r. Recall the notation p2n 1q!! for the product of all odd positive
integers not exceeding 2n 1, i.e., p2n 1q!! 1 3 p2n 1q.
Lemma. For every positive integer n and every odd prime p, we have
^
8 Z
`

n
1
vp p2n 1q!!
.
`
pk 2
k1
Proof. For every positive integer k, let us count the multiples of pk among the factors 1, 3, . . . ,
2n 1. If is an arbitrary integer, the number p2 1qpk is listed above if and only if
^
Z
n
1
1
n
1
k
.
k `
1 k `
0 p2 1qp 2n
2
p
2
p
2
\
X
Hence, the number of multiples of pk among the factors is precisely mk pnk ` 21 . Thus we
obtain
^
mk
8 Z
8
n
n vp p2i1q

`

n
1
1
1
vp p2n 1q!!
vp p2i 1q
.
l
`
pk 2
i1
i1 k1
k1
k1 1
In order to prove the problem statement, consider the rational number
N

p2a ` 1qp2a ` 3q p2a ` 2b 1q


p2a ` 2b 1q!!

.
p2a 1q!! p2b 1q!!
1 3 p2b 1q

Obviously, N 1, so there exists a prime p with vp pNq 0. Since N is a fraction of two odd
numbers, p is odd.
By our lemma,
^ Z
^ Z
^
8 Z

a`b 1
a
1
b
1
0 vp pNq
k`
k`
.
`
pk
2
p
2
p
2
k1
Therefore, there exists some positive integer k such that the integer number
^ Z
^ Z
^
Z
a
1
b
1
a`b 1
k`
k`
`
dk
pk
2
p
2
p
2
is positive, so dk 1. By (2) we have

a ` b a b
a ` b a b
a`b
a
b

1 dk k k k k k k k k k .
p
p
p
p
p
p
p
p
p

(3)

Shortlisted problems solutions

85

Since }x} 21 for every rational x with odd denominator, the relation (3) can only be satisfied
if all three signs on the right-hand side are positive and dk 1. Thus we get


a b a ` b

` `
pk pk pk dk 1,
as required.

Comment 1. There are various choices for the number N in the solution. Here we sketch such a
version.
Let x and y be two rational numbers with odd denominators. It is easy to see that the condition }x} ` }y} ` }x ` y} 1 is satisfied if and only if
either

txu 21 ,

tyu 12 ,

tx ` yu 12 ,

or

txu 21 ,

tyu 12 ,

tx ` yu 12 ,

where txu denotes the fractional part of x.


In the context of our problem, the first condition seems easier to deal with. Also, one may notice
that
and
txu 12 pxq 1,
(4)
txu 12 pxq 0

where

pxq t2xu 2txu.

Now it is natural to consider the number

2a ` 2b
a`b
M ,
2a 2b
a
b
since



2pa ` bq
2a
2b

.
vp pM q

k
k
p
p
pk
k1
8

One may see that M 1, and that v2 pM q 0. Thus, there exist an odd prime p and a positive
integer k with

2a
2b
2pa ` bq

0.

k
k
p
p
pk
In view of (4), the last inequality yields
" *
" *
b
1
1
a
,
,
k
k
p
2
p
2

and

"

a`b
pk

1
,
2

(5)

which is what we wanted to obtain.


Comment 2. Once one tries to prove the existence of suitable p and k satisfying (5), it seems somehow
natural to suppose that a b and to add the restriction pk a. In this case the inequalities (5) can
be rewritten as
2a pk ,

2mpk 2b p2m ` 1qpk ,

and p2m ` 1qpk 2pa ` bq p2m ` 2qpk

for some positive integer m. This means exactly that one of the numbers 2a ` 1, 2a ` 3, . . . , 2a ` 2b 1
is divisible by some number of the form pk which is greater than 2a.
Using more advanced techniques, one can show that such a number pk exists even with k 1.
This was shown in 2004 by Laishram and Shorey; the methods used for this proof are elementary
but still quite involved. In fact, their result generalises a theorem by Sylvester which states that
for every pair of integers pn, kq with n k 1, the product pn ` 1qpn ` 2q pn ` kq is divisible by
some prime p k. We would like to mention here that Sylvesters theorem itself does not seem to
suffice for solving the problem.

Shortlisted Problems with Solutions

56th International Mathematical Olympiad


Chiang Mai, Thailand, 416

Note of Confidentiality

The shortlisted problems should be kept


strictly confidential until IMO 2016.

Contributing Countries
The Organizing Committee and the Problem Selection Committee of IMO 2015 thank the
following 53 countries for contributing 155 problem proposals:

Albania, Algeria, Armenia, Australia, Austria, Brazil, Bulgaria,


Canada, Costa Rica, Croatia, Cyprus, Denmark, El Salvador,
Estonia, Finland, France, Georgia, Germany, Greece, Hong Kong,
Hungary, India, Iran, Ireland, Israel, Italy, Japan, Kazakhstan,
Lithuania,
Luxembourg,
Montenegro,
Morocco,
Netherlands,
Pakistan,
Poland,
Romania,
Russia,
Saudi Arabia,
Serbia,
Singapore, Slovakia, Slovenia, South Africa, South Korea, Sweden,
Turkey, Turkmenistan, Taiwan, Tanzania, Ukraine, United Kingdom,
U.S.A., Uzbekistan
Problem Selection Committee

Dungjade Shiowattana, Ilya I. Bogdanov, Tirasan Khandhawit,


Wittawat Kositwattanarerk, Geza Kos, Weerachai Neeranartvong,
Nipun Pitimanaaree, Christian Reiher, Nat Sothanaphan,
Warut Suksompong, Wuttisak Trongsiriwat, Wijit Yangjit
Assistants: Jirawat Anunrojwong, Pakawut Jiradilok

Shortlisted problems

Problems
Algebra
A1. Suppose that a sequence a1 , a2 , . . . of positive real numbers satisfies
ak`1

a2k

kak
` pk 1q

for every positive integer k. Prove that a1 ` a2 ` ` an n for every n 2.

(Serbia)

A2. Determine all functions f : Z Z with the property that


`

f x f pyq f f pxq f pyq 1

holds for all x, y P Z.

(Croatia)

A3. Let n be a fixed positive integer. Find the maximum possible value of

ps r nqxr xs ,

1rs2n

where 1 xi 1 for all i 1, 2, . . . , 2n.

(Austria)

A4. Find all functions f : R R satisfying the equation


`

f x ` f px ` yq ` f pxyq x ` f px ` yq ` yf pxq

for all real numbers x and y.

(Albania)
A5. Let 2Z ` 1 denote the set of odd integers. Find all functions f : Z 2Z ` 1 satisfying
for every x, y P Z.

f x ` f pxq ` y ` f x f pxq y f px ` yq ` f px yq

(U.S.A.)
A6. Let n be a fixed integer with n 2. We say that two polynomials P and Q with real
coefficients are block-similar if for each i P t1, 2, . . . , nu the sequences
P p2015iq, P p2015i 1q, . . . , P p2015i 2014q
Qp2015iq, Qp2015i 1q, . . . , Qp2015i 2014q

and

are permutations of each other.


paq Prove that there exist distinct block-similar polynomials of degree n ` 1.

pbq Prove that there do not exist distinct block-similar polynomials of degree n.

(Canada)

IMO 2015 Thailand

Combinatorics
C1.

In Lineland there are n 1 towns, arranged along a road running from left to right.
Each town has a left bulldozer (put to the left of the town and facing left) and a right bulldozer
(put to the right of the town and facing right). The sizes of the 2n bulldozers are distinct.
Every time when a right and a left bulldozer confront each other, the larger bulldozer pushes
the smaller one off the road. On the other hand, the bulldozers are quite unprotected at their
rears; so, if a bulldozer reaches the rear-end of another one, the first one pushes the second one
off the road, regardless of their sizes.
Let A and B be two towns, with B being to the right of A. We say that town A can sweep
town B away if the right bulldozer of A can move over to B pushing off all bulldozers it meets.
Similarly, B can sweep A away if the left bulldozer of B can move to A pushing off all bulldozers
of all towns on its way.
Prove that there is exactly one town which cannot be swept away by any other one.
(Estonia)
C2. Let V be a finite set of points in the plane. We say that V is balanced if for any two
distinct points A, B P V, there exists a point C P V such that AC BC. We say that V is
center-free if for any distinct points A, B, C P V, there does not exist a point P P V such that
P A P B P C.
(a) Show that for all n 3, there exists a balanced set consisting of n points.
(b) For which n 3 does there exist a balanced, center-free set consisting of n points?
(Netherlands)
C3. For a finite set A of positive integers, we call a partition of A into two disjoint nonempty
subsets A1 and A2 good if the least common multiple of the elements in A1 is equal to the
greatest common divisor of the elements in A2 . Determine the minimum value of n such that
there exists a set of n positive integers with exactly 2015 good partitions.
(Ukraine)
C4. Let n be a positive integer. Two players A and B play a game in which they take turns
choosing positive integers k n. The rules of the game are:
piq A player cannot choose a number that has been chosen by either player on any previous
turn.
piiq A player cannot choose a number consecutive to any of those the player has already chosen
on any previous turn.
piiiq The game is a draw if all numbers have been chosen; otherwise the player who cannot
choose a number anymore loses the game.
The player A takes the first turn. Determine the outcome of the game, assuming that both
players use optimal strategies.
(Finland)

Shortlisted problems

C5. Consider an infinite sequence a1 , a2 , . . . of positive integers with ai 2015 for all i 1.
Suppose that for any two distinct indices i and j we have i ` ai j ` aj .
Prove that there exist two positive integers b and N such that

pa

bq
10072

im`1
whenever n m N.

(Australia)
C6. Let S be a nonempty set of positive integers. We say that a positive integer n is clean if
it has a unique representation as a sum of an odd number of distinct elements from S. Prove
that there exist infinitely many positive integers that are not clean.
(U.S.A.)
C7. In a company of people some pairs are enemies. A group of people is called unsociable
if the number of members in the group is odd and at least 3, and it is possible to arrange all
its members around a round table so that every two neighbors are enemies. Given that there
are at most 2015 unsociable groups, prove that it is possible to partition the company into 11
parts so that no two enemies are in the same part.
(Russia)

IMO 2015 Thailand

Geometry
G1. Let ABC be an acute triangle with orthocenter H. Let G be the point such that the
quadrilateral ABGH is a parallelogram. Let I be the point on the line GH such that AC
bisects HI. Suppose that the line AC intersects the circumcircle of the triangle GCI at C
and J. Prove that IJ AH.
(Australia)
G2. Let ABC be a triangle inscribed into a circle with center O. A circle with center A
meets the side BC at points D and E such that D lies between B and E. Moreover, let F and
G be the common points of and . We assume that F lies on the arc AB of not containing
C, and G lies on the arc AC of not containing B. The circumcircles of the triangles BDF
and CEG meet the sides AB and AC again at K and L, respectively. Suppose that the lines
F K and GL are distinct and intersect at X. Prove that the points A, X, and O are collinear.
(Greece)
G3. Let ABC be a triangle with =C 900, and let H be the foot of the altitude from C.
A point D is chosen inside the triangle CBH so that CH bisects AD. Let P be the intersection
point of the lines BD and CH. Let be the semicircle with diameter BD that meets the
segment CB at an interior point. A line through P is tangent to at Q. Prove that the
lines CQ and AD meet on .
(Georgia)
G4. Let ABC be an acute triangle, and let M be the midpoint of AC. A circle passing
through B and M meets the sides AB and BC again at P and Q, respectively. Let T be
the point such that the quadrilateral BP T Q is a parallelogram. Suppose that T lies on the
circumcircle of the triangle ABC. Determine all possible values of BT {BM.
(Russia)
G5. Let ABC be a triangle with CA CB. Let D, F , and G be the midpoints of the
sides AB, AC, and BC, respectively. A circle passing through C and tangent to AB at D
meets the segments AF and BG at H and I, respectively. The points H 1 and I 1 are symmetric
to H and I about F and G, respectively. The line H 1 I 1 meets CD and F G at Q and M,
respectively. The line CM meets again at P . Prove that CQ QP .
(El Salvador)
G6. Let ABC be an acute triangle with AB AC, and let be its circumcircle. Let H,
M, and F be the orthocenter of the triangle, the midpoint of BC, and the foot of the altitude
from A, respectively. Let Q and K be the two points on that satisfy =AQH 900 and
=QKH 900 . Prove that the circumcircles of the triangles KQH and KF M are tangent to
each other.
(Ukraine)
G7. Let ABCD be a convex quadrilateral, and let P , Q, R, and S be points on the sides
AB, BC, CD, and DA, respectively. Let the line segments P R and QS meet at O. Suppose
that each of the quadrilaterals AP OS, BQOP , CROQ, and DSOR has an incircle. Prove that
the lines AC, P Q, and RS are either concurrent or parallel to each other.
(Bulgaria)
G8. A triangulation of a convex polygon is a partitioning of into triangles by diagonals
having no common points other than the vertices of the polygon. We say that a triangulation
is a Thaiangulation if all triangles in it have the same area.
Prove that any two different Thaiangulations of a convex polygon differ by exactly two
triangles. (In other words, prove that it is possible to replace one pair of triangles in the first
Thaiangulation with a different pair of triangles so as to obtain the second Thaiangulation.)
(Bulgaria)

Shortlisted problems

Number Theory
N1.

Determine all positive integers M for which the sequence a0 , a1 , a2 , . . ., defined by


a0
and ak`1 ak tak u for k 0, 1, 2, . . ., contains at least one integer term.
(Luxembourg)
N2. Let a and b be positive integers such that a!b! is a multiple of a! ` b!. Prove that
3a 2b ` 2.
(United Kingdom)
N3. Let m and n be positive integers such that m n. Define xk pm ` kq{pn ` kq for k
1, 2, . . . , n ` 1. Prove that if all the numbers x1 , x2 , . . . , xn`1 are integers, then x1 x2 xn`1 1
is divisible by an odd prime.
(Austria)
N4. Suppose that a0 , a1 , . . . and b0 , b1 , . . . are two sequences of positive integers satisfying
a0 , b0 2 and
an`1 gcdpan , bn q ` 1,
bn`1 lcmpan , bn q 1
2M `1
2

for all n 0. Prove that the sequence (an ) is eventually periodic; in other words, there exist
integers N 0 and t 0 such that an`t an for all n N.
(France)
N5. Determine all triples pa, b, cq of positive integers for which ab c, bc a, and ca b are
powers of 2.
Explanation: A power of 2 is an integer of the form 2n , where n denotes some nonnegative
integer.
(Serbia)
N6. Let Z0 denote the set of positive integers. Consider a function f : Z0 Z0 . For
any m, n P Z0 we write f n pmq looomooon
f pf p. . . f pmq . . .qq. Suppose that f has the following two
properties:

piq If m, n P Z0 , then

f n pmq m
P Z0 ;
n

piiq The set Z0 z tf pnq | n P Z0 u is finite.


Prove that the sequence f p1q 1, f p2q 2, f p3q 3, . . . is periodic.

(Singapore)
N7. Let Z0 denote the set of positive
integers. For any positive integer k, a function
`
f : Z0 Z0 is called k-good if gcd f pmq ` n, f pnq ` m k for all m n. Find all k such
that there exists a k-good function.
(Canada)
k i
N8. For every positive integer n with prime factorization n i1 pi , define

i .
pnq
i : pi 10100

That is, pnq is the number of prime factors of n greater than 10100 , counted with multiplicity.
Find all strictly increasing functions f : Z Z such that
`

f paq f pbq pa bq
for all integers a and b with a b.
(Brazil)

IMO 2015 Thailand

Solutions
Algebra
A1. Suppose that a sequence a1 , a2 , . . . of positive real numbers satisfies
ak`1

a2k

kak
` pk 1q

(1)

for every positive integer k. Prove that a1 ` a2 ` ` an n for every n 2.

(Serbia)

Solution. From the constraint (1), it can be seen that


k
ak`1

a2k ` pk 1q
k1
ak `
,
ak
ak

and so

k1
.
ak`1
ak
Summing up the above inequality for k 1, . . . , m, we obtain

0
1
m1
m
2
m
1

` `

.
a1 ` a2 ` ` am
a2 a1
a3 a2
am`1
am
am`1
ak

(2)

Now we prove the problem statement by induction on n. The case n 2 can be done by
applying (1) to k 1:
1
a1 ` a2 a1 `
2.
a1
For the induction step, assume that the statement is true for some n 2. If an`1 1, then
the induction hypothesis yields
`

a1 ` ` an ` an`1 n ` 1.
(3)
Otherwise, if an`1 1 then apply (2) as
`

a1 ` ` an ` an`1

n
an`1

` an`1

n1

`
an`1

1
an`1

` an`1

pn 1q ` 2.

That completes the solution.

Comment 1. It can be seen easily that having equality in the statement requires a1 a2 1 in the
base case n 2, and an`1 1 in (3). So the equality a1 ` ` an n is possible only in the trivial
case a1 an 1.
Comment 2. After obtaining (2), there are many ways to complete the solution. We outline three
such possibilities.
With defining sn a1 ` ` an , the induction step can be replaced by
sn`1 sn ` an`1 sn `
because the function x x `

n
increases on rn, 8q.
x

n
n ` 1,
sn

Shortlisted problems solutions

By applying the AMGM inequality to the numbers a1 ` ` ak and kak`1 , we can conclude
a1 ` ` ak ` kak`1 2k
and sum it up for k 1, . . . , n 1.
We can derive the symmetric estimate

1ijn

ai aj

pa1 ` ` aj1 qaj

j2

and combine it with the AMQM inequality.

pj 1q

j2

npn 1q
2

10

IMO 2015 Thailand

A2. Determine all functions f : Z Z with the property that


holds for all x, y P Z.

f x f pyq f f pxq f pyq 1

(1)

(Croatia)

Answer. There are two such functions, namely the constant function x 1 and the successor
function x x ` 1.
Solution 1.
desired.

It is immediately checked that both functions mentioned in the answer are as

Now let f denote any function satisfying (1) for


` all x, y P Z. Substituting x 0 and
y f p0q into (1) we learn that the number z f f p0q satisfies f pzq 1. So by plugging
y z into (1) we deduce that
`

f px ` 1q f f pxq
(2)
holds for all x P Z. Thereby (1) simplifies to

f x f pyq f px ` 1q f pyq 1 .

(3)

We now work towards showing that f is linear by contemplating the difference f px`1qf pxq
for any x P Z. By applying (3) with y x and (2) in this order, we obtain
`

f px ` 1q f pxq f x f pxq ` 1 f f px 1 f pxqq ` 1 .

Since (3) shows f x 1 f pxq f pxq f pxq 1 1, this simplifies to


f px ` 1q f pxq ` A ,

where A f p1q ` 1 is some absolute constant.


Now a standard induction in both directions reveals that f is indeed linear and that in fact
we have f pxq Ax ` B for all x P Z, where B f p0q. Substituting this into (2) we obtain
that
Ax ` pA ` Bq A2 x ` pAB ` Bq
holds for all x P Z; applying this to x 0 and x 1 we infer A ` B AB ` B and A2 A.
The second equation leads to A 0 or A 1. In case A 1, the first equation gives B 1,
meaning that f has to be the successor function. If A 0, then f is constant and (1) shows
that its constant value has to be 1. Thereby the solution is complete.
Comment. After (2) and (3) have been obtained, there are several other ways to combine them so as
to obtain linearity properties of f . For instance, using (2) thrice in a row and then (3) with x f pyq
one may deduce that
`

` `

f py ` 2q f f py ` 1q f f f pyq f f pyq ` 1 f pyq ` f p0q ` 1

holds for all y P Z. It follows that f behaves linearly on the even numbers and on the odd numbers
separately, and moreover that the slopes of these two linear functions coincide. From this point, one
may complete the solution with some straightforward case analysis.
A different approach using the equations (2) and (3) will be presented in Solution 2. To show
that it is also possible to start in a completely different way, we will also present a third solution that
avoids these equations entirely.

Shortlisted problems solutions

11

Solution 2. We commence by deriving (2) and (3) as in the first solution. Now provided that f
is injective, (2) tells us that f is the successor function. Thus we may assume from now on that
f is not injective, i.e., that there are two integers a b with f paq f pbq. A straightforward
induction using (2) in the induction step reveals that we have f pa ` nq f pb ` nq for all
nonnegative integers n. Consequently, the sequence n f pb ` nq is periodic and thus in
particular bounded, which means that the numbers
min n
n0

and

max n
n0

exist.
`

Let us pick any integer y with f pyq and then an integer x a with f x f pyq .
Due to the definition of and (3) we have
`

f px ` 1q f x f pyq ` f pyq ` 1 2 ` 1 ,

whence 1. The same reasoning applied to yields 1. Since holds trivially,


it follows that 1, or in other words that we have f ptq 1 for all integers t a.
Finally, if any integer y is given, we may find an integer x which is so large that x ` 1 a
and x f pyq a hold. Due to (3) and the result from the previous paragraph we get
`

f pyq f px ` 1q f x f pyq 1 p1q p1q 1 1 .


Thereby the problem is solved.

Solution 3. Set d f p0q. By plugging x f pyq into (1) we obtain


f 3 pyq f pyq ` d ` 1
(4)
`

for all y P Z, where


side abbreviates f f pf pyqq . When we replace x in (1) by
` the left-hand

f pxq we obtain f f pxq f pyq f 3 pxq f pyq 1 and as a consequence of (4) this simplifies to
`

f f pxq f pyq f pxq f pyq ` d .


(5)
Now we consider the set

E tf pxq d | x P Zu .
Given two integers a and b from E, we may pick some integers x and y with f pxq a ` d
and f pyq b ` d; now (5) tells us that f pa bq pa bq ` d, which means that a b itself
exemplifies a b P E. Thus,
E is closed under taking differences.

(6)

Also, the definitions of d and E yield 0 P E. If E t0u, then f is a constant function


and (1) implies that the only value attained by f is indeed 1.
So let us henceforth suppose that E contains some number besides zero. It is known that in
this case (6) entails E to be the set of all integer multiples of some positive integer k. Indeed,
this holds for

(
k min |x| x P E and x 0 ,

as one may verify by an argument based on division with remainder.


Thus we have
tf pxq | x P Zu tk t ` d | t P Zu .
Due to (5) and (7) we get
f pk tq k t ` d

(7)

12

IMO 2015 Thailand

for all t P Z, whence in particular f pkq k ` d. So by comparing the results of substituting


y 0 and y k into (1) we learn that
f pz ` kq f pzq ` k

(8)

holds for all integers z. In plain English, this means that on any residue class modulo k the
function f is linear with slope 1.
Now by (7) the set of all values
by f is such a residue class. Hence, there exists an
` attained

absolute constant c such that f f pxq f pxq ` c holds for all x P Z. Thereby (1) simplifies to
`

f x f pyq f pxq f pyq ` c 1 .


(9)
On the other hand, considering (1) modulo k we obtain d 1 pmod kq because of (7). So
by (7) again, f attains the value 1.
Thus we may apply (9) to some integer y with f pyq 1, which gives f px ` 1q f pxq ` c.
So f is a linear function with slope c. Hence, (8) leads to c 1, wherefore there is an absolute
constant d1 with f pxq x`d1 for all x P Z. Using this for x 0 we obtain d1 d and finally (4)
discloses d 1, meaning that f is indeed the successor function.

Shortlisted problems solutions

13

A3. Let n be a fixed positive integer. Find the maximum possible value of

ps r nqxr xs ,

1rs2n

where 1 xi 1 for all i 1, 2, . . . , 2n.

(Austria)

Answer. npn 1q.

Solution 1. Let Z be the expression to be maximized. Since this expression is linear in every
variable xi and 1 xi 1, the maximum of Z will be achieved when xi 1 or 1. Therefore,
it suffices to consider only the case when xi P t1, 1u for all i 1, 2, . . . , 2n.
For i 1, 2, . . . , 2n, we introduce auxiliary variables
i

yi

r1

Taking squares of both sides, we have


yi2

2n

r1

x2r `

2n `

rsi

rsi

xr

2xr xs `

2xr xs `

2n

ri`1

irs

xr .

irs

2xr xs

2xr xs

2xr xs

ris

2xr xs ,

(1)

ris

where the last equality follows from the fact that xr P t1, 1u. Notice that for every r s, the
coefficient of xr xs in (1) is 2 for each i 1, . . . , r 1, s, . . . , 2n,
and2this coefficient is 2 for each
i r, . . . , s 1. This implies that the coefficient of xr xs in 2n
i1 yi is 2p2n s ` rq 2ps rq
4pn s ` rq. Therefore, summing (1) for i 1, 2, . . . , 2n yields
2n

i1

yi2 4n2 `

1rs2n

4pn s ` rqxr xs 4n2 4Z.

(2)

Hence, it suffices to find the minimum of the left-hand side.


Since xr P t1, 1u, we see that yi is an even integer. In addition, yi yi1 2xi 2,
and so yi1 and yi are consecutive even integers for every i 2, 3, . . . , 2n. It follows that
2
yi1
` yi2 4, which implies
2n

i1

yi2

Combining (2) and (3), we get

4n

` 2

2
y2j1 ` y2j
4n.

(3)

j1

2n

i1

yi2 4n2 4Z.

(4)

Hence, Z npn 1q.


If we set xi 1 for odd indices i and xi 1 for even indices i, then we obtain equality
in (3) (and thus in (4)). Therefore, the maximum possible value of Z is npn 1q, as desired.
Comment 1. Z npn 1q can be achieved by several other examples. In particular, xi needs not
be 1. For instance, setting xi p1qi for all 2 i 2n, we find that the coefficient of x1 in Z is 0.
Therefore, x1 can be chosen arbitrarily in the interval r1, 1s.
Nevertheless, if xi P t1, 1u for all i 1, 2, . . . , 2n, then the equality Z npn 1q holds only
when py1 , y2 , . . . , y2n q p0, 2, 0, 2,
.2n. . , 0, 2q or p2, 0, 2, 0, . . . , 2, 0q. In each case, we can
reconstruct xi accordingly. The sum i1 xi in the optimal cases needs not be 0, but it must equal 0
or 2.

14

IMO 2015 Thailand

Comment 2. Several variations in setting up the auxiliary variables are possible. For instance, one
may let x2n`i xi and yi1 xi ` xi`1 ` ` xi`n1 for any 1 i 2n. Similarly to Solution 1,
12 2n2 2Z. Then, it suffices to show that Y 2n. If n is odd,
we obtain Y : y112 ` y212 ` ` y2n
then each yi1 is odd, and so yi12 1. If n is even, then each yi1 is even. We can check that at least one
1 , y1
1
12
12
12
12
of yi1 , yi`1
n`i , and yn`i`1 is nonzero, so that yi ` yi`1 ` yn`i ` yn`i`1 4; summing these up for
i 1, 3, . . . , n 1 yields Y 2n.

Solution 2. We present a different method of obtaining the bound Z npn 1q. As in


the previous solution, we reduce the problem to the case xi P t1, 1u. For brevity, we use the
notation r2ns t1, 2, . . . , 2nu.
Consider any x1 , x2 , . . . , x2n P t1, 1u. Let
A ti P r2ns : xi 1u and B ti P r2ns : xi 1u .
For any subsets X and Y of r2ns we define

epX, Y q

rs, rPX, sPY

ps r nq .

One may observe that


epA, Aq`epA, Bq`epB, Aq`epB, Bq epr2ns, r2nsq

1rs2n

psrnq

pn 1qnp2n 1q
.
3

Therefore, we have
`
pn 1qnp2n 1q
Z epA, Aq epA, Bq epB, Aq ` epB, Bq 2 epA, Aq ` epB, Bq `
. (5)
3

Thus, we need to maximize epA, Aq ` epB, Bq, where A and B form a partition of r2ns.

Due to the symmetry, we may assume that |A| n p and |B| n ` p, where 0 p n.
From now on, we fix the value of p and find an upper bound for Z in terms of n and p.
Let a1 a2 anp and b1 b2 bn`p list all elements of A and B, respectively.
Then

np

np
n
(6)
p2i 1 n ` pqai
epA, Aq
paj ai nq
2
i1
1ijnp
and similarly

n`p

n`p
n.
p2i 1 n pqbi
epB, Bq
2
i1

(7)

Thus, now it suffices to maximize the value of


M

np

i1

p2i 1 n ` pqai `

n`p

i1

p2i 1 n pqbi .

(8)

In order to get an upper bound, we will apply the rearrangement inequality to the sequence a1 , a2 , . . . , anp , b1 , b2 , . . . , bn`p (which is a permutation of 1, 2, . . . , 2n), together with
the sequence of coefficients of these numbers in (8). The coefficients of ai form the sequence
n p 1, n p 3, . . . , 1 n ` p ,
and those of bi form the sequence
n ` p 1, n ` p 3, . . . , 1 n p .

Shortlisted problems solutions

15

Altogether, these coefficients are, in descending order:


n ` p ` 1 2i, for i 1, 2, . . . , p;

n p ` 1 2i, counted twice, for i 1, 2, . . . , n p; and

pn ` p ` 1 2iq, for i p, p 1, . . . , 1.
Thus, the rearrangement inequality yields
M

pn ` p ` 1 2iqp2n ` 1 iq

i1

np

i1

pn p ` 1 2iq p2n ` 2 p 2iq ` p2n ` 1 p 2iq

pn ` p ` 1 2iqi .

i1

Finally, combining the information from (5), (6), (7), and (9), we obtain

pn 1qnp2n 1q
n`p
np
Z
`
2n
2
3
2
np
p

` 2 pn ` p ` 1 2iqp2n ` 1 2iq ` 2 pn p ` 1 2iqp4n 2p ` 3 4iq ,


i1

i1

which can be simplified to


Z npn 1q

2
ppp 1qpp ` 1q .
3

Since p is a nonnegative integer, this yields Z npn 1q.

(9)

16

IMO 2015 Thailand

A4. Find all functions f : R R satisfying the equation

f x ` f px ` yq ` f pxyq x ` f px ` yq ` yf pxq

(1)

for all real numbers x and y.

(Albania)
Answer. There are two such functions, namely the identity function and x 2 x.

Solution. Clearly, each of the functions x x and x 2 x satisfies (1). It suffices now to
show that they are the only solutions to the problem.
Suppose that f is any function satisfying (1). Then setting y 1 in (1), we obtain
`

f x ` f px ` 1q x ` f px ` 1q;

(2)

in other words, x ` f px ` 1q is a fixed point of f for every x P R.


We distinguish two cases regarding the value of f p0q.

Case 1. f p0q 0.
By letting x 0 in (1), we have
`

f f pyq ` f p0q f pyq ` yf p0q.

So, if y0 is a fixed point of f , then substituting y y0 in the above equation we get y0 1.


Thus, it follows from (2) that x ` f px ` 1q 1 for all x P R. That is, f pxq 2 x for all x P R.
Case 2. f p0q 0.
By letting y 0 and replacing x by x ` 1 in (1), we obtain
`

f x ` f px ` 1q ` 1 x ` f px ` 1q ` 1.

From (1), the substitution x 1 yields


`

f 1 ` f py ` 1q ` f pyq 1 ` f py ` 1q ` yf p1q.

(3)

(4)

By plugging x 1 into (2), we see that f p1q 1. We then plug y 1 into (4) and
deduce that f p1q 1. Hence, (4) reduces to
`

f 1 ` f py ` 1q ` f pyq 1 ` f py ` 1q ` y.
(5)
Accordingly, if both y0 and y0 ` 1 are fixed points of f , then so is y0 ` 2. Thus, it follows
from (2) and (3) that x ` f px ` 1q ` 2 is a fixed point of f for every x P R; i.e.,
`

f x ` f px ` 1q ` 2 x ` f px ` 1q ` 2.
Replacing x by x 2 simplifies the above equation to
`

f x ` f px 1q x ` f px 1q.

On the other hand, we set y 1 in (1) and get


`

f x ` f px 1q x ` f px 1q f pxq f pxq.

Therefore, f pxq f pxq for all x P R.

Finally, we substitute px, yq by p1, yq in (1) and use the fact that f p1q 1 to get
`

f 1 ` f py 1q ` f pyq 1 ` f py 1q ` y.

Since f is an odd function, the above equation becomes


`

f 1 ` f py ` 1q ` f pyq 1 f py ` 1q ` y.

By adding this equation to (5), we conclude that f pyq y for all y P R.

Shortlisted problems solutions

17

A5. Let 2Z ` 1 denote the set of odd integers. Find all functions f : Z 2Z ` 1 satisfying
for every x, y P Z.

f x ` f pxq ` y ` f x f pxq y f px ` yq ` f px yq

(1)
(U.S.A.)

Answer. Fix an odd positive integer d, an integer k, and odd integers 0 , 1 , . . . , d1 . Then
the function defined as
f pmd ` iq 2kmd ` i d

pm P Z,

i 0, 1, . . . , d 1q

satisfies the problem requirements, and these are all such functions.
Solution. Throughout the solution, all functions are assumed to map integers to integers.
For any function g and any nonzero integer t, define
t gpxq gpx ` tq gpxq.
For any nonzero integers a and b, notice that a b g b a g. Moreover, if a g 0 and
b g 0, then a`b g 0 and at g 0 for all nonzero integers t. We say that g is t-quasiperiodic if t g is a constant function (in other words, if 1 t g 0, or 1 g is t-periodic). In
this case, we call t a quasi-period of g. We say that g is quasi-periodic if it is t-quasi-periodic
for some nonzero integer t.
Notice that a quasi-period of g is a period of 1 g. So if g is quasi-periodic, then its minimal
positive quasi-period t divides all its quasi-periods.
We now assume that f satisfies (1). First, by setting a x ` y, the problem condition can
be rewritten as
`

f pxq f paq f pxq f 2x a f pxq


for all x, a P Z.
(2)

Let b be an arbitrary integer and let k be an arbitrary positive integer. Applying (2) when
a is substituted by b, b ` f pxq, . . . , b ` pk 1qf pxq and summing up all these equations, we get
`

kf pxq f pbq kf pxq f 2x b kf pxq .


Notice that a similar argument works when k is negative, so that
M f pbq M f p2x b Mq

for any nonzero integer M such that f pxq | M.

(3)

We now prove two lemmas.


Lemma 1. For any distinct integers x and y, the function lcmpf pxq,f pyqq f is 2py xq-periodic.
`

Proof. Denote L lcm f pxq, f pyq . Applying (3) twice, we obtain


`

L f pbq L f p2x b Lq L f 2y pb ` 2py xqq L L f b ` 2py xq .


Thus, the function L f is 2py xq-periodic, as required.

Lemma 2. Let g be a function. If t and s are nonzero integers such that ts g 0 and
t t g 0, then t g 0.
Proof. Assume, without loss of generality, that s is positive. Let a be an arbitrary integer.
Since t t g 0, we have
`

t gpaq t gpa ` tq t g a ` ps 1qt .


The sum of these s equal numbers is ts gpaq 0, so each of them is zero, as required.

18

IMO 2015 Thailand


We now return to the solution.

Step 1. We prove that f is quasi-periodic.


`

Let Q lcm f p0q, f p1q . Applying Lemma 1, we get that the function g Q f is
2-periodic. In other words, the values of g are constant on even numbers and on odd numbers
separately. Moreover, setting M Q and x b 0 in (3), we get gp0q gpQq. Since 0 and
Q have different parities, the value of g at even numbers is the same as that at odd numbers.
Thus, g is constant, which means that Q is a quasi-period of f .
Step 2. Denote the minimal positive quasi-period of f by T . We prove that T | f pxq for all
integers x.
Since an odd number Q is a quasi-period of f , the number T is also odd. Now suppose, to
the contrary, that there exist an odd prime p, a positive integer , and` an integer
u` such that

p | T but p f puq. Setting x u and y 0 in (1), we have 2f puq f u`f puq `f uf puq ,
so p does not divide the value of f at one of the points u ` f puq or u f puq. Denote this point
by v.
`

Let L lcm f puq, f pvq . Since |u v| f puq, from Lemma 1 we get


` 2f puqL f 0.
Hence the function L f is 2f puq-periodic as well as T -periodic, so it is gcd T, 2f puq -periodic,
or gcdpT,2f puqq L f 0. Similarly, observe that the function gcdpT,2f puqq f is L-periodic as
well` as T -periodic,
so we may conclude that gcdpT,Lq gcdpT,2f puqq f 0. Since p L, both

gcd T, 2f puq and gcdpT, Lq divide T {p. We thus obtain T {p T {p f 0, which yields
T {p T {p 1 f 0.

Since T 1 f 0, we can apply Lemma 2 to the function 1 f , obtaining T {p 1 f 0.


However, this means that f is pT {pq-quasi-periodic, contradicting the minimality of T . Our
claim is proved.
Step 3. We describe all functions f .
Let d be the greatest common divisor of all values of f . Then d is odd. By Step 2, d is a
quasi-period of f , so that d f is constant. Since the value of d f is even and divisible by d,
we may denote this constant by 2dk, where k is an integer. Next, for all i 0, 1, . . . , d 1,
define i f piq{d; notice that i is odd. Then
f pmd ` iq md f piq ` f piq 2kmd ` i d

for all m P Z and i 0, 1, . . . , d 1.

This shows that all functions satisfying (1) are listed in the answer.
It remains to check that all such functions indeed satisfy (1). This is equivalent to checking (2), which is true because for every integer x, the value of f pxq is divisible by d, so that
f pxq f is constant.
Comment. After obtaining Lemmas 1 and 2, it is possible to complete the steps in a different order.
Here we sketch an alternative approach.
For any function g and any nonzero integer t, we say that g is t-pseudo-periodic if t t g 0. In
this case, we call t a pseudo-period of g, and we say that g is pseudo-periodic.
Let us first prove a basic property: if a function g is pseudo-periodic, then its minimal positive
pseudo-period divides all its pseudo-periods. To establish this, it suffices to show that if t and s
are pseudo-periods of g with t s, then so is t s. Indeed, suppose that t t g s s g 0.
Then t t s g ts s g 0, so that t s g 0 by Lemma 2. Taking differences, we obtain
t ts g s ts g 0, and thus ts ts g 0.

Now let f satisfy the problem condition. We will show that f is pseudo-periodic. When this is
done, we will let T 1 be the minimal pseudo-period of f , and show that T 1 divides 2f pxq for every
integer x, using arguments similar to Step 2 of the solution. Then we will come back to Step 1 by
showing that T 1 is also a quasi-period of f .

Shortlisted problems solutions

19

First, Lemma 1 yields that 2pyxq lcmpf pxq,f pyqq`f 0 for every distinct
integers x and y. Hence

f is pseudo-periodic with pseudo-period Lx,y lcm 2py xq, f pxq, f pyq .


We now show that T 1 | 2f pxq for every integer x. Suppose, to the contrary, that there exists an
integer u, a prime p, and a positive integer such that p | T 1 and p 2f puq. Choose v as in Step 2 and
employ Lemma 1 to obtain 2f puq lcmpf puq,f pvqq f 0. However, this implies that T 1 {p T 1 {p f 0, a
contradiction with the minimality of T 1 .
We now claim that T 1 2 f 0. Indeed, Lemma 1 implies that there exists an integer s such that
s 2 f 0. Hence T 1 s 2 f T 1 T 1 2 f 0, which allows us to conclude that T 1 2 f 0 by
Lemma 2. (The last two paragraphs are similar to Step 2 of the solution.)
Now, it is not difficult to finish the solution, though more work is needed to eliminate the factors
of 2 from the subscripts of T 1 2 f 0. Once this is done, we will obtain an odd quasi-period of f
that divides f pxq for all integers x. Then we can complete the solution as in Step 3.

20

IMO 2015 Thailand

A6. Let n be a fixed integer with n 2. We say that two polynomials P and Q with real
coefficients are block-similar if for each i P t1, 2, . . . , nu the sequences
P p2015iq, P p2015i 1q, . . . , P p2015i 2014q
Qp2015iq, Qp2015i 1q, . . . , Qp2015i 2014q

and

are permutations of each other.


paq Prove that there exist distinct block-similar polynomials of degree n ` 1.
pbq Prove that there do not exist distinct block-similar polynomials of degree n.

(Canada)

Solution 1. For convenience, we set k 2015 2 ` 1.


Part (a). Consider the following polynomials of degree n ` 1:
n

P pxq
px ikq

and

i0

Qpxq

i0

px ik 1q.

Since Qpxq P px 1q and P p0q P pkq P p2kq P pnkq, these polynomials are
block-similar (and distinct).
Part
m (b). For every polynomial F pxq and every nonnegative integer m, define F pmq
F piq; in particular, F p0q 0. It is well-known that for every nonnegative integer d the
i1
d
sum m
i1 i is a polynomial in m of degree d ` 1. Thus F may also be regarded as a real
polynomial of degree deg F ` 1 (with the exception that if F 0, then F 0 as well). This
allows us to consider the values of F at all real points (where the initial definition does not
apply).
Assume for the sake of contradiction that there exist two distinct block-similar polynomials
P pxq and Qpxq of degree n. Then both polynomials P Q pxq and P 2 Q2 pxq have roots at the
points 0, k, 2k, . . . , nk. This motivates the following lemma, where we use the special polynomial
T pxq

i0

px ikq.

Lemma. Assume that F pxq is a nonzero polynomial such that 0, k, 2k, . . . , nk are among the
roots of the polynomial F pxq. Then deg F n, and there exists a polynomial Gpxq such that
deg G deg F n and F pxq T pxqGpxq T px 1qGpx 1q.
Proof. If deg F n, then F pxq has at least n ` 1 roots, while its degree is less than n ` 1.
Therefore, F pxq 0 and hence F pxq 0, which is impossible. Thus deg F n.
The lemma condition yields that F pxq T pxqGpxq for some polynomial Gpxq such that
deg G deg F pn ` 1q deg F n.
Now, let us define F1 pxq T pxqGpxq T px 1qGpx 1q. Then for every positive integer n
we have
n

F1 pnq
T pxqGpxq T px 1qGpx 1q T pnqGpnq T p0qGp0q T pnqGpnq F pnq,
i1

so the polynomial F F1 pxq F pxq F1 pxq has infinitely many roots. This means that this
polynomial is zero, which in turn yields F pxq F1 pxq, as required.
l

Shortlisted problems solutions

21

First, we apply the lemma to the nonzero polynomial R1 pxq P pxqQpxq.` Since the degree
of R1 pxq is at most n, we conclude that it is exactly n. Moreover, R1 pxq T pxq T px 1q
for some nonzero constant .
Our next aim is to prove that the polynomial Spxq P pxq ` Qpxq is constant. Assume the
contrary. Then, notice that the polynomial R2 pxq P pxq2 Qpxq2 R1 pxqSpxq is also nonzero
and satisfies the lemma condition. Since n deg R1 ` deg S deg R2 2n, the lemma yields
R2 pxq T pxqGpxq T px 1qGpx 1q
with some polynomial Gpxq with 0
` deg G n.

Since the polynomial R1 pxq T pxq T px 1q divides the polynomial


`

R2 pxq T pxq Gpxq Gpx 1q ` Gpx 1q T pxq T px 1q ,


`

we get R1 pxq | T pxq Gpxq Gpx 1q . On the other hand,


`

gcd T pxq, R1 pxq gcd T pxq, T pxq T px 1q gcd T pxq, T px 1q 1,

since both T pxq and T px1q are the products of linear polynomials, and their roots are distinct.
Thus R1 pxq | Gpxq Gpx 1q. However, this is impossible since Gpxq Gpx 1q is a nonzero
polynomial of degree less than n deg R1 .
Thus, our assumption
` is wrong,
and Spxq
` is a constant polynomial, say Spxq . Notice
that the polynomials 2P pxq { and 2Qpxq q{ are also block-similar and distinct.
So we may replace the initial polynomials by these ones, thus obtaining two block-similar
polynomials P pxq and Qpxq with P pxq Qpxq T pxq T px 1q. It remains to show that
this is impossible.
For every i 1, 2 . . . , n, the values T pik k ` 1q and T pik 1q have the same sign. This
means that the values P pik k ` 1q T pik k ` 1q and P pikq T pik 1q have opposite
signs, so P pxq has a root in each of the n segments rik k ` 1, iks. Since deg P n, it must
have exactly one root in each of them.
Thus, the sequence P p1q, P p2q, . . . , P pkq should change sign exactly once. On the other
hand, since P pxq and P pxq are block-similar, this sequence must have as many positive terms
as negative ones. Since k 2 ` 1 is odd, this shows that the middle term of the sequence
above must be zero, so P p ` 1q 0, or T p ` 1q T pq. However, this is not true since
|T p ` 1q| | ` 1| ||

i2

| ` 1 ik| || | ` 1|

i2

| ik| |T pq| ,

where the strict inequality holds because n 2. We come to the final contradiction.
Comment 1. In the solution above, we used the fact that k 1 is odd. One can modify the
arguments of the last part in order to work for every (not necessarily odd) sufficiently large value of k;
namely, when k is even, one may show that the sequence P p1q, P p2q, . . . , P pkq has different numbers
of positive and negative terms.
On the other hand, the problem statement with k replaced by 2 is false, since the polynomials
P pxq T pxq T px 1q and Qpxq T px 1q T pxq are block-similar in this case, due to the fact that
P p2i 1q P p2iq Qp2iq Qp2i 1q T p2i 1q for all i 1, 2, . . . , n. Thus, every complete
solution should use the relation k 2.
One may easily see that the condition n 2 is also substantial, since the polynomials x and
k ` 1 x become block-similar if we set n 1.
It is easily seen from the solution that the result still holds if we assume that the polynomials have
degree at most n.

22

IMO 2015 Thailand

Solution 2. We provide an alternative argument for part pbq.


Assume again that there exist two distinct block-similar polynomials P pxq and Qpxq of
degree n. Let Rpxq P pxq
Qpxq and Spxq P pxq ` Qpxq. For brevity, we also
( denote the
segment pi 1qk ` 1, ik by Ii , and the set pi 1qk ` 1, pi 1qk ` 2, . . . , ik of all integer
points in Ii by Zi .

Step 1. We prove that Rpxq has exactly one root in each segment Ii , i 1, 2, . . . , n, and all
these roots are simple.
Indeed, take any i P t1, 2, . . . , nu and choose some points p , p` P Zi so that
P pp q min P pxq and
xPZi

P pp` q max P pxq.


xPZi

Since the sequences of values of P and Q in Zi are permutations of each other, we have
Rpp q P pp q Qpp q 0 and Rpp` q P pp` q Qpp` q 0. Since Rpxq is continuous, there
exists at least one root of Rpxq between p and p` thus in Ii .
So, Rpxq has at least one root in each of the n disjoint segments Ii with i 1, 2, . . . , n.
Since Rpxq is nonzero and its degree does not exceed n, it should have exactly one root in each
of these segments, and all these roots are simple, as required.
Step 2. We prove that Spxq is constant.
We start with the following claim.
`
`

Claim. For every i 1, 2, . . . , n, the sequence of values S pi 1qk ` 1 , S pi 1qk ` 2 , . . . ,


Spikq cannot be strictly increasing.
`
Proof. Fix any i P t1, 2, . . . , nu. Due to the symmetry, we may assume that P ikq Qpikq.
Choose now p and p` as in Step 1. If we had P pp` q P pp q, then P would be constant
on Zi , so all the elements of Zi would be the roots of Rpxq, which is not the case. In particular,
we have p` p . If p p` , then Spp q P pp q ` Qpp q Qpp` q ` P pp` q Spp` q, so our
claim holds.
We now show that the remaining case p p` is impossible. Assume first that P pp` q
Qpp` q. Then, like in Step 1, we have Rpp q 0, Rpp` q 0, and Rpikq 0, so Rpxq has a root
in each of the intervals rp , p` q and pp` , iks. This contradicts the result of Step 1.
We are left only with the case p p` and P pp` q Qpp` q (thus p` is the unique root of
Rpxq in Ii ). If p` ik, then the values of Rpxq on Zi z tiku are all of the same sign, which
is absurd since their sum is zero. Finally, if p p` ik, then Rpp q and Rpikq are both
negative. This means that Rpxq should have an even number of roots in rp , iks, counted with
multiplicity. This also contradicts the result of Step 1.
l
`

In
a
similar
way,
one
may
prove
that
for
every
i

1,
2,
.
.
.
,
n,
the
sequence
S
pi

1qk
`
1
,
`

S pi 1qk ` 2 , . . . , Spikq cannot be strictly decreasing. This means that the polynomial
Spxq Spxq Spx 1q attains at least one nonnegative (value, as well as at least one nonpositive value, on the set Zi (and even on Zi z pi 1qk ` 1 ); so S has a root in Ii .
Thus S has at least n roots; however, its degree is less than n, so S should be identically
zero. This shows that Spxq is a constant, say Spxq .
Step 3. Notice that the polynomials P pxq {2 and Qpxq {2 are also block-similar and
distinct. So we may replace the initial polynomials by these ones, thus reaching P pxq Qpxq.
Then Rpxq 2P pxq, so P pxq has exactly one root in each of the segments Ii , i 1, 2, . . . , n.
On the other hand, P pxq and P pxq should attain the same number of positive values on Zi .
Since k is odd, this means that Zi contains exactly one root of P pxq; moreover, this root should
be at the center of Zi , because P pxq has the same number of positive and negative values on Zi .
Thus we have found all n roots of P pxq, so
P pxq c

i1

px ik ` q

for some c P R z t0u,

Shortlisted problems solutions

23

where pk 1q{2. It remains to notice that for every t P Z1 z t1u we have


|P ptq| |c| |t 1|

i2

|t ik ` | |c|

i2

|1 ik ` | |P p1q|,

so P p1q P ptq for all t P Z1 . This shows that P pxq is not block-similar to P pxq. The final
contradiction.
Comment 2. One may merge Steps 1 and 2 in the following manner. As above, we set Rpxq
P pxq Qpxq and Spxq P pxq ` Qpxq.
We aim to prove that the polynomial Spxq 2P pxq Rpxq 2Qpxq ` Rpxq is constant. Since the
degrees of Rpxq and Spxq do not exceed n, it suffices to show that the total number of roots of Rpxq
and Spxq Spxq Spx 1q is at least 2n. For this purpose, we prove the following claim.
Claim. For every i 1, 2, . . . , n, either each of R and S has a root in Ii , or R has at least two roots
in Ii .

Proof. Fix any i P t1, 2, . . . , nu. Let r P Zi be a point such that |Rprq| maxxPZi |Rpxq|; we may
assume that Rprq 0. Next, let p , q ` P Ii be some points such that P pp q minxPZi P pxq and
Qpq ` q maxxPZi Qpxq. Notice that P pp q Qprq P prq and Qpq ` q P prq Qprq, so r is different
from p and q ` .
Without loss of generality, we may assume that p r. Then we have Rpp q P pp q Qpp q
0 Rprq, so Rpxq has a root in rp , rq. If q ` r, then, similarly, Rpq ` q 0 Rprq, and Rpxq also
has a root in pr, q ` s; so Rpxq has two roots in Ii , as required.

In the remaining case we have q ` r; it suffices now to show that in this case S has a root in Ii .
Since P pp q Qprq and |Rpp q| Rprq, we have Spp q 2P pp q Rpp q 2Qprq ` Rprq Sprq.
Similarly, we get Spq ` q 2Qpq ` q ` Rpq ` q 2P prq Rprq Sprq. Therefore, the sequence of values
of S on Zi is neither strictly increasing nor strictly decreasing, which shows that S has a root
in Ii .
l

Comment 3. After finding the relation P pxq Qpxq T pxq T px 1q from Solution 1, one
may also follow the approach presented in Solution 2. Knowledge of the difference of polynomials
may simplify some steps; e.g., it is clear now that P pxq Qpxq has exactly one root in each of the
segments Ii .

24

IMO 2015 Thailand

Combinatorics
C1. In Lineland there are n 1 towns, arranged along a road running from left to right.
Each town has a left bulldozer (put to the left of the town and facing left) and a right bulldozer
(put to the right of the town and facing right). The sizes of the 2n bulldozers are distinct.
Every time when a right and a left bulldozer confront each other, the larger bulldozer pushes
the smaller one off the road. On the other hand, the bulldozers are quite unprotected at their
rears; so, if a bulldozer reaches the rear-end of another one, the first one pushes the second one
off the road, regardless of their sizes.
Let A and B be two towns, with B being to the right of A. We say that town A can sweep
town B away if the right bulldozer of A can move over to B pushing off all bulldozers it meets.
Similarly, B can sweep A away if the left bulldozer of B can move to A pushing off all bulldozers
of all towns on its way.
Prove that there is exactly one town which cannot be swept away by any other one.
(Estonia)
Solution 1. Let T1 , T2 , . . . , Tn be the towns enumerated from left to right. Observe first that,
if town Ti can sweep away town Tj , then Ti also can sweep away every town located between Ti
and Tj .
We prove the problem statement by strong induction on n. The base case n 1 is trivial.

For the induction step, we first observe that the left bulldozer in T1 and the right bulldozer
in Tn are completely useless, so we may forget them forever. Among the other 2n2 bulldozers,
we choose the largest one. Without loss of generality, it is the right bulldozer of some town Tk
with k n.
Surely, with this large bulldozer Tk can sweep away all the towns to the right of it. Moreover,
none of these towns can sweep Tk away; so they also cannot sweep away any town to the left
of Tk . Thus, if we remove the towns Tk`1 , Tk`2, . . . , Tn , none of the remaining towns would
change its status of being (un)sweepable away by the others.
Applying the induction hypothesis to the remaining towns, we find a unique town among
T1 , T2 , . . . , Tk which cannot be swept away. By the above reasons, it is also the unique such
town in the initial situation. Thus the induction step is established.
Solution 2. We start with the same enumeration and the same observation as in Solution 1.
We also denote by i and ri the sizes of the left and the right bulldozers belonging to Ti ,
respectively. One may easily see that no two towns Ti and Tj with i j can sweep each other
away, for this would yield ri j ri .

Clearly, there is no town which can sweep Tn away from the right. Then we may choose the
leftmost town Tk which cannot be swept away from the right. One can observe now that no
town Ti with i k may sweep away some town Tj with j k, for otherwise Ti would be able
to sweep Tk away as well.

Now we prove two claims, showing together that Tk is the unique town which cannot be
swept away, and thus establishing the problem statement.
Claim 1. Tk also cannot be swept away from the left.
Proof. Let Tm be some town to the left of Tk . By the choice of Tk , town Tm can be swept
away from the right by some town Tp with p m. As we have already observed, p cannot be
greater than k. On the other hand, Tm cannot sweep Tp away, so a fortiori it cannot sweep Tk
away.
l
Claim 2. Any town Tm with m k can be swept away by some other town.

Shortlisted problems solutions

25

Proof. If m k, then Tm can be swept away from the right due to the choice of Tk . In the
remaining case we have m k.
Let Tp be a town among Tk , Tk`1, . . . , Tm1 having the largest right bulldozer. We claim
that Tp can sweep Tm away. If this is not the case, then rp q for some q with p q m. But
this means that q is greater than all the numbers ri with k i m 1, so Tq can sweep Tk
away. This contradicts the choice of Tk .
l
Comment 1. One may employ the same ideas within the inductive approach. Here we sketch such
a solution.
Assume that the problem statement holds for the collection of towns T1 , T2 , . . . , Tn1 , so that there
is a unique town Ti among them which cannot be swept away by any other of them. Thus we need
to prove that in the full collection T1 , T2 , . . . , Tn , exactly one of the towns Ti and Tn cannot be swept
away.
If Tn cannot sweep Ti away, then it remains to prove that Tn can be swept away by some other
town. This can be established as in the second paragraph of the proof of Claim 2.
If Tn can sweep Ti away, then it remains to show that Tn cannot be swept away by any other town.
Since Tn can sweep Ti away, it also can sweep all the towns Ti , Ti`1 , . . . , Tn1 away, so Tn cannot be
swept away by any of those. On the other hand, none of the remaining towns T1 , T2 , . . . , Ti1 can
sweep Ti away, so that they cannot sweep Tn away as well.
Comment 2. Here we sketch yet another inductive approach. Assume that n 1. Firstly, we find a
town which can be swept away by each of its neighbors (each town has two neighbors, except for the
bordering ones each of which has one); we call such town a loser. Such a town exists, because there
are n 1 pairs of neighboring towns, and in each of them there is only one which can sweep the other
away; so there exists a town which is a winner in none of these pairs.
Notice that a loser can be swept away, but it cannot sweep any other town away (due to its
neighbors protection). Now we remove a loser, and suggest its left bulldozer to its right neighbor (if
it exists), and its right bulldozer to a left one (if it exists). Surely, a town accepts a suggestion if a
suggested bulldozer is larger than the towns one of the same orientation.
Notice that suggested bulldozers are useless in attack (by the definition of a loser), but may serve
for defensive purposes. Moreover, each suggested bulldozers protection works for the same pairs of
remaining towns as before the removal.
By the induction hypothesis, the new configuration contains exactly one town which cannot be
swept away. The arguments above show that the initial one also satisfies this property.

Solution 3. We separately prove that piq there exists a town which cannot be swept away,
and that piiq there is at most one such town. We also make use of the two observations from
the previous solutions.
To prove piq, assume contrariwise that every town can be swept away. Let t1 be the leftmost
town; next, for every k 1, 2, . . . we inductively choose tk`1 to be some town which can sweep
tk away. Now we claim that for every k 1, 2, . . . , the town tk`1 is to the right of tk ; this leads
to the contradiction, since the number of towns is finite.
Induction on k. The base case k 1 is clear due to the choice of t1 . Assume now that for
all j with 1 j k, the town tj`1 is to the right of tj . Suppose that tk`1 is situated to the left
of tk ; then it lies between tj and tj`1 (possibly coinciding with tj ) for some j k. Therefore,
tk`1 can be swept away by tj`1 , which shows that it cannot sweep tj`1 away so tk`1 also
cannot sweep tk away. This contradiction proves the induction step.
To prove piiq, we also argue indirectly and choose two towns A and B neither of which can
be swept away, with A being to the left of B. Consider the largest bulldozer b between them
(taking into consideration the right bulldozer of A and the left bulldozer of B). Without loss
of generality, b is a left bulldozer; then it is situated in some town to the right of A, and this
town may sweep A away since nothing prevents it from doing that. A contradiction.

26

IMO 2015 Thailand

Comment 3. The Problem Selection Committee decided to reformulate this problem. The original
formulation was as follows.
Let n be a positive integer. There are n cards in a deck, enumerated from bottom to top with
numbers 1, 2, . . . , n. For each i 1, 2, . . . , n, an even number ai is printed on the lower side and an
odd number bi is printed on the upper side of the ith card. We say that the ith card opens the j th card,
if i j and bi ak for every k i ` 1, i ` 2, . . . , j. Similarly, we say that the ith card closes the
j th card, if i j and ai bk for every k i 1, i 2, . . . , j. Prove that the deck contains exactly one
card which is neither opened nor closed by any other card.

Shortlisted problems solutions

27

C2. Let V be a finite set of points in the plane. We say that V is balanced if for any two

distinct points A, B P V, there exists a point C P V such that AC BC. We say that V is
center-free if for any distinct points A, B, C P V, there does not exist a point P P V such that
P A P B P C.
(a) Show that for all n 3, there exists a balanced set consisting of n points.
(b) For which n 3 does there exist a balanced, center-free set consisting of n points?
(Netherlands)
Answer for part (b). All odd integers n 3.
Solution.
Part (a). Assume that n is odd. Consider a regular n-gon. Label the vertices of the n-gon
as A1 , A2 , . . . , An in counter-clockwise order, and set V tA1 , . . . , An u. We check that V is
balanced. For any two distinct vertices Ai and Aj , let k P t1, 2, . . . , nu be the solution of
2k i ` j pmod nq. Then, since k i j k pmod nq, we have Ai Ak Aj Ak , as required.
Now assume that n is even. Consider a regular p3n 6q-gon, and let O be its circumcenter. Again, label its vertices as A1 , . . . , A3n6 in counter-clockwise order, and choose V
tO, A1 , A2 , . . . , An1 u. We check that V is balanced. For any two distinct vertices Ai and Aj , we
always have OAi OAj . We now consider the vertices O and Ai . First note that the triangle
OAi An{21`i is equilateral for all i n2 . Hence, if i n2 , then we have OAn{21`i Ai An{21`i ;
otherwise, if i n2 , then we have OAin{2`1 Ai Ain{2`1 . This completes the proof.
An example of such a construction when n 10 is shown in Figure 1.
A3 B 2

B1

A2
A1

B3
A1

O
O

A9
A2

A8
A3

E
C

A7
A4

A6
A5
Figure 1

D
Figure 2

Comment (a ). There are many ways to construct an example by placing equilateral triangles in a
circle. Here we present one general method.
Let O be the center of a circle and let A1 , B1 , . . . , Ak , Bk be distinct points on the circle such
that the triangle OAi Bi is equilateral for each i. Then V tO, A1 , B1 , . . . , Ak , Bk u is balanced. To
construct a set of even cardinality, put extra points C, D, E on the circle such that triangles OCD
and ODE are equilateral (see Figure 2). Then V tO, A1 , B1 , . . . , Ak , Bk , C, D, Eu is balanced.

Part (b). We now show that there exists a balanced, center-free set containing n points for
all odd n 3, and that one does not exist for any even n 3.
If n is odd, then let V be the set of vertices of a regular n-gon. We have shown in part (a)
that V is balanced. We claim that V is also center-free. Indeed, if P is a point such that

28

IMO 2015 Thailand

P A P B P C for some three distinct vertices A, B and C, then P is the circumcenter of


the n-gon, which is not contained in V.

Now suppose that V is a balanced, center-free set of even cardinality n. We will derive a
contradiction. For a pair of distinct points A, B P V, we say that a point C P V is associated
with the pair tA, Bu if AC BC. Since there are npn1q
pairs of points, there exists a point
P npn1q L T n2
P P V which is associated with at least
n 2 pairs. Note that none of these n2 pairs
2
can contain P , so that the union of these n2 pairs consists of at most n 1 points. Hence
there exist two such pairs that share a point. Let these two pairs be tA, Bu and tA, Cu. Then
P A P B P C, which is a contradiction.
Comment (b). We can rephrase the argument in graph theoretic terms as follows. Let V be a
balanced, center-free set consisting of n points. For any pair of distinct vertices A, B P V and for
any C P V such that AC BC, draw directed edges A C and B C. Then all pairs of vertices
generate altogether at least npn1q directed edges; since the set is center-free, these edges are distinct.
So we must obtain a graph in which any two vertices are connected in both directions. Now, each
vertex has exactly n 1 incoming edges, which means that n 1 is even. Hence n is odd.

Shortlisted problems solutions

29

C3. For a finite set A of positive integers, we call a partition of A into two disjoint nonempty
subsets A1 and A2 good if the least common multiple of the elements in A1 is equal to the
greatest common divisor of the elements in A2 . Determine the minimum value of n such that
there exists a set of n positive integers with exactly 2015 good partitions.
(Ukraine)
Answer. 3024.
Solution. Let A ta1 , a2 , . . . , an u, where a1 a2 an . For a finite nonempty set B
of positive integers, denote by lcm B and gcd B the least common multiple and the greatest
common divisor of the elements in B, respectively.
Consider any good partition pA1 , A2 q of A. By definition, lcm A1 d gcd A2 for some
positive integer d. For any ai P A1 and aj P A2 , we have ai d aj . Therefore, we have
A1 ta1 , a2 , . . . , ak u and A2 tak`1 , ak`2 , . . . , an u for some k with 1 k n. Hence, each
good partition is determined by an element ak , where 1 k n. We call such ak partitioning.
It is convenient now to define k lcmpa1 , a2 , . . . , ak q and gk gcdpak`1 , ak`2 , . . . , an q for
1 k n 1. So ak is partitioning exactly when k gk .
We proceed by proving some properties of partitioning elements, using the following claim.
Claim. If ak1 and ak are partitioning where 2 k n 1, then gk1 gk ak .
Proof. Assume that ak1 and ak are partitioning. Since k1 gk1 , we have k1 | ak .
Therefore, gk k lcmpk1 , ak q ak , and gk1 gcdpak , gk q ak , as desired.
l
Property 1. For every k 2, 3, . . . , n 2, at least one of ak1 , ak , and ak`1 is not partitioning.
Proof. Suppose, to the contrary, that all three numbers ak1 , ak , and ak`1 are partitioning. The
claim yields that ak`1 gk ak , a contradiction.
l

Property 2. The elements a1 and a2 cannot be simultaneously partitioning. Also, an2 and
an1 cannot be simultaneously partitioning
Proof. Assume that a1 and a2 are partitioning. By the claim, it follows that a2 g1 1
lcmpa1 q a1 , a contradiction.
Similarly, assume that an2 and an1 are partitioning. The claim yields that an1 gn1
gcdpan q an , a contradiction.
l

Now let A be an n-element set with exactly 2015 good partitions. Clearly, we have
n 5. Using Property 2, we find that there is at most one
partitioning
element in each
X n5
\
of ta1 , a2 u and tan2 , an1 u. By Property 1, there are at least 3 non-partitioning elements
\ P 2pn2q T
X

partitioning
in ta3 , a4 , . . . , an3 u. Therefore, there are at most pn 1q 2 n5
3
3
P 2pn2q T
elements in A. Thus,
2015, which implies that n 3024.
3
Finally, we show that there exists a set of 3024 positive integers with exactly 2015 partitioning elements. Indeed, in the set A t2 6i , 3 6i , 6i`1 | 0 i 1007u, each element of the
form 3 6i or 6i , except 61008 , is partitioning.
Therefore, the minimum possible value of n is 3024.
Comment. Here we will work out
P theT general case when 2015 is replaced by an arbitrary positive
integer m. Note that the bound 2pn2q
m obtained in the solution is, in fact, true for any positive
3
P T
` 1.
integers m and n. Using this bound, one can find that n 3m
P23m T
To show that the bound is sharp, one constructs a set of 2 ` 1 elements with exactly m good
partitions. Indeed, the minimum is attained on the set t6i , 2 6i , 3 6i | 0 i t 1u Y t6t u for every
even m 2t, and t2 6i , 3 6i , 6i`1 | 0 i t 1u for every odd m 2t 1.

30

IMO 2015 Thailand

C4. Let n be a positive integer. Two players A and B play a game in which they take turns
choosing positive integers k n. The rules of the game are:
piq A player cannot choose a number that has been chosen by either player on any previous
turn.
piiq A player cannot choose a number consecutive to any of those the player has already chosen
on any previous turn.
piiiq The game is a draw if all numbers have been chosen; otherwise the player who cannot
choose a number anymore loses the game.
The player A takes the first turn. Determine the outcome of the game, assuming that both
players use optimal strategies.
(Finland)
Answer. The game ends in a draw when n 1, 2, 4, 6; otherwise B wins.

Solution. For brevity, we denote by rns the set t1, 2, . . . , nu.


Firstly, we show that B wins whenever n 1, 2, 4, 6. For this purpose, we provide a strategy
which guarantees that B can always make a move after As move, and also guarantees that the
game does not end in a draw.
We begin with an important observation.
Lemma. Suppose that Bs first pick is n and that A has made the k th move where k 2. Then
B can also make the k th move.
Proof. Let S be the set of the first k numbers chosen by A. Since S does not contain consecutive
integers, we see that the set rns z S consists of k contiguous components if 1 P S, and k ` 1
components otherwise. Since B has chosen only k 1 numbers, there is at least one component
of rns z S consisting of numbers not yet picked by B. Hence, B can choose a number from this
component.
l
We will now describe a winning strategy for B, when n 1, 2, 4, 6. By symmetry, we may
. So B can pick the number n in
assume that As first choice is a number not exceeding n`1
2
Bs first turn. We now consider two cases.
Case 1. n is odd and n 3. The only way the game ends in a draw is that A eventually picks
all the odd numbers from the set rns. However, B has already chosen n, so this cannot happen.
Thus B can continue to apply the lemma until A cannot make a move.
Case 2. n is even and n 8. Since B has picked n, the game is a draw only if A can
eventually choose all the odd numbers from the set rn 1s. So B picks a number from the set
t1, 3, 5, . . . , n 3u not already chosen by A, on Bs second move. This is possible since the set
consists of n2
3 numbers and A has chosen only 2 numbers. Hereafter B can apply the
2
lemma until A cannot make a move.
Hence, in both cases A loses.
We are left with the cases n 1, 2, 4, 6. The game is trivially a draw when n 1, 2. When
n 4, A has to first pick 1 to avoid losing. Similarly, B has to choose 4 as well. It then follows
that the game ends in a draw.
When n 6, B gets at least a draw by the lemma or by using a mirror strategy. On the
other hand, A may also get at least a draw in the following way. In the first turn, A chooses 1.
After Bs response by a number b, A finds a neighbor c of b which differs from 1 and 2, and
reserves c for As third move. Now, clearly A can make the second move by choosing a number
different from 1, 2, c 1, c, c ` 1. Therefore A will not lose.

Shortlisted problems solutions

31

Comment 1. We present some explicit winning strategies for B.


We start with the case n is odd and n 3. B starts by picking n in the first turn. On the kth move
for k 2, B chooses the number exactly 1 less than As kth pick. The only special case is when As
kth choice is 1. In this situation, As first pick was a number a 1 and B can respond by choosing
a 1 on the kth move instead.

We now give an alternative winning strategy in the case n is even and n 8. We first present a
winning strategy for the case when As first pick is 1. We consider two cases depending on As second
move.
Case 1. As second pick is 3. Then B chooses n 3 on the second move. On the kth move, B chooses
the number exactly 1 less than As kth pick except that B chooses 2 if As kth pick is n 2 or n 1.

Case 2. As second pick is a 3. Then B chooses a 2 on the second move. Afterwards on the
kth move, B picks the number exactly 1 less than As kth pick.
One may easily see that this strategy guarantees Bs victory, when As first pick is 1.
The following claim shows how to extend the strategy to the general case.
Claim. Assume that B has an explicit strategy leading to a victory after A picks 1 on the first move.
Then B also has an explicit strategy leading to a victory after any first moves of A.
Proof. Let S be an optimal strategy of B after A picks 1 on the first move. Assume that A picks some
number a 1 on this move; we show how B can make use of S in order to win in this case.
In parallel to the real play, B starts an imaginary play. The positions in these plays differ by
flipping the segment r1, as; so, if a player chooses some number x in the real play, then the same player
chooses a number x or a ` 1 x in the imaginary play, depending on whether x a or x a. Thus
As first pick in the imaginary play is 1.
Clearly, a number is chosen in the real play exactly if the corresponding number is chosen in the
imaginary one. Next, if an unchosen number is neighboring to one chosen by A in the imaginary play,
then the corresponding number also has this property in the real play, so A also cannot choose it.
One can easily see that a similar statement with real and imaginary plays interchanged holds for B
instead of A.
Thus, when A makes some move in the real play, B may imagine the corresponding legal move in
the imaginary one. Then B chooses the response according to S in the imaginary game and makes
the corresponding legal move in the real one. Acting so, B wins the imaginary game, thus B will also
win the real one.
l
Hence, B has a winning strategy for all even n greater or equal to 8.
Notice that the claim can also be used to simplify the argument when n is odd.
Comment 2. One may also employ symmetry when n is odd. In particular, B could use a mirror
strategy. However, additional ideas are required to modify the strategy after A picks n`1
2 .

32

IMO 2015 Thailand

C5. Consider an infinite sequence a1 , a2 , . . . of positive integers with ai 2015 for all i 1.
Suppose that for any two distinct indices i and j we have i ` ai j ` aj .
Prove that there exist two positive integers b and N such that

pai bq 10072

im`1

whenever n m N.

(Australia)

Solution 1. We visualize the set of positive integers as a sequence of points. For each n we
draw an arrow emerging from n that points to n ` an ; so the length of this arrow is an . Due to
the condition that m ` am n ` an for m n, each positive integer receives at most one arrow.
There are some positive integers, such as 1, that receive no arrows; these will be referred to as
starting points in the sequel. When one starts at any of the starting points and keeps following
the arrows, one is led to an infinite path, called its ray, that visits a strictly increasing sequence
of positive integers. Since the length of any arrow is at most 2015, such a ray, say with starting
point s, meets every interval of the form rn, n ` 2014s with n s at least once.

Suppose for the sake of contradiction that there would be at least 2016 starting points.
Then we could take an integer n that is larger than the first 2016 starting points. But now the
interval rn, n ` 2014s must be met by at least 2016 rays in distinct points, which is absurd. We
have thereby shown that the number b of starting points satisfies 1 b 2015. Let N denote
any integer that is larger than all starting points. We contend that b and N are as required.

To see this, let any two integers m and n with n m N be given. The sum nim`1 ai
gives the total length of the arrows emerging from m ` 1, . . . , n. Taken together, these arrows
form b subpaths of our rays, some of which may be empty. Now on each ray we look at
the first number that is larger than m; let x1 , . . . , xb denote these numbers, and let y1 , . . . , yb
enumerate in corresponding order the numbers defined similarly with respect to n. Then the
list of differences y1 x1 , . . . , yb xb consists of the lengths of these paths and possibly some
zeros corresponding to empty paths. Consequently, we obtain
n

im`1

ai

pyj xj q ,

j1

whence
n

im`1

pai bq

pyj nq

j1

pxj mq .

j1

Now each of the b rays meets the interval rm ` 1, m ` 2015s at some point and thus x1
m, . . . , xb m are b distinct members of the set t1, 2, . . . , 2015u. Moreover, since m ` 1 is not a
starting point, it must belong to some ray; so 1 has to appear among these numbers, wherefore
1`

b1

pj ` 1q

j1

pxj mq 1 `

j1

b1

p2016 b ` jq .

j1

The same argument applied to n and y1 , . . . , yb yields


1`

b1

pj ` 1q

j1

pyj nq 1 `

j1

b1

p2016 b ` jq .

j1

Shortlisted problems solutions

33

So altogether we get

n
b1

pai bq
p2016 b ` jq pj ` 1q pb 1qp2015 bq

j1
im`1
2

pb 1q ` p2015 bq
10072 ,

2
as desired.
Solution 2. Set sn n ` an for all positive integers n. By our assumptions, we have
n ` 1 sn n ` 2015
for all n P Z0 . The members of the sequence s1 , s2 , . . . are distinct. We shall investigate the
set
M Z0 z ts1 , s2 , . . .u .
Claim. At most 2015 numbers belong to M.
Proof. Otherwise let m1 m2 m2016 be any 2016 distinct elements from M. For
n m2016 we have
ts1 , . . . , sn u Y tm1 , . . . , m2016 u t1, 2, . . . , n ` 2015u ,
where on the left-hand side we have a disjoint union containing altogether n ` 2016 elements.
But the set on the right-hand side has only n ` 2015 elements. This contradiction proves our
claim.
l
Now we work towards proving that the positive integers b |M| and N maxpMq are as
required. Recall that we have just shown b 2015.
Let us consider any integer r N. As in the proof of the above claim, we see that
Br M Y ts1 , . . . , sr u

(1)

is a subset of r1, r ` 2015s X Z with precisely b ` r elements. Due to the definitions of M and N,
we also know r1, r ` 1s X Z Br . It follows that there is a set Cr t1, 2, . . . , 2014u with
|Cr | b 1 and

(
Br r1, r ` 1s X Z Y r ` 1 ` x x P Cr .
(2)

For any finite set of integers J we denote thesum of its elements by J. Now the equations (1)
and (2) give rise to two ways of computing Br and the comparison of both methods leads to

M`

i1

si

or in other words to

M`

i1

i1

i ` bpr ` 1q `

pai bq b `

Cr .

Cr ,

(3)

After this preparation, we consider any two integers m and n with n m N. Plugging
r n and r m into (3) and subtracting the estimates that result, we deduce
n

pai bq

im`1

Cn

Cm .

34

IMO 2015 Thailand

Since Cn and Cm are subsets of t1, 2, . . . , 2014u with |Cn | |Cm | b 1, it is clear that the
absolute value of the right-hand side of the above inequality attains its largest possible value if
either Cm t1, 2, . . . , b 1u and Cn t2016 b, . . . , 2014u, or the other way around. In these
two cases we have

Cn Cm pb 1qp2015 bq ,

so in the general case we find


pb 1q ` p2015 bq

10072 ,
pai bq pb 1qp2015 bq

im`1
2
as desired.

Comment. The sets Cn may be visualized by means of the following process: Start with an empty
blackboard. For n 1, the following happens during the nth step. The number an gets written on
the blackboard, then all numbers currently on the blackboard are decreased by 1, and finally all zeros
that have arisen get swept away.
It is not hard to see that the numbers present on the blackboard after n steps are distinct and
form the set Cn . Moreover, it is possible to complete a solution based on this idea.

Shortlisted problems solutions

35

C6. Let S be a nonempty set of positive integers. We say that a positive integer n is clean if
it has a unique representation as a sum of an odd number of distinct elements from S. Prove
that there exist infinitely many positive integers that are not clean.
(U.S.A.)
Solution 1. Define an odd (respectively, even) representation of n to be a representation of n
as a sum of an odd (respectively, even) number of distinct elements of S. Let Z0 denote the
set of all positive integers.
Suppose, to the contrary, that there exist only finitely many positive integers that are not
clean. Therefore, there exists a positive integer N such that every integer n N has exactly
one odd representation.
Clearly, S is infinite. We now claim the following properties of odd and even representations.
Property 1. Any positive integer n has at most one odd and at most one even representation.
Proof. We first show that every integer n has at most one even representation. Since S is infinite,
there exists x P S such that x maxtn, Nu. Then, the number n ` x must be clean, and x does
not appear in any even representation of n. If n has more than one even representation, then
we obtain two distinct odd representations of n ` x by adding x to the even representations
of n, which is impossible. Therefore, n can have at most one even representation.
Similarly, there exist two distinct elements y, z P S such that y, z maxtn, Nu. If n has
more than one odd representation, then we obtain two distinct odd representations of n ` y ` z
by adding y and z to the odd representations of n. This is again a contradiction.
l
Property 2. Fix s P S. Suppose that a number n N has no even representation. Then
n ` 2as has an even representation containing s for all integers a 1.
Proof. It is sufficient to prove the following statement: If n has no even representation without s,
then n`2s has an even representation containing s (and hence no even representation without s
by Property 1).
Notice that the odd representation of n ` s does not contain s; otherwise, we have an even
representation of n without s. Then, adding s to this odd representation of n ` s, we get that
n ` 2s has an even representation containing s, as desired.
l
Property 3. Every sufficiently large integer has an even representation.
Proof. Fix any s P S, and let r be an arbitrary element in t1, 2, . . . , 2su. Then, Property 2
implies that the set Zr tr ` 2as : a 0u contains at most one number exceeding N with
no even representation. Therefore,Zr contains finitely many positive integers with no even
representation, and so does Z0 2s
l
r1 Zr .

In view of Properties 1 and 3, we may assume that N is chosen such that every n N has
exactly one odd and exactly one even representation. In particular, each element s N of S
has an even representation.
Property 4. For any s, t P S with N s t, the even representation of t contains s.
Proof. Suppose the contrary. Then, s ` t has at least two odd representations: one obtained by
adding s to the even representation of t and one obtained by adding t to the even representation
of s. Since the latter does not contain s, these two odd representations of s ` t are distinct, a
contradiction.
l
n
Let s1 s2 be all the elements of S, and set n i1 si for each nonnegative
integer n. Fix an integer k such that sk N. Then, Property 4 implies that for every i k
the even representation of si contains all the numbers sk , sk`1, . . . , si1 . Therefore,
si sk ` sk`1 ` ` si1 ` Ri i1 k1 ` Ri ,
where Ri is a sum of some of s1 , . . . , sk1. In particular, 0 Ri s1 ` ` sk1 k1 .

(1)

36

IMO 2015 Thailand


Let j0 be an integer satisfying j0 k and j0 2k1 . Then (1) shows that, for every j j0 ,
sj`1 j k1 j {2.

(2)

Next, let p j0 be an index such that Rp minij0 Ri . Then,

sp`1 sk ` sk`1 ` ` sp ` Rp`1 psp Rp q ` sp ` Rp`1 2sp .

Therefore, there is no element of S larger than sp but smaller than 2sp . It follows that the
even representation of 2sp does not contain any element larger than sp . On the other hand,
inequality (2) yields 2sp s1 ` ` sp1, so must contain a term larger than sp1 . Thus,
it must contain sp . After removing sp from , we have that sp has an odd representation not
containing sp , which contradicts Property 1 since sp itself also forms an odd representation
of sp .
Solution 2. We will also use Property 1 from Solution 1.
We first define some terminology and notations used in this solution. Let Z0 denote the set
of all nonnegative integers. All sums mentioned are regarded as sums of distinct elements of S.
Moreover, a sum is called even or odd depending on the parity of the number of terms in it. All
closed or open intervals refer to sets of all integers inside them, e.g., ra,
bs tx P Z : a x bu.
Again, let s1 s2 be all elements of S, and denote n ni1 si for each positive
integer n. Let On (respectively, En ) be the set of numbers
representable
8
8 as an odd (respectively,
even) sum of elements of ts1 , . . . , sn u. Set E n1 En and O n1 On . We assume that
0 P En since 0 is representable as a sum of 0 terms.
We now proceed to our proof. Assume, to the contrary, that there exist only finitely
many positive integers that are not clean and denote the number of non-clean positive integers
by m 1. Clearly, S is infinite. By Property 1 from Solution 1, every positive integer n has at
most one odd and at most one even representation.
Step 1. We estimate sn`1 and n`1 .

Upper bounds: Property 1 yields |On | |En | 2n1 , so r1, 2n1 ` ms z On m. Hence,
there exists a clean integer xn P r1, 2n1 ` ms z On . The definition of On then yields that the
odd representation of xn contains a term larger than sn . Therefore, sn`1 xn 2n1 ` m for
every positive integer n. Moreover, since s1 is the smallest clean number, we get 1 s1 m.
Then,
n`1
n`1

si ` s1
p2i2 ` mq ` m 2n 1 ` pn ` 1qm
n`1
i2

i2

for every positive integer n. Notice that this estimate also holds for n 0.

Lower bounds: Since On`1 r1, n`1s, we have n`1 |On`1 | 2n for all positive integers n.
Then,
sn`1 n`1 n 2n p2n1 1 ` nmq 2n1 ` 1 nm
for every positive integer n.

Combining the above inequalities, we have


2n1 ` 1 nm sn`1 2n1 ` m

and

for every positive integer n.

2n n`1 2n 1 ` pn ` 1qm,

(3)

Step 2. We prove Property 3 from Solution 1.


For every integer x and set of integers Y , define x Y tx y : y P Y u.
In view of Property 1, we get
En`1 En \ psn`1 ` On q

and

On`1 On \ psn`1 ` En q,

where \ denotes the disjoint union operator. Notice also that sn`2 2n ` 1 pn ` 1qm
2n1 1 ` nm n for every sufficiently large n. We now claim the following.

Shortlisted problems solutions

37

Claim 1. pn sn`1 , sn`2 sn`1 q En for every sufficiently large n.


Proof. For sufficiently large n, all elements of pn , sn`2 q are clean. Clearly, the elements
of pn , sn`2 q can be in neither On nor O z On`1 . So, pn , sn`2q On`1 z On sn`1 ` En ,
which yields the claim.
l
Now, Claim 1 together with inequalities (3) implies that, for all sufficiently large n,
`

E En pn sn`1 , sn`2 sn`1 q 2nm, 2n1 pn ` 2qm .

This easily yields that Z0 z E is also finite. Since Z0 z O is also finite, by Property 1, there
exists a positive integer N such that every integer n N has exactly one even and one odd
representation.
Step 3. We investigate the structures of En and On .
Suppose that z P E2n . Since z can be represented as an even sum using ts1 , s2 , . . . , s2n u, so
can its complement 2n z. Thus, we get E2n 2n E2n . Similarly, we have
E2n 2n E2n ,

O2n 2n O2n ,

E2n`1 2n`1 O2n`1,

O2n`1 2n`1 E2n`1 . (4)

Claim 2. For every sufficiently large n, we have


r0, n s On pN, n Nq

and

r0, n s En pN, n Nq.

Proof. Clearly On , En r0, n s for every positive integer n. We now prove On , En pN, n Nq.
Taking n sufficiently large, we may assume that sn`1 2n1 `1nm 21 p2n1 1`nmq n {2.
Therefore, the odd representation of every element of pN, n {2s cannot contain a term larger
than sn . Thus, pN, n {2s On . Similarly, since sn`1 ` s1 n {2, we also have pN, n {2s En .
Equations (4) then yield that, for sufficiently large n, the interval pN, n Nq is a subset of
both On and En , as desired.
l
Step 4. We obtain a final contradiction.
Notice that 0 P Z0 z O and 1 P Z0 z E. Therefore, the sets Z0 z O and Z0 z E are
nonempty. Denote o maxpZ0 z Oq and e maxpZ0 z Eq. Observe also that e, o N.
Taking k sufficiently large, we may assume that 2k 2N and that Claim 2 holds for
all n 2k. Due to (4) and Claim 2, we have that 2k e is the minimal number greater than N
which is not in E2k , i.e., 2k e s2k`1 ` s1 . Similarly,
2k o s2k`1 ,

2k`1 e s2k`2 ,

and

2k`1 o s2k`2 ` s1 .

Therefore, we have
s1 ps2k`1 ` s1 q s2k`1 p2k eq p2k oq o e
p2k`1 eq p2k`1 oq s2k`2 ps2k`2 ` s1 q s1 ,
which is impossible since s1 0.

38

IMO 2015 Thailand

C7. In a company of people some pairs are enemies. A group of people is called unsociable
if the number of members in the group is odd and at least 3, and it is possible to arrange all
its members around a round table so that every two neighbors are enemies. Given that there
are at most 2015 unsociable groups, prove that it is possible to partition the company into 11
parts so that no two enemies are in the same part.
(Russia)
Solution 1. Let G pV, Eq be a graph where V is the set of people in the company and E
is the set of the enemy pairs the edges of the graph. In this language, partitioning into 11
disjoint enemy-free subsets means properly coloring the vertices of this graph with 11 colors.
We will prove the following more general statement.
Claim. Let G be a graph with chromatic number k 3. Then G contains at least 2k1 k
unsociable groups.
Recall that the chromatic number of G is the least k such that a proper coloring
V V1 \ \ Vk

(1)

exists. In view of 211 12 2015, the claim implies the problem statement.

Let G be a graph with chromatic number k. We say that a proper coloring (1) of G is
leximinimal, if the k-tuple p|V1 |, |V2 |, . . . , |Vk |q is lexicographically minimal; in other words, the
following conditions are satisfied: the number n1 |V1 | is minimal; the number n2 |V2 | is
minimal, subject to the previously chosen value of n1 ; . . . ; the number nk1 |Vk1 | is minimal,
subject to the previously chosen values of n1 , . . . , nk2 .
The following lemma is the core of the proof.
Lemma 1. Suppose that G pV, Eq is a graph with odd chromatic number k 3, and let (1)
be one of its leximinimal colorings. Then G contains an odd cycle which visits all color classes
V1 , V2 , . . . , Vk .
Proof of Lemma 1. Let us call a cycle colorful if it visits all color classes.
Due to the definition of the chromatic number, V1 is nonempty. Choose an arbitrary vertex
v P V1 . We construct a colorful odd cycle that has only one vertex in V1 , and this vertex is v.

We draw a subgraph of G as follows. Place v in the center, and arrange the sets V2 , V3 , . . . , Vk
in counterclockwise circular order around it. For convenience, let Vk`1 V2 . We will draw
arrows to add direction to some edges of G, and mark the vertices these arrows point to. First
we draw arrows from v to all its neighbors in V2 , and mark all those neighbors. If some vertex
u P Vi with i P t2, 3, . . . , ku is already marked, we draw arrows from u to all its neighbors
in Vi`1 which are not marked yet, and we mark all of them. We proceed doing this as long as
it is possible. The process of marking is exemplified in Figure 1.
Notice that by the rules of our process, in the final state, marked vertices in Vi cannot have
unmarked neighbors in Vi`1 . Moreover, v is connected to all marked vertices by directed paths.
Now move each marked vertex to the next color class in circular order (see an example in
Figure 3). In view of the arguments above, the obtained coloring V1 \ W2 \ \ Wk is proper.
Notice that v has a neighbor w P W2 , because otherwise
`
`

V1 z tvu \ W2 Y tvu \ W3 \ \ Wk

would be a proper coloring lexicographically smaller than (1). If w was unmarked, i.e., w was
an element of V2 , then it would be marked at the beginning of the process and thus moved
to V3 , which did not happen. Therefore, w is marked and w P Vk .

Shortlisted problems solutions


V5

39
V4

W5

W4

w
w

w
w
V2

V3

Figure 1

W2

W3

Figure 2

Since w is marked, there exists a directed path from v to w. This path moves through the
sets V2 , . . . , Vk in circular order, so the number of edges in it is divisible by k 1 and thus even.
Closing this path by the edge w v, we get a colorful odd cycle, as required.
l
Proof of the claim. Let us choose a leximinimal coloring (1) of G. For every set C t1, 2, . . . , ku
such that |C| is odd and greater than 1, we will provide an odd cycle visiting exactly those
color classes whose indices are listed in the set C. This property ensures that we have different
cycles for different choices of C, and it proves the claim because there are 2k1 k choices for
the set C.

Let VC cPC Vc , and let GC be the induced subgraph of G on the vertex set VC . We
also have the induced coloring of VC with |C| colors; this coloring is of course proper. Notice
further that the induced coloring is leximinimal: if we had a lexicographically smaller coloring
pWc qcPC of GC , then these classes, together the original color classes Vi for i R C, would provide
a proper coloring which is lexicographically smaller than (1). Hence Lemma 1, applied to the
subgraph GC and its leximinimal coloring pVc qcPC , provides an odd cycle that visits exactly
those color classes that are listed in the set C.
l
Solution 2. We provide a different proof of the claim from the previous solution.
We say that a graph is critical if deleting any vertex from the graph decreases the graphs
chromatic number. Obviously every graph contains a critical induced subgraph with the same
chromatic number.
Lemma 2. Suppose that G pV, Eq is a critical graph with chromatic number k 3. Then
every vertex v of G is contained in at least 2k2 1 unsociable groups.

Proof. For every set X V , denote by npXq the number of neighbors of v in the set X.
Since G is critical, there exists a proper coloring of G z tvu with k 1 colors, so there exists
a proper coloring V V1 \ V2 `\ \ Vk of G such that
V1 tvu. Among such colorings,
take one for which the sequence npV2 q, npV3 q, . . . , npVk q is lexicographically minimal. Clearly,
npVi q 0 for every i 2, 3, . . . , k; otherwise V2 \ . . . \ Vi1 \ pVi Y V1 q \ Vi`1 \ . . . Vk would
be a proper coloring of G with k 1 colors.
We claim that for every C t2, 3, . . . , ku with |C| 2 being even, G contains an unsociable
group so that the set of its members colors is precisely C Y t1u. Since the number of such
sets C is 2k2 1, this proves the lemma. Denote the elements of C by c1 , . . . , c2 in increasing
order. For brevity, let Ui Vci . Denote by Ni the set of neighbors of v in Ui .

40

IMO 2015 Thailand

We show that for every i 1, . . . , 2 1 and x P Ni , the subgraph induced by Ui Y Ui`1


contains a path that connects x with another point in Ni`1 . For the sake of contradiction,
suppose that no such path exists. Let S be the set of vertices that lie in the connected component
of x in the subgraph induced by Ui Y Ui`1 , and let P Ui X S, and Q Ui`1 X S (see Figure 3).
Since x is separated from Ni`1 , the sets Q and Ni`1 are disjoint. So, if we re-color G by
replacing Ui and Ui`1 by pUi Y Qq z P and pUi`1 Y P q z Q, respectively, we obtain a proper
coloring such that npUi q npVci q is decreased` and only npUi`1 q npV
ci`1 q is increased. That
contradicts the lexicographical minimality of npV2 q, npV3 q, . . . , npVk q .
Ui

Ui+1
Q

Ni

Ni+1
S
v

Figure 3
Next, we build a path through U1 , U2 , . . . , U2 as follows. Let the starting point of the path
be an arbitrary vertex v1 in the set N1 . For i 2 1, if the vertex vi P Ni is already defined,
connect vi to some vertex in Ni`1 in the subgraph induced by Ui Y Ui`1 , and add these edges to
the path. Denote the new endpoint of the path by vi`1 ; by the construction we have vi`1 P Ni`1
again, so the process can be continued. At the end we have a path that starts at v1 P N1 and
ends at some v2 P N2 . Moreover, all edges in this path connect vertices in neighboring classes:
if a vertex of the path lies in Ui , then the next vertex lies in Ui`1 or Ui1 . Notice that the path
is not necessary simple, so take a minimal subpath of it. The minimal subpath is simple and
connects the same endpoints v1 and v2 . The property that every edge steps to a neighboring
color class (i.e., from Ui to Ui`1 or Ui1 ) is preserved. So the resulting path also visits all of
U1 , . . . , U2 , and its length must be odd. Closing the path with the edges vv1 and v2 v we obtain
the desired odd cycle (see Figure 4).
l
U1

U2

U3

U21

U2

...
N1
v1

N2
v2

N21

N3
v3

v21

N2
v2

Figure 4
Now we prove the claim by induction on k 3. The base case k 3 holds by applying
Lemma 2 to a critical subgraph. For the induction step, let G0 be a critical k-chromatic subgraph of G, and let v be an arbitrary vertex of G0 . By Lemma 2, G0 has at least 2k2 1
unsociable groups containing v. On the other hand, the graph G0 z tvu has chromatic number k 1, so it contains at least 2k2 pk 1q unsociable groups by the induction hypothesis.
Altogether, this gives 2k2 1 ` 2k2 pk 1q 2k1 k distinct unsociable groups in G0 (and
thus in G).

Shortlisted problems solutions

41

Comment 1. The claim we proved is sharp. The complete graph with k vertices has chromatic
number k and contains exactly 2k1 k unsociable groups.
Comment 2. The proof of Lemma 2 works for odd values of |C| 3 as well. Hence, the second
solution shows
the analogous statement that the number of even sized unsociable groups is at least
`
2k 1 k2 .

42

IMO 2015 Thailand

This page is intentionally left blank

Shortlisted problems solutions

43

Geometry
G1. Let ABC be an acute triangle with orthocenter H. Let G be the point such that the
quadrilateral ABGH is a parallelogram. Let I be the point on the line GH such that AC
bisects HI. Suppose that the line AC intersects the circumcircle of the triangle GCI at C
and J. Prove that IJ AH.
(Australia)
Solution 1. Since HG k AB and BG k AH, we have BG K BC and CH K GH. Therefore, the quadrilateral BGCH is cyclic. Since H is the orthocenter of the triangle ABC, we
have =HAC 900 =ACB =CBH. Using that BGCH and CGJI are cyclic quadrilaterals,
we get
=CJI =CGH =CBH =HAC.

Let M be the intersection of AC and GH, and let D A be the point on the line AC such
that AH HD. Then =MJI =HAC =MDH.
Since =MJI =MDH, =IMJ =HMD, and IM MH, the triangles IMJ and
HMD are congruent, and thus IJ HD AH.
C
D

G
H

Comment. Instead of introducing the point D, one can complete the solution by using the law of
sines in the triangles IJM and AM H, yielding
IJ
sin =IM J
sin =AM H
AH
AH

.
IM
sin =M JI
sin =HAM
MH
IM

Solution 2. Obtain =CGH =HAC as in the previous solution. In the parallelogram


ABGH we have =BAH =HGB. It follows that
=HMC =BAC =BAH ` =HAC =HGB ` =CGH =CGB.
So the right triangles CMH and CGB are similar. Also, in the circumcircle of triangle GCI
we have similar triangles MIJ and MCG. Therefore,
MI
MH
GB
AH
IJ

.
CG
MC
MC
GC
CG
Hence IJ AH.

44

IMO 2015 Thailand

G2. Let ABC be a triangle inscribed into a circle with center O. A circle with center A
meets the side BC at points D and E such that D lies between B and E. Moreover, let F and
G be the common points of and . We assume that F lies on the arc AB of not containing
C, and G lies on the arc AC of not containing B. The circumcircles of the triangles BDF
and CEG meet the sides AB and AC again at K and L, respectively. Suppose that the lines
F K and GL are distinct and intersect at X. Prove that the points A, X, and O are collinear.
(Greece)
Solution 1. It suffices to prove that the lines F K and GL are symmetric about AO. Now
the segments AF and AG, being chords of with the same length, are clearly symmetric with
respect to AO. Hence it is enough to show
=KF A =AGL .

(1)

Let us denote the circumcircles of BDF and CEG by B and C , respectively. To prove (1),
we start from
=KF A =DF G ` =GF A =DF K .
In view of the circles B , , and , this may be rewritten as
=KF A =CEG ` =GBA =DBK =CEG =CBG .
Due to the circles C and , we obtain =KF A =CLG =CAG =AGL. Thereby the
problem is solved.
A

L
L

G
G

K
K

C
F
F
O
B
B

D
D

E
E

Figure 1
Solution 2. Again, we denote the circumcircle of BDKF by B . In addition, we set
=BAC, =ABF , and =EDA =AED (see Figure 2). Notice that AF AG entails
=GCA, so all three of , , and respect the symmetry between B and C of our
configuration. Again, we reduce our task to proving (1).
This time, we start from
2 =KF A 2p=DF A =DF Kq .
Since the triangle AF D is isosceles, we have
=DF A =ADF =EDF =BF D ` =EBF .

Shortlisted problems solutions

45

Moreover, because of the circle B we have =DF K =CBA. Altogether, this yields
`

2 =KF A =DF A ` =BF D ` =EBF 2=CBA ,

which simplifies to

2 =KF A =BF A ` =CBA .


Now the quadrilateral AF BC is cyclic, so this entails 2 =KF A ` .
Due to the symmetry between B and C alluded to above, this argument also shows that
2 =AGL ` . This concludes the proof of (1).

F
F

K
K

G
G

D
D
Figure 2

E
E

Comment 1. As the first solution shows, the assumption that A be the center of may be weakened
to the following one: The center of lies on the line OA. The second solution may be modified to
yield the same result.
Comment 2. It might be interesting to remark that =GDK 900 . To prove this, let G1 denote
the point on diametrically opposite to G. Because of =KDF =KBF =AGF =G1 DF , the
points D, K, and G1 are collinear, which leads to the desired result. Notice that due to symmetry we
also have =LEF 900 .
Moreover, a standard argument shows that the triangles AGL and BGE are similar. By symmetry
again, also the triangles AF K and CDF are similar.
There are several ways to derive a solution from these facts. For instance, one may argue that
=KF A =BF A =BF K =BF A =EDG1 p1800 =AGBq p1800 =G1 GEq
=AGE =AGB =BGE =AGL .

Comment 3. The original proposal did not contain the point X in the assumption and asked instead
to prove that the lines F K, GL, and AO are concurrent. This differs from the version given above only
insofar as it also requires to show that these lines cannot be parallel. The Problem Selection Committee
removed this part from the problem intending to make it thus more suitable for the Olympiad.
For the sake of completeness, we would still like to sketch one possibility for proving F K AO here.
As the points K and O lie in the angular region =F AG, it suffices to check =KF A ` =F AO 1800 .
Multiplying by 2 and making use of the formulae from the second solution, we see that this is equivalent
to p ` q ` p1800 2q 3600 , which in turn is an easy consequence of 1800 .

46

IMO 2015 Thailand

G3. Let ABC be a triangle with =C 900, and let H be the foot of the altitude from C.

A point D is chosen inside the triangle CBH so that CH bisects AD. Let P be the intersection
point of the lines BD and CH. Let be the semicircle with diameter BD that meets the
segment CB at an interior point. A line through P is tangent to at Q. Prove that the
lines CQ and AD meet on .
(Georgia)

Solution 1. Let K be the projection of D onto AB; then AH HK (see Figure 1). Since
P H k DK, we have
HK
AH
PD

.
(1)
PB
HB
HB
Let L be the projection of Q onto DB. Since P Q is tangent to and =DQB =BLQ
900 , we have =P QD =QBP =DQL. Therefore, QD and QB are respectively the internal
and the external bisectors of =P QL. By the angle bisector theorem, we obtain
PD
PQ
PB

.
DL
QL
BL

(2)

AH
PD
DL

. So, the spiral similarity centered at B


HB
PB
LB
and sending A to D maps H to L. Moreover, sends the semicircle with diameter AB passing
through C to . Due to CH K AB and QL K DB, it follows that pCq Q.
Hence, the triangles ABD and CBQ are similar, so =ADB =CQB. This means that the
lines AD and CQ meet at some point T , and this point satisfies =BDT =BQT . Therefore,
T lies on , as needed.
The relations (1) and (2) yield

C
T
P

D L

K
Figure 1

D
B

K
Figure 2

Comment 1. Since =BAD =BCQ, the point T lies also on the circumcircle of the triangle ABC.

Solution 2. Let be the circumcircle of ABC, and let AD meet at T . Then =AT B
=ACB 900 , so T lies on as well. As in the previous solution, let K be the projection of D
onto AB; then AH HK (see Figure 2).
Our goal now is to prove that the points C, Q, and T are collinear. Let CT meet again
at Q1 . Then, it suffices to show that P Q1 is tangent to , or that =P Q1 D =Q1 BD.
Since the quadrilateral BDQ1 T is cyclic and the triangles AHC and KHC are congruent, we
have =Q1 BD =Q1 T D =CT A =CBA =ACH =HCK. Hence, the right triangles
HK
Q1 D
1
CHK and BQ D are similar. This implies that

, and thus HK BD CK Q1 D.
CK
BD
HK
PD

, and so P D BK HK BD.
Notice that P H k DK; therefore, we have
BD
BK
PD
CK
Consequently, P D BK HK BD CK Q1 D, which yields 1
.
QD
BK
Since =CKA =KAC =BDQ1 , the triangles CKB and P DQ1 are similar, so =P Q1 D
=CBA =Q1 BD, as required.

Shortlisted problems solutions

47

Comment 2. There exist several other ways to prove that P Q1 is tangent to . For instance, one
PD
P Q1
may compute
and
in terms of AH and HB to verify that P Q12 P D P B, concluding that
PB
PB
P Q1 is tangent to .
Another possible approach is the following. As in Solution 2, we introduce the points T and Q1
and mention that the triangles ABC and DBQ1 are similar (see Figure 3).
Let M be the midpoint of AD, and let L be the projection of Q1 onto AB. Construct E on the
line AB so that EP is parallel to AD. Projecting from P , we get pA, B; H, Eq pA, D; M, 8q 1.
PD
EA

, the point P is the image of E under the similarity transform mapping ABC
Since
AB
DB
to DBQ1 . Therefore, we have pD, B; L, P q pA, B; H, Eq 1, which means that Q1 D and Q1 B are
respectively the internal and the external bisectors of =P Q1 L. This implies that P Q1 is tangent to ,
as required.

C
Q
T
P

M
A

D L
K

Figure 3

Solution 3. Introduce the points T and Q1 as in the previous solution. Note that T lies on
the circumcircle of ABC. Here we present yet another proof that P Q1 is tangent to .
Let be the circle completing the semicircle . Construct a point F symmetric to C with
respect to AB. Let S T be the second intersection point of F T and (see Figure 4).
C

K
S

Figure 4
Since AC AF , we have =DKC =HCK =CBA =CT A =DT S 1800
=SKD. Thus, the points C, K, and S are collinear. Notice also that =Q1 KD =Q1 T D
=HCK =KF H 1800 =DKF . This implies that the points F, K, and Q1 are collinear.
Applying Pascals theorem to the degenerate hexagon KQ1 Q1 T SS, we get that the tangents to passing through Q1 and S intersect on CF . The relation =Q1 T D =DT S yields
that Q1 and S are symmetric with respect to BD. Therefore, the two tangents also intersect
on BD. Thus, the two tangents pass through P . Hence, P Q1 is tangent to , as needed.

48

IMO 2015 Thailand

G4. Let ABC be an acute triangle, and let M be the midpoint of AC. A circle passing
through B and M meets the sides AB and BC again at P and Q, respectively. Let T be
the point such that the quadrilateral BP T Q is a parallelogram. Suppose that T lies on the
circumcircle of the triangle ABC. Determine all possible values of BT {BM.
(Russia)
?
Answer. 2.
Solution 1. Let S be the center of the parallelogram BP T Q, and let B 1 B be the point on
the ray BM such that BM MB 1 (see Figure 1). It follows that ABCB 1 is a parallelogram.
Then, =ABB 1 =P QM and =BB 1 A =B 1 BC =MP Q, and so the triangles ABB 1 and
MQP are similar. It follows that AM and MS are corresponding medians in these triangles.
Hence,
=SMP =B 1 AM =BCA =BT A.
(1)

Since =ACT =P BT and =T AC =T BC =BT P , the triangles T CA and P BT are


similar. Again, as T M and P S are corresponding medians in these triangles, we have
=MT A =T P S =BQP =BMP.

(2)

Now we deal separately with two cases.


Case 1. S does not lie on BM. Since the configuration is symmetric between A and C, we
may assume that S and A lie on the same side with respect to the line BM.
Applying (1) and (2), we get
=BMS =BMP =SMP =MT A =BT A =MT B,
and so ?
the triangles BSM and BMT are similar. We now have BM 2 BS BT BT 2 {2, so
BT 2BM.

Case 2. S lies on BM. It follows from (2) that =BCA =MT A =BQP =BMP
(see Figure 2). Thus, P Q?k AC and P M k AT . Hence, BS{BM BP {BA BM{BT , so
BT 2 2BM 2 and BT 2BM.
B

B
Q
S
S
P
P
M
M

C
P

Figure 1

T
Figure 2

Shortlisted problems solutions

49

Comment 1. Here is another way to show that the triangles BSM and BM T are similar. Denote
by the circumcircle of the triangle ABC. Let R be the second point of intersection of and , and
let be the spiral similarity centered at R mapping to . Then, one may show that maps each
point X on to a point Y on such that B, X, and Y are collinear (see Figure 3). If we let K and L
be the second points of intersection of BM with and of BT with , respectively, then it follows that
the triangle M KT is the image of SM L under . We now obtain =BSM =T M B, which implies
the desired result.

P
S

M
M

Q
Q
C

M
M

L
Y
T
K
Figure 3

Figure 4

Solution 2. Again, we denote by the circumcircle of the triangle ABC.


Choose the points X and Y on the rays BA and BC respectively, so that =MXB =MBC
and =BY M =ABM (see Figure 4). Then the triangles BMX and Y MB are similar. Since
=XP M =BQM, the points P and Q correspond to each other in these triangles. So, if

BP BX, then BQ p1 q BY . Thus

BT BP ` BQ BY ` pBX BY q BY ` Y X,

which means that T lies on the line XY .


Let B 1 B be the point on the ray BM such that BM MB 1 . Then =MB 1 A
=MBC =MXB and =CB 1 M =ABM =BY M. This means that the triangles BMX,
BAB 1 , Y MB, and B 1 CB are all similar; hence BA BX BM BB 1 BC BY . Thus
there exists an inversion centered at B which swaps A with X, M with B 1 , and C with Y .
This inversion then swaps with the line
? XY , and hence it preserves T . Therefore, we have
BT 2 BM BB 1 2BM 2 , and BT 2BM.
Solution 3. We begin with the following lemma.
Lemma. Let ABCT be a cyclic quadrilateral. Let P and Q be points on the sides BA and BC
respectively, such that BP T Q is a parallelogram. Then BP BA ` BQ BC BT 2 .
Proof. Let the circumcircle of the triangle QT C meet the line BT again at J (see Figure 5).
The power of B with respect to this circle yields
BQ BC BJ BT.

(3)

50

IMO 2015 Thailand

We also have =T JQ 1800 =QCT =T AB and =QT J =ABT , and so the triangles
T JQ and BAT are similar. We now have T J{T Q BA{BT . Therefore,
T J BT T Q BA BP BA.

(4)

Combining (3) and (4) now yields the desired result.


l
Let X and Y be the midpoints of BA and BC respectively (see Figure 6). Applying the
lemma to the cyclic quadrilaterals P BQM and ABCT , we obtain
BX BP ` BY BQ BM 2
and
BP BA ` BQ BC BT 2 .

Since BA 2BX and BC 2BY , we have BT 2 2BM 2 , and so BT

?
2BM.

B
B

Q
P

P
P

T
Figure 5

M
M

T
Figure 6

Comment 2. Here we give another proof of the lemma using Ptolemys theorem. We readily have
T C BA ` T A BC AC BT.
The lemma now follows from

BQ
BT
sin =BCT
BP

.
TC
TA
AC
sin =ABC

Shortlisted problems solutions

51

G5.

Let ABC be a triangle with CA CB. Let D, F , and G be the midpoints of the
sides AB, AC, and BC, respectively. A circle passing through C and tangent to AB at D
meets the segments AF and BG at H and I, respectively. The points H 1 and I 1 are symmetric
to H and I about F and G, respectively. The line H 1 I 1 meets CD and F G at Q and M,
respectively. The line CM meets again at P . Prove that CQ QP .
(El Salvador)
Solution 1. We may assume that CA CB. Observe that H 1 and I 1 lie inside the segments
CF and CG, respectively. Therefore, M lies outside ABC (see Figure 1).
Due to the powers of points A and B with respect to the circle , we have
CH 1 CA AH AC AD 2 BD 2 BI BC CI 1 CB.
Therefore, CH 1 CF CI 1 CG. Hence, the quadrilateral H 1 I 1 GF is cyclic, and so =I 1 H 1 C
=CGF .
Let DF and DG meet again at R and S, respectively. We claim that the points R and S
lie on the line H 1 I 1 .
Observe that F H 1 F A F H F C F RF D. Thus, the quadrilateral ADH 1 R is cyclic, and
hence =RH 1 F =F DA =CGF =I 1 H 1 C. Therefore, the points R, H 1 , and I 1 are collinear.
Similarly, the points S, H 1 , and I 1 are also collinear, and so all the points R, H 1 , Q, I 1, S, and M
are all collinear.
R

H
H

H
H

H
H

Q
Q
II

F
F

G
G

P
P

Q
Q

S
S

II
F
F

G
G

II

II

H
A

H
D

Figure 1

B
A

D
Figure 2

Then, =RSD =RDA =DF G. Hence, the quadrilateral RSGF is cyclic (see Figure 2).
Therefore, MH 1 MI 1 MF MG MR MS MP MC. Thus, the quadrilateral CP I 1H 1
is also cyclic. Let be its circumcircle.
Notice that =H 1 CQ =SDC =SRC and =QCI 1 =CDR =CSR. Hence,
CH 1 Q RCQ and CI 1 Q SCQ, and therefore QH 1 QR QC 2 QI 1 QS.
We apply the inversion with center Q and radius QC. Observe that the points R, C, and S
are mapped to H 1 , C, and I 1 , respectively. Therefore, the circumcircle of RCS is mapped
to the circumcircle of H 1CI 1 . Since P and C belong to both circles and the point C is
preserved by the inversion, we have that P is also mapped to itself. We then get QP 2 QC 2 .
Hence, QP QC.
Comment 1. The problem statement still holds when intersects the sides CA and CB outside
segments AF and BG, respectively.

52

IMO 2015 Thailand

Solution 2. Let X HI X AB, and let the tangent to at C meet AB at Y . Let XC


meet again at X 1 (see Figure 3). Projecting from C, X, and C again, we have pX, A; D, Bq
pX 1 , H; D, Iq pC, I; D, Hq pY, B; D, Aq. Since A and B are symmetric about D, it follows
that X and Y are also symmetric about D.
Now, Menelaus theorem applied to ABC with the line HIX yields
1

AH 1 CI 1 BY
CH BI AX

1 1
.
HA IC XB
H C I B YA

By the converse of Menelaus theorem applied to ABC with points H 1 , I 1 , Y , we get that
the points H 1 , I 1 , Y are collinear.
C
H
H
II
X
X

F
F

G
G
II

H
H
A

M
M

D
Figure 3

Let T be the midpoint of CD, and let O be the center of . Let CM meet T Y at N. To
avoid confusion, we clean some superfluous details out of the picture (see Figure 4).
Let V MT X CY . Since MT k Y D and DT T C, we get CV V Y . Then Cevas
theorem applied to CT Y with the point M yields
1

TQ Y N
T Q CV Y N

.
QC V Y NT
QC NT

TQ
TN
Therefore, QC
N
. So, NQ k CY , and thus NQ K OC.
Y
Note that the points O, N, T , and Y are collinear. Therefore, CQ K ON. So, Q is the
orthocenter of OCN, and hence OQ K CP . Thus, Q lies on the perpendicular bisector
of CP , and therefore CQ QP , as required.

C
Q
Q
O

TT

P
P
M
M

N
Y

Figure 4

Shortlisted problems solutions

53

Comment 2. The second part of Solution 2 provides a proof of the following more general statement,
which does not involve a specific choice of Q on CD.
Let Y C and Y D be two tangents to a circle with center O (see Figure 4). Let be the midline
of Y CD parallel to Y D. Let Q and M be two points on CD and , respectively, such that the
line QM passes through Y . Then OQ K CM .

54

IMO 2015 Thailand

G6. Let ABC be an acute triangle with AB AC, and let be its circumcircle. Let H,

M, and F be the orthocenter of the triangle, the midpoint of BC, and the foot of the altitude
from A, respectively. Let Q and K be the two points on that satisfy =AQH 900 and
=QKH 900 . Prove that the circumcircles of the triangles KQH and KF M are tangent to
each other.
(Ukraine)
Solution 1. Let A1 be the point diametrically opposite to A on . Since =AQA1 900 and
=AQH 900 , the points Q, H, and A1 are collinear. Similarly, if Q1 denotes the point on
diametrically opposite to Q, then K, H, and Q1 are collinear. Let the line AHF intersect
again at E; it is known that M is the midpoint of the segment HA1 and that F is the midpoint
of HE. Let J be the midpoint of HQ1 .
Consider any point T such that T K is tangent to the circle KQH at K with Q and T
lying on different sides of KH (see Figure 1). Then =HKT =HQK and we are to prove
that =MKT =CF K. Thus it remains to show that =HQK =CF K ` =HKM . Due
to =HQK 900 =Q1 HA1 and =CF K 900 =KF A, this means the same as =Q1 HA1
=KF A =HKM . Now, since the triangles KHE and AHQ1 are similar with F and J being
the midpoints of corresponding sides, we have =KF A =HJA, and analogously one may
obtain =HKM =JQH. Thereby our task is reduced to verifying
=Q1 HA1 =HJA =JQH .
A
Q

H
J
B

M F

Q
A

Figure 1

Figure 2

To avoid confusion, let us draw a new picture at this moment (see Figure 2). Owing to
=Q1 HA1 =JQH ` =HJQ and =HJA =QJA ` =HJQ, we just have to show that
2 =JQH =QJA. To this end, it suffices to remark that AQA1 Q1 is a rectangle and that J,
being defined to be the midpoint of HQ1 , has to lie on the mid parallel of QA1 and Q1 A.
Solution 2. We define the points A1 and E and prove that the ray MH passes through Q
in the same way as in the first solution. Notice that the points A1 and E can play analogous
roles to the points Q and K, respectively: point A1 is the second intersection of the line MH
with , and E is the point on with the property =HEA1 900 (see Figure 3).
In the circles KQH and EA1 H, the line segments HQ and HA1 are diameters, respectively;
so, these circles have a common tangent t at H, perpendicular to MH. Let R be the radical
center of the circles ABC, KQH and EA1 H. Their pairwise radical axes are the lines QK,
A1 E and the line t; they all pass through R. Let S be the midpoint of HR; by =QKH

Shortlisted problems solutions

55

K
H

C
B

M
A

S
t
R

Figure 3

=HEA1 900 , the quadrilateral HERK is cyclic and its circumcenter is S; hence we have
SK SE SH. The line BC, being the perpendicular bisector of HE, passes through S.
The circle HMF also is tangent to t at H; from the power of S with respect to the circle
HMF we have
SM SF SH 2 SK 2 .

So, the power of S with respect to the circles KQH and KF M is SK 2 . Therefore, the line
segment SK is tangent to both circles at K.

56

IMO 2015 Thailand

G7. Let ABCD be a convex quadrilateral, and let P , Q, R, and S be points on the sides
AB, BC, CD, and DA, respectively. Let the line segments P R and QS meet at O. Suppose
that each of the quadrilaterals AP OS, BQOP , CROQ, and DSOR has an incircle. Prove that
the lines AC, P Q, and RS are either concurrent or parallel to each other.
(Bulgaria)
Solution 1. Denote by A , B , C , and D the incircles of the quadrilaterals AP OS, BQOP ,
CROQ, and DSOR, respectively.
We start with proving that the quadrilateral ABCD also has an incircle which will be
referred to as . Denote the points of tangency as in Figure 1. It is well-known that QQ1 OO1
(if BC k P R, this is obvious; otherwise, one may regard the two circles involved as the incircle
and an excircle of the triangle formed by the lines OQ, P R, and BC). Similarly, OO1 P P1 .
Hence we have QQ1 P P1 . The other equalities of segment lengths marked in Figure 1 can
be proved analogously. These equalities, together with AP1 AS1 and similar ones, yield
AB ` CD AD ` BC, as required.
B
P1
A

Q Q1
C

B
O1

O
O

S1
S

D
R

Figure 1
Next, let us draw the lines parallel to QS through P and R, and also draw the lines parallel
to P R through Q and S. These lines form a parallelogram; denote its vertices by A1 , B 1 , C 1 ,
and D 1 as shown in Figure 2.
Since the quadrilateral AP OS has an incircle, we have AP AS OP OS A1 S A1 P .
It is well-known that in this case there also exists a circle A tangent to the four rays AP ,
AS, A1 P , and A1 S. It is worth mentioning here that in case when, say, the lines AB and A1 B 1
coincide, the circle A is just tangent to AB at P . We introduce the circles B , C , and D in
a similar manner.
Assume that the radii of the circles A and C are different. Let X be the center of the
homothety having a positive scale factor and mapping A to C .
Now, Monges theorem applied to the circles A , , and C shows that the points A, C,
and X are collinear. Applying the same theorem to the circles A , B , and C , we see that
the points P , Q, and X are also collinear. Similarly, the points R, S, and X are collinear, as
required.
If the radii of A and C are equal but these circles do not coincide, then the degenerate
version of the same theorem yields that the three lines AC, P Q, and RS are parallel to the
line of centers of A and C .
Finally, we need to say a few words about the case when A and C coincide (and thus they
also coincide with , B , and D ). It may be regarded as the limit case in the following manner.

Shortlisted problems solutions

57

B
B
P
P
Q
Q

A
A
A
A

C
C

O
O

C
C

X
A

R
R

D
D
Figure 2

Let us fix the positions of A, P , O, and S (thus we also fix the circles A , A , B , and D ). Now
we vary the circle C inscribed into =QOR; for each of its positions, one may reconstruct the
lines BC and CD as the external common tangents to B , C and C , D different from P R
and QS, respectively. After such variation, the circle changes, so the result obtained above
may be applied.
Solution 2. Applying Menelaus theorem to ABC with the line P Q and to ACD with
the line RS, we see that the line AC meets P Q and RS at the same point (possibly at infinity)
if and only if
AP BQ CR DS

1.
P B QC RD SA

(1)

So, it suffices to prove (1).


We start with the following result.
Lemma 1. Let EF GH be a circumscribed quadrilateral, and let M be its incenter. Then
F M2
EF F G

.
GH HE
HM 2
Proof. Notice that =EMH ` =GMF =F ME ` =HMG 1800 , =F GM =MGH, and
=HEM =MEF (see Figure 3). By the law of sines, we get
EF F G
sin =F ME sin =GMF
sin =HMG sin =EMH
GH HE

.
FM FM
sin =MEF sin =F GM
sin =MGH sin =HEM
HM HM

58

IMO 2015 Thailand


B

II

K C
K

O
O

L
D

Figure 3

Figure 4

We denote by I, J, K, and L the incenters of the quadrilaterals AP OS, BQOP , CROQ,


and DSOR, respectively. Applying Lemma 1 to these four quadrilaterals we get
AP P O BQ QO CR RO DS SO
P I 2 QJ 2 RK 2 SL2

,
OS SA OP P B OQ QC OR RD
SI 2 P J 2 QK 2 RL2
which reduces to
P I 2 QJ 2 RK 2 SL2
AP BQ CR DS

.
P B QC RD SA
P J 2 QK 2 RL2 SI 2

(2)

Next, we have =IP J =JOI 900 , and the line OP separates I and J (see Figure 4).
This means that the quadrilateral IP JO is cyclic. Similarly, we get that the quadrilateral
JQKO is cyclic with =JQK 900 . Thus, =QKJ =QOJ =JOP =JIP . Hence,
PI
QK
the right triangles IP J and KQJ are similar. Therefore,

. Likewise, we obtain
PJ
QJ
SI
RK

. These two equations together with (2) yield (1).


RL
SL
Comment. Instead of using the sine law, one may prove Lemma 1 by the following approach.

F
G
N
M

H
E
Figure 5
Let N be the point such that N HG M EF and such that N and M lie on different sides
of the line GH, as shown in Figure 5. Then =GN H ` =HM G =F M E ` =HM G 1800 . So,

Shortlisted problems solutions

59

the quadrilateral GN HM is cyclic. Thus, =M N H =M GH =F GM and =HM N =HGN


HM HN
M F EM
HM

.
=EF M =M F G. Hence, HM N M F G. Therefore,
HG
HN HG
M G EF
M F GM
HM

. By multiplying these two equations, we complete the proof.


Similarly, we obtain
HE
M E GF

Solution 3. We present another approach for showing (1) from Solution 2.


Lemma 2. Let EF GH and E 1 F 1 G1 H 1 be circumscribed quadrilaterals such that =E ` =E 1
=F ` =F 1 =G ` =G1 =H ` =H 1 1800 . Then
EF GH
E 1 F 1 G1 H 1
1 1
.
F G HE
F G H 1E 1
Proof. Let M and M 1 be the incenters of EF GH and E 1 F 1 G1 H 1 , respectively. We use the
notation rXY Zs for the area of a triangle XY Z.
Taking into account the relation =F ME ` =F 1 M 1 E 1 1800 together with the analogous
ones, we get
EF GH
rMEF s rMGHs
ME MF sin =F ME MG MH sin =HMG

F G HE
rMF Gs rMHEs
MF MG sin =GMF MH ME sin =EMH
1 1
1 1
E 1 F 1 G1 H 1
M E M F sin =F 1 M 1 E 1 M 1 G1 M 1 H 1 sin =H 1 M 1 G1

.
1 1
M F M 1 G1 sin =G1 M 1 F 1 M 1 H 1 M 1 E 1 sin =E 1 M 1 H 1
F 1 G1 H 1 E 1

R
P =
=P
P
P
Q
Q

B
B
C
C

A
A =
=A
A

O =
=O
O
O

A
A
A =
=A
D
D
S =
=S
S
S
Q

Figure 6
Denote by h the homothety centered at O that maps the incircle of CROQ to the incircle
of AP OS. Let Q1 hpQq, C 1 hpCq, R1 hpRq, O 1 O, S 1 S, A1 A, and P 1 P .
Furthermore, define B 1 A1 P 1 X C 1 Q1 and D 1 A1 S 1 X C 1 R1 as shown in Figure 6. Then
AP OS
A1 P 1 O 1S 1
1 1 1 1
P O SA
P O S A
holds trivially. We also have

C 1 R1 O 1 Q1
CR OQ
1 1
RO QC
R O Q1 C 1

by the similarity of the quadrilaterals CROQ and C 1 R1 O 1 Q1 .

60

IMO 2015 Thailand

Next, consider the circumscribed quadrilaterals BQOP and B 1 Q1 O 1P 1 whose incenters lie
on different sides of the quadrilaterals shared side line OP O 1 P 1. Observe that BQ k B 1 Q1
and that B 1 and Q1 lie on the lines BP and QO, respectively. It is now easy to see that the
two quadrilaterals satisfy the hypotheses of Lemma 2. Thus, we deduce
B 1 Q1 O 1 P 1
BQ OP
1 1
.
QO P B
Q O P 1B 1
Similarly, we get

DS OR
D 1 S 1 O 1 R1
1 1
.
SO RD
S O R1 D 1
Multiplying these four equations, we obtain
A1 P 1 B 1 Q1 C 1 R1 D 1 S 1
AP BQ CR DS

1 1 1 1 1 1 1 1.
P B QC RD SA
P B QC RD SA

(3)

Finally, we apply Brianchons theorem to the circumscribed hexagon A1 P 1 R1 C 1 Q1 S 1 and


deduce that the lines A1 C 1 , P 1 Q1 , and R1 S 1 are either concurrent or parallel to each other. So,
by Menelaus theorem, we obtain
A1 P 1 B 1 Q1 C 1 R1 D 1 S 1

1.
P 1 B 1 Q1 C 1 R1 D 1 S 1 A1
This equation together with (3) yield (1).

Shortlisted problems solutions

61

G8. A triangulation of a convex polygon is a partitioning of into triangles by diagonals


having no common points other than the vertices of the polygon. We say that a triangulation
is a Thaiangulation if all triangles in it have the same area.
Prove that any two different Thaiangulations of a convex polygon differ by exactly two
triangles. (In other words, prove that it is possible to replace one pair of triangles in the first
Thaiangulation with a different pair of triangles so as to obtain the second Thaiangulation.)
(Bulgaria)
Solution 1. We denote by rSs the area of a polygon S.

Recall that each triangulation of a convex n-gon has exactly n 2 triangles. This means
that all triangles in any two Thaiangulations of a convex polygon have the same area.
Let T be a triangulation of a convex polygon . If four vertices A, B, C, and D of
form a parallelogram, and T contains two triangles whose union is this parallelogram, then we
say that T contains parallelogram ABCD. Notice here that if two Thaiangulations T1 and T2
of differ by two triangles, then the union of these triangles is a quadrilateral each of whose
diagonals bisects its area, i.e., a parallelogram.
We start with proving two properties of triangulations.
Lemma 1. A triangulation of a convex polygon cannot contain two parallelograms.
Proof. Arguing indirectly, assume that P1 and P2 are two parallelograms contained in some
triangulation T . If they have a common triangle in T , then we may assume that P1 consists of
triangles ABC and ADC of T , while P2 consists of triangles ADC and CDE (see Figure 1).
But then BC k AD k CE, so the three vertices B, C, and E of are collinear, which is absurd.
Assume now that P1 and P2 contain no common triangle. Let P1 ABCD. The sides AB,
BC, CD, and DA partition into several parts, and P2 is contained in one of them; we may
assume that this part is cut off from P1 by AD. Then one may label the vertices of P2 by X,
Y , Z, and T so that the polygon ABCDXY ZT is convex (see Figure 2; it may happen that
D X and/or T A, but still this polygon has at least six vertices). But the sum of the
external angles of this polygon at B, C, Y , and Z is already 3600 , which is impossible. A final
contradiction.
l
E

Z
D

C
C

A
A
B

Figure 1

A
T
Figure 2

Y
Figure 3

Lemma 2. Every triangle in a Thaiangulation T of contains a side of .


Proof. Let ABC be a triangle in T . Apply an affine transform such that ABC maps to an
equilateral triangle; let A1 B 1 C 1 be the image of this triangle, and 1 be the image of . Clearly,
T maps into a Thaiangulation T 1 of 1 .
Assume that none of the sides of A1 B 1 C 1 is a side of 1 . Then T 1 contains some other
triangles with these sides, say, A1 B 1 Z, C 1 A1 Y , and B 1 C 1 X; notice that A1 ZB 1 XC 1 Y is a convex
hexagon (see Figure 3). The sum of its external angles at X, Y , and Z is less than 3600 . So one
of these angles (say, at Z) is less than 1200 , hence =A1 ZB 1 600 . Then Z lies on a circular arc
subtended by A1 B 1 and ?
having angular measure less than 2400 ; consequently, the altitude ZH
1 1
of A B Z is less than 3 A1 B 1 {2. Thus rA1 B 1 Zs rA1 B 1 C 1 s, and T 1 is not a Thaiangulation.
A contradiction.
l

62

IMO 2015 Thailand

Now we pass to the solution. We say that a triangle in a triangulation of is an ear if it


contains two sides of . Note that each triangulation of a polygon contains some ear.
Arguing indirectly, we choose a convex polygon with the least possible number of sides
such that some two Thaiangulations T1 and T2 of violate the problem statement (thus has
at least five sides). Consider now any ear ABC in T1 , with AC being a diagonal of . If T2
also contains ABC, then one may cut ABC off from , getting a polygon with a smaller
number of sides which also violates the problem statement. This is impossible; thus T2 does
not contain ABC.
Next, T1 contains also another triangle with side AC, say ACD. By Lemma 2, this
triangle contains a side of , so D is adjacent to either A or C on the boundary of . We may
assume that D is adjacent to C.
Assume that T2 does not contain the triangle BCD. Then it contains two different triangles BCX and CDY (possibly, with X Y ); since these triangles have no common interior
points, the polygon ABCDY X is convex (see Figure 4). But, since rABCs rBCXs
rACDs rCDY s, we get AX k BC and AY k CD which is impossible. Thus T2 contains BCD.
Therefore, rABDs rABCs ` rACDs rBCDs rABCs, and ABCD is a parallelogram
contained in T1 . Let T 1 be the Thaiangulation of obtained from T1 by replacing the diagonal AC with BD; then T 1 is distinct from T2 (otherwise T1 and T2 would differ by two triangles).
Moreover, T 1 shares a common ear BCD with T2 . As above, cutting this ear away we obtain
that T2 and T 1 differ by two triangles forming a parallelogram different from ABCD. Thus T 1
contains two parallelograms, which contradicts Lemma 1.
A

X
Y
Y

D
B

C
T1

YY
C

D
B

Figure 4

C
T2

X
X
X

Z
Z

B
Figure 5

sDebrunner inequality stating that


Comment 1. Lemma 2 is equivalent to the well-known Erdo
for any triangle P QR and any points A, B, C lying on the sides QR, RP , and P Q, respectively, we
have
(
rABCs min rABRs, rBCP s, rCAQs .
(1)

To derive this inequality from Lemma 2, one may assume that (1) does not hold, and choose
some points X, Y , and Z inside the triangles BCP , CAQ, and ABR, respectively, so that rABCs
rABZs rBCXs rCAY s. Then a convex hexagon AZBXCY has a Thaiangulation containing ABC, which contradicts Lemma 2.
Conversely, assume that a Thaiangulation T of contains a triangle ABC none of whose sides
is a side of , and let ABZ, AY C, and XBC be other triangles in T containing the corresponding
sides. Then AZBXCY is a convex hexagon.
Consider the lines through A, B, and C parallel to Y Z, ZX, and XY , respectively. They form a
triangle X 1 Y 1 Z 1 similar to XY Z (see Figure 5). By (1) we have
(
(
rABCs min rABZ 1 s, rBCX 1 s, rCAY 1 s min rABZs, rBCXs, rCAY s ,
so T is not a Thaiangulation.

Shortlisted problems solutions

63

Solution 2. We will make use of the preliminary observations from Solution 1, together with
Lemma 1.
Arguing indirectly, we choose a convex polygon with the least possible number of sides
such that some two Thaiangulations T1 and T2 of violate the statement (thus has at least
five sides). Assume that T1 and T2 share a diagonal d splitting into two smaller polygons 1
and 2 . Since the problem statement holds for any of them, the induced Thaiangulations of
each of i differ by two triangles forming a parallelogram (the Thaiangulations induced on i
by T1 and T2 may not coincide, otherwise T1 and T2 would differ by at most two triangles). But
both these parallelograms are contained in T1 ; this contradicts Lemma 1. Therefore, T1 and T2
share no diagonal. Hence they also share no triangle.
We consider two cases.
Case 1. Assume that some vertex B of is an endpoint of some diagonal in T1 , as well as an
endpoint of some diagonal in T2 .

Let A and C be the vertices of adjacent to B. Then T1 contains some triangles ABX
and BCY , while T2 contains some triangles ABX 1 and BCY 1 . Here, some of the points X,
X 1 , Y , and Y 1 may coincide; however, in view of our assumption together with the fact that T1
and T2 share no triangle, all four triangles ABX, BCY , ABX 1 , and BCY 1 are distinct.
Since rABXs rBCY s rABX 1 s rBCY 1 s, we have XX 1 k AB and Y Y 1 k BC. Now,
if X Y , then X 1 and Y 1 lie on different lines passing through X and are distinct from that
point, so that X 1 Y 1 . In this case, we may switch the two Thaiangulations. So, hereafter we
assume that X Y .

In the convex pentagon ABCY X we have either =BAX ` =AXY 1800 or =XY C `
=Y CB 1800 (or both); due to the symmetry, we may assume that the first inequality holds.

Let r be the ray emerging from X and co-directed with AB; our inequality shows that r points
to the interior of the pentagon (and thus to the interior of ). Therefore, the ray opposite to r
points outside , so X 1 lies on r; moreover, X 1 lies on the arc CY of not containing X.
So the segments XX 1 and Y B intersect (see Figure 6).
Let O be the intersection point of the rays r and BC. Since the triangles ABX 1 and BCY 1
have no common interior points, Y 1 must lie on the arc CX 1 which is situated inside the
triangle XBO. Therefore, the line Y Y 1 meets two sides of XBO, none of which may be XB
(otherwise the diagonals XB and Y Y 1 would share a common point). Thus Y Y 1 intersects BO,
which contradicts Y Y 1 k BC.
X

X
r
YY
A

C
B

Figure 6
Case 2. In the remaining case, each vertex of is an endpoint of a diagonal in at most one
of T1 and T2 . On the other hand, a triangulation cannot contain two consecutive vertices with
no diagonals from each. Therefore, the vertices of alternatingly emerge diagonals in T1 and
in T2 . In particular, has an even number of sides.

64

IMO 2015 Thailand


Next, we may choose five consecutive vertices A, B, C, D, and E of in such a way that
=ABC ` =BCD 1800

and =BCD ` =CDE 1800 .

(2)

In order to do this, it suffices to choose three consecutive vertices B, C, and D of such that
the sum of their external angles is at most 1800 . This is possible, since has at least six sides.
E

A
Z

C
Figure 7

We may assume that T1 has no diagonals from B and D (and thus contains the triangles ABC and CDE), while T2 has no diagonals from A, C, and E (and thus contains the
triangle BCD). Now, since rABCs rBCDs rCDEs, we have AD k BC and BE k CD
(see Figure 7). By (2) this yields that AD BC and BE CD. Let X AC X BD and
Y CE X BD; then the inequalities above imply that AX CX and EY CY .
Finally, T2 must also contain some triangle BDZ with Z C; then the ray CZ lies in
the angle ACE. Since rBCDs rBDZs, the diagonal BD bisects CZ. Together with the
inequalities above, this yields that Z lies inside the triangle ACE (but Z is distinct from A
and E), which is impossible. The final contradiction.
Comment 2. Case 2 may also be accomplished with the use of Lemma 2. Indeed, since each
triangulation of an n-gon contains n 2 triangles neither of which may contain three sides of ,
Lemma 2 yields that each Thaiangulation contains exactly two ears. But each vertex of is a vertex
of an ear either in T1 or in T2 , so cannot have more than four vertices.

Shortlisted problems solutions

65

Number Theory
N1.
a0

Determine all positive integers M for which the sequence a0 , a1 , a2 , . . ., defined by


and ak`1 ak tak u for k 0, 1, 2, . . ., contains at least one integer term.
(Luxembourg)

2M `1
2

Answer. All integers M 2.

Solution 1. Define bk 2ak for all k 0. Then


bk`1 2ak`1 2ak tak u bk

^
bk
.
2

Since b0 is an integer, it follows that bk is an integer for all k 0.


Suppose that the sequence a0 , a1 , a2 , . . . does not contain any integer term. Then bk must
be an odd integer for all k 0, so that
Z ^
bk
bk pbk 1q
bk`1 bk

.
(1)
2
2
Hence
bk`1 3

bk pbk 1q
pbk 3qpbk ` 2q
3
2
2

(2)

for all k 0.
Suppose that b0 3 0. Then equation (2) yields bk 3 0 for all k 0. For each k 0,
define ck to be the highest power of 2 that divides bk 3. Since bk 3 is even for all k 0, the
number ck is positive for every k 0.
Note that bk ` 2 is an odd integer. Therefore, from equation (2), we have that ck`1 ck 1.
Thus, the sequence c0 , c1 , c2 , . . . of positive integers is strictly decreasing, a contradiction. So,
b0 3 0, which implies M 1.
For M 1, we can check that the sequence is constant with ak 23 for all k 0. Therefore,
the answer is M 2.
Solution 2. We provide an alternative way to show M 1 once equation (1) has been
reached. We claim that bk 3 pmod 2m q for all k 0 and m 1. If this is true, then we
would have bk 3 for all k 0 and hence M 1.
To establish our claim, we proceed by induction on m. The base case bk 3 pmod 2q is
true for all k 0 since bk is odd. Now suppose that bk 3 pmod 2m q for all k 0. Hence
bk 2m dk ` 3 for some integer dk . We have
3 bk`1 p2m dk ` 3qp2m1 dk ` 1q 3 2m1 dk ` 3

pmod 2m q,

so that dk must be even. This implies that bk 3 pmod 2m`1 q, as required.


Comment. The reason the number 3 which appears in both solutions is important, is that it is a
nontrivial fixed point of the recurrence relation for bk .

66

IMO 2015 Thailand

N2.

Let a and b be positive integers such that a!b! is a multiple of a! ` b!. Prove that
3a 2b ` 2.
(United Kingdom)

Solution 1. If a b, we immediately get 3a 2b ` 2. In the case a b, the required


inequality is equivalent to a 2, which can be checked easily since pa, bq p1, 1q does not
satisfy a! ` b! | a!b!. We now assume a b and denote c b a. The required inequality
becomes a 2c ` 2.
b!
pa ` 1qpa ` 2q pa ` cq. Since
Suppose, to the contrary, that a 2c ` 1. Define M a!
a! ` b! | a!b! implies 1 ` M | a!M, we obtain 1 ` M | a!. Note that we must have c a; otherwise
1 ` M a!, which is impossible. We observe that c! | M since M is a product of c consecutive
integers. Thus gcdp1 ` M, c!q 1, which implies

a!
1 ` M
pc ` 1qpc ` 2q a.
(1)
c!
If a 2c, then a!
is a product of a c c integers not exceeding a whereas M is a product of
c!
c integers exceeding a. Therefore, 1 ` M a!
, which is a contradiction.
c!
It remains to exclude the case a 2c ` 1. Since a ` 1 2pc ` 1q, we have c ` 1 | M. Hence,
we can deduce from (1) that 1 ` M | pc ` 2qpc ` 3q a. Now pc ` 2qpc ` 3q a is a product
of a c 1 c integers not exceeding a; thus it is smaller than 1 ` M. Again, we arrive at a
contradiction.
Comment 1. One may derive
X a \version of (1) and finish the problem as follows. After
X a \ a weaker
assuming a 2c ` 1, we have 2 c, so 2 ! | M . Therefore,
Y ]
Y a ]

a
`1
` 2 a.
1 ` M
2
2
`X \
`X a \

PaT
Observe that a2 ` 1
2 ` 2 P aT is a product of 2 integers not exceeding a. This leads to a
contradiction when a is even since a2 a2 c and M is` a product
a.
` a`5 of c integersX aexceeding
\
a`1
a`3
a ` 1.

a
since
`
1

When
a
is
odd,
we
can
further
deduce
that
1
`
M
|
2
2
2
2
`
` a`5
a1
Now a`3

c
numbers
not
exceeding
a,
and
we
get
a
contradiction.

a
is
a
product
of
2
2
2

Solution 2. As in Solution 1, we may assume that a b and let c b a. Suppose, to the


contrary, that a 2c ` 1. From a! ` b! | a!b!, we have

N 1 ` pa ` 1qpa ` 2q pa ` cq pa ` cq!,

which implies that all prime factors of N are at most a ` c.


Let p be a prime factor of N. If p c or p a ` 1, then p divides one of a ` 1, . . . , a ` c
which is impossible. Hence a p c ` 1. Furthermore, we must have 2p a ` `c; otherwise,

, a , and
a ` 1 2c ` 2 2p a ` c so p | N 1, again impossible. Thus, we have p P a`c
2
2
p2 pa ` cq! since 2p a ` c. Therefore,
` a`c p N as well.
If a c ` 2, then the interval 2 , a contains at most one integer and hence at most one
prime number, which has to be a. Since p2 N, we must have N p a or N 1, which is
absurd since N a 1. Thus, we have a c ` 3, and so a`c`1
c ` 2. It follows that p lies
2
in the interval rc ` 2, as.
Thus, every prime appearing in the prime factorization of N lies in the interval rc`2, as, and
its exponent is exactly 1. So we must have N | pc ` 2qpc ` 3q a. However, pc ` 2qpc ` 3q a is
a product of a c 1 c numbers not exceeding a, so it is less than N. This is a contradiction.
Comment 2. The original problem statement also asks to determine when the equality 3a 2b ` 2
holds. It can be checked that the answer is pa, bq p2, 2q, p4, 5q.

Shortlisted problems solutions

67

N3. Let m and n be positive integers such that m n. Define xk pm ` kq{pn ` kq for k
1, 2, . . . , n ` 1. Prove that if all the numbers x1 , x2 , . . . , xn`1 are integers, then x1 x2 xn`1 1
is divisible by an odd prime.
(Austria)
Solution. Assume that x1 , x2 , . . . , xn`1 are integers. Define the integers
ak xk 1

mn
m`k
1
0
n`k
n`k

for k 1, 2, . . . , n ` 1.
Let P x1 x2 xn`1 1. We need to prove that P is divisible by an odd prime, or in
other words, that P is not a power of 2. To this end, we investigate the powers of 2 dividing
the numbers ak .
Let 2d be the largest power of 2 dividing m n, and let 2c be the largest power of 2 not
exceeding 2n ` 1. Then 2n ` 1 2c`1 1, and so n ` 1 2c . We conclude that 2c is one of the
numbers n ` 1, n ` 2, . . . , 2n ` 1, and that it is the only multiple of 2c appearing among these
numbers. Let be such that n ` 2c . Since mn
is an integer, we have d c. Therefore,
n`
mn
dc`1
dc`1
2
a n` , while 2
| ak for all k P t1, . . . , n ` 1u z tu.
dc`1
Computing modulo 2
, we get
P pa1 ` 1qpa2 ` 1q pan`1 ` 1q 1 pa ` 1q 1n 1 a 0 pmod 2dc`1 q.
Therefore, 2dc`1 P .
On the other hand, for any k P t1, . . . , n ` 1u z tu, we have 2dc`1 | ak . So P ak 2dc`1 ,
and it follows that P is not a power of 2.
Comment. Instead of attempting to show that P is not a power of 2, one may try to find an odd
factor of P (greater than 1) as follows:
From ak mn
n`k P Z0 , we get that m n is divisible by n ` 1, n ` 2, . . . , 2n ` 1, and thus
it is also divisible by their least common multiple L. So m n qL for some positive integer q;
L
hence xk q n`k
` 1.
L
Then, since n ` 1 2c n ` 2n ` 1 2c`1 1, we have 2c | L, but 2c`1 L. So n`
is odd,
L
while n`k
is even for k . Computing modulo 2q yields
x1 x2 xn`1 1 pq ` 1q 1n 1 q

pmod 2qq.

Thus, x1 x2 xn`1 1 2qr ` q qp2r ` 1q for some integer r.


Since x1 x2 xn`1 1 x1 x2 1 pq ` 1q2 1 q, we have r 1. This implies that
x1 x2 xn`1 1 is divisible by an odd prime.

68

IMO 2015 Thailand

N4.

Suppose that a0 , a1 , . . . and b0 , b1 , . . . are two sequences of positive integers satisfying


a0 , b0 2 and
an`1 gcdpan , bn q ` 1,
bn`1 lcmpan , bn q 1

for all n 0. Prove that the sequence (an ) is eventually periodic; in other words, there exist
integers N 0 and t 0 such that an`t an for all n N.
(France)
Solution 1. Let sn an ` bn . Notice that if an | bn , then an`1 an ` 1, bn`1 bn 1 and
sn`1 sn . So, an increases by 1 and sn does not change until the first index is reached with
an sn . Define
(
Wn m P Z0 : m an and m sn
and wn min Wn .

Claim 1. The sequence pwn q is non-increasing.


Proof. If an | bn then an`1 an ` 1. Due to an | sn , we have an R Wn . Moreover sn`1 sn ;
therefore, Wn`1 Wn and wn`1 wn .
Otherwise, if an bn , then an sn , so an P Wn and thus wn an . We show that an P Wn`1 ;
this implies wn`1 an wn . By the definition of Wn`1 , we need that an an`1 and an sn`1 .
The first relation holds because of gcdpan , bn q an . For the second relation, observe that in
sn`1 gcdpan , bn q ` lcmpan , bn q, the second term is divisible by an , but the first term is not.
So an sn`1 ; that completes the proof of the claim.
l
Let w min wn and let N be an index with w wN . Due to Claim 1, we have wn w for
n
all n N.
Let gn gcdpw, sn q. As we have seen, starting from an arbitrary index n N, the sequence
an , an`1 , . . . increases by 1 until it reaches w, which is the first value not dividing sn ; then it
drops to gcdpw, sn q ` 1 gn ` 1.
Claim 2. The sequence pgn q is constant for n N.
Proof. If an | bn , then sn`1 sn and hence gn`1 gn . Otherwise we have an w,
gcdpan , bn q gcdpan , sn q gcdpw, sn q gn ,

wpsn wq
an bn
gn `
,
sn`1 gcdpan , bn q ` lcmpan , bn q gn `
gn
gn

sn w
and gn`1 gcdpw, sn`1q gcd w, gn `
w gcdpw, gn q gn .
gn

(1)
l

Let g gN . We have proved that the sequence pan q eventually repeats the following cycle:
g ` 1 g ` 2 . . . w g ` 1.
Solution 2. By Claim 1 in the first solution, we have an wn w0 , so the sequence pan q is
bounded, and hence it has only finitely many values.
Let M lcmpa1 , a2 , . . .q, and consider the sequence bn modulo M. Let rn be the remainder
of bn , divided by M. For every index n, since an | M | bn rn , we have gcdpan , bn q gcdpan , rn q,
and therefore
an`1 gcdpan , rn q ` 1.
Moreover,

an
bn 1
gcdpan , bn q
an
an

bn 1
rn 1 pmod Mq.
gcdpan , rn q
gcdpan , rn q

rn`1 bn`1 lcmpan , bn q 1

Shortlisted problems solutions

69

Hence, the pair pan , rn q uniquely determines the pair pan`1 , rn`1 q. Since there are finitely many
possible pairs, the sequence of pairs pan , rn q is eventually periodic; in particular, the sequence
pan q is eventually periodic.
Comment. We show that there are only four possibilities for g and w (as defined in Solution 1),
namely
(
pw, gq P p2, 1q, p3, 1q, p4, 2q, p5, 1q .
(2)

This means that the sequence pan q eventually repeats one of the following cycles:
p2q,

p2, 3q,

p3, 4q,

or

p2, 3, 4, 5q.

(3)

Using the notation of Solution 1, for n N the sequence pan q has a cycle pg ` 1, g ` 2, . . . , wq
such that g gcdpw, sn q. By the observations in the proof of Claim 2, the numbers g ` 1, . . . , w 1 all
divide sn ; so the number L lcmpg ` 1, g ` 2, . . . , w 1q also divides sn . Moreover, g also divides w.
Now choose any n N such that an w. By (1), we have
sn`1 g `

w w2 g 2
wpsn wq
sn
.
g
g
g
2

Since L divides both sn and sn`1 , it also divides the number T w g


.
g
Suppose first that w 6, which yields g ` 1 w2 ` 1 w 2. Then pw 2qpw 1q | L | T , so we
have either w2 g2 2pw 1qpw 2q, or g 1 and w2 g2 pw 1qpw 2q. In the former case we
get pw 1qpw 5q ` pg 2 1q 0 which is false by our assumption. The latter equation rewrites as
3w 3, so w 1, which is also impossible.
Now we are left with the cases when w 5 and g | w. The case pw, gq p4, 1q violates the
2
2
; all other such pairs are listed in (2).
condition L | w g
g
In the table below, for each pair pw, gq, we provide possible sequences pan q and pbn q. That shows
that the cycles shown in (3) are indeed possible.
w
w
w
w

2
3
4
5

g
g
g
g

1
1
2
1

an 2
pa2k , a2k`1 q p2, 3q
pa2k , a2k`1 q p3, 4q
pa4k , . . . , a4k`3 q p2, 3, 4, 5q

bn 2 2n ` 1
pb2k , b2k`1 q p6 3k ` 2, 6 3k ` 1q
pb2k , b2k`1 q p12 2k ` 3, 12 2k ` 2q
pb4k , . . . , b4k`3 q p6 5k ` 4, . . . , 6 5k ` 1q

70

IMO 2015 Thailand

N5. Determine all triples pa, b, cq of positive integers for which ab c, bc a, and ca b are

powers of 2.
Explanation: A power of 2 is an integer of the form 2n , where n denotes some nonnegative
integer.
(Serbia)
Answer. There are sixteen such triples, namely p2, 2, 2q, the three permutations of p2, 2, 3q,
and the six permutations of each of p2, 6, 11q and p3, 5, 7q.
Solution 1. It can easily be verified that these sixteen triples are as required. Now let pa, b, cq
be any triple with the desired property. If we would have a 1, then both b c and c b were
powers of 2, which is impossible since their sum is zero; because of symmetry, this argument
shows a, b, c 2.

Case 1. Among a, b, and c there are at least two equal numbers.


Without loss of generality we may suppose that a b. Then a2 c and apc 1q are powers
of 2. The latter tells us that actually a and c 1 are powers of 2. So there are nonnegative
integers and with a 2 and c 2 ` 1. Since a2 c 22 2 1 is a power of 2 and
thus incongruent to 1 modulo 4, we must have 1. Moreover, each of the terms 22 2
and 22 3 can only be a power of 2 if 1. It follows that the triple pa, b, cq is either p2, 2, 2q
or p2, 2, 3q.
Case 2. The numbers a, b, and c are distinct.
Due to symmetry we may suppose that

2 a b c.

(1)

We are to prove that the triple pa, b, cq is either p2, 6, 11q or p3, 5, 7q. By our hypothesis, there
exist three nonnegative integers , , and such that
bc a 2 ,

and

ac b 2 ,
ab c 2 .

(2)
(3)
(4)

Evidently we have
.

(5)

Depending on how large a is, we divide the argument into two further cases.
Case 2.1. a 2.
We first prove that 0. Assume for the sake of contradiction that 0. Then c is even
by (4) and, similarly, b is even by (5) and (3). So the left-hand side of (2) is congruent to 2
modulo 4, which is only possible if bc 4. As this contradicts (1), we have thereby shown that
0, i.e., that c 2b 1.
Now (3) yields 3b 2 2 . Due to b 2 this is only possible if 4. If 4, then we
get b 6 and c 2 6 1 11, which is a solution. It remains to deal with the case 5.
Now (2) implies
9 2 9bp2b 1q 18 p3b 2qp6b ` 1q 16 2 p2`1 ` 5q 16 ,
and by 5 the right-hand side is not divisible by 32. Thus 4 and we get a contradiction
to (5).

Shortlisted problems solutions

71

Case 2.2. a 3.
Pick an integer P t1, `1u such that c is not divisible by 4. Now
2 ` 2 pbc a2 q ` pca bq pb ` aqpc q
is divisible by 2 and, consequently, b`a is divisible by 21 . On the other hand, 2 acb
pa 1qc 2c implies in view of (1) that a and b are smaller than 21 . All this is only possible
if 1 and a ` b 21 . Now (3) yields
ac b 2pa ` bq ,

(6)

whence 4b a ` 3b apc 1q ab, which in turn yields a 3.


So (6) simplifies to c b ` 2 and (2) tells us that bpb ` 2q 3 pb 1qpb ` 3q is a power
of 2. Consequently, the factors b 1 and b ` 3 are powers of 2 themselves. Since their difference
is 4, this is only possible if b 5 and thus c 7. Thereby the solution is complete.
Solution 2. As in the beginning of the first solution, we observe that a, b, c 2. Depending
on the parities of a, b, and c we distinguish three cases.
Case 1. The numbers a, b, and c are even.
Let 2A , 2B , and 2C be the largest powers of 2 dividing a, b, and c respectively. We may assume
without loss of generality that 1 A B C. Now 2B is the highest power of 2 dividing
ac b, whence ac b 2B b. Similarly, we deduce bc a 2A a. Adding both estimates
we get pa ` bqc 2pa ` bq, whence c 2. So c 2 and thus A B C 1; moreover, we
must have had equality throughout, i.e., a 2A 2 and b 2B 2. We have thereby found
the solution pa, b, cq p2, 2, 2q.
Case 2. The numbers a, b, and c are odd.
If any two of these numbers are equal, say a b, then ac b apc 1q has a nontrivial odd
divisor and cannot be a power of 2. Hence a, b, and c are distinct. So we may assume without
loss of generality that a b c.
Let and denote the nonnegative integers for which bc a 2 and ac b 2 hold.
Clearly, we have , and thus 2 divides
a 2 b 2 apbc aq bpac bq b2 a2 pb ` aqpb aq .
Since a is odd, it is not possible that both factors b`a and ba are divisible by 4. Consequently,
one of them has to be a multiple of 21 . Hence one of the numbers 2pb ` aq and 2pb aq is
divisible by 2 and in either case we have
ac b 2 2pa ` bq .

(7)

This in turn yields pa 1qb ac b 4b and thus a 3 (recall that a is odd and larger
than 1). Substituting this back into (7) we learn c b ` 2. But due to the parity b c entails
that b ` 2 c holds as well. So we get c b ` 2 and from bc a pb 1qpb ` 3q being a power
of 2 it follows that b 5 and c 7.

Case 3. Among a, b, and c both parities occur.


Without loss of generality, we suppose that c is odd and that a b. We are to show that
pa, b, cq is either p2, 2, 3q or p2, 6, 11q. As at least one of a and b is even, the expression ab c
is odd; since it is also a power of 2, we obtain
ab c 1 .

(8)

If a b, then c a2 1, and from ac b apa2 2q being a power of 2 it follows that both a


and a2 2 are powers of 2, whence a 2. This gives rise to the solution p2, 2, 3q.

72

IMO 2015 Thailand


We may suppose a b from now on. As usual, we let denote the integers satisfying
2 bc a

and

2 ac b .

(9)

If 0 it would follow that ac b ab c 1 and hence that b c 1, which is absurd. So


and are positive and consequently a and b are even. Substituting c ab 1 into (9) we
obtain

and

2 ab2 pa ` bq ,

2 a2 b pa ` bq .

(10)
(11)

The addition of both equation yields 2 ` 2 pab 2qpa ` bq. Now ab 2 is even but not
divisible by 4, so the highest power of 2 dividing a ` b is 21 . For this reason, the equations
(10) and (11) show that the highest powers of 2 dividing either of the numbers ab2 and a2 b is
likewise 21 . Thus there is an integer 1 together with odd integers A, B, and C such that
a 2 A, b 2 B, a ` b 23 C, and 1 ` 3 .
Notice that A ` B 22 C 4C. Moreover, (11) entails A2 B C 2. Thus 8
2
4A B 4C 4A2 B A B A2 p3B 1q. Since A and B are odd with A B, this is only
possible if A 1 and B 3. Finally, one may conclude C 1, 1, a 2, b 6, and
c 11. We have thereby found the triple p2, 6, 11q. This completes the discussion of the third
case, and hence the solution.
Comment. In both solutions, there are many alternative ways to proceed in each of its cases. Here
we present a different treatment of the part a b of Case 3 in Solution 2, assuming that (8) and (9)
have already been written down:
Put d gcdpa, bq and define the integers p and q by a dp and b dq; notice that p q and
gcdpp, qq 1. Now (8) implies c d2 pq 1 and thus we have
and

2 dpd2 pq 2 p qq

2 dpd2 p2 q p qq .

(12)

Now 2 divides 2 2 d3 pqpq pq and, as p and q are easily seen to be coprime to d2 p2 q p q,


it follows that
pd2 p2 q p qq | d2 pq pq .
(13)
In particular, we have d2 p2 q p q d2 pq pq, i.e., d2 pp2 q ` p qq p ` q. As p2 q ` p q 0, this
may be weakened to p2 q ` p q p ` q. Hence p2 q 2q, which is only possible if p 1.
Going back to (13), we get
pd2 q q 1q | d2 pq 1q .
(14)

Now 2pd2 q q 1q d2 pq 1q would entail d2 pq ` 1q 2pq ` 1q and thus d 1. But this would
tell us that a dp 1, which is absurd. This argument proves 2pd2 q q 1q d2 pq 1q and in the
light of (14) it follows that d2 q q 1 d2 pq 1q, i.e., q d2 1. Plugging this together with p 1
into (12) we infer 2 d3 pd2 2q. Hence d and d2 2 are powers of 2. Consequently, d 2, q 3,
a 2, b 6, and c 11, as desired.

Shortlisted problems solutions

73

N6.

Let Z0 denote the set of positive integers. Consider a function f : Z0 Z0 . For


any m, n P Z0 we write f n pmq looomooon
f pf p. . . f pmq . . .qq. Suppose that f has the following two
n

properties:

piq If m, n P Z0 , then

f n pmq m
P Z0 ;
n

piiq The set Z0 z tf pnq | n P Z0 u is finite.


Prove that the sequence f p1q 1, f p2q 2, f p3q 3, . . . is periodic.

(Singapore)

Solution. We split the solution into three steps. In the first of them, we show that the function
f is injective and explain how this leads to a useful visualization of f . Then comes the second
step, in which most of the work happens: its goal is to show that for any n P Z0 the sequence
n, f pnq, f 2 pnq, . . . is an arithmetic progression. Finally, in the third step we put everything
together, thus solving the problem.
Step 1. We commence by checking that f is injective. For this purpose, we consider any
m, k P Z0 with f pmq f pkq. By piq, every positive integer n has the property that
km
f n pmq m f n pkq k

n
n
n
is a difference of two integers and thus integral as well. But for n |k m| ` 1 this is only
possible if k m. Thereby, the injectivity of f is established.
Now recall that due to condition piiq there are finitely many positive integers a1 , . . . , ak
such that Z0 is the disjoint union of ta1 , . . . , ak u and tf pnq | n P Z0 u. Notice that by plugging
n 1 into condition piq we get f pmq m for all m P Z0 .
We contend that every positive integer n may be expressed uniquely in the form n f j pai q
for some j 0 and i P t1, . . . , ku. The uniqueness follows from the injectivity of f . The
existence can be proved by induction on n in the following way. If n P ta1 , . . . , ak u, then
we may take j 0; otherwise there is some n1 n with f pn1 q n to which the induction
hypothesis may be applied.
The result of the previous paragraph means that every positive integer appears exactly once
in the following infinite picture, henceforth referred to as the Table:
f 2 pa1 q
f 2 pa2 q
..
.

a1
a2
..
.

f pa1 q
f pa2 q
..
.

ak

f pak q f 2 pak q

f 3 pa1 q
f 3 pa2 q
..
.

...
...

f 3 pak q . . .

The Table
Step 2. Our next goal is to prove that each row of the Table is an arithmetic progression.
Assume contrariwise that the number t of rows which are arithmetic progressions would satisfy
0 t k. By permuting the rows if necessary we may suppose that precisely the first t rows
are arithmetic progressions, say with steps T1 , . . . , Tt . Our plan is to find a further row that
is not too sparse in an asymptotic sense, and then to prove that such a row has to be an
arithmetic progression as well.
Let us write T lcmpT1 , T2 , . . . , Tt q and A maxta1 , a2 , . . . , at u if t 0; and T 1 and
A 0 if t 0. For every integer n A, the interval n rn ` 1, n ` T s contains exactly T {Ti

74

IMO 2015 Thailand

elements of the ith row (1 i t). Therefore, the number of elements from the last pk tq
rows of the Table contained in n does not depend on n A. It is not possible that none
of these intervals n contains an element from the k t last rows, because infinitely many
numbers appear in these rows. It follows that for each n A the interval n contains at least
one member from these rows.

This yields that for every positive integer d, the interval A ` 1, A ` pd ` 1qpk tqT s contains
at least pd ` 1qpk tq elements from the last k t rows; therefore, there exists an index x with
t ` 1 x k, possibly depending on d, such that our interval contains at least d ` 1 elements
from the xth row. In this situation we have
f d pax q A ` pd ` 1qpk tqT .
Finally, since there are finitely many possibilities for x, there exists an index x t ` 1 such
that the set

(
X d P Z0 f d pax q A ` pd ` 1qpk tqT
is infinite. Thereby we have found the dense row promised above.
By assumption piq, for every d P X the number
d

f d pax q ax
d

is a positive integer not exceeding


Ad ` 2dpk tqT
A ` pd ` 1qpk tqT

A ` 2pk tqT .
d
d
This leaves us with finitely many choices for d , which means that there exists a number Tx
such that the set

(
Y d P X d Tx
is infinite. Notice that we have f d pax q ax ` d Tx for all d P Y .

Now we are prepared to prove that the numbers in the xth row form an arithmetic progression, thus coming to a contradiction with our assumption. Let us fix any
jpositive integer j.

Since the set Y is infinite, we can choose a number y P Y such that y j f pax q pax ` jTx q.
Notice that both numbers
`

f y pax q f j pax q f yj f j pax q f j pax q and f y pax q pax ` jTx q py jqTx


are divisible by y j. Thus, the difference between these numbers is also divisible by y j.
Since the absolute value of this difference is less than y j, it has to vanish, so we get f j pax q
ax ` j Tx .
Hence, it is indeed true that all rows of the Table are arithmetic progressions.

Step 3. Keeping the above notation in force, we denote the step of the ith row of the table by Ti .
Now we claim that we have f pnq n f pn ` T q pn ` T q for all n P Z0 , where
T lcmpT1 , . . . , Tk q .
To see this, let any n P Z0 be given and denote the index of the row in which it appears in
the Table by i. Then we have f j pnq n ` j Ti for all j P Z0 , and thus indeed
f pn ` T q f pnq f 1`T {Ti pnq f pnq pn ` T ` Ti q pn ` Ti q T .
This concludes the solution.

Shortlisted problems solutions

75

Comment 1. There are some alternative ways to complete the second part once the index x
corresponding to a dense row is found. For instance, one may show that for some integer Tx the set

(
Y j P Z0 f j`1 pax q f j pax q Tx

is infinite, and then one may conclude with a similar divisibility argument.

Comment 2. It may be checked that, conversely, any way to fill out the Table with finitely many
arithmetic progressions so that each positive integer appears exactly once, gives rise to a function f
satisfying the two conditions mentioned in the problem. For example, we may arrange the positive
integers as follows:
2
1
3

4
5
7

6
9
11

8
13
15

10
17
19

...
...
...

This corresponds to the function


#
n ` 2 if n is even;
f pnq
n ` 4 if n is odd.
As this example shows, it is not true that the function n f pnq n has to be constant.

76

IMO 2015 Thailand

N7.

Let Z0 denote the set of positive


integers. For any positive integer k, a function
`
f : Z0 Z0 is called k-good if gcd f pmq ` n, f pnq ` m k for all m n. Find all k such
that there exists a k-good function.
(Canada)
Answer. k 2.

Solution 1. For any function f : Z0 Z0 , let Gf pm, nq gcd f pmq ` n, f pnq ` m . Note
that a k-good function is also pk ` 1q-good for any positive integer k. Hence, it suffices to show
that there does not exist a 1-good function and that there exists a 2-good function.
We first show that there is no 1-good function. Suppose that there exists a function f such
that Gf pm, nq 1 for all m n. Now, if there are two distinct even numbers m and n such
that f pmq and f pnq are both even, then 2 | Gf pm, nq, a contradiction. A similar argument
holds if there are two distinct odd numbers m and n such that f pmq and f pnq are both odd.
Hence we can choose an even m and an odd n such that f pmq is odd and f pnq is even. This
also implies that 2 | Gf pm, nq, a contradiction.

We now construct a 2-good function. Define f pnq 2gpnq`1 n 1, where g is defined


recursively by gp1q 1 and gpn ` 1q p2gpnq`1 q!.
For any positive integers m n, set
A f pmq ` n 2gpmq`1 m ` n 1,

B f pnq ` m 2gpnq`1 n ` m 1.

We need to show that gcdpA, Bq 2. First, note that A ` B 2gpmq`1 ` 2gpnq`1 2 is not
divisible by 4, so that 4 gcdpA, Bq. Now we suppose that there is an odd prime p for which
p | gcdpA, Bq and derive a contradiction.
We first claim that 2gpm1q`1 B. This is a rather weak bound; one way to prove it is as follows. Observe that gpk `1q gpkq and hence 2gpk`1q`1 2gpkq`1 `1 for every positive integer k.
By repeatedly applying this inequality, we obtain 2gpm1q`1 2gpnq`1 ` pm 1q n B.
Now, since p | B, we have p 1 B 2gpm1q`1 , so that p 1 | p2gpm1q`1 q! gpmq.
Hence 2gpmq 1 pmod pq, which yields A ` B 2gpnq`1 pmod pq. However, since p | A ` B,
this implies that p 2, a contradiction.
Solution 2. We provide an alternative construction of a 2-good function f .
Let P be the set consisting of 4 and all odd primes. For every p P P, we say that a number
a P t0, 1, . . . , p 1u is p-useful if a a pmod pq. Note that a residue modulo p which is
neither 0 nor 2 is p-useful (the latter is needed only when p 4).
We will construct f recursively; in some steps, we will also define a p-useful number ap .
After the mth step, the construction will satisfy the following conditions:
(i ) The values of f pnq have already been defined for all n m, and p-useful numbers ap have
already been defined for all p m ` 2;
(ii ) If n m and p m ` 2, then f pnq ` n ap pmod pq;
`

(iii ) gcd f pn1 q ` n2 , f pn2 q ` n1 2 for all n1 n2 m.

If these conditions are satisfied, then f will be a 2-good function.


Step 1. Set f p1q 1 and a3 1. Clearly, all the conditions are satisfied.

Step m, for m 2. We need to determine f pmq and, if m ` 2 P P, the number am`2 .


Defining f pmq. Let Xm tp P P : p | f pnq ` m for some n mu. We will determine
f pmq mod p for all p P Xm and then choose f pmq using the Chinese Remainder Theorem.

Shortlisted problems solutions

77

Take any p P Xm . If p m ` 1, then we define f pmq ap m pmod pq. Otherwise, if


p m ` 2, then we define f pmq 0 pmod pq.
Defining am`2 . Now let p m ` 2 and suppose that p P P. We choose ap to be a residue
modulo p that is not congruent to 0, 2, or f pnq ` n for any n m. Since f p1q ` 1 2, there
are at most m ` 1 p residues to avoid, so we can always choose a remaining residue.
We first check that (ii) is satisfied. We only need to check it if p m ` 2 or n m. In the
former case, we have f pnq ` n ap pmod pq by construction. In the latter case, if n m and
p m ` 1, then we have f pmq ` m ap ap pmod pq, where we make use of the fact that
ap is p-useful.
`

Now we check that (iii) holds. Suppose, to the contrary, that p | gcd f pnq ` m, f pmq ` n
for some n m. Then p P Xm and p | f pmq ` n. If p m ` 2, then 0 f pmq ` n n pmod pq,
which is impossible since n m p.
Otherwise, if p m ` 1, then
`
`
`
`
`

0 f pmq ` n ` f pnq ` m f pnq ` n ` f pmq ` m f pnq ` n ap pmod pq.


This implies that f pnq ` n ap pmod pq, a contradiction with (ii).

Comment 1. For any p P P, we may also define ap at step m for an arbitrary m p 2. The
construction will work as long as we define a finite number of ap at each step.
Comment 2. When attempting to construct a 2-good function f recursively, the following way
seems natural. Start with setting f p1q 1. Next, for each integer m 1, introduce the set Xm like
in Solution 2 and define f pmq so as to satisfy
f pmq f pm pq pmod pq
f pmq 0 pmod pq

for all p P Xm with p m,

and

for all p P Xm with p m.

This construction
might seem
`
to work. Indeed, consider a fixed p P P, and suppose that p
divides gcd f pnq ` m, f pmq ` n for some n m. Choose such m and n so that maxpm, nq is
minimal. ` Then p P Xm . We can check
that p m, so that the construction implies that p divides gcd f pnq ` pm pq, f pm pq ` n . Since maxpn, m pq maxpm, nq, this almost leads to a
contradictionthe only trouble is the possibility that n m p. However, this flaw may happen to
be not so easy to fix.
We will present one possible way to repair this argument in the next comment.
Comment 3. There are many recursive constructions for a 2-good function f . Here we sketch one
general approach which may be specified in different ways. For convenience, we denote by Zp the set
of residues modulo p; all operations on elements of Zp are also performed modulo p.
The general structure is the same as in Solution 2, i.e. using the Chinese Remainder Theorem to
successively determine f pmq. But instead of designating a common safe residue ap for future steps,
we act as follows.
p1q
p2q
ppq
For every p P P, in some step of the process we define p subsets Bp , Bp , . . . , Bp Zp . The
meaning of these sets is that
f pmq ` m should be congruent to some element in Bppiq whenever m i pmod pq for i P Zp .
piq

(1)

piq

Moreover, in every such subset we specify a safe element bp P Bp . The meaning now is that in
piq
future steps, it is safe to set f pmq ` m bp pmod pq whenever m i pmod pq. In view of (1), this
` piq

safety will follow from the condition that p gcd bp ` pj iq, cpjq pj iq for all j P Zp and all
pjq

cpjq P Bp . In turn, this condition can be rewritten as


pjq
bpiq
p R Bp ,

where j i bpiq
p

pmod pq.

(2)

78

IMO 2015 Thailand


piq

piq

The construction in Solution 2 is equivalent to setting bp ap and Bp Zp z tap u for all i.


However, there are different, more technical specifications of our approach.
piq

piq

One may view the (incomplete) construction in Comment 2 as defining Bp and bp at step p 1
p0q
p0q (
piq
piq (
by setting Bp bp
t0u and Bp bp tf piq ` i mod pu for every i 1, 2, . . . , p 1.
However, this construction violates (2) as soon as some number of the form f piq ` i is divisible by
piq
piq
piq
some p with i ` 2 p P P, since then bp bp P Bp .
piq
Here is one possible way to repair this construction. For all p P P, we define the sets Bp and the
(
(
piq
p1q
p1q
p1q
p0q
p1q
p0q (
elements bp at step pp 2q as follows. Set Bp bp t2u and Bp
B p bp
bp
piq

piq

t1u. Next, for all i 2, . . . , p 2, define Bp ti, f piq ` i mod pu and bp i. One may see that
these definitions agree with both (1) and (2).

Shortlisted problems solutions

79

N8. For every positive integer n with prime factorization n


pnq

i : pi

i .

i1

pi i , define

10100

That is, pnq is the number of prime factors of n greater than 10100 , counted with multiplicity.
Find all strictly increasing functions f : Z Z such that
`

f paq f pbq pa bq
for all integers a and b with a b.
(1)
(Brazil)

Answer. f pxq ax ` b, where b is an arbitrary integer, and a is an arbitrary positive integer


with paq 0.

Solution. A straightforward check shows that all the functions listed in the answer satisfy the
problem condition. It remains to show the converse.
Assume that f is a function satisfying the problem condition. Notice that the function
gpxq f pxq f p0q also satisfies this condition. Replacing f by g, we assume from now on that
f p0q 0; then f pnq 0 for any positive integer n. Thus, we aim to prove that there exists a
positive integer a with paq 0 such that f pnq an for all n P Z.

We start by introducing some notation. Set N 10100 . We say that a prime p is large
if p N, and p is small otherwise; let S be the set of all small primes. Next, we say that
a positive integer is large or small if all its prime factors are such (thus, the number 1 is the
unique number which is both large and small). For a positive integer k, we denote the greatest
large divisor of k and the greatest small divisor of k by Lpkq and Spkq, respectively; thus,
k LpkqSpkq.
We split the proof into three steps.
Step 1. We prove that for every large k, we have k | f paq f pbq k | a b. In other
`

words, L f paq f pbq Lpa bq for all integers a and b with a b.


We use induction on k. The base case k 1 is trivial. For the induction step, assume that
k0 is a large number, and that the statement holds for all large numbers k with k k0 .
Claim 1. For any integers x and y with 0 x y k0 , the number k0 does not divide
f pxq f pyq.
Proof. Assume, to the contrary, that k0 | f pxq f pyq. Let Lpx yq; then x y k0 .
By the induction hypothesis, | f pxq f pyq, and thus lcmpk0 , q | f pxq f pyq. Notice that
lcmpk0 , q is large, and lcmpk0 , q k0 . But then
`

f pxq f pyq lcmpk0 , q pq px yq,


which is impossible.
l
Now we complete the induction step. By Claim 1, for every integer a each of the sequences
f paq, f pa ` 1q, . . . , f pa ` k0 1q and f pa ` 1q, f pa ` 2q, . . . , f pa ` k0 q
forms a complete residue system modulo k0 . This yields f paq f pa ` k0 q pmod k0 q. Thus,
f paq f pbq pmod k0 q whenever a b pmod k0 q.
Finally, if a b pmod k0 q then there exists an integer b1 such that b1 b pmod k0 q and
|a b1 | k0 . Then f pbq f pb1 q f paq pmod k0 q. The induction step is proved.

Step 2. We prove that for some small integer a there exist infinitely many integers n such that
f pnq an. In other words, f is linear on some infinite set.
We start with the following general statement.

80

IMO 2015 Thailand

Claim 2. There exists a constant c such that f ptq ct for every positive integer t N.
Proof. Let d be the product of all small primes, and let be a positive integer such that
2 f pNq. Then, for every p P S the numbers f p0q, f p1q, . . . , f pNq are distinct modulo p .
Set P d and c P ` f pNq.
Choose any integer t N. Due to the choice of , for every p P S there exists at most one
nonnegative integer i N with p | f ptq f piq. Since |S| N, we` can choose a nonnegative
integer j N such that p f ptq f pjq for `all p P S. Therefore,
S f ptq f pjq P .

On the other hand, Step 1 shows that L f ptq f pjq Lpt jq t j. Since 0 j N,
this yields
`
`

f ptq f pjq ` L f ptq f pjq S f ptq f pjq f pNq ` pt jqP P ` f pNq t ct. l

Now let T be the set of large primes. For every t P T , Step 1 implies L f ptq t, so the
ratio f ptq{t is an integer. Now Claim 2 leaves us with only finitely many choices for this ratio,
which means that there exists an infinite subset T 1 T and a positive integer a such that
f ptq at for all t P T 1 , as required.
`

Since Lptq L f ptq LpaqLptq for all t P T 1 , we get Lpaq 1, so the number a is small.

Step 3. We show that f pxq ax for all x P Z.


(
Let Ri x P Z : x i pmod N!q denote the residue class of i modulo N!.
Claim 3. Assume that for some r, there are infinitely many n P Rr such that f pnq an. Then
f pxq ax for all x P Rr`1 .
Proof. Choose any x P Rr`1 . By our assumption, we can select n P Rr such that f pnq an
and |n x| f pxq ax. Since n x r pr ` 1q 1 pmod N!q, the number |n x| is
large. Therefore, by Step 1 we have f pxq f pnq an ax pmod n xq, so n x | f pxq ax.
Due to the choice of n, this yields f pxq ax.
l
1
To complete Step 3, notice that the set T found in Step 2 contains infinitely many elements
of some residue class Ri . Applying Claim 3, we successively obtain that f pxq ax for all
x P Ri`1 , Ri`2 , . . . , Ri`N ! Ri . This finishes the solution.

Comment 1. As the proposer also mentions, one may


` also consider
the version of the problem where
the condition (1) is replaced by the condition that L f paq f pbq Lpa bq for all integers a and b
with a b. This allows to remove of Step 1 from the solution.
Comment 2. Step 2 is the main step of the solution. We sketch several different approaches allowing
to perform this step using statements which are weaker than Claim 2.
Approach 1. Let us again denote the
of all
by d. We focus on the values f pdi q,
` product
smalli primes
i
k
k
i 0. In view of Step 1, we have L f pd q f pd q Lpd d q dik 1 for all i k 0.
Acting similarly to the beginning of the proof of Claim 2, one may choose a number 0 such
that the residues of the numbers f pdi q, i 0, 1, . . . , N , are distinct `modulo p foreach p P S. Then,
for every i N , there exists an exponent k kpiq N such that S f pdi q f pdk q P d .
` Since there are only finitely many options for kpiq, as well as for the corresponding numbers
S f pdi q f pdk q , there exists an infinite set I of `exponents i N
such that kpiq attains the same
value k0 for all i P I, and such that, moreover, S f pdi q f pdk0 q attains the same value s0 for all
i P I. Therefore, for all such i we have
`
`

f pdi q f pdk0 q ` L f pdi q f pdk0 q S f pdi q f pdk0 q f pdk0 q ` dik0 1 s0 ,

which means that f is linear on the infinite set tdi : i P Iu (although with rational coefficients).
Finally, one may implement the relation f pdi q f p1q pmod di 1q in order to establish that in
fact f pdi q{di is a (small and fixed) integer for all i P I.

Shortlisted problems solutions

81

Approach 2. Alternatively, one may start with the following lemma.


Lemma. There exists a positive constant c such that

3N
3N

`
2N
`

L f pkq f piq c f pkq

f pkq f piq
L
i1

i1

for all k 3N .

`
Proof. Let k be an integer with k 3N . Set 3N
i1 f pkq f piq .
Notice that for every prime p P S, at most one of the numbers in the set
(
H f pkq f piq : 1 i 3N

is divisible by a power of p which is greater than f p3N q; we say that such elements of H are bad.
Now, for each element h P H which is not bad we have Sphq f p3N qN , while the bad elements do
not exceed f pkq. Moreover, there are less than N bad elements in H. Therefore,
Spq

hPH

`
3N 2 `
N
S phq f p3N q
f pkq .

`
3N
This easily yields the lemma statement in view of the fact that LpqSpq f pkq
for some
absolute constant .
l
As a corollary of the lemma, one may get a weaker version of Claim 2 stating that there exists a
positive constant C such that f pkq Ck 3{2 for all k 3N . Indeed, from Step 1 we have
k3N

3N

i1

Lpk iq

3N

`
2N
L f pkq f piq c f pkq
,
i1

so f pkq c1{p2N q k3{2 .

To complete Step 2 now, set a f p1q. Due to the estimates above, we may choose a positive

for all n
integer n0 such that f pnq an npn1q
2
` n0 .

Take any n n0 with n 2 pmod N !q. Then L f pnq f p0q Lpnq n{2 and L f pnq f p1q
Lpn 1q n 1; these relations yield f pnq f p0q 0 an pmod n{2q and f pnq f p1q a an

f pnq an, which shows that f pnq an in view of the


pmod n 1q, respectively. Thus, npn1q
2
estimate above.
Comment 3. In order to perform Step 3, it suffices to establish the equality f pnq an for any
infinite set of values of n. However, if this set has some good structure, then one may find easier ways
to complete this step.
For instance, after showing, as in Approach 2, that f pnq an for all n n0 with n 2 pmod N !q,
one may proceed as follows. Pick an arbitrary integer x and take any large prime p which is greater
than |f pxq ax|. By the Chinese Remainder Theorem, there exists a positive integer n maxpx, n0 q
such that n 2 pmod N !q and n x pmod pq. By Step 1, we have f pxq f pnq an ax pmod pq.
Due to the choice of p, this is possible only if f pxq ax.

Вам также может понравиться