Professional Documents
Culture Documents
Iranian 2020
Iranian 2020
Iranian
Mathematical
Olympiad
2019-2020
Y oung Scholars Club
Ministry of Education, I.R. Iran
www.mathysc.ir
th
37
Iranian
Mathematical
Olympiad
37th Iranian Mathematical Olympiad
Selected Problems with Solutions
1
Iranian Team Members at the 61th IMO
(St. Petersburg - Russian Federation)
• Matin Yadollahi
• Kian Shamsaei
• Mohammad Moshtaghifar
• Ali Mirzaei Anari
2
Contents
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Problems
Second Round . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Third Round . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Solutions
Second Round . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Third Round . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3
Preface
The Team Selection Test was held on 4 days, having the same structure
as the International Mathematical Olympiad (IMO). In the end, the top 6
participants were selected to become members of the Iranian Team at the
61th IMO.
In this booklet, we present the 6 problems of the Second Round, 24 prob-
4
lems of the Third Round, and 12 proposed problems of the Team Selection
Test, together with their solutions.
It’s a pleasure for the authors to offer their grateful appreciation to all the
people who have contributed to the conduction of the 37th Iranian Mathemat-
ical Olympiad, including the National Committee of Mathematics Olympiad,
problem proposers, problem selection groups, exam preparation groups, coor-
dinators, editors, instructors and all those who have shared their knowledge
and effort to increase the Mathematics enthusiasm in our country, and as-
sisted in various ways to the conduction of this scientific event.
5
Problems
Second Round
7
Roozbeh wins and Keyvan loses. Otherwise, the game continues. Prove that
no matter how Roozbeh plays, Kayvan can play in a way that he never loses.
(→ p.20)
8
Third Round
Algebra
1. (Shayan Talaei) a, b and c are positive real numbers such that
X X
(a + b)2 = 2 a + 6abc.
cyc cyc
Prove that
X X
2
(a − b) ≤ 2 a − 6abc .
cyc cyc
(→ p.23)
2. (Amir Hossein Zolfaghari) Find all function f : R → R such that for any
three real numbers a, b, c that satisfy a + f (b) + f (f (c)) = 0, the following
equality holds:
f (a)3 + bf (b)2 + c2 f (c) = 3abc.
(→ p.24)
3. (Navid Safaei) We are given a natural number d. Find all open intervals of
maximum length I ⊆ R such that for all real numbers a0 , a1 , . . . , a2d−1 inside
the interval I, the polynomial P (x) = x2d + a2d−1 x2d−1 + · · · + a1 x + a0 has
no real roots.
(→ p.25)
4. (Mohammad Heidary) Let A1 , A2 , . . . Ak be points on the unit circle. Prove
that X
d(Ai , Aj )2 ≤ k 2 ,
1≤i<j≤k
9
5. (Yahya Motevassel) P (x) is a non-constant monic polynomial with integer
coefficients. Assume that P1 (x), P2 (x) . . . , Pn (x) are monic polynomials with
integer coefficients such that for all 1 ≤ i ≤ n, deg(Pi ) ≥ deg(P ). We know
that for any natural number x, there exists a natural number y and an index
i (1 ≤ i ≤ n), such that P (x) = Pi (y). Prove that there exists an index j
(1 ≤ j ≤ n) and a natural number k such that P (x) = Pj (x + k).
(→ p.28)
6. (Navid Safaei) Let a, b, c be non-zero distinct real numbers so that there
exist functions f, g : R+ → R so that
x
af (xy) + bf = cf (x) + g(y)
y
for all positive real x and large enough y.
Prove that there exists a function h : R+ → R so that
x
f (xy) + f = 2f (x) + h(y)
y
Combinatorics
1. (Amin Behjati) Hossna is playing with an m × n grid of points. She can
draw segments between some of the points with the following conditions:
a) No two segments intersect except in points of the grid.
10
3. (Mohammad Heidary) Cells of an n×n table are filled with positive integers
in a way that the number 2n + 2 − i − j is written at the intersection of the
i−th row and j−th column. In every step, we can choose two non-intersecting
n × k rectangles or two non-intersecting k × n rectangles (1 ≤ k ≤ n2 ), and
swap all the numbers inside these two rectangles with one another (without
reflection or rotation). Find the minimum number of moves one should do to
reach the position that in the intersection of the i−th row and j−th column,
the number 2n + 2 − i − j is written.
(→ p.32)
4. (Seyed Reza Hosseini) A bear is in the center of the left down corner of a
100 × 100 square table. It can move from one cell to another cell if they share
a common edge. We call a cycle in this table a bear cycle if it visits each
cell exactly once and gets back to the place it started. Removing a row or
column will divide the bear cycle into number of paths. Find the minimum
k such that for any bear cycle, there exists a row or column that we ensure
that after its removal, the maximum length among the remaining paths is at
most k.
(→ p.33)
5. (Morteza Saghafian) Let T be a triangulation of a convex 100-gon. We
construct P (T ) by copying the same 100-gon and drawing a diagonal if it
was not drawn in T , and there is a quadrilateral with this diagonal and two
other vertices so that all its sides and the other diagonal are in T . Let f (T )
be the number of intersections of diagonals in P (T ). Find the minimum and
maximum of f (T ).
(→ p.33)
6. (Seyed Reza Hosseini) Let n be a positive integer. There are 2n red lines
and n blue lines in general position given on the plane. Prove that there are at
least (n−1)(n−2)
2 regions with a monochromatic perimeter. (An infinite region
is also counted as a region with rays and segments forming its perimeter).
(→ p.34)
Geometry
1. (Alireza Dadgarnia) Given a cyclic quadrilateral ABCD. There is a point
P on side BC such that ∠P AB = ∠P DC = 90◦ . The medians of vertices A
and D in triangles 4P AB and 4P DC meet at K and the angle bisectors of
∠P AB and ∠P DC meet at L. Prove that KL ⊥ BC.
(→ p.35)
2. (Iman Maghsoudi) Consider an acute-angled triangle 4ABC with AB =
AC and ∠A > 60◦ . Let O be the circumcenter of 4ABC. Point P lies on
11
circumcircle of 4BOC such that BP k AC, and point K lies on segment AP
>
such that BK = BC. Prove that line CK bisects the arc BC of circumcircle
of 4BOC.
(→ p.36)
Number Theory
1. (Yahya Motevassel) Let k ∈ N and {an }n≥0 and {bn }n≥0 be two sequences
of positive integers that ai , bi ∈ {1, 2, . . . , 9}. For all n ≥ 0
an . . . a1 a0 + k bn . . . b1 b0 + k.
12
2. (Mohsen Jamali) Prove that for any positive integers m > n, there are
infinitely many positive integers a, b such that set of prime divisors of am + bn
is equal to set of prime divisors of a2019 + b1398 .
(→ p.42)
3. (Mohsen Jamali, Yahya Motevassel) Let S be an infinite set of positive
integers, define:
T = {x + y|x, y ∈ S, x 6= y}.
Suppose that there are only finite primes p such that:
a) p ≡ 1 (mod 4).
b) There exists a positive integer s such that p|s, s ∈ T .
Prove that there are infinity many primes that divide at least one element of
S.
(→ p.42)
4. (Ali PartoFard, Mohsen Jamali) Find all functions f : N → N such that
for any distinct positive integers x, y, z, x + y + z is a perfect square if and
only if f (x) + f (y) + f (z) is a perfect square.
(→ p.42)
5. (Yahya Motevassel) Call a polynomial
P (x) = an xn + an−1 xn−1 + · · · + a1 x + a0
with integer coefficients primitive if and only if gcd(an , an−1 , . . . , a1 , a0 ) = 1.
a) Let P (x) be a primitive polynomial with degree less than 1398 and S
be a subset of primes greater than 1398. Prove that there is a positive
integer n so that P (n) is not divisible by any prime in S.
b) Prove that there exists a primitive polynomial P (x) with degree less
than 1398 such that for each nautral number n, P (n) is divisible by
every prime less than 1398.
(→ p.44)
6. (Yahya Motevassel) Let a, m be positive integers such that ordm (a) is odd
and for any integers x, y such that:
a) xy ≡ a (mod m).
b) ordm (x) ≤ ordm (a).
c) ordm (y) ≤ ordm (a).
We have either ordm (x) | ordm (a) or ordm (y) | ordm (a). Prove that ordm (a)
has at most one prime divisor.
(→ p.44)
13
Team Selection Test
iii) Pσ(1) (x) > Pσ(2) (x) > · · · > Pσ(n) (x) for 0 < x < .
Find all interesting numbers.
(→ p. 46)
4. (Ali Zamani) Given a function g : [0, 1] → R such that for every non empty
partition of the interval [0, 1] to subsets A, B either ∃x ∈ A : g(x) ∈ B or
∃x ∈ B : g(x) ∈ A. Furthermore g(x) > x for all x ∈ [0, 1]. Prove that
g(x) = 1, for infinitely many x in its domain.
(→ p. 47)
14
5. (Mohammad Amin Sharifi) Let k ∈ Z prove that there are infinitely many
pairs of distinct positive integer numbers n, m such that
n + S(2n) = m + S(2m),
kn + S(n2 ) = km + S(m2 ),
15
11. (Mohammad Amin Sharifi) For every positive integer k > 1 prove that
there exists a real number x such that for every positive integer n < 1398:
(→ p. 53)
p−1
12. (Ali Partofard) Let p be an odd prime number. Find all 2 -tuples
p−1
x1 , x2 , . . . , x p−1 ∈ Zp 2 such that
2
(→ p. 54)
16
Solutions
Second Round
1. First note that if the line l has slope a, then the reflection of l with respect
to any line which is parallel to one of the axes has the slope −a.
now assume that at the start the ray has slope a. then the ray always has
the the slope ±a. now at the starting point a line with slope −a lies outside
the rectangle so by symmetry at the opposite corner the line with slope −a
lies outside the rectangle. hence the ray reach the opposite corner with slope
a.
now assume that a light ray enters the rectangle from opposite corner, By
symmetry this two rays meet at the time 2t in the center of the rectangle.
XK XT
= .
YK ZT
Therefore, K and T are corresponding points in triangles 4XY B and 4XZC.
Which gives us
∠T CX = ∠KBX = ∠T BX,
and T B = T C. So, T lies on the perpendicular bisector of BC and since
AB = AC, T also lies on the angle bisector of ∠A.
18
A
Y
T
K
B X C
So,
(x1 x2 . . . xn−1 )2
nx3n ≥ (x1 x2 . . . xn )2 =⇒ xn ≥ .
n
Combining these two facts, we get
(x1 x2 . . . xn−1 )4
x31 + x32 + · · · + x3n−1 ≥
n2
4
(x x
1 2 . . . x n−1 )
=⇒ (n − 1)x3n−1 ≥
n2
=⇒ n2 (n − 1) ≥ x41 x42 . . . x4n−2 xn−1 .
n2 (n − 1) ≥ 24n−7 .
19
4. Let K be the intersection point of CD, AX and L be the intersection point
of CD, AY .
L
E
A B
F
AX + XY + AY = AK + KL + LA = KD + KL + LC = CD
5.
Lemma. If 1 ≤ k1 < k2 < · · · < kt ≤ n − 1 be natural numbers, then
t
X
∀x ∈ R : x2n + x2ki +1 + x2ki + 1 > 0.
i=1
20
Pt
Since x + 1 ≥ 0 and i=1 x2ki ≥ 0, we have
t
X
x2n + 1 + (x + 1) x2ki > 0.
i=1
If x < −1, then x + 1 < 0 and x2k+1 < x < 1. So, x2n+1 x2k+1 + 1 > 0.
Therfore, we can re-write
t
X
x1398 + x2ki +1 + x2ki + 1
i=1
as
t−1
X
x1398−(2kt +1) + 1 x2kt +1 + x2k1 +1 x2ki+1 −(2ki +1) + 22k1 + 1
i=1
1396
where 1 ≤ k1 ≤ k2 ≤ · · · ≤ 2 . So, it is positive.
Where
1398
1 ≤ s1 ≤ s2 ≤ · · · ≤ sm ≤ ,
2
1398
0 ≤ t1 ≤ t2 ≤ · · · ≤ tn ≤ ,
2
1 ≤ k1 < k2 < · · · < kl ≤ 1398.
According to the lemma we proved, the polynomial should be always positive.
21
respect to A:the combination of any two reflections with respect to A, B is a
transformation.
−−→
Transforming by ±2AB does not change the parity of coordinates, so if we
−−→
define an equivalence relation P ≡ Q if and only if P = Q + 2nAB, n ∈ Z,
points will form at least 14 classes. every connected component has points
from at most two classes. note that A and B are not connected and their
components consists of exactly one class so we have at least 8 components.
As an example, which is easy to verify, take the two points having only
half a unit distance form the center of the table as A, B.
22
Third Round
Algebra
a2 +
P P P
1. We know that cyc cyc ab = cyc a + 3abc, so
!2 !2
X X X
2
a + ab = a + 3abc
cyc cyc cyc
!2 !2 ! !
X X X X
2 2
=⇒ a + ab +2 a ab
cyc cyc cyc cyc
!2
X X
= a + 9a2 b2 c2 + 6abc a
cyc cyc
!2 !2 !2
X X X
2
=⇒ a + ab − a − 9a2 b2 c2
cyc cyc cyc
! !
X X X
2
= 6abc a−2 a ab .
cyc cyc cyc
By AM-GM we have
! ! !2
X X X X
2
a ab ≥ ab ≥ 3abc a
cyc cyc cyc cyc
So
! ! ! !
X X X X X X
2 2
2 a ab − 6abc a ≥ 6abc a−2 a ab
cyc cyc cyc cyc cyc cyc
23
Then using above facts
! !
X X X
2
2 a ab − 6abc a
cyc cyc cyc
!2 !2 !2
X X X
≥ a2 + ab − a − 9a2 b2 c2
cyc cyc cyc
!2
X X
⇐⇒ a + 9a2 b2 c2 − 6abc a
cyc cyc
!2 ! ! !2
X X X X
2 2
≥ a −2 a ab + ab
cyc cyc cyc cyc
!2 !2
X X X
⇐⇒ a − 3abc ≥ a2 − ab .
cyc cyc cyc
⇒ ∀b 6= 0 : f (b) = −f (0).
24
And according to the injectivity at point 0, it follows that f (0) = 0.
Now, P (−f (f (b)), b, 0) and P (−f (f (c)), 0, c) give us
f (f (b)) = ±b ∀b 6= 0.
f (f (b)) = ±b ∀b ∈ R.
If there exists a real number c 6= 0 such that f (f (c)) = −c, P (c, 0, c) gives us
f (c)(f (c)2 + c2 ) = 0
which is a Contradiction.
So
∀c ∈ R : f (f (c)) = c
now P (−a, 0, a) gives us f (−a)2 +a2 f (a) = 0 and P (a, 0, −a) gives us f (a)3 +
a2 f (−a) = 0 and they lead to f (a) = ±a.
If there exist non-zero real numbers b, c such that f (b) = b and f (c) = −c,
P (−b − c, b, c) leads to contradiction. So f (x) = x and f (x) = −x are the
only solutions.
3. The answer is I = 1, 1 + d1 .
Assume that the desired interval is of the form of (b, c). For some q, r in (b, c),
put ai = q for odd and ai = r for even i, where 0 ≤ i ≤ 2d − 1. Then
P (−1) = 1 − dq + dr.
Since P (x) has no real root, we must have P (−1) > 0. Thus, q − r < d1 . We
can assume that c − b = d1 . Therefore, consider the interval as b, b + d1 . It
is easy to find that b > 0, since by choosing a0 = b + should be positive.
Now, assign the following numbers to the coefficients of the polynomial.
1
a2d−1 = a2d−3 = · · · = a1 = b + + , a2d = a2d−2 = · · · = a0 = b + ,
d
for some sufficiently small > 0.
It is clear that for all positive real x, P (x) > 0. For all negative real x, putting
x = −t, where t > 0, then,
1 2d−1 1
P (−t) = t2d − b + t + bt2d−2 − · · · − b + t + b + Q(t),
d d
25
for some polynomial Q(t), deg Q(t) = 2d − 1. As tends to zero, it remains
to find all b > 0 such that
1 2d−1 1
R(t) = t2d − b + t + bt2d−2 − · · · − b + t + b ≥ 0.
d d
has no positive real roots. Now, we prove that P (x) > 0 for all negative real
x. Put x = −t, t > 0.
Then,
1 2d−1 1
P (−t) > t2d − 1 + t + t2d−2 − · · · − 1 + t + 1.
d d
Now, since t2d + 1 ≥ t2d−2k+1 + t2k−1 and t2k + t2k−2 ≥ 2t2k−1 , we are done.
Thus,
1 dt2d − t2d−1 + t2d−3 + · · · + t
b≤ lim .
d t→1+ t2d−1 − t2d−2 + · · · + t − 1
and
1 dt2d − t2d−1 + t2d−3 + · · · + t
b≥ lim ,
d t→1− t2d−1 − t2d−2 + · · · + t − 1
since the function
dt2d − t2d−1 + t2d−3 + · · · + t
t2d−1 − t2d−2 + · · · + t − 1
has a limit as t approaches 1. Thus, we find that
dt2d − t2d−1 + t2d−3 + · · · + t dt2d − t2d−1 + t2d−3 + · · · + t
lim = lim .
t→1+ t2d−1 − t2d−2 + · · · + t − 1 t→1− t2d−1 − t2d−2 + · · · + t − 1
Hence,
1 dt2d − t2d−1 + t2d−3 + · · · + t
b = lim .
d t→1 t2d−1 − t2d−2 + · · · + t − 1
26
Finally note that
dt2d − t2d−1 + t2d−3 + · · · + t
t2d−1 − t2d−2 + · · · + t − 1
t − t2d−1 + t2d − t2d−3 + · · · + t2d − t
2d
=
(t − 1) (t2d−2 + t2d−4 + · · · + 1)
(t − 1) t2d−1 + t2d−3 t2 + t + 1 + · · · + t t2d−2 + · · · + 1
=
(t − 1) (t2d−2 + t2d−4 + · · · + 1)
Thus,
dt2d − t2d−1 + t2d−3 + · · · + t
lim
t→1 t2d−1 − t2d−2 + · · · + t − 1
t2d−1 + t2d−3 t2 + t + 1 + · · · + t t2d−2 + · · · + 1 d2
= lim 2d−2 2d−4
= = 1.
t→1 t +t + ··· + 1 d
1
That is, b = d and d = 1.
4. Assume that the circle mentioned in the problem is the unit circle on the
complex plane. Then we can say every vertex Ai is equivalent to a complex
number zi such that |zi | = 1. On the other hand we have d (Ai , Aj ) =
|zi − zj |. So we should prove that
X 2
|zi − zj | ≤ k 2 .
1≤i<j≤k
We know that
2 2 2
|zi − zj | = (zi − zj ) (zi − zj ) = |zi | + |zj | − (zi zj + zj zi ) = 2 − zi zj − zj zi .
So we have
X k X
|zi − zj |2 = 2 − (zi zj + zj zi ).
2
1≤i<j≤k 1≤i<j≤k
and
X X X
(zi zj + zj zi ) = zi zj = zi (z1 + . . . + zn − zi )
1≤i<j≤k 1≤i6=j≤k 1≤i≤k
X 2
X X
= zi zi − k = zi − k.
1≤i≤k 1≤i≤k 1≤i≤k
27
Therefore,
2
X 2
X X
|zi − zj |2 = k 2 − k − zi − k = k 2 −
zi ≤ k.
1≤i<j≤k 1≤i≤k 1≤i≤k
P
Equality holds whenever 1≤i≤k zi = 0, in other words, when the circum-
center and the centroid of A1 A2 . . . Ak coincide.
5. We firstly prove that there exists an index i such that deg Pi (x) = deg P (x)
and P (x) = Pi (y) for infinitely many x, y ∈ N.
Assume to the contrary. Let the degree of Pt+1 (x), . . . , Pn (x) be equal to
deg P (x) and deg Pi (x) > deg P (x)∀i ∈ {1, 2, . . . , t}.
Consider a sufficiently large N0 such that:
28
P (x) = xd + ad−1 xd−1 + · · · + a0 d ≥ 2,
then,
d−1
X
=⇒ xd − y d ≤ c |x|i + |y|i ≤ cd xd−1 − y d−1
i=1
d
x − y d xd − y d
=⇒ = ≤ cd.
xd−1 + y d−1 xd−1 + y d−1
And we have
xd − y d
x−y ≤ ≤ cd.
xd−1 + y d−1
So, x − y ≤ cd. Therefore, there exists a number k such that x − y = k for
infinitely many times.
Then we get P (x) = Pi (x − k) for infinitely many x and we’re done.
The case that ≥ P (x) = 1 is trivial and if P (x) − Pi (x) = c, then we’ll have
P (x) = Pi (y) and Pi (y) − Pi (x) = c. Consider sufficiently large x, y such that
Pi (x) is increasing. If x 6= y,
Pi (y) ≥ Pi (x + 1) =⇒ Pi (x + 1) − Pi (x) ≤ c
for infinitely many x. So, Pi (x) should be linear and we’re done.
and,
x x
af (x) + bf = cf + g(y).
y2 y
Multiplying the first equation by a and the second one by b, then, adding and
using the original equation, we shall find that
x
a2 f xy 2 + b2 f = (c2 − 2ab)f (x) + (a + b + c)g(y).
y2
29
Further, putting y 2 , instead of y, in the original equation, one can find that
2 x
= cf (x) + g y 2
af xy + bf
y2
for all sufficiently large y. Multiplying both sides by b, then subtracting,
yielding to
a2 − ab f xy 4 = c2 − 2ab − ac f (x) + T y 2 .
Thus,
a2 − ab f xy 4 − f xy 2 = T y 2 − T (y).
That is,
2
x
f xy +f = 2f (x) + R(y).
y2
√
Putting y instead of y we will eventually arrive at the desired conclusion.
The remaining cases for c = 2a and c = −a are the same.
Combinatorics
1. We claim the answer is mn − n.
First note that by Pick’s theorem, the area of a region is at least 2b − 1, where
b is the number of the lattice points on its boundary. Obviously, for any
region, b ≥ 3 and if b = 3, the region must be a triangle. But each of the
edges of this triangle lie between two consecutive rows of the grid, which is
impossible. So by Pick’s theorem, the area of a region is at least 42 − 1 = 1.
Consider the 2n small segments of length 1 in the top and the bottom edges
of the grid. We will prove that for each of these segments, we can assign a
30
triangle inside the grid with the area of 12 , counted in the infinite region, such
that this segment is an edge of the triangle, and we can choose these triangles
in a way that none of them intersect.
Label the points of the first row as a1 , a2 , . . . an , and the points of the second
row as b1 , b2 , . . . , bn . For all 1 ≤ i ≤ n, let ti be the greatest index such that
ai and bti are connected by a segment (if it exists). If ai isn’t connected to
any of the bj s and i > 1, let ti = ti−1 , and if a1 isn’t connected to any of the
bj s, let t1 = 1. Clearly, t1 ≤ t2 ≤ · · · ≤ tn , which means for all i 6= j, ai bti
and aj btj do not intersect. Also the segment ai bti doesn’t intersect with any
of the other drawn segments. Now assign triangle 4ai−1 ai bti to the segment
ai−1 ai . The area of this triangle is 21 and it is counted in the infinite region.
Also none of such triangles intersect. Similarly, we can assign such triangles
to the n segments of the last row of the grid.
So the area of the grid counted in the infinite region is at least 2n × 21 = n.
This means that the sum of the areas of finite regions is at most mn − n.
Because the area of each region is at least 1, there can be at most mn − n
finite regions.
For the equality, consider the grid below. Obviously, the area of the grid
counted in the infinite region is n and the area of each finite region is 1. So
there are mn − n finite regions and we’re done.
Clearly, f (n, k) = |A| + |B| + 2|C|. Because we can’t choose k bits from
the last n − 1 bits of the sequences that produce all the binary sequences of
length k, we have |A| + |B| + |C| ≤ f (n − 1, k). Now consider the set C. If
|C| ≥ f (n − 1, k − 1), we can fix k − 1 bits from the last n − 1 bits to produce
all sequences of length k − 1. So because of the definition of C, by fixing these
k − 1 bits and the first bit, all sequences of length k are produced, which is a
contradiction. So we have
31
By induction and using Pascal’s identity we get
k−1
X k−2
X n − 1 k−1
X n − 1 k−2 X n − 1
n−1
f (n, k) ≤ + =1+ +
i=0
i i=0
i i=1
i i=0
i
k−1
X n − 1 n − 1
=1+ +
i=1
i i−1
k−1X n k−1 X n
n
= + = .
0 i=1
i i=0
i
For the equality example, simply choose all binary sequences with at most
k − 1 zeros. This way, by fixing any k bits, the sequence with k zeros will
never be produced and we’re done.
and assume that we will swap the blocks A and B in this step. After swapping
these blocks, only four pairs may have been changed from good to bad. We
show it’s impossible that both of the pairs (ai−1 , ai ) and (aj−1 , aj ) change
from good to bad. Assume to contrary that both (ai−1 , ai ) and (aj−1 , aj )
were good but the pairs (aj−1 , ai ) and (ai−1 , aj ) are bad.
So we have ai−1 < ai < aj−1 and aj−1 < aj < ai−1 , which is a contra-
diction. Similarly, at most one of the pairs (ai+k , ai+k+1 ) and (aj+k , aj+k+1 )
can change from good to bad. This means that at each step at most two of
the good pairs can change from good to bad. In the beginning, the number
32
of good pairs was n − 1 and in the final sequence there is no good pair. So
we need at least b n2 c steps, which means we should swap at least b n2 c vertical
rectangles. Similarly, we should swap at least b n2 c horizontal rectangles and
we are done.
50
50
If we remove any column of the table, all the cells in each side of that column
form a path. Obviously, there are at least 5000 cells in one of these sides. So
the length of the path is at least 4999.
Suppose that we remove a row. Assume that the row is in the lower half of
the table. Clearly, there exists a path including all the cells in the upper half
of the table. So the length of this path is 4999 and we’re done.
5. Call two triangles in T adjacent if they share an edge. First note that for
any diagonal d drawn in P (T ), there are two adjacent triangles of T such that
d is drawn in P (T ), because of the quadrilateral formed by these triangles.
We call them d’s triangles.
Assume that two diagonals d1 , d2 intersect in P (T ). Because the diagonals of
the triangulation do not intersect, we can easily find three triangles t1 , t2 , t3
of T such that t1 , t2 are d1 ’s triangles and t2 , t3 are d2 ’s triangles.
On the other hand, for any three triangles t1 , t2 , t3 of T that t2 is adjacent to
33
t1 , t3 , we can find a pair of intersecting diagonals in P (T ).
Now construct a graph G of 98 vertices with each vertex corresponding to one
of the triangles in T and an edge connecting two vertices if and only if the
corresponding triangles are adjacent. Clearly, there are 97 edges in G (equal
to the number of diagonals in T ).
So if we let d1 , d2 , . . . , d98 be the degrees of the vertices of G (where 1 ≤ di ≤ 3
for all 1 ≤ i ≤ 98), then the number of pairs of edges in the graph sharing a
vertex is:
98
X di
.
i=1
2
Let r, s, t be the number of vertices
P98with degree 1, 2, 3, respectively. Obviously
r + s + t = 98. Also we have i=1 di = 2 × 97 = r + 2s + 3t. Note that
P98 di
i=1 2 = s + 3t. So we can conclude that
98
X di
f (T ) = = r + 4 × 97 − 3 × 98 = r + 94.
i=1
2
34
regions are the infinite regions we initially had. An intersection of a red and
a blue line is exactly on 4 bi-colored regions. Note that there are exactly
2n × n = 2n2 such points. So the sum of the numbers written is at most
On the other hand, it’s easy to find that the sum of the numbers in a row
corresponding to a bi-colored (finite or infinite) region is at least 2. So if there
are k bi-colored regions, we have
8n2 + 6n ≥ 2k ⇒ 4n2 + 3n ≥ k
as desired.
Geometry
1. Extend AP and DP until they meet DC and AB at X and Y , respectively.
L
X
B
K
P
A Y
C
D
35
2. Let D be the second intersection point of circumcircle of 4BOC and line
AC and K 0 be the intersection point of lines AP and CM , where M is the
>
midpoint of arc BC.
A
O
D
B C
P
M
K0 ≡ K
We have
1
∠BCK 0 = ∠BOC = ∠A = ∠DAB,
2
∠CDB = 2∠A ⇒ ∠ABD = ∠A ⇒ AD = BD.
36
A
F K E
I
O
B D X≡Y C
Note that
XB sin ∠XOB sin ∠IOB
= = .
XC sin ∠XOC sin ∠IOC
Which is equivalent to
|∠B−∠A|
∠C sin
sin 2 2
· ∠C
.
|∠B−∠A| sin
sin 2 2
Using Ceva’s theorem in triangle 4BOC for point I. Now, by the Ratio
lemma, we have
YB c sin ∠Y AB c sin ∠KAF
= · = · .
YC b sin ∠Y AC b sin ∠KAE
By Ceva’s theorem in 4AEF for point K, we have
sin 90◦ − ∠B ∠B
sin ∠KAF sin ∠KEF sin ∠KF A 2 sin 2
= · = ∠C
· ∠C
.
sin ∠KAE sin ∠KEA sin ∠KF E sin 90◦ − 2 sin 2
c sin 90◦ − ∠B ∠C
2 sin 2
· ∠C
= ∠B
b sin 90◦ − 2 sin 2
∠B ∠C
sin ∠C cos 2 sin 2
⇐⇒ · ∠C
= ∠B
.
sin ∠B cos 2 sin 2
x x
Which is obviously true since sin x = 2 sin 2 cos 2 .
37
4. Let E be the intersection point of line M K and the circumcircle of 4ABC,
then, since ∠BEM = ∠C 2 and ∠DIK = 90 − ∠AID so ∠BEM = ∠DIK, it
follows that the points B, I, K, E lie on a circle. Suppose BC intersects this
circle at point F 0 , other than B. Let N be the intersection point of line BD
and the circumcircle of 4ABC and G be where lines CM and BK meet.
A
N
M
D
E K
I
G
B C F0 ≡ F
IK ID
Since M N ⊥ AI, Noting the parallel lines, we have MN = DN . Now we
have
sin ∠C
ID 2 CI
= ∠B
· ,
DN sin 2 N C
and
CI BI
= ,
NC MI
so we have
sin ∠C
IK 2 CI BI
= ∠B
· = .
MN sin 2 N C M I
On the other hand since M I = M B we have
sin 90◦ − ∠A
MN 2
= .
MI sin ∠C
2
So we get
∠B ∠A
◦
KI · sin = BI · sin 90 − ,
2 2
and that easily gives us S4M IB = S4M IK . Then we have BG = GK and
since ∠KF 0 B = ∠KID = ∠C 0 0
2 we have KF k IC so F ≡ F . Thus, BIKF
is cyclic as desired.
38
5. Without loss of generality, let’s assume that AC ≥ AB. Let D be the
second intersection point of line AH and the circumcircle of 4ABC and let
O be circumcenter of 4ABC. Let the lines OD and BC meet at J. Then
we have ∠JDH = ∠JHD since BC is perpendicular bisector of HD. On
the other hand ∠DCA = 90 − ∠B + ∠C so we have ∠ODH = ∠B − ∠C.
Therefore JH k AO, since AO ⊥ EF so we get that JH ⊥ EF and J lies on
the line KH. Note that
∠P KD = ∠AKD = 90◦ − ∠B + ∠C.
Also
∠OJP = ∠OJC = ∠CDJ + ∠DCJ = ∠C + 90◦ − ∠B.
Therefore ∠OJP = ∠P KD and JDKP is cyclic and ∠P KH = ∠P KJ =
∠P DJ. But we have ∠P DJ = ∠P HJ = ∠P HK since D is the reflection of
H with respect to P J. So ∠P KH = ∠P HK which gives us P K = P H as
desired.
A
F
H O
J P
B C
D
K
6. Assume the circumcircles of 4ABY and 4AEX meet for the second time
at K. Since
∠KEX = ∠KAX = 180◦ − ∠KAY = 180◦ − ∠KBY = ∠KBS,
we find out that KBES is concyclic. We have
∠Y KB = ∠Y AB = ∠BCA = ∠P Y B,
39
∠EKX = ∠EAX = ∠ADE = ∠QXE.
Which gives us
∠Y ZX = ∠Y SX − ∠SY Z − ∠SXZ
= 180◦ − (∠BKE + ∠Y KB + ∠EKX)
= 180◦ − ∠Y KX.
Therefore, Y KXZ is inscribed in a circle called ω. Let’s say the tangent line
to ω at K meets XY at T . We have
K
Y
A B
X
E
S P
Q
Z C
D
Number Theory
An + k
1. Let An = an . . . a1 a0 , Bn = bn . . . b1 b0 , and Cn = . Obviously
Bn + k
Cn < 10, so Cn ∈ {1, 2, . . . , 9}.
40
Claim. If the sequence {ai } doesn’t eventually become constant 9, there
exists N ∈ N such that k + An < 10n+1 (∀n > N ).
Proof. Assume that there exists an index i large enough that k < 10i and
ai 6= 9. So we get
Therefore,
10n+1 (An + k)(Cn+1 − Cn ) .
An + k = 10θ × Sn
and 10 - Sn .
Let Ai−1 + k = 10α × Si−1 . Then
41
2. We are going to construct infinite pairs like (a, b) that suit the problems
condition. Consider c be a arbitrary natural number then put a = cn+1398
and b = cm+2019 . Then
and
a2019 + b1398 = c1398×2019 c1398m + c2019n .
So obviously set of the prime divisors of am + bn and a2019 + b1398 are the
same. Since c has been arbitrarily chosen we have infinite choices for (a, b).
3. Assume contrary that there exist infinite number of prime numbers, that
divides an element t of S. Let’s denote them p1 , p2 , . . . , pt . Take
x1 , x2 , . . . , x2mt +1 ∈ S.
x = pα1 α2 αt
1 p2 . . . pt .
Pigeonhole principle implies that there exist two index i, j such that if
xi = p α1 α2 αt
1 p2 . . . pt and xj = p1β1 pβ2 2 . . . pβt t ,
then we’ll have q ≡ 1 (mod 2m ) (It is obvious since ordq ab = 2m+1 ). And
Proof. Assume there exist two natural numbers x1 and x2 such that f (x1 ) =
42
f (x2 ) and x1 6= x2 . now choose y and x such that y + z = t2 − x1 then we
have
f (y) + f (z) + f (x1 ) = a2
for some natural number a. therefore,
and we have 2
t − s2 ≥ 2|t| − 1.
and
f (x0 − 1) + f (y0 + 1) + f (z) = b2 .
So we have
a(x + y + z) + 3b,
x + y + z,
3ba + a = t02 − t2 ,
43
which is a contradiction unless 3ba + 3b = 0 (because the left hand side is
either 0 or very big for big t). Now obviously a > 0 and we get b = 0, a = n2 .
5. a) We know that for every polynomial P (x) with degree n, the equation
P (x) ≡ 0 (mod p) has at most n distinct roots module p, for every prime
number p. Then for every pi ∈ S we have some ti ∈ {1, 2, . . . , p} where
pi - P (ti ). Now choose t by Chinese Reminder Theorem such that t ≡ ti
(mod pi ). Then for every pi ∈ S we have pi - P (t)
b) Put
P (x) = x(x − 1) . . . (x − 1396) + 1398!.
Note that 1397 and 1398 are composite numbers. then obviously for
any p ≤ 1398 and n ∈ N there exists an ai such that 1 ≤ ai ≤ 1398
and n ≡ ai (mod pi ). Therefore pi | P (n) and since P (x) is monic it
satisfies our desired conditions.
6. Assume for a contradiction that ordm (a) has at least two prime factors.
Then we can write ordm (a) = rs where gcd(r, s) = 1 and r, s are both greater
than 1. Now take a natural solution pair (k, `) of the equation ks + r` ≡ 1
(mod ϕ(m)), That definitely exists by Bézout’s theorem, and consider (x, y) =
−aks , −ar` . We claim this choice of (x, y) will contradict the condition of
problem. First of all:
Where the last equality follows from Euler’s Theorem. Now we have to prove
a lemma:
Lemma. Let z, t be natural numbers such that ordz (t) is odd. Then we
have ordz (−t) = 2ordz (t).
Proof. Let ordz (t) = w then (−t)w ≡ −1 (mod z) and (−t)2w ≡ 1 (mod z).
So ordz (−t) = 2q is even. Therefore if q < w we have t2q ≡ 1 (mod z) which
gives w | 2q and since w is odd we have w | q which is clearly a contradiction.
Using the lemma, it is easy to see that ordm (x) = 2r and ordm (y) = 2s
which is clearly a contradiction hence ordm (a) has at most one prime factor.
44
Team Selection Test
1. Let dX,Y be the weight assigned to the edge XY of the graph. Clearly, in
each triangle the maximum weight of an edge is the sum of the two others.
Let dA,B be the maximum weight among all weights assigned to the edges.
Now assign 0 to vertex A and dA,X to any other vertex X.
Obviously, this labeling works for all edges including A. We claim that it
works for all other edges.
Assume to the contrary that the labeling doesn’t work for an edge XY of the
graph. So dX,Y is not the difference between dA,X and dA,Y , which means
dX,Y = dA,X + dA,Y . Note that B cannot be any of X, Y . Since dA,B is the
maximum edge number, we have dB,X = dA,B −dA,X and dB,Y = dA,B −dA,Y .
Now consider triangle BXY . If dX,Y is the maximum weight of an edge in
this triangle, we have
dX,Y = dB,Y + dB,X =⇒ dX,Y = dA,B − dA,Y + dA,B − dA,X
=⇒ 2dX,Y = 2dA,B .
Which is impossible since the weights are distinct. So the maximum edge
weight in triangle BXY is not dX,Y . Without loss of generality, assume that
dB,Y is the maximum one. So we have
dB,Y = dB,X + dX,Y =⇒ dA,B − dA,Y = dA,B − dA,X + dA,X + dA,Y
=⇒ dA,Y = 0.
Which is again a contradiction. This completes the proof.
45
And since ∠ARS = ∠ASR, we have ∠M RS = ∠M SR and M S = M R.
Therefore A, M and O lie on the perpendicular bisector of RS. Now let X
be the intersection point of lines P E, BD.
Q S
A
P
D
E
R
M
O
B C
46
for infinitesimal positive number x.
For the sake of contradiction, assume that there exists an example. Since
Pi (x) − P1 (x) also satisfies the inequality, assume that P1 (x) = 0. Then by
contradiction, every Pi (x) has constant term zero.
Now, P3 (x) is always negative for values close to 0. Therefore, the term
with the minimal degree in P3 (x) is of the form −ax2b , for some positive real
number a and positive integer b. Analogously, for P2 (x), P4 (x), the terms of
the minimal degrees are of the form ax2b−1 , for some positive real number a
and positive integer b. Let
P2 (x) = a2 x2b2 −1 + · · ·
P3 (x) = −a3 x2b3 + · · ·
P4 (x) = a4 x2b4 −1 + · · ·
2b2 − 1 > 2b3 > 2b4 − 1 =⇒ b2 > b3 > b4 =⇒ P2 (x) < P4 (x),
for all sufficiently small positive real numbers x, contradicting the assumption
P2 (x) > P4 (x) > 0 > P3 (x).
But we claimed that n = 2, 3 are interesting. The case n = 2 is trivial and
for n = 3, we have
Pi (x) = xQi (x) + c.
If σ(i) = i, we need to find polynomials Qi such that Q1 (x) < Q2 (x) < Q3 (x)
for x ∈ (−, 0) and Q1 (x) > Q2 (x) > Q3 (x) for x ∈ (0, ). It’s clear that
linear polynomials will work.
If σ(1) = 1, σ(2) = 3 and σ(3) = 2, let Q1 (x) = 0 and Q2 (x), Q3 (x) be linear
polynomials passing through point 0 with negative leading coefficient. Other
permutations are the same and we’re done.
Also
∞
[
Si = A = {x | ∃n ≥ 0 : g n (x) = 1} .
i=1
47
And if g(x) ∈ A:
∃i : g(x) ∈ Si =⇒ x ∈ Si+1 ⊆ A.
Therefore, B is non-empty. Now if S2 has a finite number of elements, it has
an element that is largest of all the elements. Let us denote it by z. Since
g(x) > x,
max(x | x ∈ Si+1 ) ≤ max(x | x ∈ Si ).
Therefore, all the elements of A except 1 are less than or equal to z. So, the
non-empty interval (z, 1) doesn’t exist in A, which is a contradiction.
48
Case 1) x = d1 .
Consider the circle ω with center Pn+2 and radius d1 . Assume that
Pn+2 Pn+1 intersects ω at K such that Pn+2 lies between Pn+1 and K.
Let Q be a point on the smaller arc P1 K of ω. Obviously
Also
∠Pn+1 Pn+2 Q, ∠QP1 P2 < 180◦ .
So the polygon P1 . . . Pn+1 Pn+2 Q is convex and has the desired prop-
erties.
Pn+1
Pn+2
P2
K
P1 Q
Case 2) x < d1 .
Let ω 0 be the circle with center P1 and radius x. Since
49
7. The answer is 1 for m = 0, p for m = 1 and ϕ(pm ) for m > 1.
Note that Zp [x] is a unique factorization domain. So any monic P (x) ∈ Zp [x]
can be uniquely expressed as P (x) ≡ A(x)2 Q(x) (mod p), where A(x), Q(x)
are monic polynomials and Q(x) is square-free. Let fn be the number of all
square-free monic polynomials of Zp [x] with degree n. Any non-square-free
monic polynomial can be expressed as P (x) = A(x)2 S(x) where S(x) is a
square-free monic polynomial.
If deg A(x) = m, then S(x) ∈ fn−2m . We have fn−2m options for S(x) and
pm options for A(x). So
n
b2c
X
n
fn = p − fn−2m pm .
m=1
8. We claim that Bob has a winning strategy and the maximum point differ-
2
ence he can make sure will happen is 20202 .
First we show Bob’s strategy. Let ` be the vertical line that dissects the table
into two equal tables. After Alice colors a cell, Bob can easily color the cell
symmetric to that cell with respect to `. This way, Bob gets the same point
Alice got from the column and gets one more point than Alice got from the
row, because the cell he colored is in the same row as Alice’s cell. So after
each move, Bob earns exactly one more point than Alice, which means at the
2
end he has earned 20202 points more than Alice.
Now we show that Alice can make sure the difference will not be greater
2
than 2020
2 points. In each move, Alice chooses the cell that she can earn the
maximum possible points by coloring. Assume that she earns p points by
this move. Because it is the maximum choice, any cell that Bob chooses in
the next move will be in the same row or column with at most p + 1 colored
2
cells.This means the point difference in the end will be at most 2020 2 and
we’re done.
50
T
A S0
S
KJ E
F 0
J
I
B D M XA C
P
X0 N X
51
J and J 0 are symmetrical, it suffices to show that AXA k IJ 0 to get AP k IJ.
If M is the midpoint of BC, we know that M I k AXA . So we just need to
prove that M, I and J 0 are collinear which is true since SQN K is cyclic and
>
10. Let P be the midpoint of segment BC and J be the midpoint of arc BC
(J 6= A).
A
Q
M D
N
I
B P R C X
J
We call the circumcircle of triangle 4CID, ω and the intersection point of ω
and segment BC, R. We have
So, ∠QIC = 90◦ and N is the center of ω which gives us ∠QRC = 90◦ and
QR k AP . ∠RDC = ∠RQC gives us ∠JAC = ∠JDC. So, points D, R
and J are collinear. Since ∠RN C = 2∠RQC = 2∠P AC = ∠A, we have
RN k AB. Therefore
AN BR AN RC BM
= =⇒ · · = 1.
NC RC N C BR M A
So, the lines AR, BN and CM are concurrent. Let X be the intersection
point of lines AD and BC. It suffices to show that (XR, CB) = −1. Since
>
D, R and J are collinear and J is the minpoint of arc BC, We have
D
(XR, CB) = (AJ, CB) = −1.
52
1
11. Take a sufficiently large m (m > 23000 ) and put x = m + k−1 . Note that
n X n mn−i
1
m+ = .
k−1 i m(k−1)i
ki >n
Because
X n mn−i n
1 X n 2n+1
(k−1)i
< < < 1,
i m m i=0 i m
ki >n
n
1
and the remaining terms of m + k−1 are all integers. Now if n = kt + r
such that k − 1 ≥ r ≥ 0, we have two cases:
Case 1 r 6= 0.
n X n 1
1 i=t+1 1
m+ = k −n
> k−r
,
k−1 i m i m
ki >n
( n−1 )
1 X n − 1 1 n
m+ = < 2n × k−r+1 ,
k−1 i mki −n+1 m
ki >n−1
i≥t+1
n ( n−1 )
1 n n 1 1
>2 × =⇒ m+ > m+ .
mk−r mk−r+1 k−1 k−1
Case 2 r = 0.
n X n 1
1 n
m+ = < 2n × k ,
k−1 i mki −n m
ki >n
i≥t+1
( n−1 )
1 X n − 1 1 1
m+ = ≥ ,
k−1 i mki −n+1 m
ki >n−1
i≥t
( n−1 ) n
1 k≥2 n n 1 1
> 2 × k =⇒ m+ > m+ .
m m k−1 k−1
Therefore,
1 n−1 1 n
(m + ) > (m + ) ⇐⇒ k | n,
k−1 k−1
n−1
x > {xn } ⇐⇒ k | n.
53
12. Assume that p = 3. Then obviously
x1 can take any value. Now suppose
p−1
that p ≥ 5. We want to prove that x1 , x2 , . . . , x p−1 ∈ {0, 1} 2 .
2
Note that
p−1
2
X p−1 p−1 p−1
(1 − axi ) 2 ≡ + M (1 − a) 2 − 1 (mod p),
i=1
2
p−1 p−1
If we choose a such that (1 − a) 2 = 1, then by using (1 − axi ) 2 = ±1 or 0
and the above equation we have for each i,
p−1 1 − axk
(1 − axi ) 2 = =1
p
So if pt = 1 we get
1 − (1 − t)xi
=1
p
Now if xi 6= 0 then the map f (t) = 1 − (1 − t)xi is bijective. Hence if P is
the set of square remainder, f define a bijection from P to itself and
X X
f (t) = t = 0,
t∈P t∈P
54