The 4th Olympiad of Metropolises Mathematics
The 4th Olympiad of Metropolises Mathematics
The 4th Olympiad of Metropolises Mathematics
Mathematics
Solutions
Day 1
Problem 1. Three prime numbers p, q, r and a positive integer n are given such
that the numbers
p+n q+n r+n
, ,
qr rp pq
are integers. Prove that p = q = r. (Nazar Agakhanov)
Solution. We can assume without loss of generality that p ≥ q ≥ r.
Since p | q + n and p | r + n, we have p | q − r, but 0 ≤ q − r < q ≤ p, so we must
have q = r. Furthermore, q | p + n and q | r + n imply q | p − r = p − q, so q | p,
which is only possible if p = q = r.
Problem 2. In a social network with a fixed finite set of users, each user has a fixed
set of followers among the other users. Each user has an initial positive integer rating
(not necessarily the same for all users). Every midnight the rating of every user
increases by the sum of the ratings that his followers had just before the midnight.
Let m be a positive integer. A hacker, who is not a user of the network, wants all
the users to have ratings divisible by m. Every day, he can either choose a user and
increase his rating by 1, or do nothing. Prove that the hacker can achieve his goal
after some number of days. (Vladislav Novikov)
Solution. Let n be the number of users in the network. We will consider the re-
mainders of ratings modulo m. The hacker wants to change all n remainders to
zero.
If the hacker was allowed to increase ratings more than once on the same day then
he could achieve his goal on the first day. Indeed, he could first increase the rating
of the first user several times until it becomes 0 modulo m and then similarly for
the second user, and so on. After that the hacker does not need any further action,
the ratings of all users will be zeroes from the second day. We will call this initial
strategy.
We will prove that the hacker can do the same operations but on different days, so
that after some days the ratings of all users will be 0.
We represent the states of the network by vectors containing the modulo m remain-
ders of the n users’ ratings. Such vectors can be added modulo m. E.g., if m = 4
1
and n = 6, then
For a vector X of ratings before midnight we denote by f (X) the new state after
midnight.
Lemma.
f (X + Y ) = f (X) + f (Y ) .
Proof of the lemma. We need to show that vectors f (X +Y ) and f (X)+f (Y ) match
at all the positions, i.e., for every person. Consider such a person and let his name
be Bob. Let bx be Bob’s remainder in X, and let sx be the sum of ratings of his
followers modulo m in X. Let by and sy be correspondingly Bob’s remainder and
the sum of remainders of his followers in Y .
Then in f (X) Bob has bx + sx , in f (Y ) Bob has by + sy , and in f (X + Y ) Bob has
bx + by + sx + sy . Lemma is proven.
Let us calculate the future effect of a hacker’s action. If X is the initial vector and
the hacker does not do anything, we obtain the sequence of vectors
2
Thus, we get a strategy for the hacker, the result of which after some time (no more
than mn days after the last change) does not differ from the initial strategy with
all actions on the first day. The result of the initial strategy by this moment is the
zero vector. So, it will be equal to zero in our new strategy with no more than one
action per day.
Problem 3. In a non-equilateral triangle ABC point I is the incenter and point O
is the circumcenter. A line s through I is perpendicular to IO. Line ` symmetric to
the line BC with respect to s meets the segments AB and AC at points K and L,
respectively (K and L are different from A). Prove that the circumcenter of triangle
AKL lies on the line IO. (Dušan Djukić)
Solution 1. Let the incircle ω touch the lines BC, AC, AB and KL at points D,
E, F and G, respectively. Denote the circumcenter of triangle AKL by U .
Since DG k IO, we have ∠KIG = ∠KF G = ∠F DG = ∠F DI + ∠IDG = ∠KBI +
∠OIG (in oriented angles) and hence ∠KIO = ∠KBI. It follows that the circle
BIK is tangent to the line IO. Similarly, the circle CIL is tangent to the line IO.
Invert the diagram through ω (fig. 1). The points A, B, C, K and L map to the
midpoints A0 , B 0 , C 0 , K 0 and L0 of EF , F D, DE, F G and EG, respectively. The
images of the circles BIK and CIL are the lines B 0 K 0 and C 0 L0 , so these two lines are
parallel to IO. The circles ABC and AKL map to circles A0 B 0 C 0 and A0 K 0 L0 whose
centers are O1 and U1 , respectively. Thus O1 ∈ IO and U1 ∈ IU . Since B 0 C 0 L0 K 0
K
G G
L L′
′
K
E E
F I ℓ F A′ I
C′
B′
B D C D
Figure 1: for the solution of the problem 3
3
−−−→ −−→
translation by vector B 0 K 0 = C 0 L0 takes the circle A0 B 0 C 0 to the circle A0 K 0 L0 , so
the line O1 U1 is parallel to IO. It follows that U1 lies on IO, and so does U .
Solution 2. Let the incircle ω touch the lines BC, AC, AB and KL at points D, E,
F and G, respectively. Note that GD ⊥ s, so GD k IO. Denote the circumcenter of
4AKL by U . We use the following known fact:
Lemma. The line IO is the Euler line of triangle DEF .
Proof of the lemma. Let us apply the inversion with respect to the incircle ω. Points
A, B and C map to the midpoints of EF , F D and DE, so the circumcircle of 4ABC
maps to the nine-point circle of 4DEF . Therefore the nine-point center of 4DEF
lies on IO, i.e. O lies on the Euler line of 4DEF . Lemma is proven.
By the Lemma, the centroid M of 4DEF lies on IO. Similarly, we can show that
the centroid N of 4GEF lies on IU . However, M N k DG k IO, which implies that
U lies on IO.
Solution 3. We denote by δ(X, →
−
a ) the oriented distance from point X to line →
−
a.
Lemma. A point X in the plane lies on the line s if and only if
−−→ −→ −−→
f (X) = δ(X, BC) + δ(X, CA) + δ(X, AB) = 3r ,
If s k BC, triangle ABC is isosceles and the problem statement is trivial by symme-
try. Now assume that the lines s, KL and BC meet at a point X0 . By the lemma,
f (X0 ) = 3r, hence f1 (X0 ) = 3r, which in turn implies X0 ∈ s1 . Therefore the lines
s and s1 coincide, i.e. U is on IO.