year
stringdate
1961-01-01 00:00:00
2025-01-01 00:00:00
tier
stringclasses
5 values
problem_label
stringclasses
119 values
problem_type
stringclasses
13 values
exam
stringclasses
28 values
problem
stringlengths
87
2.77k
solution
stringlengths
834
13k
metadata
dict
problem_tokens
int64
50
903
solution_tokens
int64
500
3.93k
2017
T1
G1
Geometry
Balkan_Shortlist
Let $A B C$ be an acute triangle. Variable points $E$ and $F$ are on sides $A C$ and $A B$ respectively such that $B C^{2}=B A \cdot B F+C E \cdot C A$. As $E$ and $F$ vary prove that the circumcircle of $A E F$ passes through a fixed point other than $A$.
2 Let the $D$ be the intersection of $B E$ and $C F$ and let circumcircle of triangle $C F A$ intersect $B C$ at point $G$. From power of point we have $$ B G \cdot B C=B F \cdot B A $$ Combining (6) with the problem statement we get $$ B C^{2}=B A \cdot B F+C E \cdot C A=B G \cdot B C+C E \cdot C A $$ and from here we get $$ C E \cdot C A=B C(B C-B G)=B C \cdot C G $$ (7) implies that $E, A, B, G$ are concyclic as well. This gives us $$ \measuredangle G A C=\measuredangle G A E=\measuredangle G B E=\measuredangle C B D $$ and $$ \measuredangle B A C-\measuredangle G A C=\measuredangle G A B=\measuredangle G A F=\measuredangle G C F=\measuredangle B C D . $$ Adding these two equalities gives us $$ \measuredangle B A C=\measuredangle C B D+\measuredangle B C D=180^{\circ}-\measuredangle B D C . $$ This implies that $A, E, D, F$ are concyclic. Now let the second intersection of the circumcircles of $B D C$ and $A F D E$ be $X$. We have $$ \angle X A B=\angle X A F=\angle X D F=180^{\circ}-\angle X D C=\angle X B C $$ and $$ \measuredangle X A C=\angle X A E=180^{\circ}-\measuredangle X D E=\angle X D B=\measuredangle X C B $$ (8) and (9) imply that $B C$ is tangent to the circumcircles of $\triangle X A B$ and $\triangle X A C$ respectively. Let $A X$, the radical axis of the two circumcircles, intersect $B C$ at $Q$. Now we have by power of point $$ Q B^{2}=Q X \cdot Q A=Q C^{2} $$ giving up that $A X$ bisects $B C$. So $X$ is the point on the median from $A$ to side $B C$ such that $\measuredangle B X C=180-\measuredangle B A C$. This point is unique and we have proven that it is always on the circumcircle of $A E D F$.
{ "problem_match": "\n## G1", "resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "solution_match": "\n## Solution" }
84
594
2017
T1
G3
Geometry
Balkan_Shortlist
Let $A B C$ be a triangle with $A B<A C$ inscribed into a circle $c$. The tangent of $c$ at the point $C$ meets the parallel from $B$ to $A C$ at the point $D$. The tangent of $c$ at the point $B$ meets the parallel from $C$ to $A B$ at the point $E$ and the tangent of $c$ at the point $C$ at the point $L$. Suppose that the circumcircle $c_{1}$ of the triangle $B D C$ meets $A C$ at the point $T$ and the circumcircle $c_{2}$ of the triangle $B E C$ meets $A B$ at the point $S$. Prove that the lines $S T, B C, A L$ are concurrent.
We will prove first that the circle $c_{1}$ is tangent to $A B$ at the point $B$. In order to prove this, we have to prove that $\measuredangle B D C=\measuredangle A B C$. Indeed, since $B D \| A C$, we have that $\measuredangle D B C=\measuredangle A C B$. Additionally, $\angle B C D=\measuredangle B A C$ (by chord and tangent), which means that the triangles $A B C, B D C$ have two equal angles and so the third ones are also equal. It follows that $\angle B D C=\measuredangle A B C$, so $c_{1}$ is tangent to $A B$ at the point $B$. Similarly, the circle $c_{2}$ is tangent to $A C$ at the point $C$. As a consequence, $\measuredangle A B T=\measuredangle A C B$ (by chord and tangent) and also $\measuredangle B S C=\measuredangle A C B$. By the above, we have that $\measuredangle A B T=\measuredangle B S C$, so the lines $B T, S C$ are parallel. Now, let $S T$ intersect $B C$ at the point $K$. It suffice to prove that $K$ belongs to $A L$. From the trapezoid $B T C S$ we get that $$ \frac{B K}{K C}=\frac{B T}{S C} $$ and from the similar triangles $A B T, A S C$, we have that $$ \frac{B T}{S C}=\frac{A B}{A S} $$ By (1), (2) we get that $$ \frac{B K}{K C}=\frac{A B}{A S} $$ From the power of point theorem, we have that $$ A C^{2}=A B \cdot A S \Rightarrow A S=\frac{A C^{2}}{A B} $$ Going back into (3), it gives that $$ \frac{B K}{K C}=\frac{A B^{2}}{A C^{2}} $$ From the last one, it follows that $K$ belongs to the symmedian of the triangle $A B C$. Finally, recall that the well known fact that since $L B$ and $L C$ are tangents, it follows that $A L$ is the symmedian of the triangle $A B C$, so $K$ belongs to $A L$, as needed.
{ "problem_match": "\n## G3", "resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "solution_match": "\n## Solution" }
178
566
2017
T1
G5
Geometry
Balkan_Shortlist
Let $A B C$ be an acute angled triangle with ortocenter $H$, centroid $G$ and circumcircle $\omega$. Let $D$ and $M$ respectively be the intersection of lines $A H$ and $A G$ with side $B C$. Rays $M H$ and $D G$ interect $\omega$ again at $P$ and $Q$ respectively. Prove that $P D$ and $Q M$ intersect on $\omega$.
2 We prove that $M, D, P, A$ are concyclic same as in solution 1. Let $P D$ intersect $\omega$ again at $S$ We see that this gives us $\measuredangle S A H^{\prime}=\measuredangle S P H^{\prime}=\measuredangle D P M=\measuredangle D A M$. Combining this with $\measuredangle B A H^{\prime}=\measuredangle C A D$ we get: $$ \measuredangle S A H^{\prime}+\measuredangle S A B=\measuredangle H^{\prime} A B=\measuredangle C A D=\measuredangle D A M+\measuredangle M A C $$ ## Giving us $$ \measuredangle S A B=\measuredangle M A C $$ Combining (*) with $\angle A S B=\measuredangle A C B=\measuredangle A C M$ we get triangles $A S B$ and $A C M$ are similar. This gives us $$ \frac{A B}{A M}=\frac{S B}{C M} . $$ Analogously we get triangles $A S C$ and $A B M$ are similar. This gives us $$ \frac{A C}{A M}=\frac{S C}{B M} . $$ Combining ( ${ }^{* *}$ ) and ( $\left.{ }^{(* *}\right)$ we get $$ \frac{A B}{A C}=\frac{S B}{S C} $$ since $B M=C M$. Let $S M$ intersect $\omega$ again at $Q^{\prime}$. Let $Q^{\prime} D$ intersect $A M$ at $G^{\prime}$. We wish to prove that $Q^{\prime} \equiv Q$ and $G^{\prime} \equiv G$. It is enough to prove that $A G^{\prime}=2 G^{\prime} M$. Since triangles SMB and $C M Q^{\prime}$ are similar we get $$ \frac{S B}{S M}=\frac{C Q}{C M} . $$ Analogously SMC and BMQ' are similar and we get $$ \frac{S M}{S C^{\prime}}=\frac{B M}{B Q^{\prime}} . $$ Multiplying (2) and (3) we get $\frac{S B}{S C}=\frac{C Q^{\prime}}{B Q^{\prime}}$. Combining that with (1) we get $$ \frac{A B}{A C}=\frac{C Q^{\prime}}{B Q^{\prime}} . $$ Since $Q^{\prime}$ and $A$ are on the same side of $B C$ (4) gives us $A Q^{\prime} \| B C$. This means that $A B C Q^{\prime}$ is an isosceles trapezoid. Let $Q^{\prime} S$ intersect $A D$ at point $T$. Since $M D \| A Q^{\prime}, M A=M Q^{\prime}$ and $\angle T A Q^{\prime}=90^{\circ}$ we get that $M$ is center of the circumcircle of the right triangle TAQ'. Applying Menelaus' theorem on $D-G^{\prime}-Q^{\prime}$ and triangle $A M T$ we get $$ \frac{A G^{\prime}}{M G^{\prime}} \cdot \frac{M Q^{\prime}}{T Q^{\prime}} \cdot \frac{T D}{A D}=1 $$ Since $M A=M T$ and $M D \perp A T$ this means $$ D A=D T . $$ Also since $M$ is the circumcenter of triangle $T A Q^{\prime}$ we get $$ 2 M Q^{\prime}=T Q^{\prime} . $$ Combining (5) with (6) and (7) we get $2 M G^{\prime}=A G^{\prime}$. This gives us $G^{\prime} \equiv G$ and $Q^{\prime} \equiv Q$, thus proving the problem statement.
{ "problem_match": "\n## G5", "resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "solution_match": "\n## Solution" }
100
945
2017
T1
G6
Geometry
Balkan_Shortlist
Construct outside the acute-angled triangle $A B C$ the isosceles triangles $A B A_{B}, A B B_{A}$, $A C A_{C}, A C C_{A}, B C B_{C}$ and $B C C_{B}$, so that $$ A B=A B_{A}=B A_{B}, A C=A C_{A}=C A_{C}, B C=B C_{B}=C B_{C} $$ and $$ \measuredangle B A B_{A}=\measuredangle A B A_{B}=\measuredangle C A C_{A}=\measuredangle A C A_{C}=\measuredangle B C B_{C}=\measuredangle C B C_{B}=\alpha<90^{\circ} . $$ Prove that the perpendiculars from $A$ to $B_{A} C_{A}$, from $B$ to $A_{B} C_{B}$ and from $C$ to $A_{C} B_{C}$ are concurrent.
Lemma. If $B C D$ is the isoceles triangle which is outside the triangle $A B C$ and has $$ \measuredangle C B D=\measuredangle B C D=90^{\circ}-\alpha: \stackrel{\text { not }}{=} \beta, $$ then $A D \perp B_{A} C_{A}$. Proof of the lemma. Construct an isosceles triangle $A B E$ outside the triangle $A B C$, so that $\measuredangle A B E=\measuredangle A E B=\beta$. Then $A E=A B=A B_{A}$ and $\measuredangle E A B_{A}=\alpha$, so a rotation of center $A$ and angle $\alpha$ sends $C_{A}$ to $C$ and $B_{A}$ to $E$, hence $\Varangle\left(\overrightarrow{B_{A} C_{A}}, \overrightarrow{E C}\right)=\alpha$ (the angle between vectors is considered oriented). Also triangles $E B A$ and $B C D$ are similar, so a rotation of center $B$ and angle $\beta$, followed by a dilation of ratio $\frac{E B}{A B}=\frac{B C}{B D}$ sends $E$ to $A$ and $C$ to $D$, hence $\measuredangle(\overrightarrow{E C}, \overrightarrow{A D})=\beta$ (also oriented angle). This shows that $$ \measuredangle\left(\overrightarrow{B_{A} C_{A}}, \overrightarrow{A D}\right)=\measuredangle\left(\overrightarrow{B_{A} C_{A}}, \overrightarrow{E C}\right)+\measuredangle(\overrightarrow{E C}, \overrightarrow{A D})=\alpha+\beta=90^{\circ} . $$ Returning to the solution of the problem, denote $A^{\prime}$ the intersection of $B C$ with the perpendicular from $A$ to $B_{A} C_{A}$. Then $A^{\prime}$ belongs to the segment $B C$ and $$ \frac{A^{\prime} B}{A^{\prime} C}=\frac{A B \sin (B+\beta)}{A C \sin (C+\beta)} $$ Since similar relations are true for the intersections $B^{\prime}, C^{\prime}$ of the other two perpendiculars with the opposite sides, this yields $$ \frac{A^{\prime} B}{A^{\prime} C} \cdot \frac{B^{\prime} C}{B^{\prime} A} \cdot \frac{C^{\prime} A}{C^{\prime} B}=\frac{A B \sin (B+\beta)}{A C \sin (C+\beta)} \cdot \frac{B C \sin (C+\beta)}{B A \sin (A+\beta)} \cdot \frac{C A \sin (A+\beta)}{C B \sin (B+\beta)}=1 $$ whence the conclusion. Remark. The conditions 'acute-angled' and ' $\alpha<90^{\circ}$ ' are not essential, but without them there are cases when $A^{\prime}$ does not belong to the segment $B C$, or the perpendiculars become parallel.
{ "problem_match": "\n## G6", "resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "solution_match": "\n## Solution." }
232
740
2017
T1
G7
Geometry
Balkan_Shortlist
Let $A B C$ be an acute triangle with $A B \neq A C$ and circumcirle $\Gamma$. The angle bisector of $B A C$ intersects $B C$ and $\Gamma$ at $D$ and $E$ respectively. Circle with diameter $D E$ intersects $\Gamma$ again at $F \neq E$. Point $P$ is on $A F$ such that $P B=P C$ and $X$ and $Y$ are feet of perpendiculars from $P$ to $A B$ and $A C$ respectively. Let $H$ and $H^{\prime}$ be the ortocenters of $A B C$ and $A X Y$ respectively. $A H$ meets $\Gamma$ again at $Q$. If $A H^{\prime}$ and $H H^{\prime}$ intersect the circle with diameter $A H$ again at points $S$ and $T$, respectively, prove that the lines $A T, H S$ and $F Q$ are concurrent.
WLOG, assume $A B<A C$. Let $M$ be the midpoint of side $B C$ and let the circumcircle of $D F E$ intersect $A F$ again at $K$. Since $$ 90^{\circ}+\measuredangle M E D=180^{\circ}-\measuredangle M D E=\measuredangle A B C+\frac{\measuredangle B A C}{2}=\measuredangle A F E=\angle D F E+\angle A F D=90+\angle A F D $$ $\measuredangle M^{\prime} C E=\measuredangle E C P$. From the angle bisector theorem we get $$ \frac{M^{\prime} E}{P E}=\frac{C M^{\prime}}{C P}=\frac{M^{\prime} L}{P L} $$ Multiplying (1) and (2) we get $\frac{M E}{L M}=\frac{M^{\prime} E}{M^{\prime} L}$ adding 1 on both sides we get $L M=L M^{\prime}$ from which it follows that $M \equiv M^{\prime}$ and thus $C E$ and $C L$ are the bisectors of $\measuredangle M C P$. Now we have Since $X$ and $Y$ are perpendicular to $A B$ and $A C$ we have $B X P M$ and $C Y P M$ are concyclic. Here we get $$ \angle M Y C=\angle M P C=90^{\circ}-\angle B A C $$ and it follows that $Y M \perp A X$ Similarily we get $X M \perp A Y$ and so $M$ is the ortocentar of $\triangle A X Y$ giving us $M \equiv H^{\prime}$. Since ATHS and ATQF are both concyclic it is enough to prove that $H S F Q$ is concyclic. Since $$ \begin{aligned} \triangle B Q C & =180^{\circ}-\angle B A C \\ & =\angle B H C \end{aligned} $$ and $H Q \perp B C$ it follows that $B C$ is the perpendicular bisector of $H Q$. It is enough to prove that $B C$ is the perpendicular bisector of $S F$. Let $A M$ and $T H$ meet $\Gamma$ again at points $A^{\prime}$ and $N$ respec- tively. Since $H N$ passes through the midpoint of side $B C$ and $$ \angle B H C=180-\angle B A C=\angle B N C $$ it follows that $B N C H$ is a paralelogram. From here we get that $$ \angle N C B=\angle H B C=90^{\circ}-\angle A C B $$ giving us $\measuredangle N C A=90^{\circ}$ and similarily $\measuredangle N B A=90^{\circ}$. This means $A N$ is the diameter of $\Gamma$, so $$ \begin{aligned} \angle N A^{\prime} S & =\angle N A^{\prime} A=90^{\circ} \\ & =\angle H S A=\angle H S A^{\prime} \end{aligned} $$ and from here we have $H S \| A^{\prime} N$. Now since $H S \| A^{\prime} N$ and $M$ is the midpoint of $H N$ (because $B H C N$ is a paralelogram) we get that $H S N A$ is a paralelogram. Since $$ \measuredangle F A E=\measuredangle E A M=\measuredangle E A A^{\prime} $$ we get that $F A^{\prime} B C$ is an isocelese trapezoid which means that $M E$ is the perpendicular bisector of $F A^{\prime}$ (since it is the perpendicular bisector of $B C$ ). This gives us $B F=C A^{\prime}=B S$ and $C F=B A^{\prime}=C S$ giving us that $S B F C$ is a deltoid, meaning that $B C$ is the perpendicular bisector of FS. This means that $H S F Q$ is an isoceles trapezoid. Now from the radical axis theorem of the circumcircles of HSFQ, HSAT and $A T Q F$ we get that $Q F$, $H S, A T$ are concurrent.
{ "problem_match": "\nG7", "resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "solution_match": "\n## Solution" }
223
1,043
2017
T1
G8
Geometry
Balkan_Shortlist
Given an acute triangle $\triangle A B C(A C \neq A B)$ and let $(C)$ be its circumcircle. The excircle $\left(C_{1}\right)$ corresponding to the vertex $A$, of center $I_{a}$, tangents to the side $B C$ at the point $D$ and to the extensions of the sides $A B, A C$ at the points $E, Z$ respectively. Let $I$ and $L$ are the intersection points of the circles $(C)$ and $\left(C_{1}\right), H$ the orthocenter of the triangle $\triangle E D Z$ and $N$ the midpoint of segment $E Z$. The parallel line through the point $I_{a}$ to the line $H L$ meets the line $H I$ at the point $G$. Prove that the perpendicular line ( $e$ ) through the point $N$ to the to the line $B C$ and the parallel line $(\delta)$ through the point $G$ to the line $I L$ meet each other on the line $\mathrm{HI}_{a}$
We have $(e) \perp B C$ and $I_{a} D \perp B C$, so $(e) \| I_{a} D$. Let $T$. $S$ be the midpoints of the segments $H I_{a}, H D$ respectively and $Y$ the point of intersection of the lines $H D, E Z$ Then, $T S \| I_{a} D$. $T S \perp B C$ and $S Y \perp E Z$ The Euler circle ( $\omega$ ) of the triangle EDZ passes through the points $N, Y, S$. Therefore, the segment $S N$ is a diameter of the circle $(\omega)$. Thus, the center of $(\omega)$, let $T^{\prime}$, is the midpoint of the segment $S N$ On the other hand, we know that the center of Euler circle ( $\omega$ ) is the midpoint $T$ of $\mathrm{HI}_{a}$. So $T \equiv T^{\prime}$. Therefore, the line ( $e$ ) passes through the points $T, S$. Therefore, we get that the quadrilateral $H S I_{a} N$ is parallelogram and its diagonals meet each other at the point $T$. We consider the inversion $I\left(I_{a}, I_{a} Z^{2}\right)$. As $I_{a} Z^{2}=I_{a} A \cdot I_{a} N$ we have $I(N)=A$. Similarly, if $M_{1}, M_{2}$ the midpoints of the segments $D E, D Z$ respectively, we get. $I\left(M_{1}\right)=B$ and $I\left(M_{2}\right)=C$. Therefore, the circumcircle ( $C$ ) of the triangle $A B C$ is the image of the circle ( $\omega$ ) under the inversion $I$ and the points of the intersection of the circles and ( $\omega$ ) are invariant under this inversion. But it is well known that the circle of inversion passes through the points of the intersection of the circles $(C)$ and ( $\omega$ ). Thus, the Euler circle ( $\omega$ ) passes through the points I,L. Also, we consider the inversion $J\left(H, r^{2}\right)$ with $$ r^{2}=H X \cdot H Z=H D \cdot H Y=H W \cdot H E $$ where $X, W, Y$ the traces of the altitudes of the triangle $E D Z$ on its sides. Then, $J(Z)=X$, $J(D)=Y$ and $J(E)=W$. Therefore, the circumcircle $\left(C_{1}\right)$ of the triangle $A B C$ is the image of the circle $(\omega)$ under the inversion $J$. Thus, the circle of inversion $J$ passes through the points $I, L$. We conclude that $H I=H L$ and $H I_{a} \perp I L$ and since $(\delta) \| I L$, we have $H I_{a} \perp(\delta)$. If, $R$ is the point of intersection of the lines $(\delta), H L$, we get that quadrilateral $H R I_{a} G$ is parallelogram and its diagonals meet each other at the point $T$. So, the perpendicular line (e) through the point $N$ to the to the line $B C$ and the parallel line $(\delta)$ through the point $G$ to the line $I L$, meet each other on the line $H I_{a}$. ## COMBINATORICS
{ "problem_match": "\nG8", "resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "solution_match": "\n## Solution" }
237
802
2017
T1
C2
Combinatorics
Balkan_Shortlist
Let $n, a, b, c$ be natural numbers. Every point on the coordinate plane with integer coordinates is colored in one of $n$ colors. Prove there exists $c$ triangles whose vertices are colored in the same color, which are pairwise congruent, and which have a side whose lenght is divisible by $a$ and a side whose lenght is divisible by $b$.
Let the colors be $d_{1}, d_{2}, d_{3} \ldots, d_{n}$. Look at the coordinates $$ (k, 0+(n+1) a b r),(k, a b+(n+1) a b r),(k, 2 a b+(n+1) a b r), \ldots,(k, n a b+(n+1) a b r) $$ for integers $k$ and $r$. By the pigeonhole principle there are two points of the same color. For every pair ( $k, r$ ) we say the color $d_{i}$ is $(k, r)$-good if at least two coordinates $$ (k, 0+(n+1) a b r),(k, a b+(n+1) a b r),(k, 2 a b+(n+1) a b r), \ldots,(k, n a b+(n+1) a b r) $$ are colored by color $d_{i}$. Fixing $r$ and taking $k=0, a b, 2 a b, \ldots, n^{2} a b$ get that some color, say $d_{1}$, was $(k, r)$-good for at least $n+1$. Among the $n+1$ pairs $(x, y)$ there exists two which share the same $x$ cordinate. We call such quadruple $r$-great. In every $r$-great quadruple there are two triangle whose vertecies are all the same color and whose two sides are divisible by $a b$. Taking $$ r=0.1,2, \ldots, n\left(c\left(\left(^{(n+1)\left(n^{2}+1\right)} 3{ }^{3}\right)+1\right)+1\right)+1 $$ we get that there is one color which is in a $r$-great quadruple for at least $$ c\left(\left(^{(n+1)\left(n^{2}+1\right)} 3-1\right)+1\right. $$ different values of $r$. Let this color be $d_{1}$. Since there are less than $\binom{\left.(n+1) n^{2}+1\right)}{3}$ possible triangles in any $r$-great quadruple (among $c\left(\left(^{(n+1)\left(n^{2}+1\right)}\right)+1\right)+1 \quad r$-great quadruples with the color $d_{1}$ ) we get that there are $c+1$ triangles which are the same and the same color $d_{1}$ and with two sides divisible by $a b$. This concludes the problem.
{ "problem_match": "\nC2", "resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "solution_match": "\n## Solution" }
80
614
2017
T1
C4
Combinatorics
Balkan_Shortlist
For any set of points $A_{1}, A_{2}, \ldots, A_{n}$ on the plane, one defines $r\left(A_{1}, A_{2}, \ldots, A_{n}\right)$ as the radius of the smallest circle that contains all of these points. Prove that if $n \geq 3$, there are indices $i, j, k$ such that $$ r\left(A_{1}, A_{2}, \ldots, A_{n}\right)=r\left(A_{1}, A_{,}, A_{k}\right) $$
We start with a lemma. Lemma. If the triangle $A B C$ is acute, $r(A, B, C)$ is its circumradius and if it is obtuse. $r(A, B, C)$ is half the length of its longest side. ## Proof. Let us do the acute case first. The circumcircle contains the vertices, so $r(A, B, C)$ is not greater than the circumradius. Now, let us prove that no smaller circle contains all three vertices. If there is a smaller circle, let its center be $P$. Further, let the circumcenter be $O$ Since $A B C$ is acute, $O$ is in the interior. Consider the line that passes through $O$ and is parallel to $B C$. Let us call it $l_{A}$ and define $l_{B}$ and $l_{C}$. similarly. Now, consider the set of points that are on the opposite side of $I_{A}$ with respect to $A$. Call this set $S_{A}$ and define $S_{B}$ and $S_{C}$ similarly. It is easily seen (by geometry) that $S_{A} \cap S_{B} \cap S_{C} \cdot=\varnothing$. As such, assume $P \notin S_{A}$ without loss of generality. That is to say, $P$ is on the same side of $I_{A}$ as $A$. Now. consider the perpendicular bisector of $B C$ and assume that $P$, w.lo.g, is on the same side of this line as $C$. Under these circumstances, $|P B| \geqslant|O B|$. Thus, the smaller circle centered at $P$ must exclude $B$. In the obtuse case, let $\measuredangle B A C \geq 90^{\circ}$. Then $B C$ is the longest side. The circle with diameter $B C$ contains all three vertices. Therefore. $r(A, B, C)$ is not greater than $\frac{1}{2}|B C|$. But any smaller circle will clearly exclude at least one of $B$ and $C$. Now, let us return to the original problem. Note that there must be points $A, B, C$ among $A_{1}, A_{2}, \ldots, A_{n}$ such that the circumcircle of $A B C$ contains all $n$ points. One can see this as follows: First start with a large circle that contains all $n$ points. Then shrink it while keeping the center fixed, until one of the $n$ points is on the circle and call this point $A$. Then shrink it keeping the point $A$ in place and moving the center closer to $A$. until another point $B$ is on the circle. Then keep the line $A B$ fixed while moving the center toward it or away from it so that another $C$ among the $n$ points appears on the circle. It is easy to see that this procedure is doable. Consider all such triples $A, B, C$ such that the circumcircle of $A B C$ contains all of $A_{1}, A_{2}, \ldots, A_{n}$. Now choose the one among them with the smallest circumradius and let it be $A_{i}, A_{j}, A_{k}$. If $A_{i} A_{j} A_{k}$ is an acute triangle, any smaller circle will exclude one of $A_{1}, A_{j}, A_{k}$ by the lemma above. Therefore, $$ r\left(A_{1}, A_{2}, \ldots, A_{n}\right)=\text { circumradius of } A_{i} A_{j} A_{k}=r\left(A_{i}, A_{j}, A_{k}\right) $$ If $A_{i} A_{j} A_{k}$ is an obtuse triangle, let $A_{l}$ be its obtuse angle. We wish to prove that the circle with diameter $A_{j} A_{k}$ contains all $n$ points. This will mean that $$ r\left(A_{1}, A_{2}, \ldots, A_{n}\right)=\frac{1}{2}\left|A_{j} A_{k}\right|=r\left(A_{i}, A_{j}, A_{k}\right) $$ and we will be done. If there are no points on the opposite side of $A_{j} A_{k}$ w.r.t. $A_{i}$, then this assertion is clear. If there are some points on that side, choose the one $X$ such that $\measuredangle A_{j} X A_{k}$ is smallest possible. Then the circumcircle of $A_{j} X A_{k}$ contains all $n$ points. However, by the choice of $A_{i}$, the circumradius of $A_{j} X A_{k}$ cannot be less than that of $A_{i} A_{j} A_{k}$. Thus, $\measuredangle A_{j} X A_{k} \geq \measuredangle A_{j} A_{i} A_{k} \geq 90^{\circ}$. As such, the circle with diameter $A_{j} A_{k}$ contains all $n$ points. Figure 1: The circumcircles of $A_{i} A_{j} A_{k}$ and $A_{j} X A_{k}$ as well as the circle with diameter $A_{j} A_{k}$ are shown. Remark. The problem selection committee recommended formulation of the task to improve. ## C 5 We have $n$ students sitting at a round table. Initially each student is given one candy. At each step each student having candies either picks one of its candies and gives it to one of its neighbouring students, or distributes all of its candies to its neighbouring students in any way he wishes. A distribution of candies is called legal if it can be reached from the initial distribution via a sequence of steps. Determine the number of legal distributions. (All the candies are udentical.)
{ "problem_match": "\n## C4", "resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "solution_match": "\n## Solution." }
130
1,341
2017
T1
C4
Combinatorics
Balkan_Shortlist
For any set of points $A_{1}, A_{2}, \ldots, A_{n}$ on the plane, one defines $r\left(A_{1}, A_{2}, \ldots, A_{n}\right)$ as the radius of the smallest circle that contains all of these points. Prove that if $n \geq 3$, there are indices $i, j, k$ such that $$ r\left(A_{1}, A_{2}, \ldots, A_{n}\right)=r\left(A_{1}, A_{,}, A_{k}\right) $$
The answer turns out to be $\binom{2 n-1}{n}$ if $n$ is odd and $\binom{2 n-1}{n}-2\left(\begin{array}{c}\frac{3 n}{2}-1\end{array}\right)$ if $n$ is even. Case 1. Suppose $n$ is odd, say $n=2 m+1$. In this case we will show that any distribution of candies is legal. Thus the number of legal distributions is indeed ( $\left.\begin{array}{c}2 n-1 \\ n\end{array}\right)$. In this case we can achieve the above claim by letting each student to always distribute all of its candies to its two neighbouring students in some way. Thus at each step each candy will move either one position clockwise or one anticlockwise. We now look at the initial distribution of candies and the required final distribution. We specify arbitrarily for each candy in the initial distribution, the position we wish this candy to end up in the required final distribution. Because $n$ is odd, either the clockwise distance or the anticlockwise distance between the initial position of the candy and the required final position is even and at most $m$. Thus after an even number of steps (at most $m$ ) we can move each candy to its required final position. (Note that if the candy reaches the required position earlier. we can move it back and forth until all candies reach their required position.) This completes the proof of our claim in this case. Case 2. Suppose $n$ is even, say $n=2 m$. Let $x_{1} \ldots \ldots x_{2 m}$ be the students in this cyclic order. Observe that initially the students with even indices (even students) have at least one candy in total, and so do the students with odd indices (odd students). This property is preserved after each step. We will show that every distribution in which the even students have at least one candy in total and the odd students also have at least one candy in total is legal. Let us suppose that the required final distribution has $a$ candies in odd positions and $b$ candies in even positions. (Where $a, b \geq 1$.) It will be enough to reach any position with $a$ candies in even positions and $b$ candies in odd positions as then we can follow the same approach as in Case 1. To achieve this we will first move all candies to students $x_{1}$ and $x_{2}$. This is easy by specifying that at each step $x_{1}$ moves all of its candies to $x_{2}$ while for $1 \leq r \leq 2 m-1$ student $x_{r+1}$ moves all of its candies to $x_{r}$. Suppose that we now have $a+k$ candies at $x_{1}$ and $b-k$ candies at $x_{2}$ where without loss of generality $k \geq 0$. If $k=0$ we have reached our target. If not, in the next step $x_{1}$ moves a candy to $x_{2}$ and $x_{2}$ moves a candy to $x_{3}$. In the next step $x_{1}$ (it still has $a+k-1 \geq a>0$ candies) moves a candy to $x_{2}, x_{2}$ moves a candy to $x_{1}$ and $x_{3}$ moves a candy to $x_{2}$. We now have $a+k-1$ candies in $x_{1}$ and $b+1-k$ in $x_{2}$. Repeating this process another $k-1$ times we end up with $a$ candies in $x_{1}$ and $b$ candies in $x_{2}$ as required. It remains to count the total number of legal configurations in this case. This is indeed equal to $$ \binom{2 n-1}{n}-2\binom{\frac{3 n}{2}-1}{n} $$ as $\binom{2 n-1}{n}$ counts the total number of configurations while $\binom{\frac{3 n}{2}-1}{n}$ counts the number of illegal configurations where either all $n$ candies belong to the $\frac{n}{2}$ odd positions or all $n$ candies belong to the $\frac{n}{2}$ even positions.
{ "problem_match": "\n## C4", "resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "solution_match": "\n## Solution" }
130
955
2018
T1
A2
Algebra
Balkan_Shortlist
Two ants start at the same point in the plane. Each minute they choose whether to walk due north, east, south or west. They each walk 1 meter in the first minute. In each subsequent minute the distance they walk is multiplied by a rational number $q>0$. They meet after a whole number of minutes, but have not taken exactly the same route within that time. Determine all possible values of $q$. (United Kingdom)
Answer: $q=1$. Let $x_{A}^{(n)}$ (resp. $x_{B}^{(n)}$ ) be the $x$-coordinates of the first (resp. second) ant's position after $n$ minutes. Then $x_{A}^{(n)}-x_{A}^{(n-1)} \in\left\{q^{n},-q^{n}, 0\right\}$, and so $x_{A}^{(n)}, x_{B}^{(n)}$ are given by polynomials in $q$ with coefficients in $\{-1,0,1\}$. So if the ants meet after $n$ minutes, then $$ 0=x_{A}^{(n)}-x_{B}^{(n)}=P(q) $$ where $P$ is a polynomial with degree at most $n$ and coefficients in $\{-2,-, 1,0,1,2\}$. Thus if $q=\frac{a}{b}(a, b \in \mathbb{N})$, we have $a \mid 2$ and $b \mid 2$, i.e. $q \in\left\{\frac{1}{2}, 1,2\right\}$. It is clearly possible when $q=1$. We argue that $q=\frac{1}{2}$ is not possible. Assume that the ants diverge for the first time after the $k$ th minute, for $k \geqslant 0$. Then $$ \left|x_{B}^{(k+1)}-x_{A}^{(k+1)}\right|+\left|y_{B}^{(k+1)}-y_{A}^{(k+1)}\right|=2 q^{k} $$ But also $\left|x_{A}^{(\ell+1)}-x_{A}^{(\ell)}\right|+\left|y_{A}^{(\ell+1)}-y_{A}^{(\ell)}\right|=q^{\ell}$ for each $l \geqslant k+1$, and so $$ \left|x_{A}^{(n)}-x_{A}^{(k+1)}\right|+\left|y_{A}^{(n)}-y_{A}^{(k+1)}\right| \leqslant q^{k+1}+q^{k+2}+\ldots+q^{n-1} $$ and similarly for the second ant. Combining (1) and (2) with the triangle inequality, we obtain for any $n \geqslant k+1$ $$ \left|x_{B}^{(n)}-x_{A}^{(n)}\right|+\left|y_{B}^{(n)}-y_{A}^{(n)}\right| \geqslant 2 q^{k}-2\left(q^{k+1}+q^{k+2}+\ldots+q^{n-1}\right), $$ which is strictly positive for $q=\frac{1}{2}$. So for any $n \geqslant k+1$, the ants cannot meet after $n$ minutes. Thus $q \neq \frac{1}{2}$. Finally, we show that $q=2$ is also not possible. Suppose to the contrary that there is a pair of routes for $q=2$, meeting after $n$ minutes. Now consider rescaling the plane by a factor $2^{-n}$, and looking at the routes in the opposite direction. This would then be an example for $q=1 / 2$ and we have just shown that this is not possible.
{ "problem_match": "\nA2.", "resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "solution_match": "\n## Solution." }
91
820
2018
T1
A4
Algebra
Balkan_Shortlist
Let $a, b, c$ be positive real numbers such that $a b c=1$. Prove that the following inequality holds: $$ 2\left(a^{2}+b^{2}+c^{2}\right)\left(\frac{1}{a^{2}}+\frac{1}{b^{2}}+\frac{1}{c^{2}}\right) \geqslant 3(a+b+c+a b+b c+c a) $$ (Romania)
First, we show that $$ \frac{a}{b}+\frac{b}{c}+\frac{c}{a} \geqslant a b+b c+c a \quad \text { and } \quad \frac{a}{b}+\frac{b}{c}+\frac{c}{a} \geqslant a+b+c $$ By AG inequality, we have $$ \begin{aligned} \frac{a}{b}+\frac{b}{c}+\frac{c}{a} & =\frac{1}{3}\left(\frac{a}{b}+\frac{a}{b}+\frac{c}{a}\right)+\frac{1}{3}\left(\frac{b}{c}+\frac{b}{c}+\frac{a}{b}\right)+\frac{1}{3}\left(\frac{c}{a}+\frac{c}{a}+\frac{b}{c}\right) \\ & \geqslant \frac{\sqrt[3]{a c}}{\sqrt[3]{b^{2}}}+\frac{\sqrt[3]{b a}}{\sqrt[3]{c^{2}}}+\frac{\sqrt[3]{c b}}{\sqrt[3]{a^{2}}}=\frac{\sqrt[3]{a b c}}{b}+\frac{\sqrt[3]{a b c}}{c}+\frac{\sqrt[3]{a b c}}{a} \\ & =a b+b c+c a \end{aligned} $$ Similarly, we have $$ \begin{aligned} \frac{a}{b}+\frac{b}{c}+\frac{c}{a} & =\frac{1}{3}\left(\frac{a}{b}+\frac{a}{b}+\frac{b}{c}\right)+\frac{1}{3}\left(\frac{b}{c}+\frac{b}{c}+\frac{c}{a}\right)+\frac{1}{3}\left(\frac{c}{a}+\frac{c}{a}+\frac{a}{b}\right) \\ & \geqslant \frac{\sqrt[3]{a^{2}}}{\sqrt[3]{b c}}+\frac{\sqrt[3]{b^{2}}}{\sqrt[3]{c a}}+\frac{\sqrt[3]{c^{2}}}{\sqrt[3]{a b}}=\frac{a}{\sqrt[3]{a b c}}+\frac{b}{\sqrt[3]{a b c}}+\frac{c}{\sqrt[3]{a b c}} \\ & =a+b+c \end{aligned} $$ which completes our proof of ( $\dagger$ ). By Cauchy-Schwarz inequality we have $$ \left(a^{2}+b^{2}+c^{2}\right)\left(\frac{1}{b^{2}}+\frac{1}{c^{2}}+\frac{1}{a^{2}}\right) \geqslant\left(\frac{a}{b}+\frac{b}{c}+\frac{c}{a}\right)^{2} $$ which together with $\left(a^{2}+b^{2}+c^{2}\right)\left(1 / a^{2}+1 / b^{2}+1 / c^{2}\right) \geqslant 9$ leads to $$ 2\left(a^{2}+b^{2}+c^{2}\right)\left(\frac{1}{a^{2}}+\frac{1}{b^{2}}+\frac{1}{c^{2}}\right) \geqslant\left(\frac{a}{b}+\frac{b}{c}+\frac{c}{a}\right)^{2}+9 \geqslant 6\left(\frac{a}{b}+\frac{b}{c}+\frac{c}{a}\right) $$ Now, the desired inequality follows from ( $\dagger$ ).
{ "problem_match": "\nA4.", "resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "solution_match": "\n## Solution." }
104
883
2018
T1
A5
Algebra
Balkan_Shortlist
Let $f: \mathbb{R} \rightarrow \mathbb{R}$ be a concave function and let $g: \mathbb{R} \rightarrow \mathbb{R}$ be continuous. Given that $$ f(x+y)+f(x-y)-2 f(x)=g(x) y^{2} $$ for all $x, y \in \mathbb{R}$, prove that $f$ is a quadratic function. (Bulgaria)
We plug in the pairs $(a, x),(a, 2 x),(a+x, x)$ and $(a-x, x)$ to get $$ \begin{aligned} f(a+x)+f(a-x)-2 f(a) & =g(a) x^{2} \\ f(a+2 x)+f(a-2 x)-2 f(a) & =4 g(a) x^{2} \\ f(a+2 x)+f(a)-2 f(a+x) & =g(a+x) x^{2} \\ f(a-2 x)+f(a)-2 f(a-x) & =g(a-x) x^{2} \end{aligned} $$ respectively. Combining these equations in the form $2 E_{1}-E_{2}+E_{3}+E_{4}$ the left hand side vanishes, yielding an equation in $g:(g(a+x)+g(a-x)-2 g(a)) x^{2}=0$, i.e. $$ g(a)=\frac{g(a+x)+g(a-x)}{2} $$ Since $g$ is continuous, it must be linear, i.e. $g(x)=c_{1} x+c_{0}$. However, the original equation for $x=y$ together with the concavity condition now gives us $$ 0 \geqslant f(2 x)+f(0)-2 f(x)=\left(x c_{1}+c_{0}\right) x^{2} $$ for all $x$, which is only possible if $c_{1}=0$. Thus $g(x) \equiv c_{0}=2 A$ is constant and $$ f(x+y)+f(x-y)-2 f(x)=2 A y^{2} $$ This suggests that $f$ is a quadratic function, so we can set $f(x)=A x^{2}+f_{1}(x)$. Then $(*)$ becomes $f_{1}(x+y)+f_{1}(x-y)-2 f_{1}(x)=0$, so an easy induction gives us $$ f_{1}(n x)-f_{1}(0)=n\left(f_{1}(x)-f_{1}(0)\right) \quad \text { for all } \quad n \in \mathbb{Z} $$ By setting $f_{1}(0)=C$ and $f_{1}(1)=B+C$ we obtain $f_{1}(x)=B x+C$ and $f(x)=$ $A x^{2}+B x+C$ for all $x \in \mathbb{Q}$. By concavity of $f$ we conclude that $f(x)=A x^{2}+B x+C$ for all real $x$. ## Remark. In fact, $(*)$ implies that the second derivative of $f$ is constant by taking $y \rightarrow 0$ and the problem is solved. The solution presented here avoids use of derivatives.
{ "problem_match": "\nA5.", "resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "solution_match": "\n## Solution." }
100
637
2018
T1
A6
Algebra
Balkan_Shortlist
Let $n$ be a positive integer and let $x_{1}, \ldots, x_{n}$ be real numbers. Show that $$ \sum_{i=1}^{n} x_{i}^{2} \geqslant \frac{1}{n+1}\left(\sum_{i=1}^{n} x_{i}\right)^{2}+\frac{12\left(\sum_{i=1}^{n} i x_{i}\right)^{2}}{n(n+1)(n+2)(3 n+1)} $$
Let $S=\frac{1}{n+1} \sum_{i=1}^{n} x_{i}$, and $y_{i}=x_{i}-S$ for $1 \leqslant i \leqslant n$. Then we have $$ \sum_{i=1}^{n} i x_{i}=\sum_{i=1}^{n} i y_{i}+\frac{n(n+1)}{2} S $$ and $$ \sum_{i=1}^{n} y_{i}^{2}=\sum_{i=1}^{n} x_{i}^{2}-2 S \sum_{i=1}^{n} x_{i}+n S^{2}=\sum_{i=1}^{n} x_{i}^{2}-\frac{1}{n+1}\left(\sum_{i=1}^{n} x_{i}\right)^{2}-S^{2} $$ Now, by the Cauchy-Schwarz inequality $$ \begin{aligned} \left(\sum_{i=1}^{n} i x_{i}\right)^{2} & =\left(\sum_{i=1}^{n} i y_{i}+\frac{n(n+1)}{2} S\right)^{2} \\ & \leqslant\left(\sum_{i=1}^{n} i^{2}+\frac{n^{2}(n+1)^{2}}{4}\right)\left(\sum_{i=1}^{n} y_{i}^{2}+S^{2}\right) \\ & =\frac{n(n+1)(n+2)(3 n+1)}{12} \cdot\left(\sum_{i=1}^{n} x_{i}^{2}-\frac{1}{n+1}\left(\sum_{i=1}^{n} x_{i}\right)^{2}\right) \end{aligned} $$ which completes our proof. ## Remark. It can be checked that equality holds if and only if $x_{i}=c(n(n+1)+2 i)$ for $1 \leqslant i \leqslant n$ and some $c \in \mathbb{R}$. ## Combinatorics
{ "problem_match": "\nA6.", "resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "solution_match": "\n## Solution." }
126
509
2018
T1
C1
Combinatorics
Balkan_Shortlist
Let $N \geqslant 3$ be an odd integer. $N$ tennis players take part in a league. Before the league starts, a committee ranks the players in some order based on perceived skill. During the league, each pair of players plays exactly one match, and each match has one winner. A match is considered an upset if the winner had a lower initial ranking than the loser. At the end of the league, the players are ranked according to number of wins, with the initial ranking used to rank players with the same number of wins. It turns out that the final ranking is the same as the initial ranking. What is the largest possible number of upsets? (United Kingdom)
2. Write $N=2 n+1$. We only prove the upper bound. Consider a tournament $\mathbb{T}$ with correct final ranking, but where not everyone won $n$ matches. Let $A$ be the worst-ranked player with the maximal number of wins, and let $B$ be the best-ranked player with minimal wins. Clearly, $A$ was ranked above $B$. Assume $A$ beat $B$. Consider the tournament $\mathbb{T}^{\prime}$ obtained from $\mathbb{T}$ by reversing this result, and keeping all others the same. So $B$ beat $A$, which is an upset. $A$ is now the bestranked player with the second-most number of wins; $B$ is now the worst-ranked player with the second-least number of wins, and so the final ranking of $\mathbb{T}^{\prime}$ is still correct, but with one more upset than in $\mathbb{T}$. Alternatively, assume $B$ beat $A$. Then there must have been a player $C$ such that $A$ beat $C$ and $C$ beat $B$. These are upsets if, respectively, $C$ was ranked above $A$, or below $B$. It therefore cannot be the case that both of the matches involving $C$ and $\{A, B\}$ were upsets. Consider the tournament $\mathbb{T}^{\prime}$ obtained from $\mathbb{T}$ by reversing these two matches. $C$ 's number of wins stays fixed, while as before $A$ is now the best-ranked player with the second-most wins, and similar for $B$. Thus in $\mathbb{T}^{\prime}$ the final ranking is still correct, with either the same number of upsets as $\mathbb{T}$, or two more upsets than $\mathbb{T}$. If we iterate this procedure, we eventually obtain a tournament $\overline{\mathbb{T}}$ where everyone won exactly $n$ matches, and with at least as many upsets as in the original tournament $\mathbb{T}$. We now bound the number of upsets in such a tournament $\overline{\mathbb{T}}$. Suppose the player ranked $i \leqslant \frac{N+1}{2}$ beat $K$ higher ranked players. Obviously $K \leqslant i-1$. Then the number of upsets involving $i$ is $$ 2 K+\frac{N+1}{2}-i \leqslant 2(i-1)+\frac{N+1}{2}-i=\frac{N-1}{2}+i-1 . $$ Similarly, for $i \geqslant \frac{N+1}{2}$ one proves that the number of upsets involving $i$ is at most $\frac{N-1}{2}+i-1$. Finally, summing over all values of $i$ and dividing by 2 we obtain the desired result. ## Remark. We demand $N$ odd to avoid candidates providing a case distinction, rather than because the construction or the bounding argument is significantly different.
{ "problem_match": "\nC1.", "resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "solution_match": "\n## Solution" }
144
669
2018
T1
C2
Combinatorics
Balkan_Shortlist
Alice and Bob play the following game: They start with two non-empty piles of coins. Taking turns, with Alice playing first, they choose a pile with an even number of coins and move half of the coins of this pile to the other pile. The game ends if a player cannot move, or if we reach a previously reached position. In the first case, the player who cannot move loses. In the second case, the game is declared a draw. Determine all pairs $(a, b)$ of positive integers such that if initially the two piles have $a$ and $b$ coins respectively, then Bob has a winning strategy. (Cyprus)
By $v_{2}(n)$ we denote the largest nonnegative integer $r$ such that $2^{r} \mid n$. A position $(a, b)$ (i.e. two piles of sizes $a$ and $b$ ) is said to be $k$-happy if $v_{2}(a)=v_{2}(b)=k$ for some integer $k \geqslant 0$, and $k$-unhappy if $\min \left\{v_{2}(a), v_{2}(b)\right\}=k<\max \left\{v_{2}(a), v_{2}(b)\right\}$. We shall prove that Bob has a winning strategy if and only if the initial position is $k$-happy for some even $k$. - Given a 0-happy position, the player in turn is unable to play and loses. - Given a $k$-happy position $(a, b)$ with $k \geqslant 1$, the player in turn will transform it into one of the positions $\left(a+\frac{1}{2} b, \frac{1}{2} b\right)$ and $\left(b+\frac{1}{2} a, \frac{1}{2} a\right)$, both of which are ( $k-1$ )-happy because $v_{2}\left(a+\frac{1}{2} b\right)=v_{2}\left(\frac{1}{2} b\right)=v_{2}\left(b+\frac{1}{2} a\right)=v_{2}\left(\frac{1}{2} a\right)=k-1$. Therefore, if the starting position is $k$-happy, after $k$ moves they will get stuck at a 0 -happy position, so Bob will win if and only if $k$ is even. - Given a $k$-unhappy position $(a, b)$ with $k$ odd and $v_{2}(a)=k<v_{2}(b)=\ell$, Alice can move to position $\left(\frac{1}{2} a, b+\frac{1}{2} a\right)$. Since $v_{2}\left(\frac{1}{2} a\right)=v_{2}\left(b+\frac{1}{2} a\right)=k-1$, this position is ( $k-1$ )-happy with $2 \mid k-1$, so Alice will win. - Given a $k$-unhappy position $(a, b)$ with $k$ even and $v_{2}(a)=k<v_{2}(b)=\ell$, Alice must not play to position $\left(\frac{1}{2} a, b+\frac{1}{2} a\right)$, because the new position is $(k-1)$-happy and will lead to Bob's victory. Thus she must play to position $\left(a+\frac{1}{2} b, \frac{1}{2} b\right)$. We claim that this position is also $k$-unhappy. Indeed, if $\ell>k+1$, then $v_{2}\left(a+\frac{1}{2} b\right)=$ $k<v_{2}\left(\frac{1}{2} b\right)=\ell-1$, whereas if $\ell=k+1$, then $v_{2}\left(a+\frac{1}{2} b\right)>v_{2}\left(\frac{1}{2} b\right)=k$. Hence a $k$-unhappy position is winning for Alice if $k$ is odd, and drawing if $k$ is even.
{ "problem_match": "\nC2.", "resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "solution_match": "\n## Solution." }
133
800
2018
T1
G2
Geometry
Balkan_Shortlist
Let $A B C$ be a triangle inscribed in circle $\Gamma$ with center $O$ and let $H$ its orthocenter and $K$ be the midpoint of $O H$. The tangent of $\Gamma$ at $B$ meets the perpendicular bisector of $A C$ meets at $L$ and the tangent of $\Gamma$ at $C$ meets the perpendicular bisector of $A B$ at $M$. Prove that $A K \perp L M$. (Greece)
2. We introduce the complex plane such that $\Gamma$ is the unit cycle. Also, let the lower-case letters denote complex numbers corresponding to the points denoted by capital letters. First, note that $o=0, \bar{a}=1 / a, \bar{b}=1 / b$ and $\bar{c}=1 / c$. Since $B L \perp B O$, we have $$ \frac{b-l}{\bar{b}-\bar{l}}=-\frac{b-o}{\bar{b}-\bar{o}}=-\frac{b}{\bar{b}}=-b^{2}, \quad \text { and hence } \quad \bar{l}=\frac{2 b-l}{b^{2}} $$ Since $L O \perp A C$, we have $$ \frac{l}{\bar{l}}=\frac{l-o}{\bar{l}-\bar{o}}=-\frac{a-c}{\bar{a}-\bar{c}}=a c, \quad \text { and hence } \quad \bar{l}=\frac{l}{a c} . $$ Combining $(\dagger)$ and $(\ddagger)$ we get $l=\frac{2 a b c}{b^{2}+a c}$. By symmetry, $m=\frac{2 a b c}{c^{2}+a b}$ and hence $$ l-m=\frac{2 a b c(c-b)(b+c-a)}{\left(b^{2}+a c\right)\left(c^{2}+a b\right)} \quad \text { and } \quad \bar{l}-\bar{m}=\frac{2(b-c)(a b+a c-b c)}{\left(b^{2}+a c\right)\left(c^{2}+a b\right)} $$ By Hamilton's formula $a+b+c=h-o=h$, and hence $k=\frac{h+o}{2}=\frac{a+b+c}{2}$. So, $$ a-k=\frac{b+c-a}{2} \quad \text { and } \quad \bar{a}-\bar{k}=\frac{a b+a c-b c}{2 a b c} $$ and hence $$ \frac{l-m}{\bar{l}-\bar{m}}=-\frac{a-k}{\bar{a}-\bar{k}} $$ which implies $L M \perp A K$.
{ "problem_match": "\nG2.", "resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "solution_match": "\n## Solution" }
108
534
2018
T1
G6
Geometry
Balkan_Shortlist
In a triangle $A B C$ with $A B=A C, \omega$ is the circumcircle and $O$ its center. Let $D$ be a point on the extension of $B A$ beyond $A$. The circumcircle $\omega_{1}$ of triangle $O A D$ intersects the line $A C$ and the circle $\omega$ again at points $E$ and $G$, respectively. Point $H$ is such that $D A E H$ is a parallelogram. Line $E H$ meets circle $\omega_{1}$ again at point $J$. The line through $G$ perpendicular to $G B$ meets $\omega_{1}$ again at point $N$ and the line through $G$ perpendicular to $G J$ meets $\omega$ again at point $L$. Prove that the points $L, N, H, G$ lie on a circle. (Cyprus)
We first observe that $\varangle D O E=\varangle D A E=2 \varangle A B C=\varangle B O A$ and hence $\varangle D O B=$ $\varangle E O A$, which together with $O B=O A$ and $\varangle O B D=\varangle B A O=\varangle O A E$ gives us $\triangle O B D \cong \triangle O A E$. Therefore $B D=A E$. Next, $O G=O A$ implies $\varangle O D G=\varangle O D A=\varangle O D B$ and hence $\triangle O G D \cong \triangle O B D$. It follows that $D G=D B=A E=D H$. Moreover, since $A D \| E J$, we have $D J=A E=$ $D G$. Thus, the points $B, G, H, J$ lie on a circle $\omega_{2}$ with center $D$. We deduce that $\varangle A G H=\varangle B G H-\varangle B G A=180^{\circ}-\frac{1}{2} \varangle H D B-\varangle B C A=180^{\circ}-$ $\frac{1}{2} \varangle C A B-\varangle B C A=90^{\circ}$. We will now invert the diagram through $G$. By $\hat{X}$ we denote the image of any point $X$. The points $\hat{H}, \hat{L}, \hat{N}$ then lie on the lines $\hat{B} \hat{J}, \hat{A} \hat{B}$ and $\hat{A} \hat{J}$, respectively, such that $\varangle \hat{A} G \hat{H}=\hat{B} G \hat{N}=\varangle \hat{J} G \hat{L}=90^{\circ}$. It remains to prove that $\hat{H}, \hat{L}$ and $\hat{N}$ are collinear, which follows from the following statement: Lemma. Let $X Y Z$ be a triangle and let $U$ be a point in the plane. If the lines through $U$ perpendicular to $U X, U Y, U Z$ meet the lines $Y Z, Z X, X Y$ respectively at points $P, Q, R$, then the points $P, Q$ and $R$ are collinear. $\underline{\text { Proof. Here we assume that } U \text { is inside } \triangle X Y Z \text { and the angles } X U Y, Y U Z \text { and } Z U X . . . ~}$ are all obtuse - the other cases are similar. We have $$ \frac{\overrightarrow{Y P}}{\overrightarrow{P Z}}=-\frac{P_{Y U P}}{P_{P U Z}}, \quad \frac{\overrightarrow{Z Q}}{\overrightarrow{Q X}}=-\frac{P_{Z U Q}}{P_{Q U X}}, \quad \frac{\overrightarrow{X R}}{\overrightarrow{R Y}}=-\frac{P_{X U R}}{P_{R U Y}} $$ On the other hand, since $\varangle Q U X=\varangle Y U P$ are equal and equally directed, we have $\frac{P_{Y U P}}{P_{Q U X}}=\frac{U P \cdot U Y}{U Q \cdot U X}$. Writing the analogous expressions for $\frac{P_{Z U Q}}{P_{R U Y}}$ and $\frac{P_{X U R}}{P_{P U Z}}$ and multiplying them out we obtain $\frac{\overrightarrow{Y P}}{\overrightarrow{P Z}} \cdot \frac{\overrightarrow{Z Q}}{\overrightarrow{Q X}} \cdot \frac{\overrightarrow{X R}}{\overrightarrow{R Y}}=-1$, and the result follows by Menelaus' theorem. ## Remark. The result remains valid if $D$ is any point on the line $A B$. Point $L$ does not depend on the choice of $D$. Indeed, $\varangle L C B=\varangle L G B=\varangle J G B-90^{\circ}=$ $\varangle J E A+\varangle A G B-90^{\circ}=\varangle B A C+\varangle A C B-90^{\circ}=90^{\circ}-\varangle A B C$, so $C L \perp A B$. Also, since $\varangle A O N=\varangle A G N=90^{\circ}-\varangle B G A=90^{\circ}-\varangle B C A=\varangle O A B=\varangle O N D$, $O N D A$ is an isosceles trapezoid, i.e. $O N \| A B$. ## Alternative formulation. Based on the Remark, the PSC proposes the following modification which hides point $J$ and defines the points in a more natural way: A triangle $A B C$ with $A B=A C$ is inscribed in a circle $\omega$ with center $O$. Its altitude from $C$ meets $\omega$ again at point $L$. Line $\ell$ through $O$ is parallel to $A B$. A circle $\omega_{1}$ passes through points $A$ and $O$ and meets the lines $A B, A C, \ell$ and circle $\omega$ again at points $D, E, N$ and $G$, respectively. Point $H$ is such that $A D H E$ is a parallelogram. Prove that $H$ lies on the circumcircle of triangle $G L N$. ## Number Theory
{ "problem_match": "\nG6.", "resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "solution_match": "\n## Solution." }
195
1,274
2018
T1
N4
Number Theory
Balkan_Shortlist
Let $P(x)=a_{d} x^{d}+\cdots+a_{1} x+a_{0}$ be a non-constant polynomial with nonnegative integer coefficients having $d$ rational roots. Prove that $$ \operatorname{lcm}(P(m), P(m+1), \ldots, P(n)) \geqslant m\binom{n}{m} $$ for all positive integers $n>m$.
Let $x_{i}=-\frac{p_{i}}{q_{i}}(1 \leqslant i \leqslant d)$ be the roots of $P(x)$, where $p_{i}, q_{i} \in \mathbb{N}$ and $\operatorname{gcd}\left(p_{i}, q_{i}\right)=1$. By Gauss' lemma, we have $P(x)=c\left(q_{1} x+p_{1}\right)\left(q_{2} x+p_{2}\right) \cdots\left(q_{d} x+p_{d}\right)$ for some $c \in \mathbb{N}$, so $q_{1} x+p_{1} \mid P(x)$. Thus it suffices to prove the statement for $P(x)=q_{1} x+p_{1}=q x+p$. Let $$ \begin{array}{ll} A=\operatorname{lcm}(q m+p, q(m+1)+p, \ldots, q n+p) & =\prod_{i=1}^{s} p_{i}^{\alpha_{i}}, \\ B=(q m+p)(q(m+1)+p) \cdots(q n+p) & =\prod_{i=1}^{s} p_{i}^{\beta_{i}} \end{array} $$ be the prime factorizations of $A$ and $B$. Consider a prime divisor $p_{i}$. We have $p_{i}^{\alpha_{i}} \mid q x+p$ for some $m \leqslant x \leqslant n$. On the other hand, if $p_{i}^{r} \mid q y+p\left(r \leqslant \alpha_{i}\right)$ for some $m \leqslant y \leqslant n$ with $y \neq x$, then $p_{i}^{r} \mid q(x-y)$, i.e. $p_{i}^{r} \mid x-y$. Taking the product over all $y \neq x$ we obtain that $$ p_{i}^{\beta_{i}} \quad \text { divides } \quad p_{i}^{\alpha_{i}} \cdot \prod_{\substack{y=m \\ y \neq x}}^{n}|x-y|, \quad \text { which divides } \quad p_{i}^{\alpha_{i}}(n-m)! $$ It follows that $B \mid A \cdot(n-m)$ !, but $B \geqslant m(m+1) \cdots n$, so the result immediately follows.
{ "problem_match": "\nN4.", "resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "solution_match": "\n## Solution." }
93
587
2018
T1
N5
Number Theory
Balkan_Shortlist
Let $x$ and $y$ be positive integers. If for each positive integer $n$ we have that $$ (n y)^{2}+1 \mid x^{\varphi(n)}-1 $$ prove that $x=1$.
Let us take $n=3^{k}$ and suppose that $p$ is a prime divisor of $\left(3^{k} y\right)^{2}+1$ such that $p \equiv 2$ $(\bmod 3)$. Since $p$ divides $x^{\varphi(n)}-1=x^{2 \cdot 3^{k-1}}-1$, the order of $x$ modulo $p$ divides both $p-1$ and $2 \cdot 3^{k-1}$, but $\operatorname{gcd}\left(p-1,2 \cdot 3^{k-1}\right) \mid 2$, which implies that $p \mid x^{2}-1$. The result will follow if we prove that the prime $p$ can take infinitely many values. Suppose, to the contrary, that there are only finitely many primes $p$ with $p \equiv 2(\bmod 3)$ that divide a term of the sequence $$ a_{k}=3^{2 k} y^{2}+1 \quad(k \geqslant 0) $$ Let $p_{1}, p_{2}, \ldots, p_{m}$ be these primes. Clearly, we may assume without loss of generality that $3 \nmid y$. Then $a_{0}=y^{2}+1 \equiv 2(\bmod 3)$, so it has a prime divisor of the form $3 s+2$ $\left(s \in \mathbb{N}_{0}\right)$. For $N=\left(y^{2}+1\right) p_{1} \cdots p_{m}$ we have $a_{\varphi(N)}=3^{2 \varphi(N)} y^{2}+1 \equiv y^{2}+1(\bmod N)$, which means that $$ a_{\varphi(N)}=\left(y^{2}+1\right)\left(t p_{1} \cdots p_{m}+1\right) $$ for some positive integer $t$. Since $y^{2}+1 \equiv 2(\bmod 3)$ and $3^{2 \varphi(N)} y^{2}+1 \equiv 1(\bmod 3)$, the number $t p_{1} \cdots p_{m}+1$ must have a prime divisor of the form $3 s+2$, but it cannot be any of the primes $p_{1}, \ldots, p_{m}$, so we have a contradiction as desired.
{ "problem_match": "\nN5.", "resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "solution_match": "\n## Solution." }
55
562
2019
T1
A1b
Algebra
Balkan_Shortlist
Let $a_{0}$ be an arbitrary positive integer. Consider the infinite sequence $\left(a_{n}\right)_{n \geq 1}$, defined inductively as follows: given $a_{0}, a_{1}, \ldots, a_{n-1}$ define the term $a_{n}$ as the smallest positive integer such that $a_{0}+a_{1}+\ldots+a_{n}$ is divisible by $n$. Prove that there exists a positive integer $M$ such that $a_{n+1}=a_{n}$ for all $n \geq M$.
Define $b_{n}=\frac{a_{0}+a_{1}+\ldots+a_{n}}{n}$ for every positive integer $n$. According to condition, $b_{n}$ is a positive integer for every positive integer $n$. Since $a_{n+1}$ is the smallest positive integer such that $\frac{a_{0}+a_{1}+\ldots+a_{n}+a_{n+1}}{n+1}$ is a positive integer and $$ \frac{a_{0}+a_{1}+\ldots+a_{n}+b_{n}}{n+1}=\frac{a_{0}+a_{1}+\ldots+a_{n}+\frac{a_{0}+a_{1}+\ldots+a_{n}}{n}}{n+1}=\frac{a_{0}+a_{1}+\ldots+a_{n}}{n}=b_{n} $$ which is a positive integer, we get $a_{n+1} \leq b_{n}$ for every positive integer $n$. Now from last result we have $$ b_{n+1}=\frac{a_{0}+a_{1}+\ldots+a_{n}+a_{n+1}}{n+1} \leq \frac{a_{0}+a_{1}+\ldots+a_{n}+b_{n}}{n+1}=b_{n} . $$ Hence the infinite sequence of positive integers $b_{1}, b_{2}, \ldots$ is non-increasing. So there exists a positive integer $T$ such that for all $n \geq T$ we have $$ \begin{gathered} b_{n+1}=b_{n} \Rightarrow \frac{a_{0}+a_{1}+\ldots+a_{n}+a_{n+1}}{n+1}=\frac{a_{0}+a_{1}+\ldots+a_{n}}{n} \Rightarrow \\ n\left(a_{0}+a_{1}+\ldots+a_{n}+a_{n+1}\right)=(n+1)\left(a_{0}+a_{1}+\ldots+a_{n}\right) \Rightarrow \\ n a_{n+1}=a_{0}+a_{1}+\ldots+a_{n} \Rightarrow a_{n+1}=\frac{a_{0}+a_{1}+\ldots+a_{n}}{n}=b_{n} . \end{gathered} $$ Similarly we get $a_{n+2}=b_{n+1}$, which follows that $a_{n+2}=b_{n+1}=b_{n}=a_{n+1}$. Hence, taking $M=T+1$, we can state that $a_{n+1}=a_{n}$ for every $n \geq M$. [^3]A2. Find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that: $$ f(x y)=y f(x)+x+f(f(y)-f(x)) $$ for all $x, y \in \mathbb{R}$.
{ "problem_match": "\nA1b. ${ }^{4}$", "resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "solution_match": "\nSolution." }
131
715
2019
T1
A1b
Algebra
Balkan_Shortlist
Let $a_{0}$ be an arbitrary positive integer. Consider the infinite sequence $\left(a_{n}\right)_{n \geq 1}$, defined inductively as follows: given $a_{0}, a_{1}, \ldots, a_{n-1}$ define the term $a_{n}$ as the smallest positive integer such that $a_{0}+a_{1}+\ldots+a_{n}$ is divisible by $n$. Prove that there exists a positive integer $M$ such that $a_{n+1}=a_{n}$ for all $n \geq M$.
Firstly, considering $(x, y)=(1,1)$ we get $f(0)=-1$. Then, setting $y=1$, we see that $-x=f(f(1)-f(x))$, so $f$ must be surjective. Now let $(x, y)=(a, 0)$ and $(0, a)$ to get $$ -1=a+f(-1-f(a)) \quad \text { and } \quad-1=-a+f(f(a)+1) $$ Since $f$ is surjective, for any real $z$ we may write $z=f(a)+1$ and then adding these two results gives $f(z)+f(-z)=-2$. Letting $(x, y)=(a, 1)$ and $(1, a)$ we get $$ -a=f(f(1)-f(a)) \quad \text { and } \quad f(a)=a f(1)+1+f(f(a)-f(1)) . $$ Adding these, and using the previous result with $z=f(a)-f(1)$ gives $$ f(a)=a f(1)+a-1 . $$ So $f(x)=k x-1$ for all $x$, for some fixed $k$. Substituting back into the original equation we see that 1 and -1 are the only possibilities for $k$ and that both of these values do give a function that works. Alternative solution. We prove that $f(x)=x-1$ and $f(x)=-x-1$ are the only solutions. Let $x=y=1$; this gives $f(1)=f(1)+1+f(0)$, so $f(0)=-1$. Then let $(x, y)=(0, a+1),(-a-1,0)$, and $(-a, 1)$ to give the three equalities $$ \begin{aligned} f(0)=(a+1) f(0)+f(f(a+1)-f(0)) & \Rightarrow a=f(f(a+1)+1) \\ f(0)=-a-1+f(f(0)-f(-a-1)) & \Rightarrow a=f(-f(-a-1)-1) \\ f(-a)=f(-a)-a+f(f(1)-f(a)) & \Rightarrow a=f(f(1)-f(-a)) . \end{aligned} $$ The last of these three implies $f$ is bijective, hence we have $$ f(a+1)+1=-f(-a-1)-1=f(1)-f(-a) $$ From the second of these equalities we can deduce the recurrence relation $f(x)=$ $f(x-1)+f(1)+1$, so if $c=f(1)+1$, we have $f(x)=c x-1$ for all $x \in \mathbb{Z}$. Substituting into the original equation we see that $c^{2}=1$, so $f(x)=x-1$ or $f(x)=-x-1$ for $x \in \mathbb{Z}$. In the first case, let $x=1$. Then $f(y)=1+f(f(y))$, which implies $f(x)=x-1$ for all $x$ as $f$ is surjective. In the second case, set $x=-1$, so $f(-y)=-1+f(f(y))$. However from above we have $f(a+1)+f(-a-1)=2$, so $f(f(y))-1=f(-y)=-f(y)-2$, and we have $f(x)=-x-1$ by surjectivity.
{ "problem_match": "\nA1b. ${ }^{4}$", "resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "solution_match": "\nSolution." }
131
798
2019
T1
A4
Algebra
Balkan_Shortlist
Let $a_{i j}, i=1,2, \ldots, m$ and $j=1,2, \ldots, n$, be positive real numbers. Prove that $$ \sum_{i=1}^{m}\left(\sum_{j=1}^{n} \frac{1}{a_{i j}}\right)^{-1} \leq\left(\sum_{j=1}^{n}\left(\sum_{i=1}^{m} a_{i j}\right)^{-1}\right)^{-1} . $$ When does the equality hold?
We will use the following Lemma. If $a_{1}, a_{2}, \ldots, a_{n}, b_{1}, b_{2}, \ldots, b_{n}$ are positive real numbers then $$ \frac{1}{\sum_{j=1}^{n} \frac{1}{a_{j}}}+\frac{1}{\sum_{j=1}^{n} \frac{1}{b_{j}}} \leq \frac{1}{\sum_{j=1}^{n} \frac{1}{a_{j}+b_{j}}} $$ The equality holds when $\frac{a_{1}}{b_{1}}=\frac{a_{2}}{b_{2}}=\ldots=\frac{a_{n}}{b_{n}}$. Proof. Set $x_{j}=\frac{1}{a_{j}}$ and $y_{j}=\frac{1}{b_{j}}$ for each $j=1,2, \ldots, n$. Then we have to prove that $$ \frac{1}{\sum_{j=1}^{n} x_{j}}+\frac{1}{\sum_{j=1}^{n} y_{j}} \leq \frac{1}{\sum_{j=1}^{n} \frac{x_{j} y_{j}}{x_{j}+y_{j}}} \quad \text { or } \quad \sum_{j=1}^{n} \frac{x_{j} y_{j}}{x_{j}+y_{j}} \leq \frac{\left(\sum_{j=1}^{n} x_{j}\right)\left(\sum_{j=1}^{n} y_{j}\right)}{\sum_{j=1}^{n} x_{j}+\sum_{j=1}^{n} y_{j}} $$ Subtract $\sum_{j=1}^{n} x_{j}$, and we have to prove that $$ \sum_{j=1}^{n}\left(x_{j}-\frac{x_{j} y_{j}}{x_{j}+y_{j}}\right) \geq \sum_{j=1}^{n} x_{j}-\frac{\left(\sum_{j=1}^{n} x_{j}\right)\left(\sum_{j=1}^{n} y_{j}\right)}{\sum_{j=1}^{n} x_{j}+\sum_{j=1}^{n} y_{j}} $$ or $$ \sum_{j=1}^{n}\left(\frac{x_{j}^{2}}{x_{j}+y_{j}}\right) \geq \frac{\left(\sum_{j=1}^{n} x_{j}\right)^{2}}{\sum_{j=1}^{n} x_{j}+\sum_{j=1}^{n} y_{j}} $$ The last one is a consequence of Cauchy-Schwarz inequality and thus the lemma is proved. We will now prove that repeating the lemma we will get the desired inequality. For example, if $a_{1}, a_{2}, \ldots, a_{n}, b_{1}, b_{2}, \ldots, b_{n}, c_{1}, c_{2}, \ldots, c_{n}$ are positive reals then by repeating lemma two times we get $$ \frac{1}{\sum_{j=1}^{n} \frac{1}{a_{j}}}+\frac{1}{\sum_{j=1}^{n} \frac{1}{b_{j}}}+\frac{1}{\sum_{j=1}^{n} \frac{1}{c_{j}}} \leq \frac{1}{\sum_{j=1}^{n} \frac{1}{a_{j}+b_{j}}}+\frac{1}{\sum_{j=1}^{n} \frac{1}{c_{j}}} \leq \frac{1}{\sum_{j=1}^{n} \frac{1}{\left(a_{j}+b_{j}\right)+c_{j}}}=\frac{1}{\sum_{j=1}^{n} \frac{1}{a_{j}+b_{j}+c_{j}}} $$ Using similar reasoning we can prove by induction that $$ \sum_{i=1}^{m}\left(\sum_{j=1}^{n} \frac{1}{a_{i j}}\right)^{-1}=\sum_{i=1}^{m} \frac{1}{\sum_{j=1}^{n} \frac{1}{a_{i j}}} \leq \frac{1}{\sum_{j=1}^{n} \frac{1}{\sum_{i=1}^{m} a_{i j}}}=\left(\sum_{j=1}^{n}\left(\sum_{i=1}^{m} a_{i j}\right)^{-1}\right)^{-1} $$ which is the desired result. The equality holds iff $$ \frac{a_{i 1}}{a_{11}}=\frac{a_{i 2}}{a_{12}}=\ldots=\frac{a_{i n}}{a_{1 n}} $$ for all $i=1,2, \ldots, m$.
{ "problem_match": "\nA4.", "resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "solution_match": "\nSolution." }
131
1,210
2019
T1
A5
Algebra
Balkan_Shortlist
Let $a, b, c$ be positive real numbers, such that $(a b)^{2}+(b c)^{2}+(c a)^{2}=3$. Prove that $$ \left(a^{2}-a+1\right)\left(b^{2}-b+1\right)\left(c^{2}-c+1\right) \geq 1 . $$
The inequality is equivalent with $$ \left(a^{2}-a+1\right)\left(b^{2}-b+1\right)\left(c^{2}-c+1\right) \geq 1 \Leftrightarrow\left(a^{3}+1\right)\left(b^{3}+1\right)\left(c^{3}+1\right) \geq(a+1)(b+1)(c+1) . $$ Thus: $$ \begin{gathered} \prod_{c y c}\left(a^{3}+1\right)-\prod_{c y c}(a+1)=\sum_{c y c} a^{3}+\sum_{c y c}(a b)^{3}+(a b c)^{3}-\sum_{c y c} a-\sum_{c y c} a b-a b c= \\ \sum_{c y c}\left(a^{3}+a\right)+\sum_{c y c}\left(a^{3} b^{3}+a b\right)+\left[(a b c)^{3}+1+1\right]-2 \sum_{c y c} a-2 \sum_{c y c} a b-a b c-2^{A M \geq G M} \geq^{\sum_{c y c} a^{2} b^{2}=3} \\ 2 \sum_{c y c} a^{2}+2 \sum_{c y c} a^{2} b^{2}+2 a b c-2 \sum_{c y c} a-2 \sum_{c y c} a b-2^{c y c}= \\ \sum_{c y c}\left(a^{2}-2 a+1\right)+\left(\sum_{c y c} a^{2}+2 a b c+1-2 \sum_{c y c} a b\right)= \\ \sum_{c y c}(a-1)^{2}+\left(\sum_{c y c} a^{2}+2 a b c+1-2 \sum_{c y c} a b\right) \geq\left(\sum_{c y c} a^{2}+2 a b c+1-2 \sum_{c y c} a b\right) . \end{gathered} $$ We will show that $\sum_{c y c} a^{2}+2 a b c+1-2 \sum_{c y c} a b \geq 0 \quad$ (1) for every $a, b, c \geq 0$. Firstly, let us observe that $$ (1+2 a b c)(a+b+c)=(1+a b c+a b c)(a+b+c) \geq 9 \sqrt[3]{a^{2} b^{2} c^{2} a b c}=9 a b c $$ implying $$ 1+2 a b c \geq \frac{9 a b c}{a+b+c} $$ Then, using Schur's Inequality, (i.e. $\sum_{c y c} a(a-b)(a-c) \geq 0$, for any $a, b, c \geq 0$ ) we obtain that $$ \sum_{c y c} a^{2} \geq 2 \sum_{c y c} a b-\frac{9 a b c}{a+b+c} $$ Returning to (1), we get: $$ \begin{gathered} \sum_{c y c} a^{2}+2 a b c+1-2 \sum_{c y c} a b \geq\left(2 \sum_{c y c} a b-\frac{9 a b c}{a+b+c}\right)+2 a b c+1-2 \sum_{c y c} a b= \\ (1+2 a b c)-\frac{9 a b c}{a+b+c} \geq 0 \end{gathered} $$ which gives us $\prod_{\text {cyc }}\left(a^{3}+1\right)-\prod_{c y c}(a+1) \geq 0$ and, respectively, $\prod_{\text {cyc }}\left(a^{2}-a+1\right) \geq 1$. ## GEOMETRY
{ "problem_match": "\nA5.", "resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "solution_match": "\nSolution." }
85
967
2019
T1
G1
Geometry
Balkan_Shortlist
Let $A B C D$ be a square of center $O$ and let $M$ be the symmetric of the point $B$ with respect to the point $A$. Let $E$ be the intersection of $C M$ and $B D$, and let $S$ be the intersection of $M O$ and $A E$. Show that $S O$ is the angle bisector of $\angle E S B$.
We have $$ \left\{\begin{array}{l} D C \equiv D A \\ \angle E D C \equiv \angle E D A \quad \Rightarrow \triangle D E C \equiv \triangle D E A \Rightarrow \angle D A E \equiv \angle D C E(*) . \\ D E \equiv D E \end{array}\right. $$ Let $C M \cap A D=\{P\}$, then follows $\triangle C D P \equiv \triangle B A P$ and $\angle P C D \equiv \angle P B A(* *)$. Figure 1: G1 From (*) and (**) follows $\angle D C P \equiv \angle D A E \equiv \angle P B A$. Now, let $S^{\prime}=A E \cap P B$. In the triangle $S^{\prime} A B$ we have $$ m\left(\angle S^{\prime} A B\right)+m\left(\angle S^{\prime} B A\right)=m\left(\angle S^{\prime} A B\right)+m\left(\angle P A S^{\prime}\right)=m(\angle P A B)=90^{\circ}, $$ so $m\left(\angle B S^{\prime} A\right)=90^{\circ}$. We show that $A E, B P$ and $M O$ are concurrent. In the triangle $\triangle E M B$ we apply the Ceva theorem, so $$ \frac{E P}{P M} \cdot \frac{M A}{A B} \cdot \frac{B O}{O E}=1 \Leftrightarrow \frac{E P}{P M}=\frac{O E}{B O} $$ is true because $P O$ is a midsegment in the triangle $D A B(P O \| A B)$. According to the Thales theorem in the triangle $E M B, \frac{E P}{P M}=\frac{E O}{O B}$ and $A E, B P$, $M O$ are concurrent in $S^{\prime}$, which is in fact $S$. Let $P B \cap C A=\{N\}$. Because ESNO has $m(\angle E O N)+m(\angle E S N)=180^{\circ}$, it follows $E S N O$ cyclic and $m(\angle E S O)=m(\angle E N O)=m(\angle D A O)=45^{\circ}$.
{ "problem_match": "\nG1.", "resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "solution_match": "\nSolution." }
90
557
2019
T1
G2
Geometry
Balkan_Shortlist
Let be a triangle $\triangle A B C$ with $m(\angle A B C)=75^{\circ}$ and $m(\angle A C B)=45^{\circ}$. The angle bisector of $\angle C A B$ intersects $C B$ at the point $D$. We consider the point $E \in(A B)$, such that $D E=D C$. Let $P$ be the intersection of the lines $A D$ and $C E$. Prove that $P$ is the midpoint of the segment $A D$.
Let $P^{\prime}$ be the midpoint of the segment $A D$. We will prove that $P^{\prime}=P$. Let $F \in A C$ such that $D F \perp A C$. The triangle $C D F$ is isosceles with $F D=F C$ and the triangle $D P^{\prime} F$ is equilateral as $m(\angle A D F)=60^{\circ}$. Thus, the triangle $F C P^{\prime}$ is isosceles $\left(F P^{\prime}=F C\right)$ and $m\left(\angle F C P^{\prime}\right)=m\left(\angle F P^{\prime} C\right)=15^{\circ}$. Figure 2: G2 We prove now that $m(\angle F C E)=15^{\circ}$. Let $M$ be the point on $[A B$ such that the triangle $A C M$ is equilateral. As $\triangle A D C \equiv$ $\triangle A D M(S A S) \Rightarrow D C=D M(=D E)$ and $m(\angle A M D)=m(\angle A C D)=45^{\circ}$. It follows that the triangle $\triangle D M E$ is isosceles with $m(\angle D M E)=m(\angle D E M)=45^{\circ}$. In the triangle $\triangle B D E$ we have $m(\angle B D E)=60^{\circ}$ and thus $m(\angle C D E)=120^{\circ}$.As the triangle $D C E$ is isoscel with $m(\angle D C E)=m(\angle D E C)=30^{\circ}$. Finaly $m(\angle A C E)=m(\angle A C B)-$ $m(\angle B C E)=45^{\circ}-30^{\circ}=15^{\circ}$. Thus $m\left(\angle F C P^{\prime}\right)=15^{\circ}=m(\angle F C E)$, and therefore $P^{\prime} \in C E$ and $P^{\prime}=P$, which means that $P$ is the midpoint of the segment $A D$. Alternative solution: In the way as above we prove that $m(\angle B C E)=15^{\circ}$. So the quadrilateral $A C D E$ is inscribed in a circle. Now, applying the sine rules to $\triangle D P E$ and $\triangle A P E$ we get $$ \begin{gathered} \frac{D P}{\sin 30^{\circ}}=\frac{P E}{\sin 15^{\circ}}, \quad \frac{A P}{\sin 105^{\circ}}=\frac{P E}{\sin 30^{\circ}} \Rightarrow \frac{D P}{\sin 30^{\circ}} \cdot \frac{\sin 105^{\circ}}{A P}=\frac{P E}{\sin 15^{\circ}} \cdot \frac{\sin 30^{\circ}}{P E}, \\ \frac{D P}{A P}=\frac{1}{\sin 30^{\circ}} 105^{\circ} \cdot \sin 15^{\circ} \\ =\frac{1}{4 \cdot \sin 105^{\circ} \cdot \sin 15^{\circ}}=\frac{1}{2 \cdot\left(\cos 90^{\circ}-\cos 120^{\circ}\right)}=\frac{1}{2 \cdot \frac{1}{2}}=1 . \end{gathered} $$ Thus, $Q P=A P$.
{ "problem_match": "\nG2.", "resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "solution_match": "\nSolution." }
118
843
2019
T1
G3
Geometry
Balkan_Shortlist
Let $A B C$ be a scalene and acute triangle, with circumcentre $O$. Let $\omega$ be the circle with centre $A$, tangent to $B C$ at $D$. Suppose there are two points $F$ and $G$ on $\omega$ such that $F G \perp A O, \angle B F D=\angle D G C$ and the couples of points $(B, F)$ and $(C, G)$ are in different halfplanes with respect to the line $A D$. Show that the tangents to $\omega$ at $F$ and $G$ meet on the circumcircle of $A B C$.
Consider any two points $F, G$ on $\omega$ such that $\angle B F D=\angle D G C$. Exploiting the isosceles triangles $\triangle A F G, \triangle A F D$, and $\triangle A D G$, we deduce (using directed angles throughout): $$ \begin{gathered} \angle D B F-\angle G C D=180^{\circ}-\angle B F D-\angle B D F-\left(180^{\circ}-\angle D G C-\angle C D G\right) \stackrel{(*)}{=} \\ \angle C D G-\angle F D B=\frac{1}{2} \cdot(\angle D A G-\angle D A F)=\frac{1}{2} \cdot\left[\left(180^{\circ}-2 \cdot \angle A D G\right)-\left(180^{\circ}-2 \cdot \angle A D F\right)\right]= \\ \angle A D F-\angle G D A=\angle D F A-\angle A G D=\angle D F G-\angle F G D \stackrel{(*)}{=} \angle B F G-\angle F G C, \end{gathered} $$ where we use $\angle B F D=\angle D G C$ at $\left(^{*}\right)$. Thus $B F G C$ is cyclic. Figure 3: G3 Now, if in addition $F G \perp A O$, then since $A$ is the centre of $\omega$, in fact $A O$ is the perpendicular bisector of $F G$. But by definition, since $A B C$ is scalene, $A O$ meets the perpendicular bisector of $B C$ at $O$. Hence $O$ is the centre of $B F G C$, and thus in fact $B F A G C$ is cyclic. But then the lines perpendicular to $A F$ at $F$, and $A G$ at $G$ (the tangents to $\omega$ ) must intersect at $E$, the point antipodal to $A$ on $\odot B F A G C$. Alternative solution: Let the circumcircle of $A B C$ be $\Gamma$. From the conditions, $G$ is the reflection of $F$ in the line $A O$. Let $B^{\prime}, D^{\prime}$ be the reflections of $B, D$ across this same line $A O$. Clearly $D^{\prime}$ also lies on $\omega$ and $B^{\prime}$ lies on $\Gamma$. Then, using directed angles, $\angle C G D=\angle D F B=\angle B^{\prime} G D^{\prime}$ so $$ \angle B^{\prime} G C=\angle B^{\prime} G D^{\prime}-\angle C G D^{\prime}=\angle C G D-\angle C G D^{\prime}=\angle D^{\prime} G D=\frac{1}{2} \angle D^{\prime} A D=\angle O A D . $$ Then, exploiting the isogonality property that $\angle D A B=\angle C A O$, we have $\angle O A D=\angle C A B-2 \angle D A B=\angle A B C-\angle B C A=\angle A B C-\angle B^{\prime} B A=\angle B^{\prime} B C$. So $G$ lies on $\Gamma$, and by the reflection property so does $F$. But then, as in the previous solution, the tangents at $F$ and $G$ to $\omega$ must intersect at $E$, the point antipodal to $A$ on $\Gamma$.
{ "problem_match": "\nG3.", "resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "solution_match": "\nSolution." }
138
814
2019
T1
G5
Geometry
Balkan_Shortlist
Let $A B C(B C>A C)$ be an acute triangle with circumcircle $k$ centered at $O$. The tangent to $k$ at $C$ intersects the line $A B$ at the point $D$. The circumcircles of triangles $B C D, O C D$ and $A O B$ intersect the ray $C A$ (beyond $A$ ) at the points $Q, P$ and $K$, respectively, such that $P \in(A K)$ and $K \in(P Q)$. The line $P D$ intersects the circumcircle of triangle $B K Q$ at the point $T$, so that $P$ and $T$ are in different halfplanes with respect to $B Q$. Prove that $T B=T Q$.
As $D C$ is tangent to $k$ at $C$ then $\angle O C D=90^{\circ}$. Denote by $X$ the midpoint of $A B$. Then $\angle O X A=90^{\circ}$ because of $O X$ is the perpendicular bisector of the side $A B$. The pentagon $P X O C D$ is inscribed in the circle with diameter $O D$, hence $\angle P X A=$ $\angle P X D=\angle P C D=\angle Q C D=\angle Q B A$ (the latter is due to $Q B C D$ being cyclic). We deduce that $P X \| Q B$ and that $P$ is the midpoint of $A Q$, so $A P=P Q$. Figure 5: G5 Now let $T_{1}$ be the midpoint of the arc $B Q$, not containing $K$, from the circumcircle of $\triangle B K Q$, then $T_{1} B=T_{1} Q$. Due to $\angle D P O=90^{\circ}$, it suffices to show that $\angle O P T_{1}=90^{\circ}$ - indeed, $T \equiv T_{1}$ and $T B=T Q$ would follow. Denote by $Y$ the midpoint of $B Q$. Then $\angle O X B=\angle T_{1} Y B=90^{\circ}$. The quadrilateral $Q K B T_{1}$ is inscribed in a circle, hence $\angle B T_{1} Q=180-\angle B K Q=\angle A K B$. Then $\angle X B O=$ $\frac{1}{2} \angle A K B=\frac{1}{2} \angle B T_{1} Q=\angle B T_{1} Y$ and thus $\triangle O X B \sim \triangle B Y T_{1}$. The quadrilaterals $P X B Y$ and $A X Y P$ are paralellograms, since $X Y$ and $P Y$ are middle lines of the triangle $A Q B$. Consequently, $$ \frac{O X}{X P}=\frac{O X}{B Y}=\frac{X B}{T_{1} Y}=\frac{P Y}{T_{1} Y} $$ which along with $\angle P X B=\angle P Y B$ and $\angle O X B=\angle T_{1} Y B$ gives $\angle O X P=\angle P Y T_{1}$ and $\triangle O X P \sim \triangle P Y T_{1}$. Thus $\angle X P O=\angle Y T_{1} P$ and $\angle P O X=\angle T_{1} P Y$. In conclusion, $$ \angle O P T_{1}=\angle X P Y+\angle X P O+\angle Y P T_{1}=\angle P X A+\angle X P O+\angle X O P=90^{\circ} $$
{ "problem_match": "\nG5.", "resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "solution_match": "\nSolution." }
168
655
2019
T1
G6
Geometry
Balkan_Shortlist
Let $A B C$ be an acute triangle, and $A X, A Y$ two isogonal lines. Also, suppose that $K, S$ are the feet of perpendiculars from $B$ to $A X, A Y$, and $T, L$ are the feet of perpendiculars from $C$ to $A X, A Y$ respectively. Prove that $K L$ and $S T$ intersect on $B C$.
Denote $\phi=\widehat{X A B}=\widehat{Y A C}, \alpha=\widehat{C A X}=\widehat{B A Y}$. Then, because the quadrilaterals ABSK and ACTL are cyclic, we have $$ \widehat{B S K}+\widehat{B A K}=180^{\circ}=\widehat{B S K}+\phi=\widehat{L A C}+\widehat{L T C}=\widehat{L T C}+\phi, $$ so, due to the 90-degree angles formed, we have $\widehat{K S L}=\widehat{K T L}$. Thus, KLST is cyclic. Figure 6: G6 Consider $M$ to be the midpoint of $B C$ and $K^{\prime}$ to be the symmetric point of $K$ with respect to $M$. Then, $B K C K^{\prime}$ is a parallelogram, and so $B K \| C K^{\prime}$. But $B K \| C T$, because they are both perpendicular to $A X$. So, $K^{\prime}$ lies on $C T$ and, as $\widehat{K T K^{\prime}}=90$ and $M$ is the midpoint of $K K^{\prime}, M K=M T$. In a similar way, we have that $M S=M L$. Thus, the center of $(K L S T)$ is $M$. Consider $D$ to be the foot of altitude from $A$ to $B C$. Then, $D$ belongs in both $(A B K S)$ and ( $A C L T)$. So, $$ \widehat{A D T}+\widehat{A C T}=180^{\circ}=\widehat{A B S}+\widehat{A D S}=\widehat{A D T}+90^{\circ}-\alpha=\widehat{A D S}+90^{\circ}-\alpha, $$ and $A D$ is the bisector of $\widehat{S D T}$. Because $D M$ is perpendicular to $A D, D M$ is the external bisector of this angle, and, as $M S=M T$, it follows that $D M S T$ is cyclic. In a similar way, we have that $D M L K$ is also cyclic. So, we have that $S T, K L$ and $D M$ are the radical axes of these three circles, $(K L S T)$, $(D M S T),(D M K L)$. These lines are, therefore, concurrent, and we have proved the desired result. Alternative solution. We continue after proving that $M$ is the center of $(K L S T)$. If $D$ is the foot of perpendicular from $A$ to $B C$, then $A S D K B$ is cyclic, as well as $A T D L C$. The radical axes of those two circles and ( $K L S T)$ are concurrent, thus $K S$ and $L T$ intersect on point $Q \in A D$. So, if $P$ is the intersection point of $K L$ and $T S$, due to Brokard's theorem, $A Q$ is perpendicular to $M P$. This is, of course, equivalent to proving that $P$ belongs on $B C$.
{ "problem_match": "\nG6.", "resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "solution_match": "\nSolution." }
95
753
2019
T1
G7
Geometry
Balkan_Shortlist
Let $A D, B E$, and $C F$ denote the altitudes of triangle $\triangle A B C$. Points $E^{\prime}$ and $F^{\prime}$ are the reflections of $E$ and $F$ over $A D$, respectively. The lines $B F^{\prime}$ and $C E^{\prime}$ intersect at $X$, while the lines $B E^{\prime}$ and $C F^{\prime}$ intersect at the point $Y$. Prove that if $H$ is the orthocenter of $\triangle A B C$, then the lines $A X, Y H$, and $B C$ are concurrent.
We will prove that the desired point of concurrency is the midpoint of $B C$. Assume that $\triangle A B C$ is acute. Let $(A B C)^{5}$ intersect $(A E F)$ at the point $Y^{\prime}$; we will prove that $Y=Y^{\prime}$. Figure 7: G7 Using the fact that $H$ is the incenter of $\triangle D E F$ we get that $D, E^{\prime}, F$ and $D, F^{\prime}, E$ are triples of collinear points. Furthermore, $$ 90^{\circ}=\angle{ }^{6} A E H=\angle A F^{\prime} H=\angle A E^{\prime} H=\angle A F H \Rightarrow F^{\prime}, E^{\prime}, H \in\left(A E F Y^{\prime}\right) . $$ We will now prove that the points $Y^{\prime}, B, D, F^{\prime}$ are concyclic. Indeed, $$ \angle Y^{\prime} B D=\angle Y^{\prime} B C=\angle Y^{\prime} A C=\angle Y^{\prime} A E=\angle Y^{\prime} F^{\prime} E \Rightarrow\left(Y^{\prime}, B, D, F^{\prime}\right) . $$ Now, as $$ \angle F^{\prime} Y^{\prime} B=\angle F^{\prime} D C=\angle E D C=\angle C A B=\angle C Y^{\prime} B, $$ the points $C, F^{\prime}, Y^{\prime}$ are collinear. Similarly we get that $B, E^{\prime}, Y^{\prime}$ are collinear, which implies $$ Y^{\prime}=Y=(A B C) \cap(A E F) . $$ [^4]Since we proved this property using directed angles, we know that it is also true for obtuse triangles. Notice that the points $A, B, C, H$ form an orthocentric system; in other words $H$ is the orthocenter of $\triangle A B C$ and $A$ is the orthocenter $\triangle H B C$. Furthermore, notice that $F^{\prime}$ is to $\triangle A B C$ as $E^{\prime}$ is to $\triangle H B C$ and that $E^{\prime}$ is to $\triangle A B C$ as $F^{\prime}$ is to $\triangle H B C$. This means that $X$ is to $\triangle H B C$ as $Y$ is to $\triangle A B C$ and, as we know the proven property is also true for obtuse triangles, we get $$ X=(H B C) \cap(A E F) . $$ By Reflecting the Orthocenter Lemma we know that in a triangle $A B C$, the reflection of its orthocenter over the midpoint of $B C$ is the antipode of $A$ w.r.t. ( $A B C$ ). Applying this Lemma on the triangles $A B C$ and $H B C$ we get that $Y H$ and $A X$ both go through the midpoint of $B C$, thus finishing the solution. Remark 1: The crucial part of this solution is defining the points $X, Y$ as intersections of circles. This can also be achieved directly by using similar triangles or by using the Spiral Similarity Lemma on $\triangle H B C, \triangle H F^{\prime} E^{\prime}$ and $\triangle A B C, \triangle A E^{\prime} F^{\prime}$. Remark 2: We can also invert around $A$ with radius $\sqrt{A H \cdot A D}$ or around $H$ with radius $\sqrt{H A \cdot H D}$ to prove that $X$ or $Y$ invert to the midpoint of $B C$ by using the existence of the nine-point circle.
{ "problem_match": "\nG7.", "resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "solution_match": "\nSolution." }
141
865
2019
T1
G8
Geometry
Balkan_Shortlist
Given an acute triangle $A B C,(c)$ is circumcircle with center $O$ and $H$ the orthocenter of the triangle $A B C$. The line $A O$ intersects $(c)$ at the point $D$. Let $D_{1}, D_{2}$ and $H_{2}, H_{3}$ be the symmetrical points of the points $D$ and $H$ with respect to the lines $A B, A C$ respectively. Let $\left(c_{1}\right)$ be the circumcircle of the triangle $A D_{1} D_{2}$. Suppose that the line $A H$ intersects again $\left(c_{1}\right)$ at the point $U$, the line $H_{2} H_{3}$ intersects the segment $D_{1} D_{2}$ at the point $K_{1}$ and the line $D H_{3}$ intersects the segment $U D_{2}$ at the point $L_{1}$. Prove that one of the intersection points of the circumcircles of the triangles $D_{1} K_{1} H_{2}$ and $U D L_{1}$ lies on the line $K_{1} L_{1}$.
It is well known that the symmetrical points $H_{1}, H_{2}, H_{3}$ of $H$ with respect the sides $B C, A B, A C$ of the triangle $A B C$ respectively lie on the circle (c). Figure 8: G8 Let $L$ be the second point of intersection of $(c)$ and $\left(c_{1}\right)$. First we will prove that the lines $D_{1} H_{2}, D_{2} H_{3}$ and $U D$ pass through the point $L$. Suppose that the line $A H$ intersects the side $B C$ at the point $Z$. Since $H_{1} D\|B C\| D_{1} D_{2}$ and $B, C$ are the midpoints of the segments $D_{1} D, D_{2} D$ respectively, we get that $Z$ is the midpoint of the segment $H H_{1}$, so the point $H$ lies on $D_{1} D_{2}$. Therefore, $A H \perp D_{1} D_{2}$ and $A U$ is a diameter of $\left(c_{1}\right)$. Thus, $A L \perp U L$ and $A L \perp D L$. We have that the points $U, D, L$ are collinear. (1) Now, $\angle A L D_{1}=\angle A D_{2} D_{1}, \angle A L H_{2}=\angle A C H_{2}$. Since $A H C D_{2}$ is cyclic we get $\angle A C H_{2}=\angle A D_{2} D_{1}$. Therefore, $\angle A L H_{2}=\angle A L D_{1}$. So the points $D_{1}, H_{2}, L$ are collinear. (2) Similarly, $$ \angle D_{1} L D_{2}=\angle D_{1} A D_{2}=180^{\circ}-2\left(\angle A D_{1} H\right) . $$ Since $A D_{1} B H$ is cyclic we have $\angle A D_{1} H=\angle A B H=\angle A B H_{3}$. Therefore, we get $$ \angle D_{1} L D_{2}=180^{\circ}-2\left(\angle A B H_{3}\right)=180^{\circ}-2\left(\angle A D H_{3}\right)=180^{\circ}-\angle H_{2} D H_{3} . $$ Thus, $$ \angle D_{1} L D_{2}+\angle H_{2} D H_{3}=180^{\circ} \quad \text { or } \angle D_{1} L D_{2}+\angle H_{3} L H_{2}=180^{\circ} . $$ So the points $H_{3}, L, D_{2}$ are collinear. (3) From (1), (2), (3) we have that the lines $D_{1} H_{2}, D_{2} H_{3}$ and $U D$ are concurrent at the point $L$. Also we have $$ \angle H_{3} D A=\angle D_{2} D A-\angle C D H_{3}=\angle A D_{2} D-\angle C B H_{3} $$ and because $B \mathrm{HD}_{2} \mathrm{C}$ is a parallelogram, we get $\angle C B H_{3}=\angle H D_{2} C$. So $$ \angle H_{3} D A=\angle A D_{2} D-\angle H D_{2} C=\angle A D_{2} D_{1}=\angle A D_{1} D_{2}=\angle A U D_{2} . $$ Therefore, the circumcircle of the triangle $U D L_{1}$ passes through the point $A$. Also, $\angle A D_{1} K_{1}=\angle D_{2} D_{1} A=\angle D_{2} U A$. But $A U L_{1} D$ is cyclic and we have $\angle D_{2} U A=\angle H_{3} D A=$ $\angle H_{3} B A=\angle H_{3} H_{2} A$. Therefore, $\angle A D_{1} K_{1}=\angle H_{3} H_{2} A$. Thus, the circumcircle of the triangle $D_{1} K_{1} H_{2}$ passes through the point $A$. Because the points $H_{3}, L, D_{2}$ are collinear by the Desargues theorem, the lines $U D_{1}$, $L_{1} K_{1}, D H_{2}$ are concurrent, let say in the point $M$. From the similarity of the triangles $U D L_{1}$ and $D_{1} K_{1} H_{2}$ we conclude that $M$ is the center of unique spiral similarity and because the circumcircles of the triangles $D_{1} K_{1} H_{2}$ and $U D L_{1}$ intersect at the point $A$, then the second point of intersection is $M$. Therefore, $M$ lies on the line $K_{1} L_{1}$. Comment. We can prove the last part in a different way. Let $M$ be the point of intersection of the circumcircles of the triangles $D_{1} K_{1} H_{2}$ and $U D L_{1}$. Now, we have $$ \angle K_{1} M A=\angle H_{3} H_{2} A=\angle H_{3} B A=\angle A D H_{3}=\angle L_{1} U A=\angle L_{1} M A . $$ Therefore, the points $L_{1}, K_{1}, M$ are collinear.
{ "problem_match": "\nG8.", "resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "solution_match": "\nSolution." }
260
1,330
2019
T1
G9
Geometry
Balkan_Shortlist
Given semicircle (c) with diameter $A B$ and center $O$. On the (c) we take point $C$ such that the tangent at the $C$ intersects the line $A B$ at the point $E$. The perpendicular line from $C$ to $A B$ intersects the diameter $A B$ at the point $D$. On the (c) we get the points $H, Z$ such that $C D=C H=C Z$. The line $H Z$ intersects the lines $C O, C D, A B$ at the points $S, I, K$ respectively and the parallel line from $I$ to the line $A B$ intersects the lines $C O, C K$ at the points $L, M$ respectively. We consider the circumcircle $(k)$ of the triangle $L M D$, which intersects again the lines $A B, C K$ at the points $P, U$ respectively. Let $\left(e_{1}\right)$, $\left(e_{2}\right),\left(e_{3}\right)$ be the tangents of the $(k)$ at the points $L, M, P$ respectively and $R=\left(e_{1}\right) \cap\left(e_{2}\right)$, $X=\left(e_{2}\right) \cap\left(e_{3}\right), T=\left(e_{1}\right) \cap\left(e_{3}\right)$. Prove that if $Q$ is the center of $(k)$, the lines $R D, T U$, $X S$ pass through the same point, which lies in the line $I Q$.
Since $C H=C Z$ we have $O C \perp H Z$. So from the cyclic quadrilateral $S O D I$ we get $$ C S \cdot C O=C I \cdot C D . $$ Figure 9: G9 We draw the perpendicular line $(v)$ to $H C$ at the point $H$. Let $J$ be the intersection point of lines $(v)$ and $C O$. Then $C J$ is diameter of the circle $(O, O A)$ and $$ C J=2 C O $$ From the right triangle $J H C$ we have $$ H C^{2}=C S \cdot C J $$ Therefore, from (1), (2) and (3) we get $$ C S \cdot \frac{1}{2} C J=C I \cdot C D \quad \text { or } \quad H C^{2}=2 C I \cdot C D \text {. } $$ However $H C=C D$ and thus $C D=2 C I$. Thus, $I$ is the midpoint of the segment $C D$. Nevertheless, $L M \| O K$, so the points $L, M$ are the midpoints of the sides $C O$ and $C K$ respectively. Therefore, the circumcircle $(k)$ of the triangle $L M D$ is the Euler circle of the $C O K$ and thus it passes through the point $S$. We have $Q S=Q U$ and from the right triangles $O S K, O U K$ we get $P S=P U=\frac{O K}{2}$. Therefore, the points $P, Q$ are located on the perpendicular bisector of the segment $S U$. Now, we conclude that $S U \| T X$, because $Q P \perp\left(e_{3}\right)$. Similarly, we prove that $D U \| R T$ and $S D \| R X$. Since the triangles $S U D$ and $X T R$ are homothetic we get that the lines $R D, T U, X S$ are concurrent at the center $\mathcal{M}$ of homothety. The points $I$ and $Q$ atre the incenters of homothetic triangles $S U D$ and $X T R$, respectively. Thus, the line $I Q$ passes through the point $\mathcal{M}$. ## NUMBER THEORY
{ "problem_match": "\nG9.", "resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "solution_match": "\nSolution." }
354
534
2019
T1
TN1
Number Theory
Balkan_Shortlist
Let $\mathbb{P}$ be the set of all prime numbers. Find all functions $f: \mathbb{P} \rightarrow \mathbb{P}$ such that $$ f(p)^{f(q)}+q^{p}=f(q)^{f(p)}+p^{q} $$ holds for all $p, q \in \mathbb{P}$.
Obviously, the identical function $f(p)=p$ for all $p \in \mathbb{P}$ is a solution. We will show that this is the only one. First we will show that $f(2)=2$. Taking $q=2$ and $p$ any odd prime number, we have $$ f(p)^{f(2)}+2^{p}=f(2)^{f(p)}+p^{2} . $$ Assume that $f(2) \neq 2$. It follows that $f(2)$ is odd and so $f(p)=2$ for any odd prime number $p$. Taking any two different odd prime numbers $p, q$ we have $$ 2^{2}+q^{p}=2^{2}+p^{q} \Rightarrow p^{q}=q^{p} \Rightarrow p=q, $$ contradiction. Hence, $f(2)=2$. So for any odd prime number $p$ we have $$ f(p)^{2}+2^{p}=2^{f(p)}+p^{2} . $$ Copy this relation as $$ 2^{p}-p^{2}=2^{f(p)}-f(p)^{2} $$ Let $T$ be the set of all positive integers greater than 2 , i.e. $T=\{3,4,5, \ldots\}$. The function $g: T \rightarrow \mathbb{Z}, g(n)=2^{n}-n^{2}$, is strictly increasing, i.e. $$ g(n+1)-g(n)=2^{n}-2 n-1>0 $$ for all $n \in T$. We show this by induction. Indeed, for $n=3$ it is true, $2^{3}-2 \cdot 3-1>0$. Assume that $2^{k}-2 k-1>0$. It follows that for $n=k+1$ we have $$ 2^{k+1}-2(k+1)-1=\left(2^{k}-2 k-1\right)+\left(2^{k}-2\right)>0 $$ for any $k \geq 3$. Therefore, (2) is true for all $n \in T$. As consequence, (1) holds if and only if $f(p)=p$ for all odd prime numbers $p$, as well as for $p=2$. Therefore, the only function that satisfies the given relation is $f(p)=p$, for all $p \in \mathbb{P}$.
{ "problem_match": "\nTN1.", "resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "solution_match": "\nSolution." }
82
565
2019
T1
C1
Combinatorics
Balkan_Shortlist
100 couples are invited to a traditional Moldovan dance. The 200 people stand in a line, and then in a step, two of them (not necessarily adjacent) may swap positions. Find the least $C$ such that whatever the initial order, they can arrive at an ordering where everyone is dancing next to their partner in at most $C$ steps.
With 100 replaced by $N$, the answer is $C=C(N)=N-1$. Throughout, we will say that the members of a couple have the same. $N=2$ : We use this as a base case for induction for both bounds. Up to labelling, there is one trivial initial order, and two non-trivial ones, namely $$ 1,1,2,2 ; \quad 1, \sqrt{2,2,1} ; \quad 1, \sqrt{2,1}, 2 $$ The brackets indicate how to arrive at a suitable final ordering with one step. Obviously one step is necessary in the second and third cases. Upper bound: First we show $C(N) \leq N-1$, by induction. The base case $N=2$ has already been seen. Now suppose the claim is true for $N-1$, and consider an initial arrangement of $N$ couples. Suppose the types of the left-most couples in line are $a$ and $b$. If $a \neq b$, then in the first step, swap the $b$ in place two with the other person with type $a$. If $a=b$, skip this. In both cases, we now have $N-1$ couples distributed among the final $2 N-2$ places, and we know that $N-2$ steps suffices to order them appropriately, by induction. So $N-1$ steps suffices for $N$ couples. Lower bound: We need to exhibit an example of an initial order for which $N-1$ steps are necessary. Consider $$ \mathcal{A}_{N}:=1,2,2,3,3, \ldots, N-1, N-1, N, N, 1 $$ Proceed by induction, with the base case $N=2$ trivial. Suppose there is a sequence of at most $N-2$ steps which works. In any suitable final arrangement, a given type must be in positions (odd, even), whereas they start in positions (even, odd). So each type must be involved in at least one step. However, each step involves at most two types, so by the pigeonhole principle, at least four types are involved in at most one step. Pick one such type $a \neq 1$. The one step involving $a$ must be one of $$ \ldots, ?, a, a, ?, \ldots . $$ Neither of these steps affects the relative order of the $2 N-2$ other people. So by ignoring this step involving the $a$, we have a sequence of at most $N-3$ steps acting on the other $2 N-2$ people which appropriately sorts them. By induction, this is a contradiction. Alternative lower bound I: Consider the graph with vertices given by pairs of positions $\{(1,2),(3,4), \ldots,(2 N-1,2 N)\}$. We add an edge between pairs of (different) vertices if we ever swap two people in places corresponding to those vertices. In particular, at the end, the two people with type $k$ end up in places corresponding to a single vertex. Suppose we start from the ordering (1) and have some number of steps leading to an ordering where everyone is next to their partner. Then, in the induced graph, there is a path between the vertices corresponding to the places $(2 k-3,2 k-2)$ and $(2 k-1,2 k)$ for each $2 \leq k \leq N$, and also between $(1,2)$ and $(2 N-1,2 N)$. In other words, the graph is connected, and so must have at least $N-1$ edges. Alternative lower bound II: Consider a bipartite multigraph with vertex classes $\left(v_{1}, \ldots, v_{n}\right)$ and $\left(w_{1}, \ldots, w_{n}\right)$. Connect $v_{i}$ to $w_{j}$ if a person of type $j$ is in positions ( $2 i-1,2 i$ ) (if both positions are taken by the type $j$ couple, then add two edges). Each step in the dance consists of replacing edges $\left.E=\left\{v_{a} \leftrightarrow w_{c}, v_{b} \leftrightarrow w_{d}\right)\right\}$ with $E^{\prime}=\left\{v_{a} \leftrightarrow w_{d}, v_{b} \leftrightarrow w_{c}\right\}$. However, both before and after the step, the number of components in the graph which include $\left\{v_{a}, v_{b}, w_{c}, w_{d}\right\}$ is either one or two. The structure of other components which do not include these vertices is unaffected by the move. Therefore, the number of connected components increases by at most 1 in each step. Starting from configuration (1), the graph initially consists of a single (cyclic) component, so one requires at least $n-1$ steps to get to the final configuration for which there are $n$ connected components.
{ "problem_match": "\nC1.", "resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "solution_match": "\nSolution." }
77
1,110
2019
T1
C2b
Combinatorics
Balkan_Shortlist
An $5 \times 5$ array must be completed with all numbers $\{1,2, \ldots, 25\}$, one number in each cell. Find the maximal positive integer $k$, such that for any completion of the array there is a $2 \times 2$ square (subarray), whose numbers have a sum not less than $k$.
We will prove that $k_{\max }=45$. We number the columns and the rows and we select all possible $3^{2}=9$ choices of an odd column with an odd row. Collecting all such pairs of an odd column with an odd row, we double count some squares. Indeed, we take some $3^{2}$ squares 5 times, some 12 squares 3 times and there are some 4 squares (namely all the intersections of an even column with an even row) that we don't take in such pairs. It follows that the maximal total sum over all $3^{2}$ choices of an odd column with an odd row is $$ 5 \times(17+18+\cdots+25)+3 \times(5+6+\cdots+16)=1323 $$ So, by an averaging argument, there exists a pair of an odd column with an odd row with sum at most $\frac{1323}{9}=147$. Then all the other squares of the array will have sum at least $$ (1+2+\cdots+25)-147=178 $$ But for these squares there is a tiling with $2 \times 2$ arrays, which are 4 in total. So there is an $2 \times 2$ array, whose numbers have a sum at least $\frac{178}{4}>44$. So, there is a $2 \times 2$ array whose numbers have a sum at least 45 . This argument gives that $$ k_{\max } \geq 45 . $$ We are going now to give an example of an array, in which 45 is the best possible. We fill the rows of the array as follows: | 25 | 5 | 24 | 6 | 23 | | :---: | :---: | :---: | :---: | :---: | | 11 | 4 | 12 | 3 | 13 | | 22 | 7 | 21 | 8 | 20 | | 14 | 2 | 15 | 1 | 16 | | 19 | 9 | 18 | 10 | 17 | We are going now to even rows: In the above array, every $2 \times 2$ subarray has a sum, which is less or equal to 45 . This gives that $$ k_{\max } \leq 45 . $$ A combination of (1) and (2) gives that $k_{\max }=45$. [^6]C3. Anna and Bob play a game on the set of all points of the form $(m, n)$ where $m, n$ are integers with $|m|,|n| \leqslant 2019$. Let us call the lines $x= \pm 2019$ and $y= \pm 2019$ the boundary lines of the game. The points of these lines are called the boundary points. The neighbours of point $(m, n)$ are the points $(m+1, n),(m-1, n),(m, n+1),(m, n-1)$. Anna starts with a token at the origin ( 0,0 ). With Bob playing first, they alternately perform the following steps: At his turn, Bob deletes two points on each boundary line. On her turn Anna makes a sequences of three moves of the token, where a move of the token consists of picking up the token from its current position and placing it in one of its neighbours. To win the game Anna must place her token on a boundary point before it is deleted by Bob. Does Anna have a winning strategy? [Note: At every turn except perhaps her last, Anna must make exactly three moves.]
{ "problem_match": "\nC2b. ${ }^{8}$", "resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "solution_match": "\nSolution." }
79
851
2019
T1
C2b
Combinatorics
Balkan_Shortlist
An $5 \times 5$ array must be completed with all numbers $\{1,2, \ldots, 25\}$, one number in each cell. Find the maximal positive integer $k$, such that for any completion of the array there is a $2 \times 2$ square (subarray), whose numbers have a sum not less than $k$.
Anna does not have a winning strategy. We will provide a winning strategy for Bob. It is enough to describe his strategy for the deletions on the line $y=2019$. Bob starts by deleting $(0,2019)$ and $(-1,2019)$. Once Anna completes her step, he deletes the next two available points on the left if Anna decreased her $x$-coordinate, the next two available points on the right if Anna increased her $x$-coordinate, and the next available point to the left and the next available point to the right if Anna did not change her $x$-coordinate. The only exception to the above rule is on the very first time Anna decreases $x$ by exactly 1 . In that step, Bob deletes the next available point to the left and the next available point to the right. Bob's strategy guarantees the following: If Anna makes a sequence of steps reaching $(-x, y)$ with $x>0$ and the exact opposite sequence of moves in the horizontal direction reaching $(x, y)$ then Bob deletes at least as many points to the left of $(0,2019)$ in the first sequence than points to the right of $(0,2019)$ in the second sequence. So we may assume for contradiction that Anna wins by placing her token at $(k, 2019)$ for some $k>0$. Define $\Delta=3 m-(2 x+y)$ where $m$ is the total number of points deleted by Bob to the right of $(0,2019)$, and $(x, y)$ is the position of Anna's token. For each sequence of steps performed first by Anna and then by Bob, $\Delta$ does not decrease. This can be seen by looking at the following table exhibiting the changes in $3 m$ and $2 x+y$. We have excluded the cases where $2 x+y<0$. | Step | $(0,3)$ | $(1,2)$ | $(-1,2)$ | $(2,1)$ | $(0,1)$ | $(3,0)$ | $(1,0)$ | $(2,-1)$ | $(1,-2)$ | | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | | $m$ | 1 | 2 | 0 (or 1$)$ | 2 | 1 | 2 | 2 | 2 | 2 | | $3 m$ | 3 | 6 | 0 (or 3$)$ | 6 | 3 | 6 | 6 | 6 | 6 | | $2 x+y$ | 3 | 4 | 0 | 5 | 1 | 6 | 2 | 3 | 0 | The table also shows that if in this sequence of steps Anna changes $y$ by +1 or -2 then $\Delta$ is increased by 1 . Also, if Anna changes $y$ by +2 or -1 then the first time this happens $\Delta$ is increased by 2 . (This also holds if her move is $(0,-1)$ or $(-2,-1)$ which are not shown in the table.) Since Anna wins by placing her token at $(k, 2019)$ we must have $m \leqslant k-1$ and $k \leqslant 2018$. So at that exact moment we have: $$ \Delta=3 m-(2 k+2019)=k-2022 \leqslant-4 . $$ So in her last turn she must have decreased $\Delta$ by at least 4 . So her last step must have been $(1,2)$ or $(2,1)$ which give a decrease of 4 and 5 respectively. (It could not be $(3,0)$ because then she must have already won. Also she could not have done just one or two moves in her last turn since this is not enough for the required decrease in $\Delta$.) If her last step was $(1,2)$ then just before doing it we had $y=2017$ and $\Delta=0$. This means that in one of her steps the total change in $y$ was not $0 \bmod 3$. However in that case we have seen that $\Delta>0$, a contradiction. If her last step was $(2,1)$ then just before doing it we had $y=2018$ and $\Delta=0$ or $\Delta=1$. So she must have made at least two steps with the change of $y$ being +1 or -2 or at least one step with the change of $y$ being +2 or -1 . In both cases, consulting the table, we get an increase of at least 2 in $\Delta$, a contradiction. Note 1: If Anna is allowed to make at most three moves at each step, then she actually has a winning strategy. Note 2: If 2019 is replaced by $N>1$ then Bob has a winning strategy if and only if $3 \mid N$.
{ "problem_match": "\nC2b. ${ }^{8}$", "resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "solution_match": "\nSolution." }
79
1,121
2019
T1
C4
Combinatorics
Balkan_Shortlist
A town-planner has built an isolated city whose road network consists of 2 N roundabouts, each connecting exactly three roads. A series of tunnels and bridges ensure that all roads in the town meet only at roundabouts. All roads are two-way, and each roundabout is oriented clockwise. Vlad has recently passed his driving test, and is nervous about roundabouts. He starts driving from his house, and always takes the first exit at each roundabout he encounters. It turns out his journey includes every road in the town in both directions before he arrives back at the starting point in the starting direction. For what values of $N$ is this possible?
$N$ odd. In fact, the number of trajectories has the same parity as $N$. The setting is a (multi)graph where every vertex has degree three. Each vertex has an orientation, an ordering of its incident edges. We call Vlad's possible paths trajectories, and a complete trajectory if he traverses every edge in both directions. We may assume the multigraph is connected, as otherwise a complete trajectory is certainly not possible. N odd (construction): There is an example when $N=1$, as shown in Figure 10. Figure 10: C4: $\quad N=1$ There are two 3-regular graphs on two vertices, the handcuffs and theta. The handcuffs fail since each self-loop has its own trajectory, but the theta does work for two of the four possible orientations. We now construct examples for $N \geq 3$ odd by induction. Suppose we have a valid 3 -regular graph on $2(N-2)$ vertices, such that Vlad's trajectory is complete. This has at least two (undirected) edges, so pick two of them, $e$ and $e^{\prime}$. (It does not matter if they share incident vertices.) Split both $e$ and $e^{\prime}$ into three, by adding two new vertices to each, and connect as in Figure 11. New vertices have degree three; other degrees are unchanged, so the graph is still 3regular. For each edge $e$ and $e^{\prime}$, pick a direction. (Both $u p$ in the figure.) These directed edges are part of the complete trajectory given by the induction hypothesis. Choose the orientations of the new vertices to preserve these two sections of the trajectory. The remaining two directed edges in the original graph will end up as partial trajectories in the new graph (see Figure 11). However, because all the new partial trajectories start and finish at the same places and in the same directions in the original graph, and no other directed edges are changed, the trajectory remains complete. The result for $N$ odd follows by induction. $\mathbf{N}$ even: Split each edge $e$ in the graph into two directed edges $\overleftarrow{e}$ and $\vec{e}$. Let $D$ be the set of the $6 N$ directed edges. Let $\alpha$ be the permutation of $D$ which exchanges $\overleftarrow{e}$ Figure 11: C4: Trajectories in the old and new graphs and $\vec{e}$. Now, for each roundabout $v$, let $\overleftarrow{e_{1}}, \overleftarrow{e_{2}}, \overleftarrow{e_{3}}$ be the three directed edges into $v$. The roundabout has a cyclic orientation, either $\left(\overleftarrow{e_{1}}, \overleftarrow{e_{2}}, \overleftarrow{e_{3}}\right)$ or $\left(\overleftarrow{e_{1}}, \overleftarrow{e_{3}}, \overleftarrow{e_{2}}\right)$. Let $\theta\left(\overleftarrow{e_{1}}\right)$ describe the directed edge after $\overleftarrow{e_{1}}$ in this orientation. By considering all roundabouts, $\theta$ is also a permutation of $D$. Note that $\theta\left(\overleftarrow{e_{1}}\right)$ is directed towards $v$, so the directed edge after $\overleftarrow{e_{1}}$ in a trajectory is $\alpha\left(\theta\left(\overleftarrow{e_{1}}\right)\right)$. So Vlad makes a complete trajectory precisely if $\alpha \theta$ is a cyclic permutation of $D$. Note that the cycle type of $\theta$ is $(3,3, \ldots, 3)$, and the cycle type of $\alpha$ is $(2,2, \ldots, 2)$. So $\theta$ is always an even permutation, while $\alpha$ is an even permutation precisely when $N$ is even. However, a cyclic permutation of $D$ is always odd, since $|D|=6 N$ is even. So there is certainly no complete trajectory when $N$ is even. Alternative I: We claim that in a graph with $E$ edges, and $V$ vertices, the number of trajectories, $T$, has the same parity as $V+E$. We allow degenerate cases of this statement, for example graphs that are disconnected, or trajectories that consist of only a single vertex, so that the graph that consists of $V$ vertices and no edges has precisely $V$ trajectories, and thus satisfies the given claim. This shows that $N$ cannot be even. We prove the claim by induction on $E$. Suppose we are given a graph with $E \geq 1$ edges and $T$ trajectories. Then consider any edge $e$, and its two directions $\vec{e}, \overleftarrow{e}$. Let $A$ be the sequence of directed edges starting from the one after $\vec{e}$ in its trajectory, ending at the edge before $\overleftarrow{e}$ or $\vec{e}$, whichever appears first. Similarly define $B$ starting after $\overleftarrow{e}$. $A$ and $B$ are disjoint, and may be empty. Figure 12: C4: (a) Initial trajectories. (b) After removing $e$ We consider removing $e$, but otherwise keep the orientations at its incident vertices the same. Then if $\vec{e}, \overleftarrow{e}$ are in different trajectories, these are the concatenations ( $\vec{e}, A)$ and $(\overleftarrow{e}, B)$. After removing $e$, for each direction $\overleftarrow{e}, \vec{e}$, instead of proceeding onto this directed edge, the relevant trajectory moves to the other trajectory. In other words, the resulting trajectory is the concatenation $(A, B)$. So $T$ decreases by one. Similarly, if both directions of $e$ are part of the same trajectory, this is the concatenation $(\vec{e}, A, \overleftarrow{e}, B)$. Then when we remove $e$, this splits into the two trajectories $(A)$ and $(B)$, by an essentially identical argument. So $T$ increases by one. Thus in both cases, removing one edge changes the parity of $T$, and so the claim follows by induction on $E$. In the original setting we have $V=2 N, E=3 N$, so $T$ must have the same parity as $5 N$. Thus $T=1$ is impossible when $N$ is even. Alternative II: An alternative is to induct on $N$, using the following stronger claim. Claim: You can't have exactly one trajectory for $N$ even; nor exactly two trajectories for a connected graph with $N$ odd. Proof of claim: We have to check that the claim is true for $N=1,2$. Checking $N=2$ requires a couple of case. Alternatively, one can argue that a single cyclic edge with no vertices (!) counts as the case $N=0$. Now use strong induction by contradiction. If $N$ is even, but has exactly one trajectory, then there are no self-loops, so pick any edge $e$, connecting vertices $v \neq w$. Remove $e$, then remove $v$, and connect $v$ 's other two incident edges (which are distinct from each other and $e$ ) to form a single edge. Do the same for $w$. Figure 13: C4: Trajectories in the old and new graphs The effect on the trajectories is shown in Figure 13. Note that the new graph is still 3-regular. We then argue as in Proof I that this operation splits the trajectory into two. So if the new graph is connected, this contradicts the hypothesis for $N-1$. Alternately, the new graph might consist of two components. Since it is 3 -regular, each component has an even number of vertices. The total number of vertices is $2(N-1)$, which is 2 modulo 4 , and so one of the components has a number of vertices which is a multiple of four, and a complete trajectory of this component, which also contradicts the induction hypothesis. Now suppose $N$ is odd, but the original oriented graph has exactly two trajectories. If there is a self-loop at some vertex $v$, then one of the trajectories involves only this self-loop. So remove this vertex, and consider the other vertex $w$ connected to $v$. Remove $w$ and join up its other two incident edges. The resulting graph corresponds to $N$ even, and has a complete trajectory, which is a contradiction. Otherwise, there are no self-loops, but the graph is connected hence there must be one edge $e$ connecting vertices $v \neq w$ which has one trajectory in one direction, and the other trajectory in the other direction. Collapse this edge as in Figure 13, and again by the same argument as in Proof I, this merges the two trajectories, giving a complete trajectory for $N$ even, and a contradiction. [^0]: ${ }^{1}$ Proposed by PSC. [^1]: ${ }^{2}$ Proposed by PSC. [^2]: ${ }^{3}$ Proposed by PSC. [^3]: ${ }^{4}$ Proposed by PSC. [^4]: ${ }^{5}(X Y Z)$ denotes the circumcircle of $\triangle X Y Z$ ${ }^{6} \angle$ denotes a directed angle modulo $\pi$ [^5]: ${ }^{7}$ Proposed by PSC. [^6]: ${ }^{8}$ Proposed by PSC.
{ "problem_match": "\nC4.", "resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "solution_match": "\nSolution." }
133
2,092
2021
T1
A3
Algebra
Balkan_Shortlist
Find all functions $f: \mathbb{R}^{+} \rightarrow \mathbb{R}^{+}$such that $$ f(x+f(x)+f(y))=2 f(x)+y $$ holds for all $x, y \in \mathbb{R}^{+}$. ## Proposed by Greece
1. We will show that $f(x)=x$ for every $x \in \mathbb{R}^{+}$. It is easy to check that this function satisfies the equation. We write $P(x, y)$ for the assertion that $f(x+f(x)+f(y))=2 f(x)+y$. We first show that $f$ is injective. So assume $f(a)=f(b)$. Now $P(1, a)$ and $P(1, b)$ show that $$ 2 f(1)+a=f(1+f(1)+f(a))=f(1+f(1)+f(b))=2 f(1)+b $$ and therefore $a=b$. Let $A=\left\{x \in \mathbb{R}^{+}: f(x)=x\right\}$. It is enough to show that $A=\mathbb{R}^{+}$. $P(x, x)$ shows that $x+2 f(x) \in A$ for every $x \in \mathbb{R}^{+}$. Now $P(x, x+2 f(x))$ gives that $$ f(2 x+3 f(x))=x+4 f(x) $$ for every $x \in \mathbb{R}^{+}$. Therefore $P(x, 2 x+3 f(x))$ gives that $2 x+5 f(x) \in A$ for every $x \in \mathbb{R}^{+}$. Suppose $x, y \in \mathbb{R}^{+}$such that $x, 2 x+y \in A$. Then $P(x, y)$ gives that $$ f(2 x+f(y))=f(x+f(x)+f(y))=2 f(x)+y=2 x+y=f(2 x+y) $$ and by the injectivity of $f$ we have that $2 x+f(y)=2 x+y$. We conlude that $y \in A$ as well. Now since $x+2 f(x) \in A$ and $2 x+5 f(x)=2(x+2 f(x))+f(x) \in A$ we deduce that $f(x) \in A$ for every $x \in \mathbb{R}^{+}$. I.e. $f(f(x))=f(x)$ for every $x \in \mathbb{R}^{+}$. By injectivity of $f$ we now conclude that $f(x)=x$ for every $x \in \mathbb{R}^{+}$.
{ "problem_match": "\nA3.", "resource_path": "Balkan_Shortlist/segmented/en-2021_bmo_shortlist.jsonl", "solution_match": "\nSolution" }
71
567
2021
T1
A3
Algebra
Balkan_Shortlist
Find all functions $f: \mathbb{R}^{+} \rightarrow \mathbb{R}^{+}$such that $$ f(x+f(x)+f(y))=2 f(x)+y $$ holds for all $x, y \in \mathbb{R}^{+}$. ## Proposed by Greece
2. As in Solution $1, f$ is injective. Furthermore, letting $m=2 f(1)$ we have that the image of $f$ contains $(m, \infty)$. Indeed, if $t>m$, say $t=m+y$ for some $y>0$, then $P(1, y)$ shows that $f(1+f(1)+f(y))=t$. Let $a, b \in \mathbb{R}$. We will show that $f(a)-a=f(b)-b$. Define $c=2 f(a)-2 f(b)$ and $d=$ $a+f(a)-b-f(b)$. It is enough to show that $c=d$. By interchanging the roles of $a$ and $b$ in necessary, we may assume that $d \geqslant 0$. From $P(a, y)$ and $P(b, y)$, after subtraction, we get $$ f(a+f(a)+f(y))-f(b+f(b)+f(y))=2 f(a)-2 f(b)=c . $$ so for any $t>m$ (picking $y$ such that $f(y)=t$ in (1)) we get $$ f(a+f(a)+t)-f(b+f(b)+t)=2 f(a)-2 f(b)=c . $$ Now for any $z>m+b+f(b)$, taking $t=z-b-f(b)$ in (2) we get $$ f(z+d)-f(z)=c $$ Now for any $x>m+b+f(b)$ from (3) we get that $$ 2 f(x+d)+y=2 f(x)+y+2 c . $$ Also, for any $x$ large enough, $(x>\max \{m+b+f(b), m+b+f(b)+c-d\}$ will do), by repeated application of (3), we have $$ \begin{aligned} f(x+d+f(x+d)+f(y)) & =f(x+f(x+d)+y)+c \\ & =f(x+f(x)+y+c)+c \\ & =f(x+f(x)+y+c-d)+2 c . \end{aligned} $$ (In the first equality we applied (3) with $z=x+f(x+d)+y>x>m+b+f(b)$, in the second with $z=x>m+b+f(b)$ and in the third with $z=x+f(x)+y-c+d>x+c-d>m+b+f(b)$. In particular, now $P(x+d, y)$ implies that $$ f(x+f(x)+y+c-d)=2 f(x)+y=f(x+f(x)+y) $$ for every large enough $x$. By injectivity of $f$ we deduce that $x+f(x)+y+c-d=x+f(x)+y$ and therefore $c=d$ as required. It now follows that $f(x)=x+k$ for every $x \in \mathbb{R}^{+}$and some fixed constant $k$. Substituting in the initial equation we get $k=0$.
{ "problem_match": "\nA3.", "resource_path": "Balkan_Shortlist/segmented/en-2021_bmo_shortlist.jsonl", "solution_match": "\nSolution" }
71
660
2021
T1
A4
Algebra
Balkan_Shortlist
Let $f, g$ be functions from the positive integers to the integers. Vlad the impala is jumping around the integer grid. His initial position is $\mathbf{x}_{0}=(0,0)$, and for every $n \geqslant 1$, his jump is $$ \mathbf{x}_{n}-\mathbf{x}_{n-1}=( \pm f(n), \pm g(n)) \text { or }( \pm g(n), \pm f(n)) $$ with eight possibilities in total. Is it always possible that Vlad can choose his jumps to return to his initial location $(0,0)$ infinitely many times when (a) $f, g$ are polynomials with integer coefficients? (b) $f, g$ are any pair of functions from the positive integers to the integers? ## Proposed by United Kingdom
1. (a) Yes it is always possible. The key idea is the following: Let $b(n)$ be the number of 1 's in the binary expansion of $n=0,1,2, \ldots$. Lemma: Given a polynomial $f$ with integer coefficients and degree at most $d$, then $$ \sum_{k=0}^{2^{d+1}-1}(-1)^{b(k)} f(n+k)=f(n)-f(n+1)-f(n+2)+\cdots \pm f\left(n+\left(2^{d+1}-1\right)\right)=0 $$ Proof of Lemma: The result is clear for $d=0$. For $d \geqslant 1$, we have $$ \sum_{k=0}^{2^{d+1}-1}(-1)^{b(k)} f(n+k)=\sum_{k=0}^{2^{d}-1}(-1)^{b(k)}\left[f(n+k)-f\left(n+k+2^{d}\right)\right] . $$ So set $\tilde{f}(n)=f(n)-f\left(n+2^{d}\right)$, which is a polynomial of degree at most $d-1$. Then $$ \sum_{k=0}^{2^{d+1}-1}(-1)^{b(k)} f(n+k)=\sum_{k=0}^{2^{d}-1} \tilde{f}(n+k)=0 $$ by induction, completing the proof of the lemma. In particular, if we take $$ \mathbf{x}_{n}-\mathbf{x}_{n-1}=\left((-1)^{b(n)} f(n),(-1)^{b(n)} g(n)\right), $$ then $\mathbf{x}_{D}=\mathbf{0}$ whenever $D$ is a multiple of $2^{1+\max (\operatorname{deg}(f), \operatorname{deg}(g))}$. (b) No, it is not always possible. Let $g$ be any suitable function. Then, we construct $f$ inductively. There are at most $8^{n-1}$ possibilities for $\mathbf{x}_{n-1}$, so choose $f(n)$ to be greater than the magnitude of all of them. Consequently $\mathbf{x}_{n}$ cannot be $\mathbf{0}$.
{ "problem_match": "\nA4.", "resource_path": "Balkan_Shortlist/segmented/en-2021_bmo_shortlist.jsonl", "solution_match": "\n## Solution" }
178
530
2021
T1
A4
Algebra
Balkan_Shortlist
Let $f, g$ be functions from the positive integers to the integers. Vlad the impala is jumping around the integer grid. His initial position is $\mathbf{x}_{0}=(0,0)$, and for every $n \geqslant 1$, his jump is $$ \mathbf{x}_{n}-\mathbf{x}_{n-1}=( \pm f(n), \pm g(n)) \text { or }( \pm g(n), \pm f(n)) $$ with eight possibilities in total. Is it always possible that Vlad can choose his jumps to return to his initial location $(0,0)$ infinitely many times when (a) $f, g$ are polynomials with integer coefficients? (b) $f, g$ are any pair of functions from the positive integers to the integers? ## Proposed by United Kingdom
2. (a) Given a polynomial $f$ of degree at most $d$ and integers $n, r$, we claim that $$ \sum_{k=0}^{2^{d+1}-1} \varepsilon_{k} f\left(2^{d} n+r+k\right)=0 $$ for some choice of $\varepsilon_{0}, \varepsilon_{1}, \ldots, \varepsilon_{2^{d+1}-1} \in\{-1,1\}$. (Which are allowed to depend on $d$ and f.) We proceed by induction on $d$, the case $d=0$ being immediate. For the inductive step we define the polynomial $g(n)=f(2 n+r+1)-f(2 n+r)$ which is a polynomial of degree at most $d-1$. Then $$ \sum_{k=0}^{2^{d}-1} \varepsilon_{k} g\left(2^{d-1} n+k\right)=0 $$ for some choice of the $\varepsilon_{k}$ 's giving $$ \sum_{k=0}^{2^{d+1}-1} \varepsilon_{k}^{\prime} f\left(2^{d} n+r+k\right)=0 $$ where $\varepsilon_{2 k}^{\prime}=-\varepsilon_{k}$ and $\varepsilon_{2 k+1}^{\prime}=\varepsilon_{k}$. This completes the proof of the claim. Now the proof can be completed as in Solution 1. (b) Apart from magnitude arguments, one could also use modulo arguments. For example, taking $f(0), g(0)$ to be odd and $f(n), g(n)$ to be even for every $n \geqslant 1$ works. ## Comments. (1) We propose to omit part (b) as it is easy and furthermore it suggests that the answer to (a) is most likely affirmative. (2) Giving a precise self-contained characterisation of $b(n)$ in Solution 1 is not necessary for the lemma. It could instead be phrased as: There exists a sequence $\beta(k) \in\{-1,+1\}^{\mathbb{N}}$ such that $\sum \beta(k) f(n+k)=0$. Then, one constructs $\beta(\cdot)$ inductively as part of the proof via $\beta\left(k+2^{d}\right)=-\beta(k)$ for $k<2^{d}$, which coincides with the original definition, ie $\beta(\cdot)=(-1)^{b(\cdot)}$. (3) The sequence of signs in both solutions are essentially the same. (Either all signs exactly the same or all signs different.)
{ "problem_match": "\nA4.", "resource_path": "Balkan_Shortlist/segmented/en-2021_bmo_shortlist.jsonl", "solution_match": "\n## Solution" }
178
617
2021
T1
A5
Algebra
Balkan_Shortlist
Find all functions $f: \mathbb{R}^{+} \longrightarrow \mathbb{R}^{+}$such that $$ f(x f(x+y))=y f(x)+1 $$ holds for all $x, y \in \mathbb{R}^{+}$. ## Proposed by North Macedonia
1. We will show that that $f(x)=\frac{1}{x}$ for every $x \in \mathbb{R}^{+}$. It is easy to check that this function satisfies the equation. We write $P(x, y)$ for the assertion that $f(x f(x+y))=y f(x)+1$. We first show that $f$ is injective. So assume $f\left(x_{1}\right)=f\left(x_{2}\right)$ and take any $x<x_{1}, x_{2}$. Then $P\left(x, x_{1}-x\right)$ and $P\left(x, x_{2}-x\right)$ give $$ \left(x_{1}-x\right) f(x)+1=f\left(x f\left(x_{1}\right)\right)=f\left(x f\left(x_{2}\right)\right)=\left(x_{2}-x\right) f(x)+1 $$ giving $x_{1}=x_{2}$. It is also immediate that for every $z>1$ there is an $x$ such that $f(x)=z$. Indeed $P\left(x, \frac{z-1}{f(x)}\right)$ gives that $$ f\left(x f\left(x+\frac{z-1}{f(x)}\right)\right)=z . $$ Now given $z>1$, take $x$ such that $f(x)=z$. Then $P\left(x, \frac{z-1}{z}\right)$ gives $$ f\left(x f\left(x+\frac{z-1}{z}\right)\right)=\frac{z-1}{z} f(x)+1=z=f(x) . $$ Since $f$ is injective, we deduce that $f\left(x+\frac{z-1}{z}\right)=1$. So there is a $k \in \mathbb{R}^{+}$such that $f(k)=1$. Since $f$ is injective this $k$ is unique. Therefore $x=k+\frac{1}{z}-1$. I.e. for every $z>1$ we have $$ f\left(k+\frac{1}{z}-1\right)=z $$ We must have $k+\frac{1}{z}-1 \in \mathbb{R}^{+}$for each $z>1$ and taking the limit as $z$ tends to infinity we deduce that $k \geqslant 1$. (Without mentioning limits, assuming for contradiction that $k<1$, taking $z=\frac{2}{1-k}$ leads to a contradiction.) Set $r=k-1$. Now $P\left(r+\frac{1}{6}, \frac{1}{3}\right)$ gives $$ f\left(\left(r+\frac{1}{6}\right) f\left(r+\frac{1}{6}+\frac{1}{3}\right)\right)=\frac{1}{3} f\left(r+\frac{1}{6}\right)+1=\frac{6}{3}+1=3=f\left(r+\frac{1}{3}\right) . $$ But $$ f\left(\left(r+\frac{1}{6}\right) f\left(r+\frac{1}{6}+\frac{1}{3}\right)\right)=f\left(\left(r+\frac{1}{6}\right) f\left(r+\frac{1}{2}\right)\right)=f\left(2 r+\frac{1}{3}\right) . $$ The injectivity of $f$ now shows that $r=0$, i.e. that $f(1)=k=1$. This shows that $f\left(\frac{1}{z}\right)=z$ for every $z>1$, i.e. $f(x)=\frac{1}{x}$ for every $x<1$. Now for $x>1$ consider $P(1, x-1)$ to get $f(f(x))=(x-1) f(1)+1=x=f\left(\frac{1}{x}\right)$. Injectivity of $f$ shows that $f(x)=\frac{1}{x}$. So for all possible values of $x$ we have shown that $f(x)=\frac{1}{x}$.
{ "problem_match": "\nA5.", "resource_path": "Balkan_Shortlist/segmented/en-2021_bmo_shortlist.jsonl", "solution_match": "\nSolution" }
70
965
2021
T1
A6
Algebra
Balkan_Shortlist
Find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that $$ f(x y)=f(x) f(y)+f(f(x+y)) $$ holds for all $x, y \in \mathbb{R}$. ## Proposed by Romania
1. We will show that $f(x)=0$ for every $x \in \mathbb{R}$ or $f(x)=x-1$ for every $x \in \mathbb{R}$. It is easy to check that both of these functions work. We write $P(x, y)$ for the assertion that $f(x y)=f(x) f(y)+f(f(x+y))$. For later use we write $Q(x, y)$ for the assertion that $f(x y)=f(x) f(y)$ and $R(x, y)$ for the assertion that $f(x y)=$ $f(x) f(y)+f(x+y-1)$. Assume first that $f(0)=0$. For each $t \in \mathbb{R}, P(0, t)$ gives $f(f(t))=0$. Therefore we get that $Q(x, y)$ holds for each $x, y \in \mathbb{R}$. Now $Q(x, 1)$ gives $f(x)=f(x) f(1)$ for each $x \in \mathbb{R}$. But $f(1) \neq 1$ as otherwise we would have $f(f(1))=f(1)=1 \neq 0$, a contradiction. Since $f(1) \neq 1$, then $f(x)=f(x) f(1)$ gives $f(x)=0$. This holds for each $x \in \mathbb{R}$ and gives our first solution. From now on we assume that $f(0)=a \neq 0$. If $f(1)=1$, then for $t \in \mathbb{R}, P(t-1,1)$ gives $f(f(t))=0$ so we get that $Q(x, y)$ holds for each $x, y \in \mathbb{R}$. Now $Q(x, 0)$ gives $f(0)=f(x) f(0)$ for each $x \in \mathbb{R}$. Since $f(0) \neq 0$, then $f(x)=1$ for each $x \in \mathbb{R}$. This however contradicts the fact that $f(f(t))=0$ for each $t \in \mathbb{R}$. So from now on we can further assume that $f(1)=b \neq 1$. Now $P(x, 0)$ gives $$ f(f(x))=a-a f(x) $$ and $P(x-1,1)$ gives $$ f(f(x))=f(x-1)-b f(x-1) . $$ Therefore, letting $c=\frac{b-1}{a}$, we get $$ f(x)=c f(x-1)+1 $$ for every $x \in \mathbb{R}$. Claim 1. There is an integer $n$ such that $n^{2} \geqslant 4 f(n)$. Proof. If $c=1$, then inductively from (1) we get that $f(n)=f(0)+n=a+n$ for each $n \in \mathbb{N}$. So for $n$ large enough we have $n^{2} \geqslant 4 f(n)$. If $c \neq 1$, then inductively from (1) we get that $$ f(n)=\left(a-\frac{1}{1-c}\right) c^{n}+\frac{1}{1-c} $$ for every $n \in \mathbb{Z}$. (We apply induction once to prove the result for every $n \geqslant 0$ and once to prove the result for every $n<0$.) For $|c|<1$ we have $\lim _{n \rightarrow \infty} f(n)=\frac{1}{1-c}$ so we can find $n$ large enough such that $4 f(n) \leqslant n^{2}$. For $|c|>1$ we have $\lim _{n \rightarrow-\infty} f(n)=\frac{1}{1-c}$ so we can find a negative integer $n$ with $|n|$ large enough such that $4 f(n) \leqslant n^{2}$. For $|c|=1$, we must have $c=-1$, so $f(n)= \pm\left(a-\frac{1}{2}\right)+\frac{1}{2}$ and again for $n$ large enough we have $4 f(n) \leqslant n^{2}$. Claim 2. $f(1)=0$. Proof. Let $n$ be as given by Claim 1 and pick $x^{\prime}, y^{\prime} \in \mathbb{R}$ such that $x^{\prime}+y^{\prime}=n$ and $x^{\prime} y^{\prime}=f(n)$. This is possible since $n^{2} \geqslant 4 f(n)$. Now $P\left(x^{\prime}, y^{\prime}\right)$ gives $f\left(x^{\prime}\right) f\left(y^{\prime}\right)=0$. So there is a $d \in \mathbb{R}$ such that $f(d)=0$. Putting $x=d+1$ in (1) we get $f(d+1)=1$. Now $P(d, 1)$ gives $f(f(d+1))=0$ and therefore $b=f(1)=0$. Claim 3. $c \neq-1$. Proof. If $c=-1$, then $f(x)+f(x-1)=1$ for every $x \in \mathbb{R}$. In particular, for every $x \in \mathbb{R}$, we have $$ f(x)+f(x+1)=1=f(x+1)+f(x+2) $$ giving $f(x)=f(x+2)$. So $P\left(\frac{1}{2}, \frac{1}{2}\right)$ and $P\left(\frac{1}{2}, \frac{5}{2}\right)$ give $$ f\left(\frac{5}{4}\right)=f\left(\frac{1}{2}\right) f\left(\frac{5}{2}\right)+f(f(3))=f\left(\frac{1}{2}\right) f\left(\frac{1}{2}\right)+f(f(1))=f\left(\frac{1}{4}\right) . $$ But $f\left(\frac{1}{4}\right)+f\left(\frac{5}{4}\right)=1$, therefore $f\left(\frac{1}{4}\right)=f\left(\frac{5}{4}\right)=\frac{1}{2}$. Since $f(1)=0$, then $f(0)=1$ and so $$ \frac{1}{2}=f\left(\frac{1}{4}\right)=f\left(\frac{1}{2}\right)^{2}+f(f(1)) \geqslant f(f(1))=f(0)=1 $$ a contradiction. Claim 4. $c=1$. Proof. From (1) we get that $f(2)=1, f(3)=c+1$ and $f(4)=c^{2}+c+1$. Now $P(3,1)$ and $P(2,2)$ give that $$ f(f(4))=f(3)-f(3) f(1)=c+1 \quad \text { and } \quad f(f(4))=f(4)-f(2)^{2}=c^{2}+c=c(c+1) . $$ Since by Claim $3 c \neq-1$, then we must have $c=1$. Since $f(1)=0$, then $P(x+y-1,1)$ gives $f(x+y-1)=f(f(x+y))$. Thus we have that $R(x, y)$ holds for every $x, y \in \mathbb{R}$. Now $R(x, y+1)$ gives $$ f(x y+y)=f(x) f(y+1)+f(x+y) $$ and from (1) and the fact that $c=1$ we deduce that $$ \begin{aligned} f(x y+x) & =f(x) f(y)+f(x)+f(x+y) \\ & =f(x) f(y)+f(x)+f(x+y-1)+1 \\ & =f(x y)+f(x)+1 \end{aligned} $$ This holds for every $x, y \in \mathbb{R}$. In particular, taking $x \neq 0$ and $y=t / x$, we have $$ f(t+x)=f(t)+f(x)+1 $$ for every $t \in \mathbb{R}, x \in \mathbb{R} \backslash\{0\}$. Note that (2) holds for $x=0$ as well, since $c=1$ implies that $f(0)=-1$. Defining $g(x)=f(x)+1$ for each $x \in \mathbb{R}$ then (2) gives that $$ g(t+x)=g(t)+g(x) $$ for every $t, x \in \mathbb{R}$. I.e. $g$ is additive. Furthermore $R(x, y)$ implies that $$ \begin{aligned} g(x y)-1 & =(g(x)-1)(g(y)-1)+g(x+y-1)-1 \\ & =g(x) g(y)-g(x)-g(y)+g(x+y-1) \\ & =g(x) g(y)-1 . \end{aligned} $$ This implies that $g$ is multiplicative. We know that an additive and multiplicative function is either identically zero or the identity function. [Since $g$ is multiplicative, $g\left(x^{2}\right)=g(x)^{2} \geqslant 0$ giving that $g$ takes non-negative values at non-negative arguments. Since also $g$ is additive we get that $g$ is monotone increasing. Since also $g$ is additive it is know that $g(x)=C x$ for every $x \in \mathbb{R}$ for some contant $C$. The multiplicativity of $g$ now gives that $C=0$ or $C=1$.] Since $g$ is not identically 0 we get that $g(x)=x$ for every $x \in \mathbb{R}$ giving that $f(x)=x-1$ for every $x \in \mathbb{R}$.
{ "problem_match": "\nA6.", "resource_path": "Balkan_Shortlist/segmented/en-2021_bmo_shortlist.jsonl", "solution_match": "\nSolution" }
62
2,409
2021
T1
A6
Algebra
Balkan_Shortlist
Find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that $$ f(x y)=f(x) f(y)+f(f(x+y)) $$ holds for all $x, y \in \mathbb{R}$. ## Proposed by Romania
2 (Sketch). One can prove directly Claims 3 and 4 without the use of Claims 1 and 2. To prove Claim 3 we can make use of $P(x+1, y-1)$ which together with $P(x, y)$ and (1) gives $$ f(x y+y-x)-c f(x y)=f(y)-c f(x) . $$ Assuming $c=-1$, then (1) and (3) give that $f(x+2)=f(x)$ for every $x \in \mathbb{R}$. It follows that $f(x+2 n)=f(x)$ for every $x \in \mathbb{R}$ and every $n \in \mathbb{Z}$. Now with similar ideas as in the proof of Claim 1, it can be shown that for every $u, v \in \mathbb{R}$ there is $n \in \mathbb{N}$ large enough such that $u=x y+x-y+2 n$ and $v=x y+y-x$. Then using (3) we can get $$ f(u)=f(x y+x-y+2 n)=f(x y+x-y)=f(x y+y-x)=f(v) . $$ So $f$ is constant and it must be identically equal to $1 / 2$ which leads to a contradiction. Now using (3) with $x=y$ and assuming $c \neq 1$ we get $f\left(x^{2}\right)=f(x)$. So $f$ is even. This eventually leads to $f(n)=1 /(1-c)=a=b$ for every integer $n$. Now $P(0,0)$ gives $a=a^{2}+f(a)$ and $P(a,-a)$ gives $f\left(-a^{2}\right)=f(a) f(-a)+f(a)$. Since $f$ is even we eventually get $f(a)=0$ which gives $a=0$ or $a=1$ both contraidicting the facts that $a \neq 0$ and $b \neq 1$. So $c=1$ and using (1) and (3) one can eventually get $a=-1$. The solution can then finish in the same way as in Solution 1. ## COMBINATORICS
{ "problem_match": "\nA6.", "resource_path": "Balkan_Shortlist/segmented/en-2021_bmo_shortlist.jsonl", "solution_match": "\nSolution" }
62
505
2021
T1
C1
Combinatorics
Balkan_Shortlist
Let $\mathcal{A}_{n}$ be the set of $n$-tuples $x=\left(x_{1}, \ldots, x_{n}\right)$ with $x_{i} \in\{0,1,2\}$. A triple $x, y, z$ of distinct elements of $\mathcal{A}_{n}$ is called good if there is some $i$ such that $\left\{x_{i}, y_{i}, z_{i}\right\}=\{0,1,2\}$. A subset $A$ of $\mathcal{A}_{n}$ is called good if every three distinct elements of $A$ form a good triple. Prove that every good subset of $\mathcal{A}_{n}$ has at most $2\left(\frac{3}{2}\right)^{n}$ elements. ## Proposed by Greece
1. We proceed by induction on $n$, the case $n=1$ being trivial. Let $$ A_{0}=\left\{\left(x_{1}, \ldots, x_{n}\right) \in A: x_{n} \neq 0\right\} $$ and define $A_{1}$ and $A_{2}$ similarly. Since $A$ is good and $A_{0}$ is a subset of $A$, then $A_{0}$ is also good. Therefore, any three of its elements have a coordinate that differs. This coordinate cannot be the last one since 0 cannot appear as a last coordinate. This means that the set $A_{0}^{\prime}$ obtained from $A_{0}$ by deleting the last coordinate from each of its elements is a good subset of $\mathcal{A}_{n-1}$. Moreover, if $\left|A_{0}\right| \geqslant 3$ then $\left|A_{0}^{\prime}\right|=\left|A_{0}\right|$. Indeed, if otherwise, then there is an element $a \in A_{0}^{\prime}$ such that $x, y \in A_{0}$, where $x$ and $y$ are obtained from $a$ by adding to it the digits 1 and 2 respectively as the $n$-th coordinate. But then if $z$ is any other element of $A_{0}$ then $x, y, z$ do not form a good triple, a contradiction. So by the inductive hypothesis $$ \left|A_{0}\right| \leqslant \max \left\{2,\left|A_{0}^{\prime}\right|\right\} \leqslant 2\left(\frac{3}{2}\right)^{n-1} $$ Similarly, $$ \left|A_{2}\right|,\left|A_{3}\right| \leqslant 2\left(\frac{3}{2}\right)^{n-1} $$ On the other hand, each element of $A$ appears in exactly two of $A_{0}, A_{1}, A_{2}$. As a result, $$ |A|=\frac{1}{2}\left(\left|A_{0}\right|+\left|A_{1}\right|+\left|A_{2}\right|\right) \leqslant 2\left(\frac{3}{2}\right)^{n} $$
{ "problem_match": "\nC1.", "resource_path": "Balkan_Shortlist/segmented/en-2021_bmo_shortlist.jsonl", "solution_match": "\nSolution" }
188
551
2021
T1
C1
Combinatorics
Balkan_Shortlist
Let $\mathcal{A}_{n}$ be the set of $n$-tuples $x=\left(x_{1}, \ldots, x_{n}\right)$ with $x_{i} \in\{0,1,2\}$. A triple $x, y, z$ of distinct elements of $\mathcal{A}_{n}$ is called good if there is some $i$ such that $\left\{x_{i}, y_{i}, z_{i}\right\}=\{0,1,2\}$. A subset $A$ of $\mathcal{A}_{n}$ is called good if every three distinct elements of $A$ form a good triple. Prove that every good subset of $\mathcal{A}_{n}$ has at most $2\left(\frac{3}{2}\right)^{n}$ elements. ## Proposed by Greece
2. Let $$ B=\left\{x=\left(x_{1}, \ldots, x_{n}\right) \in \mathcal{A}_{n}: x_{i} \in\{0,1\}\right\} $$ Let $A$ be a good subset of $\mathcal{A}_{n}$ and define $f: A \times B \rightarrow \mathcal{A}_{n}$ by $f(a, b)=a+b=\left(a_{1}+b_{1}, \ldots, a_{n}+b_{n}\right)$ where the addition is done modulo 3 . We claim that if $(a, b),\left(a^{\prime}, b^{\prime}\right)$ and $\left(a^{\prime \prime}, b^{\prime \prime}\right)$ are distinct, then $f(a, b), f\left(a^{\prime}, b^{\prime}\right)$ and $f\left(a^{\prime \prime}, b^{\prime \prime}\right)$ cannot all be equal. Indeed assume $f(a, b)=f\left(a^{\prime}, b^{\prime}\right)=f\left(a^{\prime \prime}, b^{\prime \prime}\right)=\left(x_{1}, \ldots, x_{n}\right)$. So for each $i$ we have $a_{i}+b_{i}=a_{i}^{\prime}+b_{i}^{\prime}=a_{i}^{\prime \prime}+b_{i}^{\prime \prime}=x_{i}$. But then $a_{i}=x_{i}-b_{i} \in\left\{x_{i}, x_{i}-1\right\}$ and similarly $a_{i}^{\prime}, a_{i}^{\prime \prime} \in\left\{x_{i}, x_{i}-1\right\}$. So $\left\{a_{i}, a_{i}^{\prime}, a_{i}^{\prime \prime}\right\} \neq\{0,1,2\}$. Since this holds for each $i$ then $A$ cannot be a good set, contradiction. Therefore $|A||B| \leqslant 2\left|\mathcal{A}_{n}\right|$ which gives $|A| \leqslant 2\left(\frac{3}{2}\right)^{n}$ as required. Remark. Writing $f(n)$ for the maximal possible size of a good set, we proved that $f(n) \leqslant$ $2\left(\frac{3}{2}\right)^{n}$. We do not know the best possible asymptotic for $f(n)$ but we offer a corresponding lower bound which can increase the difficulty of the proposed problem. We pick each element of $\mathcal{A}_{n}$ independently with probability $p$ to form a set $A$. For each bad triple $x, y, z$ of elements of $A$ we arbitrarily remove one of the elements to end up with a good set $B$. Note that there are at most $21^{n}$ bad triples $(x, y, z)$ since for coordinate $i$, out of the 27 triples of the form $\left(x_{i}, y_{i}, z_{i}\right)$, only 6 of them will make the triple $(x, y, z)$ a good triple. (Actually there are less than $21^{n}$ triples since this counts also triples where two or more of the $n$-tuples are the same.) So we get that $$ \mathbb{E}|B| \geqslant p \cdot 3^{n}-p^{3} \cdot 21^{n} . $$ Taking $p=\frac{1}{\sqrt{3 \cdot 7^{n}}}$ we get $$ \mathbb{E}|B| \geqslant \frac{1}{\sqrt{3}}\left(\frac{9}{7}\right)^{n / 2}-\frac{1}{3 \sqrt{3}}\left(\frac{9}{7}\right)^{n / 2}=\frac{2}{3 \sqrt{3}}\left(\frac{9}{7}\right)^{n / 2}=C \alpha^{n} $$ where $\alpha=1.13389 \ldots$ and $C=0.3849 \ldots$. It follows that there is a good set of size at least $C \alpha^{n}$.
{ "problem_match": "\nC1.", "resource_path": "Balkan_Shortlist/segmented/en-2021_bmo_shortlist.jsonl", "solution_match": "\nSolution" }
188
1,010
2021
T1
C2
Combinatorics
Balkan_Shortlist
Let $K$ and $N>K$ be fixed positive integers. Let $n$ be a positive integer and let $a_{1}, a_{2}, \ldots, a_{n}$ be distinct integers. Suppose that whenever $m_{1}, m_{2}, \ldots, m_{n}$ are integers, not all equal to 0 , such that $\left|m_{i}\right| \leqslant K$ for each $i$, then the sum $$ \sum_{i=1}^{n} m_{i} a_{i} $$ is not divisible by $N$. What is the largest possible value of $n$ ? ## Proposed by North Macedonia
The answer is $n=\left\lfloor\log _{K+1} N\right\rfloor$. Note first that for $n \leqslant\left\lfloor\log _{K+1} N\right\rfloor$, taking $a_{i}=(K+1)^{i-1}$ works. Indeed let $r$ be maximal such that $m_{r} \neq 0$. Then on the one hand we have $$ \left|\sum_{i=1}^{n} m_{i} a_{i}\right| \leqslant \sum_{i=1}^{n} K(K+1)^{i-1}=(K+1)^{n}-1<N $$ On the other hand we have $$ \left|\sum_{i=1}^{n} m_{i} a_{i}\right| \geqslant\left|m_{r} a_{r}\right|-\left|\sum_{i=1}^{r-1} m_{i} a_{i}\right| \geqslant(K+1)^{r-1}-\sum_{i=1}^{r-1} K(K+1)^{i-1}=1>0 $$ So the sum is indeed not divisible by $n$. Assume now that $n \geqslant\left\lfloor\log _{K+1} N\right\rfloor$ and look at all $n$-tuples of the form $\left(t_{1}, \ldots, t_{n}\right)$ where each $t_{i}$ is a non-negative integer with $t_{i} \leqslant K$. There are $(K+1)^{n}>N$ such tuples so there are two of them, say $\left(t_{1}, \ldots, t_{n}\right)$ and $\left(t_{1}^{\prime}, \ldots, t_{n}^{\prime}\right)$ such that $$ \sum_{i=1}^{n} t_{i} a_{i} \equiv \sum_{i=1}^{n} t_{i}^{\prime} a_{i} \bmod N $$ Now taking $m_{i}=t_{i}-t_{i}^{\prime}$ for each $i$ satisfies the requirements on the $m_{i}$ 's but $N$ divides the sum $$ \sum_{i=1}^{n} m_{i} a_{i} $$ a contradiction.
{ "problem_match": "\nC2.", "resource_path": "Balkan_Shortlist/segmented/en-2021_bmo_shortlist.jsonl", "solution_match": "\nSolution." }
146
562
2021
T1
C3
Combinatorics
Balkan_Shortlist
In an exotic country, the National Bank issues coins that can take any value in the interval $[0,1]$. Find the smallest constant $c>0$ such that the following holds, no matter the situation in that country: Any citizen of the exotic country that has a finite number of coins, with a total value of no more than 1000, can split those coins into 100 boxes, such that the total value inside each box is at most c. ## Proposed by Romania
1. The answer is $c=\frac{1000}{91}=11-\frac{11}{1001}$. Clearly, if $c^{\prime}$ works, so does any $c>c^{\prime}$. First we prove that $c=11-\frac{11}{1001}$ is good. We start with 100 empty boxes. First, we consider only the coins that individually value more than $\frac{1000}{1001}$. As their sum cannot overpass 1000, we deduce that there are at most 1000 such coins. Thus we are able to put (at most) 10 such coins in each of the 100 boxes. Everything so far is all right: $10 \cdot \frac{1000}{1001}<10<c=11-\frac{11}{1001}$. Next, step by step, we take one of the remaining coins and prove there is a box where it can be added. Suppose that at some point this algorithm fails. It would mean that at a certain point the total sums in the 100 boxes would be $x_{1}, x_{2}, \ldots, x_{100}$ and no matter how we would add the coin $x$, where $x \leqslant \frac{1000}{1001}$, in any of the boxes, that box would be overflowed, i.e., it would have a total sum of more than $11-\frac{11}{1001}$. Therefore, $$ x_{i}+x>11-\frac{11}{1001} $$ for all $i=1,2, \ldots, 100$. Then $$ x_{1}+x_{2}+\cdots+x_{100}+100 x>100 \cdot\left(11-\frac{11}{1001}\right) . $$ But since $1000 \geqslant x_{1}+x_{2}+\cdots+x_{100}+x$ and $\frac{1000}{1001} \geqslant x$ we obtain the contradiction $$ 1000+99 \cdot \frac{1000}{1001}>100 \cdot\left(11-\frac{11}{1001}\right) \Longleftrightarrow 1000 \cdot \frac{1100}{1001}>100 \cdot 11 \cdot \frac{1000}{1001} . $$ Thus the algorithm does not fail and since we have finitely many coins, we will eventually reach to a happy end. Now we show that $c=11-11 \alpha$, with $1>\alpha>\frac{1}{1001}$ does not work. Take $r \in\left[\frac{1}{1001}, \alpha\right)$ and let $n=\left\lfloor\frac{1000}{1-r}\right\rfloor$. Since $r \geqslant \frac{1}{1001}$, then $\frac{1000}{1-r} \geqslant 1001$, therefore $n \geqslant 1001$. Now take $n$ coins each of value $1-r$. Their sum is $n(1-r) \leqslant \frac{1000}{1-r} \cdot(1-r)=1000$. Now, no matter how we place them in 100 boxes, as $n \geqslant 1001$, there exist 11 coins in the same box. But $11(1-r)=11-11 r>11-11 \alpha$, so the constant $c=11-11 \alpha$ indeed does not work.
{ "problem_match": "\nC3.", "resource_path": "Balkan_Shortlist/segmented/en-2021_bmo_shortlist.jsonl", "solution_match": "\nSolution" }
104
903
2021
T1
C4
Combinatorics
Balkan_Shortlist
A sequence of $2 n+1$ non-negative integers $a_{1}, a_{2}, \ldots, a_{2 n+1}$ is given. There's also a sequence of $2 n+1$ consecutive cells enumerated from 1 to $2 n+1$ from left to right, such that initially the number $a_{i}$ is written on the $i$-th cell, for $i=1,2, \ldots 2 n+1$. Starting from this initial position, we repeat the following sequence of steps, as long as it's possible: Step 1: Add up the numbers written on all the cells, denote the sum as $s$. Step 2: If $s$ is equal to 0 or if it is larger than the current number of cells, the process terminates. Otherwise, remove the $s$-th cell, and shift all cells that are to the right of it one position to the left. Then go to Step 1. Example: $(1,0,1, \underline{2}, 0) \rightarrow(1, \underline{0}, 1,0) \rightarrow(1, \underline{1}, 0) \rightarrow(\underline{1}, 0) \rightarrow(0)$. A sequence $a_{1}, a_{2}, \ldots, a_{2 n+1}$ of non-negative integers is called balanced, if at the end of this process there's exactly one cell left, and it's the cell that was initially enumerated by $(n+1)$, i.e. the cell that was initially in the middle. Find the total number of balanced sequences as a function of $n$. ## Proposed by North Macedonia
The answer is: $C_{n} \cdot C_{n}$, where $C_{n}=\frac{1}{n+1}\binom{2 n}{n}$ is the $n$-th Catalan number. We divide the proof into several steps. First, some terminology: the last (rightmost) $n$ cells will be called the back cells and the front (leftmost) $n$ cells will be called the front cells. The central, $(n+1)$-st, cell will be called the middle cell. Claim 1. All the back cells must be removed before any front cell is removed. Proof. Assume for contradiction that this is not the case. Then there must be a point in time where a front cell is deleted and then immediately after a back cell is deleted. Let us say that the deleted front cell was at position $i$. So all back cells have positions greater or equal to $i+2$. After the cell is deleted all back cells have positions greater or equal to $i+1$. But since we deleted cell $i$, then the total sum is $i$ and this does not increase. So at the next step we delete a cell at position at most $i$, a contradiction. Claim 2. The middle cell must contain the number 0 , i.e., $a_{n+1}=0$. Proof. Consider the last step in the process where we have total of 2 cells. One of these is the middle cell, and by Claim 1 the other must be one of the front cells. I.e. we have $\left(x, a_{n+1}\right)$. On the next move, we remove $x$, which means that $x+a_{n+1}=1$. So $a_{n+1}=0$ or $a_{n+1}=1$. But after that we cannot remove $a_{n+1}$, which means that $a_{n+1} \neq 1$. So $a_{n+1}=0$. Now, let's define a self-destructing sequence to be one with no surviving cells at the end of the process. For example, $(0,1,2)$ is self-destructing because $(0,1,2) \rightarrow(0,1) \rightarrow(1) \rightarrow()$. Let $\mathcal{S}_{n}$ be the set of self-destructing sequences of length $n$. For example, $\mathcal{S}_{2}=\{(0,1),(1,1)\}$. It is clear that the front cells form a self-destructing sequence, i.e., $\left(a_{1}, a_{2}, \cdots a_{n}\right) \in \mathcal{S}_{n}$. The back cells also have certain self-destructing quality, which is made more precise in Claim 3 below. Claim 3. Fix the front sequence $\varphi=\left(a_{1}, a_{2}, \cdots, a_{n}\right)$. Let $\mathcal{B}_{\phi}$ be the set of all possible back sequences of length $n$ that can be appended to $\varphi$ (with a 0 between them) to get a balanced sequence. Then there is a bijection $f: \mathcal{S}_{n} \mapsto \mathcal{B}_{\phi}$. Proof. Let $c=n+1-\sum_{i=1}^{n} a_{i}$ and consider a particular $\sigma=\left(s_{1}, s_{2}, \ldots, s_{n}\right) \in \mathcal{S}_{n}$. Let $\ell$ be the initial index of the last surviving cell in $\sigma$. Then $f(\sigma)=\left(s_{1}, s_{2}, \ldots, s_{\ell}+c, s_{\ell+1}, \ldots, s_{n}\right)$ defines a bijection $\mathcal{S}_{n} \mapsto \mathcal{B}_{\phi}$. Indeed we claim that the $k$-th deleted cell in $\sigma$ is the $k$-th deleted cell in $\overline{\varphi 0 f(\sigma)}$ for each $k=1, \ldots, n$. Indeed after some deletions let $S$ be the total sum remaining in $\sigma$. Then the total sum remaining in $\overline{\varphi 0 f(\sigma)}$ is $-\sum_{i=1}^{n} a_{i}+0+S+c=S+n+1$. So we delete next the cell in position $S$ in $\sigma$ if and only if we delete the cell in position $S+n+1$ in $\overline{\varphi 0 f(\sigma)}$. So $\overline{\phi 0 f(\sigma)}$ is clearly a balanced sequence: we first eliminate all cells in the back, then the front. In the same manner it follows that every balanced sequence in of this form. So far we have shown that the total number of balanced sequences is $\left|\mathcal{S}_{n}\right|^{2}$. It remains to calculate the size $\left|\mathcal{S}_{n}\right|$. Claim 4. Let $\mathcal{T}_{n}$ be the set of $2 n$-sequences consisting of $n$ zeros and $n$ ones such that in each initial segment the number of 1's does not surpass the number of 0 's. Then $\left|\mathcal{S}_{n}\right|=\left|\mathcal{T}_{n}\right|$. Proof. Let $[n]=\{1,2, \ldots, n\}$, and let us also consider the set $\mathcal{F}_{n}$ of non-decreasing mappings $f:[n] \rightarrow[n]$ such that $f(i) \leqslant i$ for each $i \in[n]$. The claim will follow once we show that $\left|\mathcal{S}_{n}\right|=\left|\mathcal{F}_{n}\right|$ and that $\left|\mathcal{F}_{n}\right|=\left|\mathcal{T}_{n}\right|$. In order to demonstrate that $\left|\mathcal{S}_{n}\right|=\left|\mathcal{F}_{n}\right|$, observe that there is an obvious bijective correspondence $a \mapsto f$ between the sets $\mathcal{S}_{n}$ and $\mathcal{F}_{n}$. Indeed, reversing the self-destructing process for an $n$-sequence $a=\left(a_{1}, a_{2}, \ldots, a_{n}\right) \in \mathcal{S}_{n}$, simply define $f(i)$ to be the (partial) sum of the existing terms after the $i$-th backward step. As for $\left|\mathcal{T}_{n}\right|=\left|\mathcal{F}_{n}\right|$, note the following bijective correspondence $t \mapsto f$ between the sets $\mathcal{T}_{n}$ and $\mathcal{F}_{n}$. Let $f(i)$ equal $1+\#(i)$, where $\#(i)$ is defined to be the total number of $1^{\prime} s$ appearing in $t$ before the $i$-th zero. Finally, it is a known fact that $\left|\mathcal{B}_{n}\right|$ is the $n$-th Catalan number $C_{n}=\frac{1}{n+1}\binom{2 n}{n}$. (The essential idea of the textbook proof of this fact uses the so-called reflection principle of A. D. André.)
{ "problem_match": "\nC4.", "resource_path": "Balkan_Shortlist/segmented/en-2021_bmo_shortlist.jsonl", "solution_match": "\nSolution." }
363
1,652
2021
T1
C5
Combinatorics
Balkan_Shortlist
Angel has a warehouse, which initially contains 100 piles of 100 pieces of rubbish each. Each morning, Angel either clears every piece of rubbish from a single pile, or one piece of rubbish from each pile. However, every evening, a demon sneaks into the warehouse and adds one piece of rubbish to each non-empty pile, or creates a new pile with one piece. What is the first morning when Angel can guarantee to have cleared all the rubbish from the warehouse? ## Proposed by United Kingdom
1. We will show that he can do so by the morning of day 199 but not earlier. If we have $n$ piles with at least two pieces of rubbish and $m$ piles with exactly one piece of rubbish, then we define the value of the pile to be $$ V= \begin{cases}n & m=0 \\ n+\frac{1}{2} & m=1 \\ n+1 & m \geqslant 2\end{cases} $$ We also denote this position by $(n, m)$. Implicitly we will also write $k$ for the number of piles with exactly two pieces of rubbish. Angel's strategy is the following: (i) From position $(0, m)$ remove one piece from each pile to go position $(0,0)$. The game ends. (ii) From position $(n, 0)$, where $n \geqslant 1$, remove one pile to go to position $(n-1,0)$. Either the game ends, or the demon can move to position $(n-1,0)$ or $(n-1,1)$. In any case $V$ reduces by at least $1 / 2$. (iii) From position $(n, 1)$, where $n \geqslant 1$, remove one pile with at least two pieces to go to position $(n-1,1)$. The demon can move to position $(n, 0)$ or $(n-1,2)$. In any case $V$ reduces by (at least) $1 / 2$. (iv) From position $(n, m)$, where $n \geqslant 1$ and $m \geqslant 2$, remove one piece from each pile to go to position $(n-k, k)$. The demon can move to position $(n, 0)$ or $(n-k, k+1)$. In any case $V$ reduces by at least $1 / 2$. (The value of position $(n-k, k+1)$ is $n+\frac{1}{2}$ if $k=0$, and $n-k+1 \leqslant n$ if $k \geqslant 1$.) So during every day if the game does not end then $V$ is decreased by at least $1 / 2$. So after 198 days if the game did not already end we will have $V \leqslant 1$ and we will be in one of positions $(0, m),(1,0)$. The game can then end on the morning of day 199. We will now provide a strategy for demon which guarantees that at the end of each day $V$ has decreased by at most $1 / 2$ and furthermore at the end of the day $m \leqslant 1$. (i) If Angel moves from $(n, 0)$ to $(n-1,0)$ (by removing a pile) then create a new pile with one piece to move to $(n-1,1)$. Then $V$ decreases by $1 / 2$ and and $m=1 \leqslant 1$ (ii) If Angel moves from $(n, 0)$ to $(n-k, k)$ (by removing one piece from each pile) then add one piece back to each pile to move to $(n, 0)$. Then $V$ stays the same and $m=0 \leqslant 1$. (iii) If Angels moves from $(n, 1)$ to $(n-1,1)$ or $(n, 0)$ (by removing a pile) then add one piece to each pile to move to $(n, 0)$. Then $V$ decreases by $1 / 2$ and $m=0 \leqslant 1$. (iv) If Angel moves from $(n, 1)$ to $(n-k, k)$ (by removing a piece from each pile) then add one piece to each pile to move to $(n, 0)$. Then $V$ decreases by $1 / 2$ and $m=0 \leqslant 1$. Since after every move of demon we have $m \leqslant 1$, in order for Angel to finish the game in the next morning we must have $n=1, m=0$ or $n=0, m=1$ and therefore we must have $V \leqslant 1$. But now inductively the demon can guarantee that by the end of day $N$, where $N \leqslant 198$ the game has not yet finished and that $V \geqslant 100-N / 2$.
{ "problem_match": "\nC5.", "resource_path": "Balkan_Shortlist/segmented/en-2021_bmo_shortlist.jsonl", "solution_match": "\nSolution" }
104
1,025
2021
T1
C6
Combinatorics
Balkan_Shortlist
There is a population $P$ of 10000 bacteria, some of which are friends (friendship is mutual), so that each bacterion has at least one friend and if we wish to assign to each bacterion a coloured membrane so that no two friends have the same colour, then there is a way to do it with 2021 colours, but not with 2020 or less. Two friends $A$ and $B$ can decide to merge in which case they become a single bacterion whose friends are precisely the union of friends of $A$ and $B$. (Merging is not allowed if $A$ and $B$ are not friends.) It turns out that no matter how we perform one merge or two consecutive merges, in the resulting population it would be possible to assign 2020 colours or less so that no two friends have the same colour. Is it true that in any such population $P$ every bacterium has at least 2021 friends? ## Proposed by Bulgaria
1. The answer is affirmative. We will use the terminology of graph theory. Here the vertices of our main graph $G$ are the bacteria and there is an edge between two precisely when they are friends. The degree $d(v)$ of a vertex $v$ of $G$ is the number of neighbours of $v$. The minimum degree $\delta(G)$ of $G$ is the smallest amongst all $d(v)$ for vertices $v$ of $G$. The chromatic number $\chi(G)$ of $G$ is the number of colours needed in order to colour the vertices such that neighbouring vertices get distinct colours. It suffices to establish the following: Claim. Let $k$ be a positive integer and let $G$ be a graph on $n>k$ vertices with $\delta(G) \geqslant 1$ and $\chi(G)=k$. Suppose that merging one pair or two pairs of vertices results in a graph $G^{\prime}$ with $\chi\left(G^{\prime}\right) \leqslant k-1$. Then $\delta(G) \geqslant k$. We establish this in a series of claims. Claim 1. $\delta(G) \geqslant k-1$. Proof. Suppose for contradiction that we have a vertex $v$ of degree $r \leqslant k-2$ and denote its neighbours by $v_{1}, \ldots, v_{r}$. (Note that, by assumption, $v$ has at least one neighbour.) Suppose we merge $v$ with $v_{i}$. We denote the new vertex by $v_{0}$, and we colour the obtained graph in $k-1$ colours. Note that at most $r \leqslant k-2$ colours can appear in the set $S_{1}=$ $\left\{v_{0}, v_{1}, \ldots, v_{i-1}, v_{i+1}, \ldots, v_{r}\right\}$. Therefore we can get a $(k-1)$-colouring of $G$ by assigning the colour of $v_{0}$ to $v_{i}$ and an unused colour (from the $k-1$ available) to $v$, thus contradicting the assumption that $\chi(G)=k$. So from now on we may assume that there is a vertex $v$ of $G$ with $\operatorname{deg}(v)=k-1$, as otherwise the proof is complete. We denote its neighbours by $v_{1}, \ldots, v_{k-1}$. Claim 2. The set of neighbours of $v$ induces a complete graph. Proof of Claim 2. Suppose $v_{i} v_{j} \notin E(G)$. Merge $v$ with $v_{i}$, giving a next vertex $w$, and then merge $w$ with $v_{j}$, denoting the newest vertex by $v_{0}$. Then colour the resulting graph in $k-1$ colours. Note that at most $k-2$ colours can appear in the set $S_{2}=\left\{v_{0}, v_{1}, \ldots, v_{k-1}\right\} \backslash\left\{v_{i}, v_{j}\right\}$. So we can get a $(k-1)$-colouring of $G$ by assigning the colour of $v_{0}$ to $v_{i}$ and $v_{j}$ and an unused colour (from the $k-1$ available) to $v$, thus contradicting the assumption that $\chi(G)=k$. Claim 3. For every edge $u w$, both $u$ and $w$ belong in the set $\left\{v, v_{1}, \ldots, v_{k-1}\right\}$. Proof. Otherwise merge $u$ and $w$ and call the new vertex $z$. If $u, w \notin\left\{v, v_{1}, \ldots, v_{k-1}\right\}$ then by Claim 2 the resulting graph contains a complete graph on $\left\{v, v_{1}, \ldots, v_{k-1}\right\}$ and so its chromatic number is at least $k$, a contradiction. If one of $u, w$ belongs in the set $\left\{v, v_{1}, \ldots, v_{k-1}\right\}$, say $u=v_{i}$, then the resulting graph contains a complete graph on $\left\{v, v_{1}, \ldots, v_{k-1}, z\right\} \backslash\left\{v_{i}\right\}$. This is again a contradiction. From Claim 3 we see that $G$ consists of a complete set on $k$ vertices together with $n-k>0$ isolated vertices. This is a contradiction as $\delta(G) \geqslant 1$. Remark. We do not know if the result is best possible or whether it can be improved to show $\delta(G) \geqslant 2022$. ## GEOMETRY
{ "problem_match": "\nC6.", "resource_path": "Balkan_Shortlist/segmented/en-2021_bmo_shortlist.jsonl", "solution_match": "\nSolution" }
215
1,117
2021
T1
G1
Geometry
Balkan_Shortlist
Let $A B C$ be a triangle with $A B<A C<B C$. On the side $B C$ we consider points $D$ and $E$ such that $B A=B D$ and $C E=C A$. Let $K$ be the circumcenter of triangle $A D E$ and let $F, G$ be the points of intersection of the lines $A D, K C$ and $A E, K B$ respectively. Let $\omega_{1}$ be the circumcircle of triangle $K D E, \omega_{2}$ the circle with center $F$ and radius $F E$, and $c_{3}$ the circle with center $G$ and radius $G D$. Prove that $\omega_{1}, \omega_{2}$ and $\omega_{3}$ pass through the same point and that this point of intersection lies on the line $A K$. Proposed by Greece
1. Since the triangles $B A D, K A D$ and $K D E$ are isosceles, then $\angle B A D=\angle B D A$ and $\angle K A D=\angle K D A$ and $\angle K D E=\angle K E D$. Therefore, $$ \angle B A K=\angle B A D-\angle K A D=\angle B D A-\angle K D A=\angle K D E=\angle K E D=180^{\circ}-\angle B E K . $$ So the points $B, E, K, A$ are concyclic. Similarly the points $C, D, K, A$ are also concyclic. Let $M, N$ be the midpoints of $A D$ and $A E$ respectively. Since the triangle $A C E$ is isosceles, the perpendicular bisector of $A E$, say $\varepsilon_{1}$, passes through the points $C, K$ and $N$. Similarly, the perpendicular bisector of $A D$, say $\varepsilon_{2}$, passes through the points $B, K$ and $M$. Therefore the points $F, G$ lie on $\varepsilon_{1}$ and $\varepsilon_{2}$ respectively. Thus, using also the fact that $A K D C$ is a cyclic quadrilteral we get that $$ \angle F D C=\angle A D C=\angle A K C=\angle E K C=\angle E K F . $$ So the point $F$ lies on the circle $\omega_{1}$. Similarly $G$ also lies on $\omega_{1}$. Let $I$ be the point of intersection of the line $A K$ with $\omega_{1}$. The triangles $A K F$ and $E K F$ are equal, so $\angle K A F=\angle K E F$. Since also $K, E, F, I$ all belong on $\omega_{1}$ then $$ \angle K A F=\angle K E F=\angle F I K . $$ It follows that $F I=F A=F E$. Therefore $I$ lies on $\omega_{2}$ as well. Similarly it also lies on $\omega_{3}$. So the circles $\omega_{1}, \omega_{2}, \omega_{3}$ all pass through $I$ which lies on line $A K$.
{ "problem_match": "\nG1.", "resource_path": "Balkan_Shortlist/segmented/en-2021_bmo_shortlist.jsonl", "solution_match": "\nSolution" }
195
519
2021
T1
G1
Geometry
Balkan_Shortlist
Let $A B C$ be a triangle with $A B<A C<B C$. On the side $B C$ we consider points $D$ and $E$ such that $B A=B D$ and $C E=C A$. Let $K$ be the circumcenter of triangle $A D E$ and let $F, G$ be the points of intersection of the lines $A D, K C$ and $A E, K B$ respectively. Let $\omega_{1}$ be the circumcircle of triangle $K D E, \omega_{2}$ the circle with center $F$ and radius $F E$, and $c_{3}$ the circle with center $G$ and radius $G D$. Prove that $\omega_{1}, \omega_{2}$ and $\omega_{3}$ pass through the same point and that this point of intersection lies on the line $A K$. Proposed by Greece
2. Let $M$ the midpoint of $A D$. Then $B M$ is the perpendicular bisector of $A D$, because the triangle $A B D$ is isosceles. $K M$ is also the perpendicular bisector of $A D$, because the point $K$ is the circumcenter of the triangle $A E D$. So points $B, G, K, M$ are collinear and $G M$ is also the perpendicular bisector of $A D$. Therefore $G D=G A$ and so $A$ belongs on $\omega_{3}$. Similarly $A$ belongs on $\omega_{2}$. Since $A D G$ is isosceles with $G A=G D$, it follows that $\angle E G D=2 \angle G A D=2 \angle E A D$. Since $A F E$ is isosceles with $F A=F E$, it follows that $\angle E F D=2 \angle F A E=2 \angle E A D$. We also have $E K D=2 \angle E A D$ as $K$ is the circumcenter of the triangle $E A D$. From the last three equalities it follows that $F, G$ belong on $\omega_{1}$. Let $T \neq A$ be the second point of intersection of the circles $\omega_{2}, \omega_{3}$ and let $S=A T \cap F G$. Let $N$ be the midpoint of $A E$. Since $\angle A M K=\angle A N K=90^{\circ}$, then the points $A, M, K, N$ are concyclic and therefore $\angle N A K=\angle N M K$. Since $N M$ is parallel to $E D(M, N$ midpoints of $A D, A E)$ then $\angle N M K=\angle D B M=90^{\circ}-\angle M D B$. Since also $D, E, G, F$ are concyclic, then $\angle M D B=\angle F G N=90^{\circ}-\angle G A S$. From the above, it follows that $\angle N A K=\angle G A S$ and so $A, K, S$ are collinear. By definition of $S$, we get that $T$ also belongs on the same line. Since $G F$ is the perpendicular bisector of $A T$ then $\angle G A K=\angle G A S=\angle G T S=\angle G T K$. But since $G K$ is the perpendiuclar bisector of $A D$ we also have $\angle G A K=\angle G D K$. Thus $\angle G T K=\angle G D K$ showing that $T$ belongs to $\omega_{1}$ as well.
{ "problem_match": "\nG1.", "resource_path": "Balkan_Shortlist/segmented/en-2021_bmo_shortlist.jsonl", "solution_match": "\nSolution" }
195
604
2021
T1
G2
Geometry
Balkan_Shortlist
Let $I$ and $O$ be the incenter and the circumcenter of a triangle $A B C$, respectively, and let $s_{a}$ be the exterior bisector of angle $\angle B A C$. The line through $I$ perpendicular to $I O$ meets the lines $B C$ and $s_{a}$ at points $P$ and $Q$, respectively. Prove that $I Q=2 I P$. ## Proposed by Serbia
Denote by $I_{b}$ and $I_{c}$ the respective excenters opposite to $B$ and $C$. Also denote the midpoint of side $B C$ by $D$, the midpoint of the arc $B A C$ by $M$, and the midpoint of segment $A M$ by $N$. Recall that $M$ is on the perpendicular bisector of $B C$, i.e. on line $O D$. Points $I, O, D, P$ lie on the circle with diameter $O P$, whereas points $I, O, Q, N$ lie on the circle with diameter $O Q$. Thus $\angle I O P=\angle I D P$ and $\angle I O Q=180^{\circ}-\angle I N Q=\angle I N A$. So the triangles $I A N$ and $Q I O$ are similar. On the other hand, points $B, C, I_{b}, I_{c}$ are on the circle with diameter $I_{b} I_{c}$, so the triangles $I B C$ and $I I_{c} I_{b}$ are similar. We have $\angle I I_{c} A=\angle C I_{c} I_{b}=\angle C B I_{b}=\frac{1}{2} \beta$. Since also $\angle I B A=$ $\frac{1}{2} \beta=\angle I I_{c} A$ then we deduce (the known fact) that $I_{c}, A, I, B$ are concyclic. Thus $\angle B I_{c} A=$ $180^{\circ}-A I B=\frac{1}{2}(\alpha+\beta)$. Since also $I_{c} M B=A M B=A C B=\gamma$, then we also have that $\angle I_{c} B M=\angle B I_{c} A=\frac{1}{2}(\alpha+\beta)$. We deduce that $I_{c} M=M B=M C=I_{b} M$, i.e. $M$ is the midpoint of $I_{b} I_{c}$. It follows that the triangles $I B D$ and $I I_{c} M$ are similar, so $\angle I O P=\angle I D P=\angle I M A$. Thus the triangles $O I P$ and $M A I$ are similar. Therefore $$ \frac{I Q}{I O}=\frac{I A}{A N}=\frac{2 I A}{A M}=\frac{2 I P}{I O} . $$ Thus $I Q=2 I P$.
{ "problem_match": "\nG2.", "resource_path": "Balkan_Shortlist/segmented/en-2021_bmo_shortlist.jsonl", "solution_match": "\nSolution." }
98
572
2021
T1
G3
Geometry
Balkan_Shortlist
Let $A B C$ be a triangle with $A B<A C$. Let $\omega$ be a circle passing through $B, C$ and assume that $A$ is inside $\omega$. Suppose $X, Y$ lie on $\omega$ such that $\angle B X A=\angle A Y C$ and $X$ lies on the opposite side of $A B$ to $C$ while $Y$ lies on the opposite side of $A C$ to $B$. Show that, as $X, Y$ vary on $\omega$, the line $X Y$ passes through a fixed point. ## Proposed by United Kingdom
2. Let $B^{\prime}$ and $C^{\prime}$ be the points of intersection of the lines $A B$ and $A C$ with $\omega$ respectively and let $\omega_{1}$ be the circumcircle of the triangle $A B^{\prime} C^{\prime}$. Let $\varepsilon$ be the tangent to $\omega_{1}$ at the point $A$. Because $A B<A C$ the lines $B^{\prime} C^{\prime}$ and $\varepsilon$ intersects at a point $Z$ which is fixed and independent of $X$ and $Y$. We have $$ \angle Z A C^{\prime}=\angle C^{\prime} B^{\prime} A=\angle C^{\prime} B^{\prime} B=\angle C^{\prime} C B . $$ Therefore, $\varepsilon \| B C$. Let $X^{\prime}, Y^{\prime}$ be the points of intersection of the lines $X A, Y A$ with $\omega$ respecively. From the hypothesis we have $\angle B X X^{\prime}=\angle Y^{\prime} Y C$. Therefore $$ \widehat{B X^{\prime}}=\widehat{Y^{\prime} C} \Longrightarrow \widehat{B C}+\widehat{C X^{\prime}}=\widehat{Y^{\prime} B}+\widehat{B C} \Longrightarrow \widehat{C X^{\prime}}=\widehat{Y^{\prime} B} $$ and so $X^{\prime} Y^{\prime}\|B C\| \varepsilon$. Thus $$ \angle X A Z=\angle X X^{\prime} Y^{\prime}=\angle X Y Y^{\prime}=\angle X Y A . $$ From the last equality we have that $\varepsilon$ is also tangent to the circmucircle $\omega_{2}$ of the triangle $X A Y$. Consider now the radical centre of the circles $\omega, \omega_{1}, \omega_{2}$. This is the point of intersection of the radical axes $B^{\prime} C^{\prime}\left(\right.$ of $\omega$ and $\left.\omega_{1}\right), \varepsilon\left(\right.$ of $\omega_{1}$ and $\omega_{2}$ ) and $X Y$ (of $\omega$ and $\omega_{2}$ ). This must be point $Z$ and therefore the variable line $X Y$ passes through the fixed point $Z$. Remark: The condition that $A B<A C$ ensures that the point $Z$ exists (rather than being at infinity). If $X Y\|\ell\| B C$ then $A X=A Y$ and $X B=Y C$ so, as $\angle B X A=\angle A Y C$, we would have $\triangle A X B \cong \triangle A Y C$ and hence $A B=A C$.
{ "problem_match": "\nG3.", "resource_path": "Balkan_Shortlist/segmented/en-2021_bmo_shortlist.jsonl", "solution_match": "\nSolution" }
133
654
2021
T1
G4
Geometry
Balkan_Shortlist
Let $A B C$ be a right-angled triangle with $\angle B A C=90^{\circ}$. Let the height from $A$ cut its side $B C$ at $D$. Let $I, I_{B}, I_{C}$ be the incenters of triangles $A B C, A B D, A C D$ respectively. Let also $E_{B}, E_{C}$ be the excenters of $A B C$ with respect to vertices $B$ and $C$ respectively. If $K$ is the point of intersection of the circumcircles of $E_{C} I B_{I}$ and $E_{B} I C_{I}$, show that $K I$ passes through the midpoint $M$ of side $B C$. ## Proposed by Greece
Since $\angle E_{C} B I=90^{\circ}=I C E_{B}$, we conclude that $E_{C} B C E_{B}$ is cyclic. Moreover, we have that $$ \angle B A I_{B}=\frac{1}{2} \angle B A D=\frac{1}{2} \widehat{C}, $$ so $A I_{B} \perp C I$. Similarly $A I_{C} \perp B I$. Therefore is the orthocenter of triangle $A I_{B} I_{C}$. It follows that $$ \angle I I_{B} I_{C}=90^{\circ}-\angle A I_{C} I_{B}=\angle I A I_{C}=45^{\circ}-\angle I_{C} A C=45^{\circ}-\frac{1}{2} \widehat{B}=\frac{1}{2} \widehat{C} $$ Therefore $I_{B} I_{C} C B$ is cyclic. Since $A E_{B} C I$ is also cyclic (on a circle of diameter $I E_{B}$ ) then $$ \angle E_{C} E_{B} B=\angle A C I=\frac{1}{2} \widehat{C}=\angle I I_{B} I_{C}, $$ therefore $I_{B} I_{C} \| E_{B} E_{C}$. From the inscribed quadrilaterals we get that $$ \angle K I_{C} I=\angle K E_{B} I \quad \text { and } \quad K E_{C} I=\angle K I_{B} I, $$ which implies that the triangles $K E_{C} I_{C}$ and $K I_{B} E_{B}$ are similar. So $$ \frac{d\left(K, E_{C} I_{C}\right)}{d\left(K, E_{B} I_{B}\right)}=\frac{E_{C} I_{C}}{E_{B} I_{B}} $$ But $I_{B} I_{C} \| E_{B} E_{C}$ and $I_{B} I_{C} C B$ is cyclic, therefore $$ \frac{E_{C} I_{C}}{E_{B} I_{B}}=\frac{I I_{C}}{I I_{B}}=\frac{I B}{I C} . $$ We deduce that $$ \frac{d(K, I C)}{d(K, I B)}=\frac{I B}{I C}, $$ i.e. the distances of $K$ to the sides $I C$ and $I B$ are inversly analogous to the lenghts of these sides. So by a well known property of the median, $K$ lies on the median of the triangle IBC. (The last property of the median can be proved either by the law of sines, or by taking the distances of the distances of the median $M$ to the sides and prove by Thales theorem that $M, I, K$ are collinear.)
{ "problem_match": "\nG4.", "resource_path": "Balkan_Shortlist/segmented/en-2021_bmo_shortlist.jsonl", "solution_match": "\nSolution." }
172
700
2021
T1
G5
Geometry
Balkan_Shortlist
Let $A B C$ be an acute triangle with $A C>A B$ and circumcircle $\Gamma$. The tangent from $A$ to $\Gamma$ intersects $B C$ at $T$. Let $M$ be the midpoint of $B C$ and let $R$ be the reflection of $A$ in $B$. Let $S$ be a point so that $S A B T$ is a parallelogram and finally let $P$ be a point on line $S B$ such that $M P$ is parallel to $A B$. Given that $P$ lies on $\Gamma$, prove that the circumcircle of $\triangle S T R$ is tangent to line $A C$. ## Proposed by United Kingdom
1. Let $N$ be the midpoint of $B S$ which, as $S A B T$ is a parallelogram, is also the midpoint of $T A$. Using $S T\|A B\| M P$ we get: $$ \frac{N B}{B P}=\frac{1}{2} \cdot \frac{S B}{B P}=\frac{T B}{2 \cdot B M}=\frac{T B}{B C} $$ which shows that $T A \| C P$. Let $\Omega$ be the circle with diameter $O T$. As $\angle O M T=90^{\circ}=\angle T A O$ we have that $A, M$ lie on $\Omega$. We now show that $P$ lies on $\Omega$. As $T A \| C P$ and $T A$ is tangent to $\Gamma$ we have that $A P=A C$, so $$ \angle T A P=\angle A C P=\angle C P A=\angle C B A=\angle T M P $$ where in the last step we used the fact that $M P \| A B$. This shows that $P$ lies on $\Omega$. Furthermore, this shows that $\angle O P T=90^{\circ}$ and so $T P$ is also tangent to $\Gamma$. Now we show that $R, S$ lie on $\Omega$ which would show that $\Omega$ is the circumcircle of triangle $S T R$. For $S$, using $S T \| A B$ and that $T A$ tangent to $\Gamma$ we have $$ \angle T S P=\angle A B S=\angle A C P=\angle T A P . $$ For $R$, the homothety with factor 2 centred at $A$ takes $B N$ to $R T$. So $B N \| R T$ and hence $$ \angle A R T=\angle A B S=\angle T A P=\angle A P T, $$ where the last step follows from $T A=T P$ as they are both tangents to $\Gamma$. Finally, we observe that as $T A$ tangent to $\Gamma$ then $$ \angle T A C=180^{\circ}-\angle C B A=\angle A B T=\angle T S A $$ which, by the alternate segment theorem, means that line $A C$ is tangent to $\Omega$ as required.
{ "problem_match": "\nG5.", "resource_path": "Balkan_Shortlist/segmented/en-2021_bmo_shortlist.jsonl", "solution_match": "\nSolution" }
155
535
2021
T1
G6
Geometry
Balkan_Shortlist
Let $A B C$ be an acute triangle such that $A B<A C$. Let $\omega$ be the circumcircle of $A B C$ and assume that the tangent to $\omega$ at $A$ intersects the line $B C$ at $D$. Let $\Omega$ be the circle with center $D$ and radius $A D$. Denote by $E$ the second intersection point of $\omega$ and $\Omega$. Let $M$ be the midpoint of $B C$. If the line $B E$ meets $\Omega$ again at $X$, and the line $C X$ meets $\Omega$ for the second time at $Y$, show that $A, Y$ and $M$ are collinear. ## Proposed by North Macedonia
1. Denote by $S$ the intersection point of $\Omega$ and the segment $B C$. Because $D A=D S$, we have $\angle D S A=\angle D A S$. Now using that $D A$ is tangent to $\omega$ we obtain: $$ \angle B A S=\angle D A S-\angle D A B=\angle D S A-\angle D C A=\angle C A S . $$ This means that the line $A S$ is the angle bisector of $\angle B A C$. Notice that $D E$ is also tangent to $\omega$, because it is the second intersection point of $\omega$ and $\Omega$. From here, and from $D E=D X$, we see that $$ \angle D C E=\angle B C E=\angle B E D=\angle D X E . $$ It follows that $C E D X$ is a cyclic quadrilateral. Since $D$ is the center of $\Omega$, then $\angle E D Y=2 \angle E X Y$. Since $C E D X$ is cyclic, we also have $$ \angle S D E=\angle C D E=\angle C X E=\angle E X Y . $$ Thus $$ 2 \angle S D E=2 \angle E X Y=\angle E D Y=\angle S D E+\angle S D Y $$ and so $\angle S D E=\angle S D Y$. So we obtain $$ \angle S A E=\frac{1}{2} \angle S D E=\frac{1}{2} \angle S D Y=\angle S A Y . $$ Combining this with the fact that $A S$ is the angle bisector of $\angle B A C$, we see that the lines $A E$ and $A Y$ are symmetric with respect to the angle bisector of $\angle B A C$. Now let $F$ be the second intersection point of the line $A Y$ and the circumcircle $\omega$. We have shown that $\angle B A E=\angle C A F$, which means that $B E=C F$ (two chords with the same corresponding central angle are equal). We similarly get $B F=C E$. Since $D A$ is tangent to $\omega$, then $\angle B A D=\angle D C A$. Since also $\angle A D B=\angle C D A$ then the triangles $D A B$ and $D C A$ are similar. This gives. $$ \frac{A B}{A C}=\frac{A D}{C D} . $$ Similarly, the triangles $D E B$ and $D C E$ are similar, giving $$ \frac{B E}{C E}=\frac{E D}{C D} . $$ Combining these with $B E=C F$ and $B F=C E$ which we have shown above, and using that $D A=D E$ (tangents from the same point $D$ ), we get the relation $$ \frac{C F}{B F}=\frac{B E}{C E}=\frac{E D}{C D}=\frac{A D}{C D}=\frac{A B}{A C} . $$ Finally, let $K$ be the intersection point of the line $A Y$ with the segment $B C$. We have $$ \frac{B K}{C K}=\frac{B K \sin (\angle B K A)}{B K \sin (\angle C K A)}=\frac{A B \sin (\angle B A K)}{A C \sin (\angle C A K)}=\frac{C F \sin (\angle B C F)}{B F \sin (\angle C B F)}=1 . $$ Thus $K=M$ and $A, Y, M$ are collinear as required.
{ "problem_match": "\nG6.", "resource_path": "Balkan_Shortlist/segmented/en-2021_bmo_shortlist.jsonl", "solution_match": "\nSolution" }
159
832
2021
T1
G6
Geometry
Balkan_Shortlist
Let $A B C$ be an acute triangle such that $A B<A C$. Let $\omega$ be the circumcircle of $A B C$ and assume that the tangent to $\omega$ at $A$ intersects the line $B C$ at $D$. Let $\Omega$ be the circle with center $D$ and radius $A D$. Denote by $E$ the second intersection point of $\omega$ and $\Omega$. Let $M$ be the midpoint of $B C$. If the line $B E$ meets $\Omega$ again at $X$, and the line $C X$ meets $\Omega$ for the second time at $Y$, show that $A, Y$ and $M$ are collinear. ## Proposed by North Macedonia
2. As in Solution 1, we let $S$ be the intersection of $\Omega$ with $B S$ and obtain that $A S$ is the angle bisector of $\angle B A C$ and that $A E$ and $A Y$ are symmetric with respect to $A S$. Let $R=\sqrt{(A B)(A C)}$ and let $\Psi$ be the map obtained by first inverting on the circle centered at $A$ of radius $R$ and the reflecting on $A S$. By construction of $\Psi$ we have $\Psi(B)=C$ and $\Psi(C)=B$. (After the inversion $B$ maps to a point $B^{\prime}$ on $A B$ such that $(A B)\left(A B^{\prime}\right)=R^{2}=(A B)(A C)$. So after the reflection $B^{\prime}$ maps to $C$.) Since the inversion of any line not passing through $A$ is a circle passing through $A$, then $\Psi(B C)$ is a circle passing through $A$. Since it also passes through $B$ and $C$ then $\Psi(B C)=\omega$. Because $D A$ is tangent to $\omega$ at $A$, and $D$ is the center of $\Omega$, the circles $\omega$ and $\Omega$ are orthogonal. Both reflection and inversion preserve orthogonality and both are involutions. This means that $\Psi$ is an involution that preserves orthogonality. From here we conlude that the images $\Psi(\omega)=B C$ and $\Psi(\Omega)$ are orthogonal lines. Since $\Psi(A S)=A S, \Phi(B C)=\omega$ and $S$ belongs on $B C$, then $\Psi(S)$ is the intersection of $A S$ with $\omega$. Since $A S$ is the angle bisector of triangle $A B C$, then $\Psi(S)=N$, the midpoint of the $\operatorname{arc} B C$ of $\omega$ not containing $A$. Since $S$ belongs on $\Omega$ and $\Psi(\Omega)$ and $\Psi(\omega)$ are orthogonal lines, then $\Psi(\Omega)$ is the line perpendicular to $B C$ at $N$. It therefore contains the midpoint $M$ of $B C$. The intersection point $E$ of $\omega$ and $\Omega$ maps to $\Psi(E)$, which is the intersection point of $\Psi(\omega)=B C$ and $\Psi(\Omega)=M N$, which must be equal to $M$, i.e. $\Psi(E)=M$. Because of this, we see that $A E$ and $A M$ are symmetric with respect to the angle bisector $A S$. Since also $A E$ and $A Y$ are symmetric with respect to $A S$, it follows that $A, M, Y$ are collinear as required.
{ "problem_match": "\nG6.", "resource_path": "Balkan_Shortlist/segmented/en-2021_bmo_shortlist.jsonl", "solution_match": "\nSolution" }
159
626
2021
T1
G7
Geometry
Balkan_Shortlist
Let $A B C$ be an acute scalene triangle. Its $C$-excircle tangent to the segment $A B$ meets $A B$ at point $M$ and the extension of $B C$ beyond $B$ at point $N$. Analogously, its $B$-excircle tangent to the segment $A C$ meets $A C$ at point $P$ and the extension of $B C$ beyond $C$ at point $Q$. Denote by $A_{1}$ the intersection point of the lines $M N$ and $P Q$, and let $A_{2}$ be defined as the point, symmetric to $A$ with respect to $A_{1}$. Define the points $B_{2}$ and $C_{2}$, analogously. Prove that $\triangle A B C$ is similar to $\triangle A_{2} B_{2} C_{2}$. ## Proposed by Bulgaria
1. We shall use the standard notations for $A B C$, i.e. $\angle A B C=\beta, B C=a$ etc. We also write $s=\frac{a+b+c}{2}$ for the semiperimeter and $r$ for the inradius. Let $M N$ intersect the altitude $A D(D$ lies on $B C)$ at the point $L$. We have that $\angle B A D=90^{\circ}-\beta$ and $\angle A M L=\angle B M N=\frac{\beta}{2}$. (Since $B M N$ is an isosceles triangle with $\angle M B N=180^{\circ}-\beta$.) It is known that $A M=s-b$ so by the Sine Law in the triangle $A M L$ we have $$ \frac{A M}{\sin \angle A L M}=\frac{A L}{\sin \angle A M L} \Longrightarrow \frac{s-b}{\sin \left(90^{\circ}+\frac{\beta}{2}\right)}=\frac{A L}{\sin \frac{\beta}{2}} \Longrightarrow A L=(s-b) \tan \frac{\beta}{2}=r . $$ Analogously we see that if $P Q$ intersects $A D$ at $L^{\prime}$, then $A L^{\prime}=r$. Therefore $L$ and $L^{\prime}$ coincide and since $A_{1}=M N \cap P Q$ by definition, we conclude that $L=L^{\prime}=A_{1}$. In particular, we can now view the point $A_{2}$ as the point on the $A$-altitude such that $A A_{2}=2 r$. Analogously $B_{2}$ and $C_{2}$ lie on the $B$-altitude and $C$-altitude, respectively, and $B B_{2}=C C_{2}=2 r$. Now let $X$ be the reflection of $A$ on the midpoint of $B C$ and define $X Y Z$ analogously. So $X Y Z$ is the triangle whose midpoints of sides are $A, B$ and $C$. Let $J$ be the incenter of this triangle. As the triangles $X Y Z$ and $A B C$ are similar with ratio 2, the inradius of $X Y Z$ is equal to $2 r$. So if $J J_{0}$ is perpendicular to $Y Z$ (with $J_{0}$ on $Y Z$ ), then $A A_{2}$ and $J J_{0}$ are parallel (both perpendicular to $Y Z$ ) and equal, hence $A A_{2} J J_{0}$ is a rectangle and in particular $A_{2}$ is the foot of the perpendicular from $J$ to the $A$-altitude of $A B C$. It follows that $A_{2}, B_{2}$ and $C_{2}$ lie on the circle $\omega$ with diameter $J H$. Now we finish with a simple angle chasing. The circle $k$ gives $\angle A_{2} B_{2} C_{2}=\angle A_{2} H C_{2}=$ $\angle 180^{\circ}-\angle A H C=\angle A B C$; similarly for the angles at $A_{2}$ and $C_{2}$. The desired similarity follows.
{ "problem_match": "\nG7.", "resource_path": "Balkan_Shortlist/segmented/en-2021_bmo_shortlist.jsonl", "solution_match": "\nSolution" }
199
755
2021
T1
G7
Geometry
Balkan_Shortlist
Let $A B C$ be an acute scalene triangle. Its $C$-excircle tangent to the segment $A B$ meets $A B$ at point $M$ and the extension of $B C$ beyond $B$ at point $N$. Analogously, its $B$-excircle tangent to the segment $A C$ meets $A C$ at point $P$ and the extension of $B C$ beyond $C$ at point $Q$. Denote by $A_{1}$ the intersection point of the lines $M N$ and $P Q$, and let $A_{2}$ be defined as the point, symmetric to $A$ with respect to $A_{1}$. Define the points $B_{2}$ and $C_{2}$, analogously. Prove that $\triangle A B C$ is similar to $\triangle A_{2} B_{2} C_{2}$. ## Proposed by Bulgaria
2. As in Solution 1, we have that $A_{2}, B_{2}, C_{2}$ belong on the corresponding altitudes with $A A_{2}=B B_{2}=C C_{2}=2 r$. We present an approach with complex numbers (and minimal calculations) which can also complete the proof. Set the incenter $I$ of the triangle $A B C$ to be the origin. We may assume that $r=1$. We write $a, b, c$ to denote $A^{\prime}, B^{\prime}, C^{\prime}$. Point $A$ is the intersection of the tangents to the unit circle (incircle) at $B^{\prime}$ and $C^{\prime}$ and is therefore represented by the complex number $2 b c /(b+c)$. Analogously the points $B$ and $C$ are represented by $2 a c /(a+c)$ and $2 a b /(a+b)$ respectively. Since $A A_{2}=r=2$ and $A A_{2}$ is parallel to $I A^{\prime}$, we have that $A_{2}$ is represented by the complex number $$ \frac{2 b c}{b+c}+2 a=\frac{2(a b+b c+c a)}{b+c} $$ Now since $|c|=1$, then $$ (A B)=\left|\frac{b c}{b+c}-\frac{a c}{a+c}\right|=\left|\frac{b-a}{(a+c)(b+c)}\right| . $$ We also have $$ \left(A_{2} B_{2}\right)=\left|\frac{2(a b+b c+c a)}{b+c}-\frac{2(a b+b c+c a)}{a+c}\right|=2|a b+b c+c a|\left(A_{2} B_{2}\right) . $$ Analogously we get $$ \frac{A_{2} B_{2}}{A B}=\frac{B_{2} C_{2}}{B C}=\frac{C_{2} A_{2}}{C A}=2|a b+b c+c a| $$ So the triangle $A_{2} B_{2} C_{2}$ is similar to the triangle $A B C$.
{ "problem_match": "\nG7.", "resource_path": "Balkan_Shortlist/segmented/en-2021_bmo_shortlist.jsonl", "solution_match": "\nSolution" }
199
508
2021
T1
G8
Geometry
Balkan_Shortlist
Let $A B C$ be a scalene triangle and let $I$ be its incenter. The projections of $I$ on $B C, C A$ and $A B$ are $D, E$ and $F$ respectively. Let $K$ be the reflection of $D$ over the line $A I$, and let $L$ be the second point of intersection of the circumcircles of the triangles $B F K$ and $C E K$. If $\frac{1}{3} B C=A C-A B$, prove that $D E=2 K L$. Proposed by Romania
Writing $A E=A F=x, B F=B D=y$ and $C E=C D=z$, the condition $\frac{1}{3} B C=A C-A B$ translates to $y+z=3(z-y)$ giving $z=2 y$, i.e. $C D=2 B D$. Letting $B^{\prime}$ be the reflection of $B$ on $A I$ we have that $B^{\prime}$ belongs on $A C$ with $B^{\prime} E=B F=$ $B D=\frac{1}{2} C D=\frac{1}{2} C E$ therefore $B^{\prime}$ is the midpoint of $C E$. Under reflection on $A I$, the circumcircle $\omega$ of triangle $D E F$ remains fixed. Its tangent $B D$ maps to $B^{\prime} K$. So $B^{\prime} K$ is tangent to $\omega$. Since $B^{\prime} E$ is tangent to $\omega$, then $B^{\prime} E=B^{\prime} K=B^{\prime} C$. Thus $C K E$ is a right-angled triangle with diameter $C E$. If $Q$ is the midpoint of $D E$ then, since $C D=C E$, we have that $\angle C Q E=90^{\circ}$ and therefore the points $C, K, Q, L, E$ are concyclic. Observe that $$ \begin{aligned} \angle B L C & =\angle B L K+\angle C L K=\angle B F K+\angle C E K=\left(180^{\circ}-\angle A F K\right)+\left(180^{\circ}-\angle A E K\right) \\ & =\angle B A C+\angle F K E=\angle B A C+\angle F D E=\angle B A C+\left(90^{\circ}-\frac{1}{2} \angle B A C\right) \\ & =90^{\circ}+\frac{1}{2} \angle B A C=\angle B I C . \end{aligned} $$ So $L$ belongs on the circumcircle of triangle $B I C$, i.e. on the $A$-excircle $\omega_{A}$ of triangle $A B C$. Let $J$ be the $A$-excenter of triangle $A B C$ and recall that it is the antipodal point of $I$ on $\omega_{A}$. Then $$ \angle C L J=\angle C B J=90^{\circ}-\frac{1}{2} \angle A B C=\angle B F D=\angle C E K=\angle C L K . $$ So $K, L, J$ are collinear and therefore $\angle I L K=90^{\circ}$. Let $T$ be the reflection of $L$ on $A I$. Since $L$ belongs on the circle with centre $B^{\prime}$ containing $E$ and $K$, then $L$ belongs on the circle $\omega_{2}$ with centre $B$ containing $F$ and $D$. Let $S$ be the intersection of $I T$ and $B C$. Since $K L \perp I L$, then $D T \perp I T$. It follows that $\angle I D T=90^{\circ}-\angle D I S=\angle I S D$. Since $I D$ is tangent on $\omega_{2}$, then $S$ belongs on $\omega_{2}$. Then $S D=2 B D=D C$ and so the triangles $I D C$ and $I D S$ are equal. Their height $D T$ and $D Q$ must be equal. Therefore $D E=2 D Q=2 D T=2 K L$ as required. ## NUMBER THEORY
{ "problem_match": "\nG8.", "resource_path": "Balkan_Shortlist/segmented/en-2021_bmo_shortlist.jsonl", "solution_match": "\nSolution." }
130
853
2021
T1
N1
Number Theory
Balkan_Shortlist
Let $n \geqslant 3$ be an integer and let $$ M=\left\{\frac{a_{1}+a_{2}+\cdots+a_{k}}{k}: 1 \leqslant k \leqslant n \text { and } 1 \leqslant a_{1}<\cdots<a_{k} \leqslant n\right\} $$ be the set of the arithmetic means of the elements of all non-empty subsets of $\{1,2, \ldots, n\}$. Find $\min \{|a-b|: a, b \in M$ with $a \neq b\}$. ## Proposed by Romania
We observe that $M$ is composed by rational numbers of the form $a=\frac{x}{k}$, where $1 \leqslant k \leqslant n$. As the arithmetic mean of $1, \ldots, n$ is $\frac{n+1}{2}$, if we look at these rational numbers in their irreducible form, we can say that $1 \leqslant k \leqslant n-1$. A non-zero difference $|a-b|$ with $a, b \in M$ is then of form $$ \left|\frac{x}{k}-\frac{y}{p}\right|=\frac{\left|p_{0} x-k_{0} y\right|}{[k, p]} $$ where $[k, p]$ is the l.c.m. of $k, p$, and $k_{0}=\frac{[k, p]}{k}, p_{0}=\frac{[k, p]}{p}$. Then $|a-b| \geqslant \frac{1}{[k, p]}$, as $\left|p_{0} x-k_{0} y\right|$ is a non-zero integer. As $$ \max \{[k, p] \mid 1 \leqslant k<p \leqslant n-1\}=(n-1)(n-2), $$ we can say that $m=\min _{\substack{a, b \in M \\ a \neq b}}|a-b| \geqslant \frac{1}{(n-1)(n-2)}$. To reach this minimum, we seek $x \in\{3,4, \ldots, 2 n-1\}$ and $y \in\{1,2, \ldots, n\}$ for which $$ \left|\frac{\frac{n(n+1)}{2}-x}{n-2}-\frac{\frac{n(n+1)}{2}-y}{n-1}\right|=\frac{1}{(n-1)(n-2)}, $$ meaning $$ \left|\frac{n(n+1)}{2}-(n-1) x+(n-2) y\right|=1 . $$ If $n=2 k$, we can choose $x=k+3$ and $y=2$ and if $n=2 k+1$ we can choose $x=n=2 k+1$ and $y=k$. Therefore, the required minimum is $\frac{1}{(n-1)(n-2)}$. Comment. For $n \geqslant 5$, the only other possibilities are to take $x=3 k-1, y=2 k-1$ if $n=2 k$ and to take $x=2 k+3, y=k+2$ if $n=2 k+1$. (For $n=3,4$ there are also examples where one of the sets is of size $n$.)
{ "problem_match": "\nN1.", "resource_path": "Balkan_Shortlist/segmented/en-2021_bmo_shortlist.jsonl", "solution_match": "\nSolution." }
154
664
2021
T1
N2
Number Theory
Balkan_Shortlist
Denote by $\ell(n)$ the largest prime divisor of $n$. Let $a_{n+1}=a_{n}+\ell\left(a_{n}\right)$ be a recursively defined sequence of integers with $a_{1}=2$. Determine all natural numbers $m$ such that there exists some $i \in \mathbb{N}$ with $a_{i}=m^{2}$.
We will show that all such numbers are exactly the prime numbers. Let $p_{1}, p_{2}, \ldots$ be the sequence of prime numbers. We will prove the following: Claim: Assume $a_{n}=p_{i} p_{i+1}$. Then for each $k=1,2, \ldots, p_{i+2}-p_{i}$ we have that $a_{n+k}=$ $\left(p_{i}+k\right) p_{i+1}$. Proof. By induction on $k$. Since $\ell\left(a_{n}\right)=p_{i+1}$, then $a_{n+1}=p_{i} p_{i+1}+p_{i+1}=\left(p_{i}+1\right) p_{i+1}$. Assume now that $a_{n+r}=\left(p_{i}+r\right) p_{i+1}$ for some $r<p_{i+2}-p_{i}$. For the inductive step, it is enough to show that $\ell\left(a_{n+r}\right)=p_{i+1}$ as then we would have $a_{n+r}=\left(p_{i}+r\right) p_{i+1}+p_{i+1}=\left(p_{i}+r+1\right) p_{i+1}$. Assume for contradiction that $\ell\left(a_{n+r}\right) \neq p_{i+1}$. Since $p_{i+1} \mid a_{n+r}$, then we must have that $\ell\left(a_{n+r}\right)>p_{i+1}$. Since also $a_{n+r}=\left(p_{i}+r\right) p_{i+1}$, then $\ell\left(p_{i}+r\right)>p_{i+1}$ and therefore $\ell\left(p_{i}+r\right) \geqslant p_{i+2}$. This is impossible as $p_{i}+r<p_{i+2}$. Since $a_{1}=2, a_{2}=4, a_{3}=6=2 \cdot 3=p_{1} p_{2}$, from the above claim, by induction, we can break up the sequence into pieces of the form $p_{i} p_{i+1},\left(p_{i}+1\right) p_{i+1}, \ldots, p_{i+2} p_{i+1}$ for $i=1,2, \ldots$, together with the initial piece 2,4 . We immediately see that for each prime $p$, the number $p^{2}$ appears in the sequence. It remains to show that no other square number appears in the sequence. Assume for contradiction that another square appears in $p_{i} p_{i+1},\left(p_{i}+1\right) p_{i+1}, \ldots, p_{i+2} p_{i+1}$ for some $i$. Since all elements of this piece are multiples of $p_{i+1}$, if a square appears in this sequence, it must be a multiple of $p_{i+1}^{2}$. So the smallest possible square different from $p_{i+1}^{2}$ is $4 p_{i+1}^{2}$. It is enough to show that $4 p_{i+1}^{2}>p_{i+2} p_{i+1}$. This is equivalent to showing that $p_{i+2}<4 p_{i+1}$ which follows from Bertrand's postulate.
{ "problem_match": "\nN2.", "resource_path": "Balkan_Shortlist/segmented/en-2021_bmo_shortlist.jsonl", "solution_match": "\nSolution." }
85
804
2021
T1
N5
Number Theory
Balkan_Shortlist
A natural number $n$ is given. Determine all $(n-1)$-tuples of nonnegative integers $a_{1}, a_{2}, \ldots, a_{n-1}$ such that $$ \left[\frac{m}{2^{n}-1}\right]+\left[\frac{2 m+a_{1}}{2^{n}-1}\right]+\left[\frac{2^{2} m+a_{2}}{2^{n}-1}\right]+\left[\frac{2^{3} m+a_{3}}{2^{n}-1}\right]+\cdots+\left[\frac{2^{n-1} m+a_{n-1}}{2^{n}-1}\right]=m $$ holds for all $m \in \mathbb{Z}$. Proposed by Serbia
1. We will show that there is a unique such $n$-tuple: $a_{k}=2^{n-1}+2^{k-1}-1$ for $k=1, \ldots, n-1$. Write $N=2^{n}-1$ and $f_{k}(x)=\left[\frac{2^{k} x+a_{k}}{N}\right]$ for $k=0,1, \ldots, n-1$, where $a_{0}=0$. Since $$ \sum_{k=0}^{n-1} f_{k}(m)-\sum_{k=0}^{n-1} f_{k}(m-1)=1 $$ for each $m \in \mathbb{Z}$, there is exactly one $k$ for which $f_{k}(m)=f_{k}(m-1)+1$. We work modulo $N$. The last equality holds if and only if $2^{k} m+a_{k} \in\left\{0,1, \ldots, 2^{k}-1\right\}$. I.e. if and only if $$ 2^{k} m \in\left\{-a_{k}, 1-a_{k}, \ldots, 2^{k}-1-a_{k}\right\} $$ Multiplying with $2^{n-k}$, and noting that $2^{n} \equiv 1 \bmod N$, we get the following: For each $m \in \mathbb{Z}$ there is a unique $k \in\{0,1, \ldots, n-1\}$ such that $m \in B_{k}$ (modulo $N$ ) where $$ B_{k}=\left\{b_{k}, b_{k}+2^{n-k}, \ldots, b_{k}+\left(2^{k}-1\right) 2^{n-k}\right\} $$ with $b_{k}=-2^{n-k} a_{k}$. Therefore the problem condition is equivalent to $\bigcup_{k=0}^{n-1} B_{k}$ being a partition of $\{0,1, \ldots, N-1\}$. For a number $b$ and set a $A \subseteq \mathbb{Z}$ we write $b+A=\{b+a: a \in A\}$. With this notation, $B_{n-1}=b_{n-1}+\left\{0,2,4, \ldots, 2^{n}-2\right\}$. The set $B_{n-2}=b_{n-2}+\left\{0,4,8, \ldots, 2^{n}-4\right\}$ is contained in $\overline{B_{n-1}}=b_{n-1}+\left\{1,3, \ldots, 2^{n}-3\right\}$, implying $b_{n-2}, b_{n-2}+2^{n}-4 \in \overline{B_{n-1}}$, which holds only if $b_{n-2} \equiv$ $b_{n-1}+1$. Further, the set $B_{n-3}=b_{n-3}+\left\{0,8,16, \ldots, 2^{n}-8\right\}$ is contained in $\overline{B_{n-1} \cup B_{n-2}}=$ $b_{n-1}+\left\{3,7, \ldots, 2^{n}-5\right\}$, so we must have $b_{n-3} \equiv b_{n-1}+3$. Similarly, $b_{n-4} \equiv b_{n-1}+7$ etc. In general, $b_{n-k} \equiv b_{n-1}+2^{k-1}-1$ for $k=1, \ldots, n-1$. It follows that $b_{0} \equiv b_{n-1}+2^{n-1}-1$. On the other hand, we have $b_{0}=0$, which gives $b_{n-1} \equiv 1-2^{n-1}$ and therefore $b_{k} \equiv 2^{n-1-k}-2^{n-1}$. Thus $a_{k} \equiv-2^{k} b_{k} \equiv 2^{n+k-1}-2^{n-1} \equiv 2^{n-1}+2^{k-1}-1$ for $k=1, \ldots, n-1$. Finally, $\sum_{k} f_{k}(0)=0$ implies $a_{k}<N$ for all $k$, so we conclude that $a_{k}=2^{n-1}+2^{k-1}-1$ for each $k=1,2, \ldots, n-1$.
{ "problem_match": "\nN5.", "resource_path": "Balkan_Shortlist/segmented/en-2021_bmo_shortlist.jsonl", "solution_match": "\nSolution" }
176
1,110
2021
T1
N5
Number Theory
Balkan_Shortlist
A natural number $n$ is given. Determine all $(n-1)$-tuples of nonnegative integers $a_{1}, a_{2}, \ldots, a_{n-1}$ such that $$ \left[\frac{m}{2^{n}-1}\right]+\left[\frac{2 m+a_{1}}{2^{n}-1}\right]+\left[\frac{2^{2} m+a_{2}}{2^{n}-1}\right]+\left[\frac{2^{3} m+a_{3}}{2^{n}-1}\right]+\cdots+\left[\frac{2^{n-1} m+a_{n-1}}{2^{n}-1}\right]=m $$ holds for all $m \in \mathbb{Z}$. Proposed by Serbia
2. We will use the identity $$ [x]+\left[x+\frac{1}{N}\right]+\left[x+\frac{2}{N}\right]+\cdots+\left[x+\frac{N-1}{N}\right]=[N x] $$ which holds for every $x \in \mathbb{R}$ and every $N \in \mathbb{N}$. (One can check this by noting that the difference between the two sides of the identity is periodic with period $1 / N$ and that the identity clearly holds for $x \in\left[0, \frac{1}{N}\right)$. ) Writing $a_{0}=0$ and $N=2^{n}-1$ we observe that $$ m=\sum_{k=0}^{n-1}\left[\frac{2^{k} m+a_{k}}{N}\right]=\sum_{r=0}^{2^{k}-1} \sum_{r=0}^{2^{k}-1}\left[\frac{m+\frac{a_{k}}{2^{k}}}{N}+\frac{r}{2^{k}}\right]=\sum_{k=0}^{n-1} \sum_{r=0}^{2^{k}-1}\left[\frac{m+\frac{a_{k}+r N}{2^{k}}}{N}\right] $$ It follows that $c_{r, k}=\left[\frac{a_{k}+r N}{2^{k}}\right]$ are all distinct modulo $N$ for $k=0,1, \ldots, n-1$ and $r=$ $0,1, \ldots, 2^{k}-1$. Indeed if two (or more) of them are congruent to $t$, then writing $f(t)$ for the right hand side of $(1)$ we get $1=f(-t)-f(-t-1) \geqslant 2$, a contradiction. Since $N=2^{n}-1$, then $c_{r, k}=r 2^{n-k}+d_{r, k}$, where $d_{r, k}=\left[\frac{a_{k}-r}{2^{k}}\right]$. Because $c_{0,0}=0$, then $c_{0, k} \neq 0$ for each $k \neq 0$ giving $a_{k} \geqslant 2^{k}$ for each $k \geqslant 1$. Setting $m=0$ in the original equation gives $a_{k}<N$ for each $k$ and so $d_{0, k} \leqslant 2^{n-k}-1$ for each $k$. Furthermore $$ 2^{n-k}-1 \geqslant d_{0, k} \geqslant d_{1, k} \geqslant \cdots \geqslant d_{2^{k}-1, k} \geqslant d_{2^{k}, k}=d_{0, k}-1 \geqslant 0 $$ In particular $0 \leqslant c_{r, k}=r 2^{n-k}+d_{r, k} \leqslant\left(2^{n}-2^{n-k}\right)+\left(2^{n-k}-1\right)=N$. For $k=0,1,2, \ldots, n-1$ define $A_{k}=\left\{c_{r, k}: r=0,1, \ldots, 2^{k}-1\right\}$. From the above, since $A_{0}=\{0\}$, we must have that $A_{1} \cup A_{2} \cup \cdots \cup A_{n-1}=\{1,2, \ldots, N-1\}$. For a natural number $t$ let $v_{2}(t)$ be as usual the largest exponent such that $2^{v_{2}(t)} \mid t$. Let $$ f(t)=n-v_{2}(t)-1, \quad g(t)=\frac{t-2^{v_{2}(t)}}{2^{1+v_{2}(t)}}, \quad \text { and } \quad h(t)=2^{f(t)}-1-g(t) $$ Note that $f(t)$ uniquely determines $v_{2}(t)$ and together with $g(t)$ they uniquely determine $t$. Similarly $h(t)$ and $g(t)$ uniquely determine $t$. Claim. For each $t \in\left\{1,2, \ldots, 2^{n-1}-1\right\}$ we have: (i) $d_{g(t), f(t)}=2^{v_{2}(t)}$, (ii) $d_{h(t), f(t)}=2^{v_{2}(t)}-1$, (iii) $c_{g(t), f(t)}=t$, (iv) $c_{h(t), f(t)}=N-t$. Proof of Claim. We proceed by induction on $t$. For $t=1$ we have $v_{2}(1)=0, f(1)=$ $n-1, g(1)=0$ and $h(1)=2^{n-1}-1$. From (2) we have $1 \geqslant d_{0, n-1}$ and $d_{0, n-1}-1 \geqslant 0$ proving (i). Also, $c_{g(1), f(1)}=c_{0, n-1}=d_{0, n-1}=1$ proving (iii). From (2) we have $1 \geqslant d_{2^{n-1}-1, n-1} \geqslant 0$. But $c_{2^{n-1}-1, n-1}=2^{n}-2+d_{2^{n-1}-1, n-1}=N-1+d_{2^{n-1}-1, n-1}$. Since $c_{2^{n-1}-1, n-1} \leqslant N-1$ we deduce both (ii) and (iv). Assume now that the result is true for $t=s-1$. We will prove the result for $t=s$. Case 1: If $s-1=2 u$ is even, then $v_{2}(s)=0$, so $f(s)=n-1, g(s)=u$ and $h(s)=2^{n-1}-1-u$. By the induction hypothesis, since all the $c_{r, k}$ 's are distinct, we must have $$ s \leqslant c_{g(s), f(s)}=2 u+d_{g(s), f(s)}=s-1+d_{g(s), f(s)} $$ and $$ N-s \geqslant c_{h(s), f(s)}=2^{n}-2-2 u+d_{h(s), f(s)}=N-s+d_{h(s), f(s)} $$ From the above we must have $d_{g(s), f(s)} \geqslant 1$ and $d_{h(s), f(s)} \leqslant 0$. But from (2) any two $d_{r, k}$ 's for fixed $k$ differ by at most 1 . This can only be achieved if we have equalities everywhere proving (i)-(iv). Case 2: If $s-1=2 u+1$ is odd, then we write $s=2 u+2=2^{v} w$ for some odd $w$. Then $v_{2}(s)=v$ and so $k=f(s)=n-1-v$ and $r=g(s)=(w-1) / 2$. Also $h(s)=2^{k}-1-r$. By the induction hypothesis we must have $$ s \leqslant c_{r, k}=r 2^{n-k}+d_{r, k}=2^{v}(w-1)+d_{r, k}=s-2^{v}+d_{r, k} $$ and $$ \begin{aligned} N-s \geqslant c_{h(s), k} & =\left(2^{k}-1-r\right) 2^{n-k}+d_{h(s), k} \\ & =2^{n}-2^{v+1}-s+2^{v}+d_{h(s), k} \\ & =N+1-s-2^{v}+d_{h(s), k} \end{aligned} $$ From the above we must have $d_{r, k} \geqslant 2^{v}$ and $d_{h(s), k} \leqslant 2^{v}-1$. As in Case 1 we must have equalities everywhere proving (i)-(iv). For $t=2^{n-1}-2^{n-k-1}$ we have $v_{2}(t)=n-k-1, f(t)=k, g(t)=2^{k-1}-1$ and $h(t)=$ $2^{k}-1-\left(2^{k-1}-1\right)=2^{k-1}$. Thus from (ii) and (iv) we get $$ \left[\frac{a_{k}-\left(2^{k-1}-1\right)}{2^{k}}\right]=2^{n-k-1} \quad \text { and } \quad\left[\frac{a_{k}-2^{k-1}}{2^{k}}\right]=2^{n-k-1}-1 . $$ This is only possible if $a^{k}=2^{k} \cdot 2^{n-k-1}+\left(2^{k-1}-1\right)=2^{n-1}+2^{k-1}-1$ as required.
{ "problem_match": "\nN5.", "resource_path": "Balkan_Shortlist/segmented/en-2021_bmo_shortlist.jsonl", "solution_match": "\nSolution" }
176
2,220
2021
T1
N6
Number Theory
Balkan_Shortlist
Let $a, b$ and $c$ be positive integers satisfying the equation $(a, b)+[a, b]=2021^{c}$. If $|a-b|$ is a prime number, prove that the number $(a+b)^{2}+4$ is composite. ## Proposed by Serbia
We write $p=|a-b|$ and assume for contradiction that $q=(a+b)^{2}+4$ is a prime number. Since $(a, b) \mid[a, b]$, we have that $(a, b) \mid 2021^{c}$. As $(a, b)$ also divides $p=|a-b|$, it follows that $(a, b) \in\{1,43,47\}$. We will consider all 3 cases separately: (1) If $(a, b)=1$, then $1+a b=2021^{c}$, and therefore $$ q=(a+b)^{2}+4=(a-b)^{2}+4(1+a b)=p^{2}+4 \cdot 2021^{c} . $$ (a) Suppose $c$ is even. Since $q \equiv 1 \bmod 4$, it can be represented uniquely (up to order) as a sum of two (non-negative) squares. But (1) gives potentially two such representations so in order to have uniqueness we must have $p=2$. But then $4 \mid q$ a contradiction. (b) If $c$ is odd then $a b=2021^{c}-1 \equiv 1 \bmod 3$. Thus $a \equiv b \bmod 3$ implying that $p=|a-b| \equiv 0 \bmod 3$. Therefore $p=3$. Without loss of generality $b=a+3$. Then $2021^{c}=a b+1=a^{2}+3 a+1$ and so $$ (2 a+3)^{2}=4 a^{2}+12 a+9=4 \cdot 2021^{c}+5 . $$ So 5 is a quadratic residue modulo 47 , a contradiction as $$ \left(\frac{5}{47}\right)=\left(\frac{47}{5}\right)=\left(\frac{2}{5}\right)=-1 . $$ (2) If $(a, b)=43$, then $p=|a-b|=43$ and we may assume that $a=43 k$ and $b=43(k+1)$, for some $k \in \mathbb{N}$. Then $2021^{c}=43+43 k(k+1)$ giving that $$ (2 k+1)^{2}=4 k^{2}+4 k+4-3=4 \cdot 43^{c-1} \cdot 47-3 . $$ So -3 is a quadratic residue modulo 47 , a contradiction as $$ \left(\frac{-3}{47}\right)=\left(\frac{-1}{47}\right)\left(\frac{3}{47}\right)=\left(\frac{47}{3}\right)=\left(\frac{2}{3}\right)=-1 . $$ (3) If $(a, b)=47$ then analogously there is a $k \in \mathbb{N}$ such that $$ (2 k+1)^{2}=4 \cdot 43^{c} \cdot 47^{c-1}-3 $$ If $c>1$ then we get a contradiction in exactly the same way as in (2). If $c=1$ then $(2 k+1)^{2}=169$ giving $k=6$. This implies that $a+b=47 \cdot 6+47 \cdot 7=47 \cdot 13 \equiv 1 \bmod 5$. Thus $q=(a+b)^{2}+4 \equiv 0 \bmod 5$, a contradiction.
{ "problem_match": "\nN6.", "resource_path": "Balkan_Shortlist/segmented/en-2021_bmo_shortlist.jsonl", "solution_match": "\nSolution." }
66
844
2021
T1
N7
Number Theory
Balkan_Shortlist
A super-integer triangle is defined to be a triangle whose lengths of all sides and at least one height are positive integers. We will deem certain positive integer numbers to be good with the condition that if the lengths of two sides of a super-integer triangle are two (not necessarily different) good numbers, then the length of the remaining side is also a good number. Let 5 be a good number. Prove that all integers larger than 2 are good numbers. ## Proposed by Serbia
Evidently, all right-angle triangles with integer sides are super-integer triangles. We will use the following notation $(a, b, c\{h\})$ to denote a super-integer triangle whose sides are $a$, $b$ and $c$ and the height of integer length is $h$. The height will be written in curly brackets next to the corresponding side and it will be omitted for right-angled triangles. It also follows that if $(a, b, c)$ is an super-integer triangle, then so is $(k a, k b, k c)$, where $k$ is a positive integer. Note. In all cases of right-angled triangles one can check directly that they are right-angled by Pythagoras' Theorem or use the standard result that $\left(d\left(m^{2}-n^{2}\right), 2 d m n, d\left(m^{2}+n^{2}\right)\right)$ is a right-angled triangle. For non-right angled triangled we will use Heron's formula that the area of the triangle is $\sqrt{s(s-a)(s-b)(s-c)}$ where $s$ is the semiperimeter. For the triangle to be super-integer we need that $s(s-a)(s-b)(s-c)$ is a perfect square, say $s=m^{2}$, and that $2 m$ is a multiple of $a$ or $b$ or $c$. We will only make implicit use of the above. From $(5,5,6\{4\})$ and $(5,5,8\{3\})$ it follows that 6 and 8 are good. From $(6,8,10)$ it then follows that 10 is also good. It thus follows if $a$ is good that $2 a$ is also good. Indeed consider a sequence of super-integer triangles showing that if 5 is good then $a$ is good. Then the sequence of super-integer triangles of double the size of their edges show that since 10 is good then $2 a$ is good. It easily follows that $12,16,20$ and 24 are good. From $(5,12,13)$ it follows that 13 and therefore also 26 are good. From $(11\{12\}, 13,20)$ and $(21\{12\}, 13,20)$ it follows that 11 and 21 are good. From $(20,21,29)$ it follows that 29 is good. From $(6\{20\}, 25,29)$ it follows that 25 is good. We will say that a positive integer is nice if it is either good or equal to 1 or 2 . Claim 1. If $a$ is good and $b$ is nice then $a b$ is good. Proof of Claim. The claim is trivial if $b=1$ and we already proved the case $b=2$. So assume that $b$ is good. Pick a sequence of super-integer triangles which shows that if 5 is good then $b$ is good. Then the sequence of super-integer triangles 5 times the size of their edges shows that since 25 is good then $5 b$ is also good. Now pick a sequence of super-integer triangles which shows that if 5 is good then $b$ is good. Then the sequence of super-integer triangles $b$ times the size of their edges shows that since $5 a$ is good then $a b$ is also good. Next, from $(15,20,25)$ and $(7,24,25)$ we get that 15,7 and therefore 14 are good. From $(9,12,15)$ and $(8,15,17)$ we get that 9,17 and therefore 18 are good and finally from $(3\{24\}, 25,26)$ and then $(3,4,5)$ we get that 3 and 4 are good. We now have that all integers from 3 to 18 are good. To prove that the remaining integers larger than 18 are good, we will proceed by strong induction. Assume that all integers from 3 to $n-1$ are good for $n \geqslant 19$. Case 1. If $n=2 m$ is even, then $3 \leqslant m \leqslant n-1$ so $m$ is good. By Claim $1, n=2 m$ is also good. Case 2. If $n$ is odd and composite, say $n=a b$, with $a, b>1$, then $3 \leqslant a, b \leqslant n-1$ so $a, b$ are good. By Claim 1, $n=a b$ is also good. Case 3. If $n$ is an odd prime of the form $4 k+1$, then by Fermat sum of two squares theorem we can write $n=a^{2}+b^{2}$. We may assume $a>b .(a \neq b$ as $n$ is prime.) Consider the triangle $\left(a^{2}-b^{2}, 2 a b, a^{2}+b^{2}\right)$. This is a super-integer triangle since it is a right-angled triangle. We have $3 \leqslant a^{2}-b^{2} \leqslant n-1$ so $a^{2}-b^{2}$ is good. We also have $3 \leqslant 2 a b<a^{2}+b^{2}=n$ so $2 a b$ is also good. Thus $n=a^{2}+b^{2}$ is good as well. Case 4. Assume $n$ is an odd prime of the form $4 k+3$. Note that $4 k+4$ is good by Case 1 as $2 k+2<4 k+3$. We also have that $4 k+5$ is good either by Case 2 (if it is composite) or by Case 3 (if it is prime) except if $4 k+5$ is a prime equal to $a^{2}+1$. (Because in this case, to use Case 3 we would need that $a^{2}-1=n$ is good which is what we are trying to prove. But in this exceptional case $n=a^{2}-1=(a-1)(a+1)$ is not prime. We will make use of the following Claim: Claim 2. Let $a, b, \ell$ be positive integers such that $\ell>1$ and $a \neq b$. If $\ell-1,|a-b|, a, b$ are nice, and $\ell, a+b, a^{2} \ell+b^{2}$ are good, then $a^{2} \ell^{2}+b^{2}$ is good. Proof of Claim. By Claim 1, the numbers $\left|a^{2}-b^{2}\right|=|a-b|(a+b)$ and $2 a b$ are good. From the right-angled triangle ( $2 a b,\left|a^{2}-b^{2}\right|, a^{2}+b^{2}$ ) it follows that $a^{2}+b^{2}$ is good. So by Claim $1 \ell\left(a^{2}+b^{2}\right)$ is good. By Claim $1(\ell-1)\left(a^{2} \ell+b^{2}\right)$ is also good. Finally, from the triangle $\left((\ell-1)\left(a^{2} \ell+b^{2}\right)\{2 \ell a b\}, \ell\left(a^{2}+b^{2}\right), a^{2} \ell^{2}+b^{2}\right)$, we get that $a^{2} \ell^{2}+b^{2}$ is good. From Claim 2 with $a=2, b=1$ and $\ell=k+1$ to obtain that $$ 2^{2}(k+1)^{2}+1^{2}=4 k^{2}+8 k+5=4(k+1)+(2 k+1)^{2} $$ is good. From Claim 2 with $a=2, b=2 k+1$ and $\ell=k+1$ we obtain that $$ 2^{2}(k+1)^{2}+(2 k+1)^{2}=(2 k+2)^{2}+(2 k+1)^{2} $$ is good. Since from Claim $1,2(2 k+1)(2 k+2)$ is good, then from the right-angled triangle $\left(4 k+3,2(2 k+1)(2 k+2),(2 k+2)^{2}+(2 k+1)^{2}\right)$ we finally deduce that $4 k+3$ is good as required.
{ "problem_match": "\nN7.", "resource_path": "Balkan_Shortlist/segmented/en-2021_bmo_shortlist.jsonl", "solution_match": "\nSolution." }
99
1,996
2000
T3
6
null
BalticWay
Fredek runs a private hotel. He claims that whenever $n \geqslant 3$ guests visit the hotel, it is possible to select two guests who have equally many acquaintances among the other guests, and who also have a common acquaintance or a common unknown among the guests. For which values of $n$ is Fredek right? (Acquaintance is a symmetric relation.)
Answer: Fredek is right for all $n \neq 4$. Suppose that any two guests of Fredek having the same number of acquaintances have neither a common acquaintance nor a common unknown. From the set $\mathcal{K}$ of Fredek's guests choose any two guests $A$ and $B$ having the same number of acquaintances (the existence of such two guests follows from the pigeonhole principle). It then follows from our assumption that $A$ and $B$ have both either $\frac{1}{2} n$ or $\frac{1}{2} n-1$ acquaintances in $\mathcal{K}$, depending on whether $A$ and $B$ are acquainted or not. This proves in particular that for any odd $n$ Fredek is right. Assume now that $n$ is even, and $n \geqslant 6$. Choose from $\mathcal{K} \backslash\{A, B\}$ two guests $C, D$ with the same number of acquaintances in $\mathcal{K} \backslash\{A, B\}$. Since every guest in $\mathcal{K} \backslash\{A, B\}$ is acquaintance either with $A$ or with $B$ but not with both, $C$ and $D$ have the same number of acquaintances in $\mathcal{K}$, which implies that they both have either $\frac{1}{2} n$ or $\frac{1}{2} n-1$ acquaintances in $\mathcal{K}$. Finally, choose from $\mathcal{K} \backslash\{A, B, C, D\}$ two guests $E, F$ with the same number of acquaintances in $\mathcal{K} \backslash\{A, B, C, D\}$ (this is possible as $n \geqslant 6$ ). Since every guest in $\mathcal{K} \backslash\{A, B, C, D\}$ has exactly two acquaintances in the set $\{A, B, C, D\}$, the guests $E$ and $F$ have the same number of acquaintances in $\mathcal{K}$, which means that they both have either $\frac{1}{2} n$ or $\frac{1}{2} n-1$ acquaintances in $\mathcal{K}$. Thus at least four people among $A, B, C, D, E, F$ have the same number of acquaintances in $\mathcal{K}$. Select any three of these four guests - then one of these three is either a common acquaintance or a common unknown for the other two. For $n=4$ Fredek is not right. The diagram on Figure 6 gives the counterexample (where points indicate guests and lines show acquaintances). Figure 6
{ "problem_match": "\n6.", "resource_path": "BalticWay/segmented/en-bw00sol.jsonl", "solution_match": "\n6." }
81
616
2001
T3
5
null
BalticWay
Let 2001 given points on a circle be colored either red or green. In one step all points are recolored simultaneously in the following way: If both direct neighbors of a point $P$ have the same color as $P$, then the color of $P$ remains unchanged, otherwise $P$ obtains the other color. Starting with the first coloring $F_{1}$, we obtain the colorings $F_{2}, F_{3}, \ldots$ after several recoloring steps. Prove that there is a number $n_{0} \leqslant 1000$ such that $F_{n_{0}}=F_{n_{0}+2}$. Is the assertion also true if 1000 is replaced by 999 ?
Answer: no. Let the points be denoted by $1,2, \ldots, 2001$ such that $i, j$ are neighbors if $|i-j|=1$ or $\{i, j\}=\{1,2001\}$. We say that $k$ points form a monochromatic segment of length $k$ if the points are consecutive on the circle and if they all have the same color. For a coloring $F$ let $d(F)$ be the maximum length of a monochromatic segment. Note that $d\left(F_{n}\right)>1$ for all $n$ since 2001 is odd. If $d\left(F_{1}\right)=2001$ then all points have the same color, hence $F_{1}=F_{2}=F_{3}=\ldots$ and we can choose $n_{0}=1$. Thus, let $1<d\left(F_{1}\right)<2001$. Below we shall prove the following implications: If $3<d\left(F_{n}\right)<2001$, then $d\left(F_{n+1}\right)=d\left(F_{n}\right)-2 ;$ If $d\left(F_{n}\right)=3$, then $d\left(F_{n+1}\right)=2$; If $d\left(F_{n}\right)=2$, then $d\left(F_{n+1}\right)=d\left(F_{n}\right)$ and $F_{n+2}=F_{n}$; From (1) and (2) it follows that $d\left(F_{1000}\right) \leqslant 2$, hence by (3) we have $F_{1000}=F_{1002}$. Moreover, if $F_{1}$ is the coloring where 1 is colored red and all other points are colored green, then $d\left(F_{1}\right)=2000$ and thus $d\left(F_{1}\right)>d\left(F_{2}\right)>\ldots>d\left(F_{1000}\right)=2$ which shows that, for all $n<1000, F_{n} \neq F_{n+2}$ and thus 1000 cannot be replaced by 999 . It remains to prove (1)-(3). Let $(i+1, \ldots, i+k)$ be a longest monochromatic segment for $F_{n}$ (considering the labels of the points modulo 2001). Then $(i+2, \ldots, i+k-1)$ is a monochromatic segment for $F_{n+1}$ and thus $d\left(F_{n+1}\right) \geqslant d\left(F_{n}\right)-2$. Moreover, if $(i+1, \ldots, i+k)$ is a longest monochromatic segment for $F_{n+1}$ where $k \geqslant 3$, then $(i, \ldots, i+k+1)$ is a monochromatic segment for $F_{n}$. From this and $F_{n+1}>1$ the implications (1) and (2) clearly follow. For proof of (3) note that if $d\left(F_{n}\right) \leqslant 2$ then $F_{n+1}$ is obtained from $F_{n}$ by changing the colour of all points. Figure 1
{ "problem_match": "\n5.", "resource_path": "BalticWay/segmented/en-bw01sol.jsonl", "solution_match": "\n5." }
168
778
2001
T3
11
null
BalticWay
The real-valued function $f$ is defined for all positive integers. For any integers $a>1, b>1$ with $d=\operatorname{gcd}(a, b)$, we have $$ f(a b)=f(d) \cdot\left(f\left(\frac{a}{d}\right)+f\left(\frac{b}{d}\right)\right), $$ Determine all possible values of $f(2001)$.
Answer: 0 and $\frac{1}{2}$. Obviously the constant functions $f(n)=0$ and $f(n)=\frac{1}{2}$ provide solutions. We show that there are no other solutions. Assume $f(2001) \neq 0$. Since $2001=3 \cdot 667$ and $\operatorname{gcd}(3,667)=1$, then $$ f(2001)=f(1) \cdot(f(3)+f(667)), $$ and $f(1) \neq 0$. Since $\operatorname{gcd}(2001,2001)=2001$ then $$ f\left(2001^{2}\right)=f(2001)(2 \cdot f(1)) \neq 0 . $$ Also $\operatorname{gcd}\left(2001,2001^{3}\right)=2001$, so $$ f\left(2001^{4}\right)=f(2001) \cdot\left(f(1)+f\left(2001^{2}\right)\right)=f(1) f(2001)(1+2 f(2001)) $$ On the other hand, $\operatorname{gcd}\left(2001^{2}, 2001^{2}\right)=2001^{2}$ and $$ f\left(2001^{4}\right)=f\left(2001^{2}\right) \cdot(f(1)+f(1))=2 f(1) f\left(2001^{2}\right)=4 f(1)^{2} f(2001) . $$ So $4 f(1)=1+2 f(2001)$ and $f(2001)=2 f(1)-\frac{1}{2}$. Exactly the same argument starting from $f\left(2001^{2}\right) \neq 0$ instead of $f(2001)$ shows that $f\left(2001^{2}\right)=2 f(1)-\frac{1}{2}$. So $$ 2 f(1)-\frac{1}{2}=2 f(1)\left(2 f(1)-\frac{1}{2}\right) \text {. } $$ Since $2 f(1)-\frac{1}{2}=f(2001) \neq 0$, we have $f(1)=\frac{1}{2}$, which implies $f(2001)=2 f(1)-\frac{1}{2}=\frac{1}{2}$.
{ "problem_match": "\n11.", "resource_path": "BalticWay/segmented/en-bw01sol.jsonl", "solution_match": "\n11." }
100
626
2001
T3
15
null
BalticWay
Let $a_{0}, a_{1}, a_{2}, \ldots$ be a sequence of positive real numbers satisfying $i \cdot a_{i}^{2} \geqslant(i+1) \cdot a_{i-1} a_{i+1}$ for $i=1,2, \ldots$ Furthermore, let $x$ and $y$ be positive reals, and let $b_{i}=x a_{i}+y a_{i-1}$ for $i=1,2, \ldots$ Prove that the inequality $i \cdot b_{i}^{2}>(i+1) \cdot b_{i-1} b_{i+1}$ holds for all integers $i \geqslant 2$.
Let $i \geqslant 2$. We are given the inequalities $$ (i-1) \cdot a_{i-1}^{2} \geqslant i \cdot a_{i} a_{i-2} $$ and $$ i \cdot a_{i}^{2} \geqslant(i+1) \cdot a_{i+1} a_{i-1} . $$ Multiplying both sides of (6) by $x^{2}$, we obtain $$ i \cdot x^{2} \cdot a_{i}^{2} \geqslant(i+1) \cdot x^{2} \cdot a_{i+1} a_{i-1} $$ By (5), $$ \frac{a_{i-1}^{2}}{a_{i} a_{i-2}} \geqslant \frac{i}{i-1}=1+\frac{1}{i-1}>1+\frac{1}{i}=\frac{i+1}{i} $$ which implies $$ i \cdot y^{2} \cdot a_{i-1}^{2}>(i+1) \cdot y^{2} \cdot a_{i} a_{i-2} . $$ Multiplying (5) and (6), and dividing both sides of the resulting inequality by $i a_{i} a_{i-1}$, we get $$ (i-1) \cdot a_{i} a_{i-1} \geqslant(i+1) \cdot a_{i+1} a_{i-2} . $$ Adding $(i+1) a_{i} a_{i-1}$ to both sides of the last inequality and multiplying both sides of the resulting inequality by $x y$ gives $$ i \cdot 2 x y \cdot a_{i} a_{i-1} \geqslant(i+1) \cdot x y \cdot\left(a_{i+1} a_{i-2}+a_{i} a_{i-1}\right) . $$ Finally, adding up (7), (8) and (9) results in $$ i \cdot\left(x a_{i}+y a_{i-1}\right)^{2}>(i+1) \cdot\left(x a_{i+1}+y a_{i}\right)\left(x a_{i-1}+y a_{i-2}\right) $$ which is equivalent to the claim.
{ "problem_match": "\n15.", "resource_path": "BalticWay/segmented/en-bw01sol.jsonl", "solution_match": "\n15." }
168
555
2002
T3
2
null
BalticWay
Let $a, b, c, d$ be real numbers such that $$ \begin{aligned} a+b+c+d & =-2 \\ a b+a c+a d+b c+b d+c d & =0 \end{aligned} $$ Prove that at least one of the numbers $a, b, c, d$ is not greater than -1 .
We can assume that $a$ is the least among $a, b, c, d$ (or one of the least, if some of them are equal), there are $n>0$ negative numbers among $a, b, c, d$, and the sum of the positive ones is $x$. Then we obtain $$ -2=a+b+c+d \geqslant n a+x . $$ Squaring we get $$ 4=a^{2}+b^{2}+c^{2}+d^{2} $$ which implies $$ 4 \leqslant n \cdot a^{2}+x^{2} $$ as the square of the sum of positive numbers is not less than the sum of their squares. Combining inequalities (1) and (2) we obtain $$ \begin{aligned} n a^{2}+(n a+2)^{2} & \geqslant 4, \\ n a^{2}+n^{2} a^{2}+4 n a & \geqslant 0, \\ a^{2}+n a^{2}+4 a & \geqslant 0 . \end{aligned} $$ As $n \leqslant 3$ (if all the numbers are negative, the second condition of the problem cannot be satisfied), we obtain from the last inequality that $$ \begin{aligned} & 4 a^{2}+4 a \geqslant 0, \\ & a(a+1) \geqslant 0 . \end{aligned} $$ As $a<0$ it follows that $a \leqslant-1$. Alternative solution. Assume that $a, b, c, d>-1$. Denoting $A=a+1, B=b+1, C=c+1, D=d+1$ we have $A, B, C, D>0$. Then the first equation gives $$ A+B+C+D=2 \text {. } $$ We also have $$ a b=(A-1)(B-1)=A B-A-B+1 . $$ Adding 5 similar terms to the last one we get from the second equation $$ A B+A C+A D+B C+B D+C D-3(A+B+C+D)+6=0 . $$ In view of (3) this implies $$ A B+A C+A D+B C+B D+C D=0, $$ a contradiction as all the unknowns $A, B, C, D$ were supposed to be positive. Another solution. Assume that the conditions of the problem hold: $$ \begin{aligned} a+b+c+d & =-2 \\ a b+a c+a d+b c+b d+c d & =0 . \end{aligned} $$ Suppose that $$ a, b, c, d>-1 \text {. } $$ If all of $a, b, c, d$ were negative, then (5) could not be satisfied, so at most three of them are negative. If two or less of them were negative, then (6) would imply that the sum of negative numbers, and hence also the sum $a+b+c+d$, is greater than $2 \cdot(-1)=-2$, which contradicts (4). So exactly three of $a, b, c, d$ are negative and one is nonnegative. Let $d$ be the nonnegative one. Then $d=-2-(a+b+c)<-2-(-1-1-1)=1$. Obviously $|a|,|b|,|c|,|d|<1$. Squaring (4) and subtracting 2 times (5), we get $$ a^{2}+b^{2}+c^{2}+d^{2}=4, $$ but $$ a^{2}+b^{2}+c^{2}+d^{2}=|a|^{2}+|b|^{2}+|c|^{2}+|d|^{2}<4, $$ a contradiction.
{ "problem_match": "\n2.", "resource_path": "BalticWay/segmented/en-bw02sol.jsonl", "solution_match": "\nSolution." }
80
889
2002
T3
3
null
BalticWay
Find all sequences $a_{0} \leqslant a_{1} \leqslant a_{2} \leqslant \ldots$ of real numbers such that $$ a_{m^{2}+n^{2}}=a_{m}^{2}+a_{n}^{2} $$ for all integers $m, n \geqslant 0$. Answer: $a_{n} \equiv 0, a_{n} \equiv \frac{1}{2}$ and $a_{n}=n$.
Denoting $f(n)=a_{n}$ we have $$ f\left(m^{2}+n^{2}\right)=f^{2}(m)+f^{2}(n) . $$ Substituting $m=n=0$ into (7) we get $f(0)=2 f^{2}(0)$, hence either $f(0)=\frac{1}{2}$ or $f(0)=0$. We consider these cases separately. (1) If $f(0)=\frac{1}{2}$ then substituting $m=1$ and $n=0$ into (7) we obtain $f(1)=f^{2}(1)+\frac{1}{4}$, whence $\left(f(1)-\frac{1}{2}\right)^{2}=0$ and $f(1)=\frac{1}{2}$. Now, $$ \begin{aligned} & f(2)=f\left(1^{2}+1^{2}\right)=2 f^{2}(1)=\frac{1}{2}, \\ & f(8)=f\left(2^{2}+2^{2}\right)=2 f^{2}(2)=\frac{1}{2}, \end{aligned} $$ etc, implying that $f\left(2^{i}\right)=\frac{1}{2}$ for arbitrarily large natural $i$ and, due to monotonity, $f(n)=\frac{1}{2}$ for every natural $n$. (2) If $f(0)=0$ then by substituting $m=1, n=0$ into (7) we obtain $f(1)=f^{2}(1)$ and hence, $f(1)=0$ or $f(1)=1$. This gives two subcases. (2a) If $f(0)=0$ and $f(1)=0$ then by the same technique as above we see that $f\left(2^{i}\right)=0$ for arbitrarily large natural $i$ and, due to monotonity, $f(n)=0$ for every natural $n$. (2b) If $f(0)=0$ and $f(1)=1$ then we compute $$ \begin{aligned} & f(2)=f\left(1^{2}+1^{2}\right)=2 f^{2}(1)=2, \\ & f(4)=f\left(2^{2}+0^{2}\right)=f^{2}(2)=4, \\ & f(5)=f\left(2^{2}+1^{2}\right)=f^{2}(2)+f^{2}(1)=5 . \end{aligned} $$ Now, $$ f^{2}(3)+f^{2}(4)=f(25)=f^{2}(5)+f^{2}(0)=25, $$ hence $f^{2}(3)=25-16=9$ and $f(3)=3$. Further, $$ \begin{aligned} f(8) & =f\left(2^{2}+2^{2}\right)=2 f^{2}(2)=8 \\ f(9) & =f\left(3^{2}+0^{2}\right)=f^{2}(3)=9 \\ f(10) & =f\left(3^{2}+1^{2}\right)=f^{2}(3)+f^{2}(1)=10 \end{aligned} $$ From the equalities $$ \begin{aligned} & f^{2}(6)+f^{2}(8)=f^{2}(10)+f^{2}(0), \\ & f^{2}(7)+f^{2}(1)=f^{2}(5)+f^{2}(5) \end{aligned} $$ we also conclude that $f(6)=6$ and $f(7)=7$. It remains to note that $$ \begin{aligned} & (2 k+1)^{2}+(k-2)^{2}=(2 k-1)^{2}+(k+2)^{2}, \\ & (2 k+2)^{2}+(k-4)^{2}=(2 k-2)^{2}+(k+4)^{2} \end{aligned} $$ and by induction it follows that $f(n)=n$ for every natural $n$.
{ "problem_match": "\n3.", "resource_path": "BalticWay/segmented/en-bw02sol.jsonl", "solution_match": "\nSolution." }
121
971
2002
T3
4
null
BalticWay
Let $n$ be a positive integer. Prove that $$ \sum_{i=1}^{n} x_{i}\left(1-x_{i}\right)^{2} \leqslant\left(1-\frac{1}{n}\right)^{2} $$ for all nonnegative real numbers $x_{1}, x_{2}, \ldots, x_{n}$ such that $x_{1}+x_{2}+\cdots+x_{n}=1$.
Expanding the expressions at both sides we obtain the equivalent inequality $$ -\sum_{i} x_{i}^{3}+2 \sum_{i} x_{i}^{2}-\frac{2}{n}+\frac{1}{n^{2}} \geqslant 0 $$ It is easy to check that the left hand side is equal to $$ \sum_{i}\left(2-\frac{2}{n}-x_{i}\right)\left(x_{i}-\frac{1}{n}\right)^{2} $$ and hence is nonnegative. Alternative solution. First note that for $n=1$ the required condition holds trivially, and for $n=2$ we have $$ x(1-x)^{2}+(1-x) x^{2}=x(1-x) \leqslant\left(\frac{x+(1-x)}{2}\right)^{2}=\frac{1}{4}=\left(1-\frac{1}{2}\right)^{2} . $$ So we may further consider the case $n \geqslant 3$. Assume first that for each index $i$ the inequality $x_{i}<\frac{2}{3}$ holds. Let $f(x)=x(1-x)^{2}=x-2 x^{2}+x^{3}$, then $f^{\prime \prime}(x)=6 x-4$. Hence, the function $f$ is concave in the interval $\left[0, \frac{2}{3}\right]$. Thus, from Jensen's inequality we have $$ \begin{aligned} \sum_{i=1}^{n} x_{i}\left(1-x_{i}\right)^{2} & =\sum_{i=1}^{n} f\left(x_{i}\right) \leqslant n \cdot f\left(\frac{x_{1}+\ldots+x_{n}}{n}\right)=n \cdot f\left(\frac{1}{n}\right)= \\ & =n \cdot \frac{1}{n}\left(1-\frac{1}{n}\right)^{2}=\left(1-\frac{1}{n}\right)^{2} . \end{aligned} $$ If some $x_{i} \geqslant \frac{2}{3}$ then we have $$ x_{i}\left(1-x_{i}\right)^{2} \leqslant 1 \cdot\left(1-\frac{2}{3}\right)^{2}=\frac{1}{9} $$ For the rest of the terms we have $$ \sum_{j \neq i} x_{j}\left(1-x_{j}\right)^{2} \leqslant \sum_{j \neq i} x_{j}=1-x_{i} \leqslant \frac{1}{3} $$ Hence, $$ \sum_{i=1}^{n} x_{i}\left(1-x_{i}\right)^{2} \leqslant \frac{1}{9}+\frac{1}{3}=\frac{4}{9} \leqslant\left(1-\frac{1}{n}\right)^{2} $$ as $n \geqslant 3$.
{ "problem_match": "\n4.", "resource_path": "BalticWay/segmented/en-bw02sol.jsonl", "solution_match": "\nSolution." }
108
741
2002
T3
6
null
BalticWay
The following solitaire game is played on an $m \times n$ rectangular board, $m, n \geqslant 2$, divided into unit squares. First, a rook is placed on some square. At each move, the rook can be moved an arbitrary number of squares horizontally or vertically, with the extra condition that each move has to be made in the $90^{\circ}$ clockwise direction compared to the previous one (e.g. after a move to the left, the next one has to be done upwards, the next one to the right etc). For which values of $m$ and $n$ is it possible that the rook visits every square of the board exactly once and returns to the first square? (The rook is considered to visit only those squares it stops on, and not the ones it steps over.) Answer: $m, n \equiv 0 \bmod 2$.
First, consider any row that is not the row where the rook starts from. The rook has to visit all the squares of that row exactly once, and on its tour around the board, every time it visits this row, exactly two squares get visited. Hence, $m$ must be even; a similar argument for the columns shows that $n$ must also be even. It remains to prove that for any even $m$ and $n$ such a tour is possible. We will show it by an inductionlike argument. Labelling the squares with pairs of integers $(i, j)$, where $1 \leqslant i \leqslant m$ and $1 \leqslant j \leqslant n$, we start moving from the square $(m / 2+1,1)$ and first cover all the squares of the top and bottom rows in the order shown in the figure below, except for the squares $(m / 2-1, n)$ and $(m / 2+1, n)$; note that we finish on the square $(m / 2-1,1)$. The next square to visit will be $(m / 2-1, n-1)$ and now we will cover the rows numbered 2 and $n-1$, except for the two middle squares in row 2 . Continuing in this way we can visit all the squares except for the two middle squares in every second row (note that here we need the assumption that $m$ and $n$ are even): | 3 | 7 | | | 8 | 4 | | :---: | :---: | :---: | :---: | :---: | :---: | | 15 | 19 | 11 | 20 | 16 | 12 | | 23 | 27 | | | 28 | 24 | | 35 | 39 | 31 | 40 | 36 | 32 | | 34 | 38 | | | 37 | 33 | | 22 | 26 | 30 | 21 | 29 | 25 | | 14 | 18 | | | 17 | 13 | | 2 | 6 | 10 | 1 | 9 | 5 | The rest of the squares can be visited easily: | 3 | 7 | 47 | 48 | 8 | 4 | | :---: | :---: | :---: | :---: | :---: | :---: | | 15 | 19 | 11 | 20 | 16 | 12 | | 23 | 27 | 43 | 44 | 28 | 24 | | 35 | 39 | 31 | 40 | 36 | 32 | | 34 | 38 | 42 | 41 | 37 | 33 | | 22 | 26 | 30 | 21 | 29 | 25 | | 14 | 18 | 46 | 45 | 17 | 13 | | 2 | 6 | 10 | 1 | 9 | 5 |
{ "problem_match": "\n6.", "resource_path": "BalticWay/segmented/en-bw02sol.jsonl", "solution_match": "\nSolution." }
192
739
2002
T3
7
null
BalticWay
We draw $n$ convex quadrilaterals in the plane. They divide the plane into regions (one of the regions is infinite). Determine the maximal possible number of these regions. Answer: The maximal number of regions is $4 n^{2}-4 n+2$.
One quadrilateral produces two regions. Suppose we have drawn $k$ quadrilaterals $Q_{1}, \ldots, Q_{k}$ and produced $a_{k}$ regions. We draw another quadrilateral $Q_{k+1}$ and try to evaluate the number of regions $a_{k+1}$ now produced. Our task is to make $a_{k+1}$ as large as possible. Note that in a maximal configuration, no vertex of any $Q_{i}$ can be located on the edge of another quadrilateral as otherwise we could move this vertex a little bit to produce an extra region. Because of this fact and the convexity of the $Q_{j}$ 's, any one of the four sides of $Q_{k+1}$ meets at most two sides of any $Q_{j}$. So the sides of $Q_{k+1}$ are divided into at most $2 k+1$ segments, each of which potentially grows the number of regions by one (being part of the common boundary of two parts, one of which is counted in $a_{k}$ ). But if a side of $Q_{k+1}$ intersects the boundary of each $Q_{j}, 1 \leqslant j \leqslant k$ twice, then its endpoints (vertices of $Q_{k+1}$ ) are in the region outside of all the $Q_{j}$-s, and the the segments meeting at such a vertex are on the boundary of a single new part (recall that it makes no sense to put vertices on edges of another quadrilaterals). This means that $a_{k+1}-a_{k} \leqslant 4(2 k+1)-4=8 k$. By considering squares inscribed in a circle one easily sees that the situation where $a_{k+1}-a_{k}=8 k$ can be reached. It remains to determine the expression for the maximal $a_{k}$. Since the difference $a_{k+1}-a_{k}$ is linear in $k, a_{k}$ is a quadratic polynomial in $k$, and $a_{0}=2$. So $a_{k}=A k^{2}+B k+2$. We have $8 k=a_{k+1}-a_{k}=A(2 k+1)+B$ for all $k$. This implies $A=4, B=-4$, and $a_{n}=4 n^{2}-4 n+2$.
{ "problem_match": "\n7.", "resource_path": "BalticWay/segmented/en-bw02sol.jsonl", "solution_match": "\nSolution." }
55
529
2002
T3
8
null
BalticWay
Let $P$ be a set of $n \geqslant 3$ points in the plane, no three of which are on a line. How many possibilities are there to choose a set $T$ of $\left(\begin{array}{c}n-1 \\ 2\end{array}\right)$ triangles, whose vertices are all in $P$, such that each triangle in $T$ has a side that is not a side of any other triangle in $T$ ? Answer: There is one possibility for $n=3$ and $n$ possibilities for $n \geqslant 4$.
For a fixed point $x \in P$, let $T_{x}$ be the set of all triangles with vertices in $P$ which have $x$ as a vertex. Clearly, $\left|T_{x}\right|=\left(\begin{array}{c}n-1 \\ 2\end{array}\right)$, and each triangle in $T_{x}$ has a side which is not a side of any other triangle in $T_{x}$. For any $x, y \in P$ such that $x \neq y$, we have $T_{x} \neq T_{y}$ if and only if $n \geqslant 4$. We will show that any possible set $T$ is equal to $T_{x}$ for some $x \in P$, i.e. that the answer is 1 for $n=3$ and $n$ for $n \geqslant 4$. Let $$ T=\left\{t_{i}: i=1,2, \ldots,\left(\begin{array}{c} n-1 \\ 2 \end{array}\right)\right\}, \quad S=\left\{s_{i}: i=1,2, \ldots,\left(\begin{array}{c} n-1 \\ 2 \end{array}\right)\right\} $$ such that $T$ is a set of triangles whose vertices are all in $P$, and $s_{i}$ is a side of $t_{i}$ but not of any $t_{j}$, $j \neq i$. Furthermore, let $C$ be the collection of all the $\left(\begin{array}{l}n \\ 3\end{array}\right)$ triangles whose vertices are in $P$. Note that $$ |C \backslash T|=\left(\begin{array}{c} n \\ 3 \end{array}\right)-\left(\begin{array}{c} n-1 \\ 2 \end{array}\right)=\left(\begin{array}{c} n-1 \\ 3 \end{array}\right) $$ Let $m$ be the number of pairs $(s, t)$ such that $s \in S$ is a side of $t \in C \backslash T$. Since every $s \in S$ is a side of exactly $n-3$ triangles from $C \backslash T$, we have $$ m=|S| \cdot(n-3)=\left(\begin{array}{c} n-1 \\ 2 \end{array}\right) \cdot(n-3)=3 \cdot\left(\begin{array}{c} n-1 \\ 3 \end{array}\right)=3 \cdot|C \backslash T| $$ On the other hand, every $t \in C \backslash T$ has at most three sides from $S$. By the above equality, for every $t \in C \backslash T$, all its sides must be in $S$. Assume that for $p \in P$ there is a side $s \in S$ such that $p$ is an endpoint of $s$. Then $p$ is also a vertex of each of the $n-3$ triangles in $C \backslash T$ which have $s$ as a side. Consequently, $p$ is an endpoint of $n-2$ sides in $S$. Since every side in $S$ has exactly 2 endpoints, the number of points $p \in P$ which occur as a vertex of some $s \in S$ is $$ \frac{2 \cdot|S|}{n-2}=\frac{2}{n-2} \cdot\left(\begin{array}{c} n-1 \\ 2 \end{array}\right)=n-1 $$ Consequently, there is an $x \in P$ which is not an endpoint of any $s \in S$, and hence $T$ must be equal to $T_{x}$.
{ "problem_match": "\n8.", "resource_path": "BalticWay/segmented/en-bw02sol.jsonl", "solution_match": "\nSolution." }
130
880
2002
T3
9
null
BalticWay
Two magicians show the following trick. The first magician goes out of the room. The second magician takes a deck of 100 cards labelled by numbers $1,2, \ldots, 100$ and asks three spectators to choose in turn one card each. The second magician sees what card each spectator has taken. Then he adds one more card from the rest of the deck. Spectators shuffle these 4 cards, call the first magician and give him these 4 cards. The first magician looks at the 4 cards and "guesses" what card was chosen by the first spectator, what card by the second and what card by the third. Prove that the magicians can perform this trick.
We will identify ourselves with the second magician. Then we need to choose a card in such a manner that another magician will be able to understand which of the 4 cards we have chosen and what information it gives about the order of the other cards. We will reach these two goals independently. Let $a, b, c$ be remainders of the labels of the spectators' three cards modulo 5 . There are three possible cases. 1) All the three remainders coincide. Then choose a card with a remainder not equal to the remainder of spectators' cards. Denote this remainder $d$. Note that we now have 2 different remainders, one of them in 3 copies (this will be used by the first magician to distinguish betwwen the three cases). To determine which of the cards is chosen by us is now a simple exercise in division by 5 . But we must also encode the ordering of the spectators' cards. These cards have a natural ordering by their labels, and they are also ordered by their belonging to the spectators. Thus, we have to encode a permutation of 3 elements. There are 6 permutations of 3 elements, let us enumerate them somehow. Then, if we want to inform the first magician that spectators form a permutation number $k$ with respect to the natural ordering, we choose the card number $5 k+d$. 2) The remainders $a, b, c$ are pairwise different. Then it is clear that exactly one of the following possibilities takes place: $$ \text { either }|b-a|=|a-c| \text {, or }|a-b|=|b-c| \text {, or } \quad|a-c|=|c-b| $$ (the equalities are considered modulo 5). It is not hard to prove it by a case study, but one could also imagine choosing three vertices of a regular pentagon - these vertices always form an isosceles, but not an equilateral triangle. Each of these possibilities has one of the remainders distinguished from the other two remainders (these distinguished remainders are $a, b, c$, respectively). Now, choose a card from the rest of the deck having the distinguished remainder modulo 5. Hence, we have three different remainders, one of them distinguished by (9) and presented in two copies. Let $d$ be the distinguished remainder and $s=5 m+d$ be the spectator's card with this remainder. Now we have to choose a card $r$ with the remainder $d$ such that the first magician would be able to understand which of the cards $s$ and $r$ was chosen by us and what permutation of spectators it implies. This can be done easily: if we want to inform the first magician that spectators form a permutation number $k$ with respect to the natural ordering, we choose the card number $s+5 k(\bmod 100)$. The decoding procedure is easy: if we have two numbers $p$ and $q$ that have the same remainder modulo 5 , calculate $p-q(\bmod 100)$ and $q-p(\bmod 100)$. If $p-q(\bmod 100)>q-p(\bmod 100)$ then $r=q$ is our card and $s=p$ is the spectator's card. (The case $p-q(\bmod 100)=q-p(\bmod 100)$ is impossible since the sum of these numbers is equal to 100 , and one of them is not greater than $6 \cdot 5=30$.) 3) Two remainders (say, $a$ and $b$ ) coincide. Let us choose a card with the remainder $d=(a+c) / 2 \bmod 5$. Then $|a-d|=|d-c| \bmod 5$, so the remainder $d$ is distinguished by (9). Hence we have three different remainders, one of them distinguished by (9) and one of the non-distinguished remainders presented in two copies. The first magician will easily determine our card, and the rule to choose the card in order to enable him also determine the order of spectators is similar to the one in the 1-st case. Alternative solution. This solution gives a non-constructive proof that the trick is possible. For this, we need to show there is an injective mapping from the set of ordered triples to the set of unordered quadruples that additionally respects inclusion. To prove that the desired mapping exists, let's consides a bipartite graph such that the set of ordered triples $T$ and the set of unordered quadruples $Q$ form the two disjoint sets of vertices and there is an edge between a triple and a quadruple if and only if the triple is a subset of the quadruple. For each triple $t \in T$, we can add any of the remaining 97 cards to it, and thus we have 97 different quadruples connected to each triple in the graph. Conversely, for each quadruple $q \in Q$, we can remove any of the 4 cards from it, and reorder the remaining 3 cards in $3 !=6$ different ways, and thus we have 24 different triples connected to each quadruple in the graph. According to the Hall's theorem, a bipartite graph $G=(T, Q, E)$ has a perfect matching if and only if for each subset $T^{\prime} \subseteq T$ the set of neighbours of $T^{\prime}$, denoted $N\left(T^{\prime}\right)$, satisfies $\left|N\left(T^{\prime}\right)\right| \geqslant\left|T^{\prime}\right|$. To prove that this condition holds for our graph, consider any subset $T^{\prime} \subseteq T$. Because we have 97 quadruples for each triple, and there can be at most 24 copies of each of them in the multiset of neighbours, we have $\left|N\left(T^{\prime}\right)\right| \geqslant \frac{97}{24}\left|T^{\prime}\right|>4\left|T^{\prime}\right|$, which is even much more than we need. Thus, the desired mapping is guaranteed to exist. Another solution. Let the three chosen numbers be $\left(x_{1}, x_{2}, x_{3}\right)$. At least one of the sets $\{1,2, \ldots, 24\}$, $\{25,26, \ldots, 48\},\{49,50, \ldots, 72\}$ and $\{73,74, \ldots, 96\}$ should contain none of $x_{1}, x_{2}$ and $x_{3}$, let $S$ be such set. Next we split $S$ into 6 parts: $S=S_{1} \cup S_{2} \cup \ldots \cup S_{6}$ so that 4 first elements of $S$ are in $S_{1}$, four next in $S_{2}$, etc. Now we choose $i \in\{1,2, \ldots, 6\}$ corresponding to the order of numbers $x_{1}, x_{2}$ and $x_{3}$ (if $x_{1}<x_{2}<x_{3}$ then $i=1$, if $x_{1}<x_{3}<x_{2}$ then $i=2, \ldots$,if $x_{3}<x_{2}<x_{1}$ then $i=6$ ). At last let $j$ be the number of elements in $\left\{x_{1}, x_{2}, x_{3}\right\}$ that are greater than elements of $S$ (note that any $x_{k}$, $k \in\{1,2,3\}$, is either greater or smaller than all the elements of $S$ ). Now we choose $x_{4} \in S_{i}$ so that $x_{1}+x_{2}+x_{3}+x_{4} \equiv j \bmod 4$ and add the card number $x_{4}$ to those three cards. Decoding of $\{a, b, c, d\}$ is straightforward. We first put the numbers into increasing order and then calculate $a+b+c+d \bmod 4$ showing the added card. The added card belongs to some $S_{i}(i \in\{1,2, \ldots, 6\})$ for some $S$ and $i$ shows us the initial ordering of cards.
{ "problem_match": "\n9.", "resource_path": "BalticWay/segmented/en-bw02sol.jsonl", "solution_match": "\nSolution." }
148
1,869
2002
T3
16
null
BalticWay
Find all nonnegative integers $m$ such that $$ a_{m}=\left(2^{2 m+1}\right)^{2}+1 $$ is divisible by at most two different primes. Answer: $m=0,1,2$ are the only solutions.
Obviously $m=0,1,2$ are solutions as $a_{0}=5, a_{1}=65=5 \cdot 13$, and $a_{2}=1025=25 \cdot 41$. We show that these are the only solutions. Assume that $m \geqslant 3$ and that $a_{m}$ contains at most two different prime factors. Clearly, $a_{m}=4^{2 m+1}+1$ is divisible by 5 , and $$ a_{m}=\left(2^{2 m+1}+2^{m+1}+1\right) \cdot\left(2^{2 m+1}-2^{m+1}+1\right) \text {. } $$ The two above factors are relatively prime as they are both odd and their difference is a power of 2 . Since both factors are larger than 1 , one of them must be a power of 5 . Hence, $$ 2^{m+1} \cdot\left(2^{m} \pm 1\right)=5^{t}-1=(5-1) \cdot\left(1+5+\cdots+5^{t-1}\right) $$ for some positive integer $t$, where $\pm$ reads as either plus or minus. For odd $t$ the right hand side is not divisible by 8 , contradicting $m \geqslant 3$. Therefore, $t$ must be even and $$ 2^{m+1} \cdot\left(2^{m} \pm 1\right)=\left(5^{t / 2}-1\right) \cdot\left(5^{t / 2}+1\right) . $$ Clearly, $5^{t / 2}+1 \equiv 2(\bmod 4)$. Consequently, $5^{t / 2}-1=2^{m} \cdot k$ for some odd $k$, and $5^{t / 2}+1=2^{m} \cdot k+2$ divides $2\left(2^{m} \pm 1\right)$, i.e. $$ 2^{m-1} \cdot k+1 \mid 2^{m} \pm 1 . $$ This implies $k=1$, finally leading to a contradiction since $$ 2^{m-1}+1<2^{m} \pm 1<2\left(2^{m-1}+1\right) $$ for $m \geqslant 3$.
{ "problem_match": "\n16.", "resource_path": "BalticWay/segmented/en-bw02sol.jsonl", "solution_match": "\nSolution." }
62
567
2002
T3
17
null
BalticWay
Show that the sequence $$ \left(\begin{array}{l} 2002 \\ 2002 \end{array}\right),\left(\begin{array}{c} 2003 \\ 2002 \end{array}\right),\left(\begin{array}{l} 2004 \\ 2002 \end{array}\right), \ldots $$ considered modulo 2002, is periodic.
Define $$ x_{n}^{k}=\left(\begin{array}{l} n \\ k \end{array}\right) $$ and note that $$ x_{n+1}^{k}-x_{n}^{k}=\left(\begin{array}{c} n+1 \\ k \end{array}\right)-\left(\begin{array}{l} n \\ k \end{array}\right)=\left(\begin{array}{c} n \\ k-1 \end{array}\right)=x_{n}^{k-1} $$ Let $m$ be any positive integer. We will prove by induction on $k$ that the sequence $\left\{x_{n}^{k}\right\}_{n=k}^{\infty}$ is periodic modulo $m$. For $k=1$ it is obvious that $x_{n}^{k}=n$ is periodic modulo $m$ with period $m$. Therefore it will suffice to show that the following is true: the sequence $\left\{x_{n}\right\}$ is periodic modulo $m$ if its difference sequence, $d_{n}=x_{n+1}-x_{n}$, is periodic modulo $m$. Furthermore, if $t$ then the period of $\left\{x_{n}\right\}$ is equal to $h t$ where $h$ is the smallest positive integer such that $h\left(x_{t}-x_{0}\right) \equiv 0$ modulo $m$. Indeed, let $t$ be the period of $\left\{d_{n}\right\}$ and $h$ be the smallest positive integer such that $h\left(x_{t}-x_{0}\right) \equiv 0$ modulo $m$. Then $$ \begin{aligned} x_{n+h t} & =x_{0}+\sum_{j=0}^{n+h t-1} d_{j}=x_{0}+\sum_{j=0}^{n-1} d_{j}+h\left(\sum_{j=0}^{t-1} d_{j}\right)= \\ & =x_{n}+h\left(x_{t}-x_{0}\right) \equiv x_{n}(\bmod m) \end{aligned} $$ for all $n$, so the sequence $\left\{x_{n}\right\}$ is in fact periodic modulo $m$ (with a period dividing $h t$ ).
{ "problem_match": "\n17.", "resource_path": "BalticWay/segmented/en-bw02sol.jsonl", "solution_match": "\nSolution." }
103
544
2002
T3
20
null
BalticWay
Does there exist an infinite non-constant arithmetic progression, each term of which is of the form $a^{b}$, where $a$ and $b$ are positive integers with $b \geqslant 2$ ? Answer: no.
For an arithmetic progression $a_{1}, a_{2}, \ldots$ with difference $d$ the following holds: $$ \begin{aligned} S_{n} & =\frac{1}{a_{1}}+\frac{1}{a_{2}}+\ldots+\frac{1}{a_{n+1}}=\frac{1}{a_{1}}+\frac{1}{a_{1}+d}+\ldots+\frac{1}{a_{1}+n d} \geqslant \\ & \geqslant \frac{1}{m}\left(\frac{1}{1}+\frac{1}{2}+\ldots+\frac{1}{n+1}\right), \end{aligned} $$ where $m=\max \left(a_{1}, d\right)$. Therefore $S_{n}$ tends to infinity when $n$ increases. On the other hand, the sum of reciprocals of the powers of a natural number $x \neq 1$ is $$ \frac{1}{x^{2}}+\frac{1}{x^{3}}+\ldots=\frac{\frac{1}{x^{2}}}{1-\frac{1}{x}}=\frac{1}{x(x-1)} $$ Hence, the sum of reciprocals of the terms of the progression required in the problem cannot exceed $$ \frac{1}{1}+\frac{1}{1 \cdot 2}+\frac{1}{2 \cdot 3}+\ldots=1+\left(\frac{1}{1}-\frac{1}{2}+\frac{1}{2}-\frac{1}{3}+\ldots\right)=2 $$ a contradiction. Alternative solution. Let $a_{k}=a_{0}+d k, k=0,1, \ldots$ Choose a prime number $p>d$ and set $k^{\prime} \equiv\left(p-a_{0}\right) d^{-1} \bmod p^{2}$. Then $a_{k^{\prime}}=a_{0}+k^{\prime} d \equiv p \bmod p^{2}$ and hence, $a_{k^{\prime}}$ can not be a power of a natural number. Another solution. There can be at most $\lfloor\sqrt{n}\rfloor$ squares in the set $\{1,2, \ldots, n\}$, at most $\lfloor\sqrt[3]{n}\rfloor$ cubes in the same set, etc. The greatest power that can occur in the set $\{1,2, \ldots, n\}$ is $\left\lfloor\log _{2} n\right\rfloor$ and thus there are no more than $$ \lfloor\sqrt{n}\rfloor+\lfloor\sqrt[3]{n}\rfloor+\ldots+\left\lfloor\left\lfloor\log _{2} \sqrt[n]{n}\right\rfloor\right. $$ powers among the numbers $1,2, \ldots, n$. Now we can estimate this sum above: $$ \begin{aligned} \lfloor\sqrt{n}\rfloor+\lfloor\sqrt[3]{n}\rfloor+\ldots+\left\lfloor\left\lfloor\log _{2} \sqrt[n\rfloor\right]{n}\right\rfloor & \leqslant\lfloor\sqrt{n}\rfloor\left(\left\lfloor\log _{2} n\right\rfloor-1\right)< \\ & <\lfloor\sqrt{n}\rfloor \cdot\left\lfloor\log _{2} n\right\rfloor=o(n) \end{aligned} $$ This means that every arithmetic progression grows faster than the share of powers.
{ "problem_match": "\n20.", "resource_path": "BalticWay/segmented/en-bw02sol.jsonl", "solution_match": "\nSolution." }
52
841
2003
T3
7
null
BalticWay
Let $X$ be a subset of $\{1,2,3, \ldots, 10000\}$ with the following property: If $a, b \in X, a \neq b$, then $a \cdot b \notin X$. What is the maximal number of elements in $X$ ? Answer: 9901.
If $X=\{100,101,102, \ldots, 9999,10000\}$, then for any two selected $a$ and $b, a \neq b$, $a \cdot b \geq 100 \cdot 101>10000$, so $a \cdot b \notin X$. So $X$ may have 9901 elements. Suppose that $x_{1}<x_{2}<\cdots<x_{k}$ are all elements of $X$ that are less than 100. If there are none of them, no more than 9901 numbers can be in the set $X$. Otherwise, if $x_{1}=1$ no other number can be in the set $X$, so suppose $x_{1}>1$ and consider the pairs $$ \begin{gathered} 200-x_{1},\left(200-x_{1}\right) \cdot x_{1} \\ 200-x_{2},\left(200-x_{2}\right) \cdot x_{2} \\ \vdots \\ 200-x_{k},\left(200-x_{k}\right) \cdot x_{k} \end{gathered} $$ Clearly $x_{1}<x_{2}<\cdots<x_{k}<100<200-x_{k}<200-x_{k-1}<\cdots<200-x_{2}<$ $200-x_{1}<200<\left(200-x_{1}\right) \cdot x_{1}<\left(200-x_{2}\right) \cdot x_{2}<\cdots<\left(200-x_{k}\right) \cdot x_{k}$. So all numbers in these pairs are different and greater than 100. So at most one from each pair is in the set $X$. Therefore, there are at least $k$ numbers greater than 100 and $99-k$ numbers less than 100 that are not in the set $X$, together at least 99 numbers out of 10000 not being in the set $X$.
{ "problem_match": "\n7.", "resource_path": "BalticWay/segmented/en-bw03sol.jsonl", "solution_match": "\nSolution:" }
78
503
2003
T3
18
null
BalticWay
Every integer is coloured with exactly one of the colours BLUE, GREEN, RED, YELLOW. Can this be done in such a way that if $a, b, c, d$ are not all 0 and have the same colour, then $3 a-2 b \neq 2 c-3 d$ ? Answer: Yes.
A colouring with the required property can be defined as follows. For a non-zero integer $k$ let $k^{*}$ be the integer uniquely defined by $k=5^{m} \cdot k^{*}$, where $m$ is a nonnegative integer and $5 \nmid k^{*}$. We also define $0^{*}=0$. Two non-zero integers $k_{1}, k_{2}$ receive the same colour if and only if $k_{1}^{*} \equiv k_{2}^{*}(\bmod 5)$; we assign 0 any colour. Assume $a, b, c, d$ has the same colour and that $3 a-2 b=2 c-3 d$, which we rewrite as $3 a-2 b-2 c+3 d=0$. Dividing both sides by the largest power of 5 which simultaneously divides $a, b, c, d$ (this makes sense since not all of $a, b, c, d$ are 0 ), we obtain $$ 3 \cdot 5^{A} \cdot a^{*}-2 \cdot 5^{B} \cdot b^{*}-2 \cdot 5^{C} \cdot c^{*}+3 \cdot 5^{D} \cdot d^{*}=0, $$ where $A, B, C, D$ are nonnegative integers at least one of which is equal to 0 . The above equality implies $$ 3\left(5^{A} \cdot a^{*}+5^{B} \cdot b^{*}+5^{C} \cdot c^{*}+5^{D} \cdot d^{*}\right) \equiv 0 \quad(\bmod 5) . $$ Assume $a, b, c, d$ are all non-zero. Then $a^{*} \equiv b^{*} \equiv c^{*} \equiv d^{*} \not \equiv 0(\bmod 5)$. This implies $$ 5^{A}+5^{B}+5^{C}+5^{D} \equiv 0 \quad(\bmod 5) $$ which is impossible since at least one of the numbers $A, B, C, D$ is equal to 0 . If one or more of $a, b, c, d$ are 0 , we simply omit the corresponding terms from (1), and the same conclusion holds.
{ "problem_match": "\n18.", "resource_path": "BalticWay/segmented/en-bw03sol.jsonl", "solution_match": "\nSolution:" }
70
534
2004
T3
14
null
BalticWay
We say that a pile is a set of four or more nuts. Two persons play the following game. They start with one pile of $n \geq 4$ nuts. During a move a player takes one of the piles that they have and split it into two non-empty subsets (these sets are not necessarily piles, they can contain an arbitrary number of nuts). If the player cannot move, he loses. For which values of $n$ does the first player have a winning strategy? Answer: The first player has a winning strategy when $n \equiv 0,1,2(\bmod 4)$; otherwise the second player has a winning strategy.
Let $n=4 k+r$, where $0 \leq r \leq 3$. We will prove the above answer by induction on $k$; clearly it holds for $k=1$. We are also going to need the following useful fact: If at some point there are exactly two piles with $4 s+1$ and $4 t+1$ nuts, $s+t \leq k$, then the second player to move from that point wins. This holds vacuously when $k=1$. Now assume that we know the answer when the starting pile consists of at most $4 k-1$ nuts, and that the useful fact holds for $s+t \leq k$. We will prove the answer is correct for $4 k, 4 k+1,4 k+2$ and $4 k+3$, and that the useful fact holds for $s+t \leq k+1$. For the sake of bookkeeping, we will refer to the first player as A and the second player as B. If the pile consists of $4 k, 4 k+1$ or $4 k+2$ nuts, A simply makes one pile consisting of $4 k-1$ nuts, and another consisting of 1,2 or 3 nuts, respectively. This makes $A$ the second player in a game starting with $4 k-1 \equiv 3(\bmod 4)$ nuts, so A wins. Now assume the pile contains $4 k+3$ nuts. A can split the pile in two ways: Either as $(4 p+1,4 q+2)$ or $(4 p, 4 q+3)$. In the former case, if either $p$ or $q$ is $0, \mathrm{~B}$ wins by the above paragraph. Otherwise, $\mathrm{B}$ removes one nut from the $4 q+2$ pile, making B the second player in a game where we may apply the useful fact (since $p+q=k$ ), so B wins. If A splits the original pile as $(4 p, 4 q+3)$, B removes one nut from the $4 p$ pile, so the situation is two piles with $4(p-1)+3$ and $4 q+3$ nuts. Then $\mathrm{B}$ can use the winning strategy for the second player just described on each pile seperately, ultimately making B the winner. It remains to prove the useful fact when $s+t=k+1$. Due to symmetry, there are two possibilities for the first move: Assume the first player moves $(4 s+1,4 t+1) \rightarrow$ $(4 s+1,4 p, 4 q+1)$. The second player then splits the middle pile into $(4 p-1,1)$, so the situation is $(4 s+1,4 q+1,4 p-1)$. Since the second player has a winning strategy both when the initial situtation is $(4 s+1,4 q+1)$ and when it is $4 p-1$, he wins (this also holds when $p=1$ ). Now assume the first player makes the move $(4 s+1,4 t+1) \rightarrow(4 s+1,4 p+2,4 q+3)$. If $p=0$, the second player splits the third pile as $4 q+3=(4 q+1)+2$ and wins by the useful fact. If $p>0$, the second player splits the second pile as $4 p+2=(4 p+1)+1$, and wins because he wins in each of the situations $(4 s+1,4 p+1)$ and $4 q+3$.
{ "problem_match": "\n14.", "resource_path": "BalticWay/segmented/en-bw04sol.jsonl", "solution_match": "\nSolution:" }
136
792
2005
T3
1
null
BalticWay
Let $a_{0}$ be a positive integer. Define the sequence $a_{n}, n \geq 0$, as follows: If $$ a_{n}=\sum_{i=0}^{j} c_{i} 10^{i} $$ where $c_{i}$ are integers with $0 \leq c_{i} \leq 9$, then $$ a_{n+1}=c_{0}^{2005}+c_{1}^{2005}+\cdots+c_{j}^{2005} . $$ Is it possible to choose $a_{0}$ so that all the terms in the sequence are distinct? Answer: No, the sequence must contain two equal terms.
It is clear that there exists a smallest positive integer $k$ such that $$ 10^{k}>(k+1) \cdot 9^{2005} . $$ We will show that there exists a positive integer $N$ such that $a_{n}$ consists of less than $k+1$ decimal digits for all $n \geq N$. Let $a_{i}$ be a positive integer which consists of exactly $j+1$ digits, that is, $$ 10^{j} \leq a_{i}<10^{j+1} . $$ We need to prove two statements: - $a_{i+1}$ has less than $k+1$ digits if $j<k$; and - $a_{i}>a_{i+1}$ if $j \geq k$. To prove the first statement, notice that $$ a_{i+1} \leq(j+1) \cdot 9^{2005}<(k+1) \cdot 9^{2005}<10^{k} $$ and hence $a_{i+1}$ consists of less than $k+1$ digits. To prove the second statement, notice that $a_{i}$ consists of $j+1$ digits, none of which exceeds 9 . Hence $a_{i+1} \leq(j+1) \cdot 9^{2005}$ and because $j \geq k$, we get $a_{i} \geq 10^{j}>(j+1) \cdot 9^{2005} \geq a_{i+1}$, which proves the second statement. It is now easy to derive the result from this statement. Assume that $a_{0}$ consists of $k+1$ or more digits (otherwise we are done, because then it follows inductively that all terms of the sequence consist of less than $k+1$ digits, by the first statement). Then the sequence starts with a strictly decreasing segment $a_{0}>a_{1}>a_{2}>\cdots$ by the second statement, so for some index $N$ the number $a_{N}$ has less than $k+1$ digits. Then, by the first statement, each number $a_{n}$ with $n \geq N$ consists of at most $k$ digits. By the Pigeonhole Principle, there are two different indices $n, m \geq N$ such that $a_{n}=a_{m}$.
{ "problem_match": "\n1.", "resource_path": "BalticWay/segmented/en-bw05sol.jsonl", "solution_match": "\nSolution:" }
163
551
2005
T3
6
null
BalticWay
Let $K$ and $N$ be positive integers with $1 \leq K \leq N$. A deck of $N$ different playing cards is shuffled by repeating the operation of reversing the order of the $K$ topmost cards and moving these to the bottom of the deck. Prove that the deck will be back in its initial order after a number of operations not greater than $4 \cdot N^{2} / K^{2}$.
Let $N=q \cdot K+r, 0 \leq r<K$, and let us number the cards $1,2, \ldots, N$, starting from the one at the bottom of the deck. First we find out how the cards $1,2, \ldots K$ are moving in the deck. If $i \leq r$ then the card $i$ is moving along the cycle $$ \begin{aligned} & i \rightarrow K+i \rightarrow 2 K+i \rightarrow \cdots \rightarrow q K+i \rightarrow(r+1-i) \rightarrow \\ & K+(r+1-i) \rightarrow \cdots \rightarrow q K+(r+1-i), \end{aligned} $$ because $N-K<q K+i \leq N$ and $N-K<q K+(r+1-i) \leq N$. The length of this cycle is $2 q+2$. In the special case of $i=r+i-1$, it actually consists of two smaller cycles of length $q+1$. If $r<i \leq K$ then the card $i$ is moving along the cycle $$ \begin{aligned} i \rightarrow K+i \rightarrow 2 K+i \rightarrow & \cdots \rightarrow(q-1) K+i \rightarrow \\ & K+r+1-i \rightarrow K+(K+r+1-i) \rightarrow \\ & 2 K+(K+r+1-i) \rightarrow \cdots \rightarrow(q-1) K+(K+r+1-i), \end{aligned} $$ because $N-K<(q-1) K+i \leq N$ and $N-K<(q-1) K+(K+r+1-i) \leq N$. The length of this cycle is $2 q$. In the special case of $i=K+r+1-i$, it actually consists of two smaller cycles of length $q$. Since these cycles cover all the numbers $1, \ldots, N$, we can say that every card returns to its initial position after either $2 q+2$ or $2 q$ operations. Therefore, all the cards are simultaneously at their initial position after at most $\operatorname{lcm}(2 q+2,2 q)=2 \operatorname{lcm}(q+1, q)=$ $2 q(q+1)$ operations. Finally, $$ 2 q(q+1) \leq(2 q)^{2}=4 q^{2} \leq 4\left(\frac{N}{K}\right)^{2} $$ which concludes the proof.
{ "problem_match": "\n6.", "resource_path": "BalticWay/segmented/en-bw05sol.jsonl", "solution_match": "\nSolution:" }
94
558
2006
T3
18
null
BalticWay
For a positive integer $n$ let $a_{n}$ denote the last digit of $n^{\left(n^{n}\right)}$. Prove that the sequence $\left(a_{n}\right)$ is periodic and determine the length of the minimal period.
Let $b_{n}$ and $c_{n}$ denote the last digit of $n$ and $n^{n}$, respectively. Obviously, if $b_{n}=0,1,5,6$, then $c_{n}=0,1,5,6$ and $a_{n}=0,1,5,6$, respectively. If $b_{n}=9$, then $n^{n} \equiv 1(\bmod 2)$ and consequently $a_{n}=9$. If $b_{n}=4$, then $n^{n} \equiv 0$ $(\bmod 2)$ and consequently $a_{n}=6$. If $b_{n}=2,3,7$, or 8 , then the last digits of $n^{m}$ run through the periods: $2-4-8-6$, $3-9-7-1,7-9-3-1$ or $8-4-2-6$, respectively. If $b_{n}=2$ or $b_{n}=8$, then $n^{n} \equiv 0$ $(\bmod 4)$ and $a_{n}=6$. In the remaining cases $b_{n}=3$ or $b_{n}=7$, if $n \equiv \pm 1(\bmod 4)$, then so is $n^{n}$. If $b_{n}=3$, then $n \equiv 3(\bmod 20)$ or $n \equiv 13(\bmod 20)$ and $n^{n} \equiv 7(\bmod 20)$ or $n^{n} \equiv 13$ $(\bmod 20)$, so $a_{n}=7$ or $a_{n}=3$, respectively. If $b_{n}=7$, then $n \equiv 7(\bmod 20)$ or $n \equiv 17(\bmod 20)$ and $n^{n} \equiv 3(\bmod 20)$ or $n^{n} \equiv 17$ $(\bmod 20)$, so $a_{n}=3$ or $a_{n}=7$, respectively. Finally, we conclude that the sequence $\left(a_{n}\right)$ has the following period of length 20: $$ 1-6-7-6-5-6-3-6-9-0-1-6-3-6-5-6-7-6-9-0 $$
{ "problem_match": "\n18.", "resource_path": "BalticWay/segmented/en-bw06sol.jsonl", "solution_match": "\nSolution:" }
54
554
2006
T3
19
null
BalticWay
Does there exist a sequence $a_{1}, a_{2}, a_{3}, \ldots$ of positive integers such that the sum of every $n$ consecutive elements is divisible by $n^{2}$ for every positive integer $n$ ? Answer: Yes. One such sequence begins 1, 3, 5, 55, 561, 851, 63253, 110055,...
We will show that whenever we have positive integers $a_{1}, \ldots, a_{k}$ such that $n^{2} \mid a_{i+1}+\cdots+a_{i+n}$ for every $n \leq k$ and $i \leq k-n$, then it is possible to choose $a_{k+1}$ such that $n^{2} \mid a_{i+1}+\cdots+a_{i+n}$ for every $n \leq k+1$ and $i \leq k+1-n$. This directly implies the positive answer to the problem because we can start constructing the sequence from any single positive integer. To obtain the necessary property, it is sufficient for $a_{k+1}$ to satisfy $$ a_{k+1} \equiv-\left(a_{k-n+2}+\cdots+a_{k}\right) \quad\left(\bmod n^{2}\right) $$ for every $n \leq k+1$. This is a system of $k+1$ congruences. Note first that, for any prime $p$ and positive integer $l$ such that $p^{l} \leq k+1$, if the congruence with module $p^{2 l}$ is satisfied then also the congruence with module $p^{2(l-1)}$ is satisfied. To see this, group the last $p^{l}$ elements of $a_{1}, \ldots, a_{k+1}$ into $p$ groups of $p^{l-1}$ consecutive elements. By choice of $a_{1}, \ldots, a_{k}$, the sums computed for the first $p-1$ groups are all divisible by $p^{2(l-1)}$. By assumption, the sum of the elements in all $p$ groups is divisible by $p^{2 l}$. Hence the sum of the remaining $p^{l-1}$ elements, that is $a_{k-p^{l-1}+2}+\cdots+a_{k+1}$, is divisible by $p^{2(l-1)}$. Secondly, note that, for any relatively prime positive integers $c, d$ such that $c d \leq k+1$, if the congruences both with module $c^{2}$ and module $d^{2}$ hold then also the congruence with module $(c d)^{2}$ holds. To see this, group the last $c d$ elements of $a_{1}, \ldots, a_{k+1}$ into $d$ groups of $c$ consecutive elements, as well as into $c$ groups of $d$ consecutive elements. Using the choice of $a_{1}, \ldots, a_{k}$ and the assumption together, we get that the sum of the last $c d$ elements of $a_{1}, \ldots, a_{k+1}$ is divisible by both $c^{2}$ and $d^{2}$. Hence this sum is divisible by $(c d)^{2}$. The two observations let us reject all congruences except for the ones with module being the square of a prime power $p^{l}$ such that $p^{l+1}>k+1$. The resulting system has pairwise relatively prime modules and hence possesses a solution by the Chinese Remainder Theorem.
{ "problem_match": "\n19.", "resource_path": "BalticWay/segmented/en-bw06sol.jsonl", "solution_match": "\nSolution:" }
98
725
2008
T3
3
null
BalticWay
Does there exist an angle $\alpha \in(0, \pi / 2)$ such that $\sin \alpha, \cos \alpha, \tan \alpha$ and $\cot \alpha$, taken in some order, are consecutive terms of an arithmetic progression? Answer: No.
Suppose that there is an $x$ such that $0<x<\frac{\pi}{2}$ and $\sin x, \cos x, \tan x, \cot x$ in some order are consecutive terms of an arithmetic progression. Suppose $x \leq \frac{\pi}{4}$. Then $\sin x \leq \sin \frac{\pi}{4}=\cos \frac{\pi}{4} \leq \cos x<1 \leq \cot x$ and $\sin x<\frac{\sin x}{\cos x}=\tan x \leq 1 \leq \cot x$, hence $\sin x$ is the least and $\cot x$ is the greatest among the four terms. Thereby, $\sin x<\cot x$, therefore equalities do not occur. Independently on whether the order of terms is $\sin x<\tan x<\cos x<\cot x$ or $\sin x<\cos x<\tan x<\cot x$, we have $\cos x-\sin x=\cot x-\tan x$. As $$ \cot x-\tan x=\frac{\cos x}{\sin x}-\frac{\sin x}{\cos x}=\frac{\cos ^{2} x-\sin ^{2} x}{\cos x \sin x}=\frac{(\cos x-\sin x)(\cos x+\sin x)}{\cos x \sin x}, $$ we obtain $\cos x-\sin x=\frac{(\cos x-\sin x)(\cos x+\sin x)}{\cos x \sin x}$. As $\cos x>\sin x$, we can reduce by $\cos x-\sin x$ and get $$ 1=\frac{\cos x+\sin x}{\cos x \sin x}=\frac{1}{\sin x}+\frac{1}{\cos x} . $$ But $0<\sin x<1$ and $0<\cos x<1$, hence $\frac{1}{\sin x}$ and $\frac{1}{\cos x}$ are greater than 1 and their sum cannot equal 1 , a contradiction. If $x>\frac{\pi}{4}$ then $0<\frac{\pi}{2}-x<\frac{\pi}{4}$. As the sine, cosine, tangent and cotangent of $\frac{\pi}{2}-x$ are equal to the sine, cosine, tangent and cotangent of $x$ in some order, the contradiction carries over to this case, too.
{ "problem_match": "\nProblem 3.", "resource_path": "BalticWay/segmented/en-bw08sol.jsonl", "solution_match": "\nSolution:" }
58
543
2008
T3
5
null
BalticWay
Suppose that Romeo and Juliet each have a regular tetrahedron to the vertices of which some positive real numbers are assigned. They associate each edge of their tetrahedra with the product of the two numbers assigned to its end points. Then they write on each face of their tetrahedra the sum of the three numbers associated to its three edges. The four numbers written on the faces of Romeo's tetrahedron turn out to coincide with the four numbers written on Juliet's tetrahedron. Does it follow that the four numbers assigned to the vertices of Romeo's tetrahedron are identical to the four numbers assigned to the vertices of Juliet's tetrahedron? Answer: Yes.
Let us prove that this conclusion can in fact be drawn. For this purpose we denote the numbers assigned to the vertices of Romeo's tetrahedron by $r_{1}, r_{2}, r_{3}, r_{4}$ and the numbers assigned to the vertices of Juliette's tetrahedron by $j_{1}, j_{2}, j_{3}, j_{4}$ in such a way that $$ \begin{aligned} & r_{2} r_{3}+r_{3} r_{4}+r_{4} r_{2}=j_{2} j_{3}+j_{3} j_{4}+j_{4} j_{2} \\ & r_{1} r_{3}+r_{3} r_{4}+r_{4} r_{1}=j_{1} j_{3}+j_{3} j_{4}+j_{4} j_{1} \\ & r_{1} r_{2}+r_{2} r_{4}+r_{4} r_{1}=j_{1} j_{2}+j_{2} j_{4}+j_{4} j_{1} \\ & r_{1} r_{2}+r_{2} r_{3}+r_{3} r_{1}=j_{1} j_{2}+j_{2} j_{3}+j_{3} j_{1} \end{aligned} $$ We intend to show that $r_{1}=j_{1}, r_{2}=j_{2}, r_{3}=j_{3}$ and $r_{4}=j_{4}$, which clearly suffices to establish our claim. Now let $$ R=\left\{i \mid r_{i}>j_{i}\right\} $$ denote the set indices where Romeo's corresponding number is larger and define similarly $$ J=\left\{i \mid r_{i}<j_{i}\right\} $$ If we had $|R|>2$, then w.l.o.g. $\{1,2,3\} \subseteq R$, which easily contradicted (4). Therefore $|R| \leq 2$, so let us suppose for the moment that $|R|=2$. Then w.l.o.g. $R=\{1,2\}$, i.e. $r_{1}>j_{1}, r_{2}>j_{2}, r_{3} \leq j_{3}, r_{4} \leq j_{4}$. It follows that $r_{1} r_{2}-r_{3} r_{4}>j_{1} j_{2}-j_{3} j_{4}$, but (1) + (2) - (3) - (4) actually tells us that both sides of this strict inequality are equal. This contradiction yields $|R| \leq 1$ and replacing the roles Romeo and Juliet played in the argument just performed we similarly infer $|J| \leq 1$. For these reasons at least two of the four desired equalities hold, say $r_{1}=1_{1}$ and $r_{2}=j_{2}$. Now using (3) and (4) we easily get $r_{3}=j_{3}$ and $r_{4}=j_{4}$ as well.
{ "problem_match": "\nProblem 5.", "resource_path": "BalticWay/segmented/en-bw08sol.jsonl", "solution_match": "\nSolution:" }
144
725
2008
T3
9
null
BalticWay
Suppose that the positive integers $a$ and $b$ satisfy the equation $$ a^{b}-b^{a}=1008 . $$ Prove that $a$ and $b$ are congruent modulo 1008.
Observe that $1008=2^{4} \cdot 3^{2} \cdot 7$. First we show that $a$ and $b$ cannot both be even. For suppose the largest of them were equal to $2 x$ and the smallest of them equal to $2 y$, where $x \geq y \geq 1$. Then $$ \pm 1008=(2 x)^{2 y}-(2 y)^{2 x} $$ so that $2^{2 y}$ divides 1008 . It follows that $y \leq 2$. If $y=2$, then $\pm 1008=(2 x)^{4}-4^{2 x}$, and $$ \pm 63=x^{4}-4^{2 x-2}=\left(x^{2}+4^{x-1}\right)\left(x^{2}-4^{x-1}\right) \text {. } $$ But $x^{2}-4^{x-1}$ is easily seen never to divide 63; already at $x=4$ it is too large. Suppose that $y=1$. Then $\pm 1008=(2 x)^{2}-2^{2 x}$, and $$ \pm 252=x^{2}-2^{2 x-2}=\left(x+2^{x-1}\right)\left(x-2^{x-1}\right) . $$ This equation has no solutions. Clearly $x$ must be even. $x=2,4,6,8$ do not work, and when $x \geq 10$, then $x+2^{x-1}>252$. We see that $a$ and $b$ cannot both be even, so they must both be odd. They cannot both be divisible by 3 , for then $1008=a^{b}-b^{a}$ would be divisible by 27 ; therefore neither of them is. Likewise, none of them is divisible by 7 . Everything will now follow from repeated use of the following fact, where $\varphi$ denotes Euler's totient function: If $n \mid 1008, a$ and $b$ are relatively prime to both $n$ and $\varphi(n)$, and $a \equiv b \bmod \varphi(n)$, then also $a \equiv b \bmod n$. To prove the fact, use Euler's Totient Theorem: $a^{\varphi(n)} \equiv b^{\varphi(n)} \equiv 1 \bmod n$. From $a \equiv b \equiv d \bmod \varphi(n)$, we get $$ 0 \equiv 1008=a^{b}-b^{a} \equiv a^{d}-b^{d} \bmod n, $$ and since $d$ is invertible modulo $\varphi(n)$, we may deduce that $a \equiv b \bmod n$. Now begin with $a \equiv b \equiv 1 \bmod 2$. From $\varphi(4)=2, \varphi(8)=4$ and $\varphi(16)=8$, we get congruence of $a$ and $b$ modulo 4, 8 and 16 in turn. We established that $a$ and $b$ are not divisible by 3 . Since $\varphi(3)=2$, we get $a \equiv b$ $\bmod 3$, then from $\varphi(9)=6$, deduce $a \equiv b \bmod 9$. Finally, since $a$ and $b$ are not divisible by 7 , and $\varphi(7)=6$, infer $a \equiv b \bmod 7$. Consequently, $a \equiv b \bmod 1008$. We remark that the equation possesses at least one solution, namely $1009^{1}-1^{1009}=1008$. It is unknown whether there exist others.
{ "problem_match": "\nProblem 9.", "resource_path": "BalticWay/segmented/en-bw08sol.jsonl", "solution_match": "\nSolution:" }
54
889
2008
T3
12
null
BalticWay
In a school class with $3 n$ children, any two children make a common present to exactly one other child. Prove that for all odd $n$ it is possible that the following holds: For any three children $A, B$ and $C$ in the class, if $A$ and $B$ make a present to $C$ then $A$ and $C$ make a present to $B$.
Assume there exists a set $\mathscr{S}$ of sets of three children such that any set of two children is a subset of exactly one member of $\mathscr{S}$, and assume that the children $A$ and $B$ make a common present to $C$ if and only if $\{A, B, C\} \in \mathscr{S}$. Then it is true that any two children $A$ and $B$ make a common present to exactly one other child $C$, namely the unique child such that $\{A, B, C\} \in \mathscr{S}$. Because $\{A, B, C\}=\{A, C, B\}$ it is also true that if $A$ and $B$ make a present to $C$ then $A$ and $C$ make a present to $B$. We shall construct such a set $\mathscr{S}$. Let $A_{1}, \ldots, A_{n}, B_{1}, \ldots B_{n}, C_{1}, \ldots, C_{n}$ be the children, and let the following sets belong to $\mathscr{S}$. (1) $\left\{A_{i}, B_{i}, C_{i}\right\}$ for $1 \leq i \leq n$. (2) $\left\{A_{i}, A_{j}, B_{k}\right\},\left\{B_{i}, B_{j}, C_{k}\right\}$ and $\left\{C_{i}, C_{j}, A_{k}\right\}$ for $1 \leq i<j \leq n, 1 \leq k \leq n$ and $i+j \equiv 2 k(\bmod n)$. We note that because $n$ is odd, the congruence $i+j \equiv 2 k(\bmod n)$ has a unique solution with respect to $k$ in the interval $1 \leq k \leq n$. Hence for $1 \leq i<j \leq n$ the set $\left\{A_{i}, A_{j}\right\}$ is a subset of a unique set $\left\{A_{i}, A_{j}, B_{k}\right\} \in \mathscr{S}$, and similarly the sets $\left\{B_{i}, B_{j}\right\}$ and $\left\{C_{i}, C_{j}\right\}$. The relations $i+j \equiv 2 i(\bmod n)$ and $i+j \equiv 2 j(\bmod n)$ both imply $i \equiv j(\bmod n)$, which contradicts $1 \leq i<j \leq n$. Hence for $1 \leq i \leq n$, the set $\left\{A_{i}, B_{i}, C_{i}\right\}$ is the only set in $\mathscr{S}$ of which any of the sets $\left\{A_{i}, B_{i}\right\}\left\{A_{i}, C_{i}\right\}$ and $\left\{B_{i}, C_{i}\right\}$ is a subset. For $i \neq k$, the relations $i+j \equiv 2 k$ $(\bmod n)$ and $1 \leq j \leq n$ determine $j$ uniquely, and we have $i \neq j$ because otherwise $i+j \equiv 2 k(\bmod n)$ implies $i \equiv k(\bmod n)$, which contradicts $i \neq k$. Thus $\left\{A_{i}, B_{k}\right\}$ is a subset of the unique set $\left\{A_{i}, A_{j}, B_{k}\right\} \in \mathscr{S}$. Similarly $\left\{B_{i}, C_{k}\right\}$ and $\left\{A_{i}, C_{k}\right\}$. Altogether, each set of two children is thus a subset of a unique set in $\mathscr{S}$.
{ "problem_match": "\nProblem 12.", "resource_path": "BalticWay/segmented/en-bw08sol.jsonl", "solution_match": "\nSolution:" }
88
896
2010
T3
3
null
BalticWay
Let $x_{1}, x_{2}, \ldots, x_{n}(n \geq 2)$ be real numbers greater than 1 . Suppose that $\left|x_{i}-x_{i+1}\right|<1$ for $i=1,2, \ldots, n-1$. Prove that $$ \frac{x_{1}}{x_{2}}+\frac{x_{2}}{x_{3}}+\ldots+\frac{x_{n-1}}{x_{n}}+\frac{x_{n}}{x_{1}}<2 n-1 $$
The proof is by induction on $n$. We establish first the base case $n=2$. Suppose that $x_{1}>1, x_{2}>1,\left|x_{1}-x_{2}\right|<1$ and moreover $x_{1} \leq x_{2}$. Then $$ \frac{x_{1}}{x_{2}}+\frac{x_{2}}{x_{1}} \leq 1+\frac{x_{2}}{x_{1}}<1+\frac{x_{1}+1}{x_{1}}=2+\frac{1}{x_{1}}<2+1=2 \cdot 2-1 . $$ Now we proceed to the inductive step, and assume that the numbers $x_{1}, x_{2}, \ldots, x_{n}, x_{n+1}>1$ are given such that $\left|x_{i}-x_{i+1}\right|<1$ for $i=1,2, \ldots, n-1, n$. Let $$ S=\frac{x_{1}}{x_{2}}+\frac{x_{2}}{x_{3}}+\ldots+\frac{x_{n-1}}{x_{n}}+\frac{x_{n}}{x_{1}}, \quad S^{\prime}=\frac{x_{1}}{x_{2}}+\frac{x_{2}}{x_{3}}+\ldots+\frac{x_{n-1}}{x_{n}}+\frac{x_{n}}{x_{n+1}}+\frac{x_{n+1}}{x_{1}} $$ The inductive assumption is that $S<2 n-1$ and the goal is that $S^{\prime}<2 n+1$. From the above relations involving $S$ and $S^{\prime}$ we see that it suffices to prove the inequality $$ \frac{x_{n}}{x_{n+1}}+\frac{x_{n+1}-x_{n}}{x_{1}} \leq 2 $$ We consider two cases. If $x_{n} \leq x_{n+1}$, then using the conditions $x_{1}>1$ and $x_{n+1}-x_{n}<1$ we obtain $$ \frac{x_{n}}{x_{n+1}}+\frac{x_{n+1}-x_{n}}{x_{1}} \leq 1+\frac{x_{n+1}-x_{n}}{x_{1}}<1+\frac{1}{x_{1}}<2, $$ and if $x_{n}>x_{n+1}$, then using the conditions $x_{n}<x_{n+1}+1$ and $x_{n+1}>1$ we get $$ \frac{x_{n}}{x_{n+1}}+\frac{x_{n+1}-x_{n}}{x_{1}}<\frac{x_{n}}{x_{n+1}}<\frac{x_{n+1}+1}{x_{n+1}}=1+\frac{1}{x_{n+1}}<1+1=2 . $$ The induction is now complete.
{ "problem_match": "\nProblem 3.", "resource_path": "BalticWay/segmented/en-bw10sol.jsonl", "solution_match": "\nSolution." }
130
705
2010
T3
7
null
BalticWay
There are some cities in a country; one of them is the capital. For any two cities $A$ and $B$ there is a direct flight from $A$ to $B$ and a direct flight from $B$ to $A$, both having the same price. Suppose that all round trips with exactly one landing in every city have the same total cost. Prove that all round trips that miss the capital and with exactly one landing in every remaining city cost the same.
Let $C$ be the capital and $C_{1}, C_{2}, \ldots, C_{n}$ be the remaining cities. Denote by $d(x, y)$ the price of the connection between the cities $x$ and $y$, and let $\sigma$ be the total price of a round trip going exactly once through each city. Now consider a round trip missing the capital and visiting every other city exactly once; let $s$ be the total price of that trip. Suppose $C_{i}$ and $C_{j}$ are two consecutive cities on the route. Replacing the flight $C_{i} \rightarrow C_{j}$ by two flights: from $C_{i}$ to the capital and from the capital to $C_{j}$, we get a round trip through all cities, with total price $\sigma$. It follows that $\sigma=s+d\left(C, C_{i}\right)+d\left(C, C_{j}\right)-$ $d\left(C_{i}, C_{j}\right)$, so it remains to show that the quantity $\alpha(i, j)=d\left(C, C_{i}\right)+d\left(C, C_{j}\right)-d\left(C_{i}, C_{j}\right)$ is the same for all 2-element subsets $\{i, j\} \subset\{1,2, \ldots, n\}$. For this purpose, note that $\alpha(i, j)=\alpha(i, k)$ whenever $i, j, k$ are three distinct indices; indeed, this equality is equivalent to $d\left(C_{j}, C\right)+d\left(C, C_{i}\right)+d\left(C_{i}, C_{k}\right)=d\left(C_{j}, C_{i}\right)+d\left(C_{i}, C\right)+d\left(C, C_{k}\right)$, which is true by considering any trip from $C_{k}$ to $C_{j}$ going through all cities except $C$ and $C_{i}$ exactly once and completing this trip to a round trip in two ways: $C_{j} \rightarrow C \rightarrow C_{i} \rightarrow C_{k}$ and $C_{j} \rightarrow C_{i} \rightarrow C \rightarrow C_{k}$. Therefore the values of $\alpha$ coincide on any pair of 2-element sets sharing a common element. But then clearly $\alpha(i, j)=\alpha\left(i, j^{\prime}\right)=\alpha\left(i^{\prime}, j^{\prime}\right)$ for all indices $i, j, i^{\prime}, j^{\prime}$ with $i \neq j, i^{\prime} \neq j^{\prime}$, and the solution is complete.
{ "problem_match": "\nProblem 7.", "resource_path": "BalticWay/segmented/en-bw10sol.jsonl", "solution_match": "\nSolution." }
98
605
2010
T3
10
null
BalticWay
Let $n$ be an integer with $n \geq 3$. Consider all dissections of a convex $n$-gon into triangles by $n-3$ non-intersecting diagonals, and all colourings of the triangles with black and white so that triangles with a common side are always of a different colour. Find the least possible number of black triangles.
. The answer is $\left\lfloor\frac{n-1}{3}\right\rfloor$. Let $f(n)$ denote the minimum number of black triangles in an $n$-gon. It is clear that $f(3)=0$ and that $f(n)$ is at least 1 for $n=4,5,6$. It is easy to see that for $n=4,5,6$ there is a coloring with only one black triangle, so $f(n)=1$ for $n=4,5,6$. First we prove by induction that $f(n) \leq\left\lfloor\frac{n-1}{3}\right\rfloor$. The case for $n=3,4,5$ has already been established. Given an $(n+3)$-gon, draw a diagonal that splits it into an $n$-gon and a 5 -gon. Color the $n$-gon with at most $\left\lfloor\frac{n-1}{3}\right\rfloor$ black triangles. We can then color the 5 -gon compatibly with only one black triangle so $f(n+3) \leq\left\lfloor\frac{n-1}{3}\right\rfloor+1=\left\lfloor\frac{n+3-1}{3}\right\rfloor$. Now we prove by induction that $f(n) \geq\left\lfloor\frac{n-1}{3}\right\rfloor$. The case for $n=3,4,5$ has already been established. Given an $(n+3)$-gon, we color it with $f(n+3)$ black triangles and pick one of the black triangles. It separates theree polygons from the $(n+3)$-gon, say an $(a+1)$-gon, $(b+1)$-gon and a $(c+1)$-gon such that $n+3=a+b+c$. We write $r_{m}$ for the remainder of the integer $m$ when divided by 3 . Then $$ \begin{aligned} f(n+3) & \geq f(a+1)+f(b+1)+f(c+1)+1 \\ & \geq\left\lfloor\frac{a}{3}\right\rfloor+\left\lfloor\frac{b}{3}\right\rfloor+\left\lfloor\frac{c}{3}\right\rfloor+1 \\ & =\frac{a-r_{a}}{3}+\frac{b-r_{b}}{3}+\frac{c-r_{c}}{3}+1 \\ & =\frac{n+3-1-r_{n}}{3}+\frac{4+r_{n}-\left(r_{a}+r_{b}+r_{c}\right)}{3} \\ & =\left\lfloor\frac{n+3-1}{3}\right\rfloor+\frac{4+r_{n}-\left(r_{a}+r_{b}+r_{c}\right)}{3} . \end{aligned} $$ Since $0 \leq r_{n}, r_{a}, r_{b}, r_{c} \leq 2$, we have that $4+r_{n}-\left(r_{a}+r_{b}+r_{c}\right) \geq 4+0-6=-2$. But since this number is divisible by 3 , it is in fact $\geq 0$. This completes the induction.
{ "problem_match": "\nProblem 10.", "resource_path": "BalticWay/segmented/en-bw10sol.jsonl", "solution_match": "\nSolution 1" }
77
769
2010
T3
10
null
BalticWay
Let $n$ be an integer with $n \geq 3$. Consider all dissections of a convex $n$-gon into triangles by $n-3$ non-intersecting diagonals, and all colourings of the triangles with black and white so that triangles with a common side are always of a different colour. Find the least possible number of black triangles.
. Call two triangles neighbours if they have a common side. Let the dissections of convex $n$-gons together with appropriate colourings be called $n$-colourings. Observe that all triangles of an arbitrary $n$-colouring can be listed, starting with an arbitrary triangle and always continuing the list by a triangle that is a neighbour to some triangle already in the list. Indeed, suppose that some triangle $\Delta$ is missing from the list. Choose a point $A$ inside a triangle in the list, as well as a point $D$ inside $\Delta$. By convexity, the line segment $A D$ is entirely inside the polygon. As the vertices of the triangles are vertices of the polygon, $A D$ crosses the sides of the triangles only outside their vertices. Hence any consecutive triangles that $A D$ passes through are neighbours. The first triangle that ray $A D$ visits and that is not in the list is one that the list can be continued with. Consider such a list of all triangles that starts with a white triangle. Each triangle has at most three neighbours and each black triangle has at least one neighbour occurring in the list before it. Thus at most two neighbours of any black triangle are following it in the list. Each white triangle except for the first one is a neighbour of some triangle preceding it in the list, and according to the construction, that triangle is black. Hence among all triangles except for the first one, there are at most twice as many white triangles as there are black triangles. Altogether, this means $w \leq 2 b+1$ where $b$ and $w$ are the numbers of black and white triangles in the construction, respectively. Observe that this formula holds also if there are no white triangles. Hence there are at most $3 b+1$ triangles altogether, i.e., $n-2 \leq 3 b+1$. In integers, this implies $b \geq\left\lceil\frac{n}{3}\right\rceil-1$ which is equivalent to $b \geq\left\lfloor\frac{n-1}{3}\right\rfloor$. This number of black triangles can be achieved as follows. Number all vertices of the polygon by 0 through $n-1$. If $n=3 k, k \in \mathbb{N}^{+}$, then draw diagonals $(0,3 i-1),(3 i-1,3 i+1),(3 i+1,0)$ for all $i=1, \ldots, k-1$. Colour black every triangle whose vertices are $0,3 i-1$ and $3 i+1$ for some $i=1, \ldots, k-1$. If $n=3 k-1$ or $n=3 k-2$ then take a described $3 k$-colouring and cut out 1 or 2 white triangles, respectively (e.g., triangles with vertices $0,1,2$ and $0, n-1, n-2$ ).
{ "problem_match": "\nProblem 10.", "resource_path": "BalticWay/segmented/en-bw10sol.jsonl", "solution_match": "\nSolution 2" }
77
650
2010
T3
19
null
BalticWay
For which $k$ do there exist $k$ pairwise distinct primes $p_{1}, p_{2}, \ldots, p_{k}$ such that $$ p_{1}^{2}+p_{2}^{2}+\cdots+p_{k}^{2}=2010 ? $$
We show that it is possible only if $k=7$. The 15 smallest prime squares are: $$ 4,9,25,49,121,169,289,361,529,841,961,1369,1681,1849,2209 $$ Since $2209>2010$ we see that $k \leq 14$. Now we note that $p^{2} \equiv 1 \bmod 8$ if $p$ is an odd prime. We also have that $2010 \equiv 2 \bmod 8$. If all the primes are odd, then writing the original equation modulo 8 we get $$ k \cdot 1 \equiv 2 \bmod 8 $$ so either $k=2$ or $k=10$. $k=2:$ As $2010 \equiv 0 \bmod 3$ and $x^{2} \equiv 0$ or $x^{2} \equiv 1 \bmod 3$ we conclude that $p_{1} \equiv p_{2} \equiv 0$ mod 3. But that is impossible. $k=10$ : The sum of first 10 odd prime squares is already greater than $2010(961+841+$ $529+\cdots>2010)$ so this is impossible. Now we consider the case when one of the primes is 2 . Then the original equation modulo 8 takes the form $$ 4+(k-1) \cdot 1 \equiv 2 \quad \bmod 8 $$ so $k \equiv 7 \bmod 8$ and therefore $k=7$. For $k=7$ there are 4 possible solutions: $$ \begin{aligned} 4+9+49+169+289+529+961 & =2010 \\ 4+9+25+121+361+529+961 & =2010 \\ 4+9+25+49+121+841+961 & =2010 \\ 4+9+49+121+169+289+1369 & =2010 \end{aligned} $$ Finding them should not be too hard. We are already asuming that 4 is included. Considerations modulo 3 show that 9 must also be included. The square 1681 together with the 6 smallest prime squares gives a sum already greater than 2010 , so only prime squares up to $37^{2}=1369$ can be considered. If 25 is included, then for the remaining 4 prime squares considerations modulo 10 one can see that 3 out of 4 prime squares from $\{121,361,841,961\}$ have to be used and two of four cases are successful. If 25 is not included, then for the remaining 5 places again from considerations modulo 10 one can see, that 4 of them will be from the set $\{49,169,289,529,1369\}$ and two out of five cases are successful.
{ "problem_match": "\nProblem 19.", "resource_path": "BalticWay/segmented/en-bw10sol.jsonl", "solution_match": "\nSolution." }
67
764
2011
T3
A-1
Algebra
BalticWay
The real numbers $x_{1}, \ldots, x_{2011}$ satisfy $$ x_{1}+x_{2}=2 x_{1}^{\prime}, \quad x_{2}+x_{3}=2 x_{2}^{\prime}, \quad \ldots, \quad x_{2011}+x_{1}=2 x_{2011}^{\prime} $$ where $x_{1}^{\prime}, x_{2}^{\prime}, \ldots, x_{2011}^{\prime}$ is a permutation of $x_{1}, x_{2}, \ldots, x_{2011}$. Prove that $x_{1}=x_{2}=\cdots=x_{2011}$.
For convenience we call $x_{2011}$ also $x_{0}$. Let $k$ be the largest of the numbers $x_{1}, \ldots, x_{2011}$, and consider an equation $x_{n-1}+x_{n}=2 k$, where $1 \leq n \leq 2011$. Hence we get $2 \max \left(x_{n-1}, x_{n}\right) \geq x_{n-1}+x_{n}=2 k$, so either $x_{n-1}$ or $x_{n}$, say $x_{n-1}$, satisfies $x_{n-1} \geq k$. Since also $x_{n-1} \leq k$, we then have $x_{n-1}=k$, and then also $x_{n}=2 k-x_{n-1}=2 k-k=k$. That is, in such an equation both variables on the left equal $k$. Now let $\mathcal{E}$ be the set of such equations, and let $\mathcal{S}$ be the set of subscripts on the left of these equations. From $x_{n}=k \forall n \in \mathcal{S}$ we get $|\mathcal{S}| \leq|\mathcal{E}|$. On the other hand, since the total number of appearances of these subscripts is $2|\mathcal{E}|$ and each subscript appears on the left in no more than two equations, we have $2|\mathcal{E}| \leq 2|\mathcal{S}|$. Thus $2|\mathcal{E}|=2|\mathcal{S}|$, so for each $n \in \mathcal{S}$ the set $\mathcal{E}$ contains both equations with the subscript $n$ on the left. Now assume $1 \in \mathcal{S}$ without loss of generality. Then the equation $x_{1}+x_{2}=2 k$ belongs to $\mathcal{E}$, so $2 \in \mathcal{S}$. Continuing in this way we find that all subscripts belong to $\mathcal{S}$, so $x_{1}=x_{2}=\cdots=x_{2011}=k$.
{ "problem_match": "\n## A-1 DEN\n", "resource_path": "BalticWay/segmented/en-bw11sol.jsonl", "solution_match": "\nSolution 1" }
176
502
2011
T3
G-4
Geometry
BalticWay
The incircle of a triangle $A B C$ touches the sides $B C, C A, A B$ at $D, E, F$, respectively. Let $G$ be a point on the incircle such that $F G$ is a diameter. The lines $E G$ and $F D$ intersect at $H$. Prove that $C H \| A B$.
We work in the opposite direction. Suppose that $H^{\prime}$ is the point where $D F$ intersect the line through $C$ parallel to $A B$. We need to show that $H^{\prime}=H$. For this purpose it suffices to prove that $E, G, H^{\prime}$ are collinear, which reduces to showing that if $G^{\prime} \neq E$ is the common point of $E H^{\prime}$ and the incircle, then $G^{\prime}=G$. Note that $H^{\prime}$ and $B$ lie on the same side of $A C$. Hence $C H^{\prime} \| A B$ gives $\angle A C H^{\prime}=180^{\circ}-\angle B A C$. Also, some homothety with center $D$ maps the segment $B F$ to the segment $C H^{\prime}$. Thus the equality $B D=B F$ implies that $C H^{\prime}=C D=C E$, i.e. the triangle $E C H^{\prime}$ is isosceles and $$ \angle H^{\prime} E C=\frac{1}{2}\left(180^{\circ}-\angle E C H^{\prime}\right)=\frac{1}{2} \angle B A C . $$ But $G^{\prime}$ and $H^{\prime}$ lie on the same side of $A C$, so $\angle G^{\prime} E C=\angle H^{\prime} E C$ and consequently $$ \angle G^{\prime} F E=\angle G^{\prime} E C=\angle H^{\prime} E C=\frac{1}{2} \angle B A C $$ so that $$ \angle G^{\prime} F A=\angle G^{\prime} F E+\angle E F A=\frac{1}{2} \angle B A C+\frac{1}{2}\left(180^{\circ}-\angle F A E\right)=90^{\circ} . $$ Hence $F G^{\prime}$ is a diameter of the incircle and the desired equality $G^{\prime}=G$ follows. Remark. A similar proof also works in the forward direction: one may compute $\angle E H D=$ $\frac{1}{2} \angle A C B$. Hence $H$ lies on the circle centred at $C$ that passes through $D$ and $E$. Consequently the triangle $E H C$ is isosceles, wherefore $$ \angle E C H=180^{\circ}-2 \angle G E C=180^{\circ}-\angle B A C . $$ Thus the lines $A B$ and $C H$ are indeed parallel.
{ "problem_match": "\n## G-4 POL\n", "resource_path": "BalticWay/segmented/en-bw11sol.jsonl", "solution_match": "\nSolution." }
81
620
2012
T3
2
null
BalticWay
Let $a, b, c$ be real numbers. Prove that $$ a b+b c+c a+\max \{|a-b|,|b-c|,|c-a|\} \leq 1+\frac{1}{3}(a+b+c)^{2} . $$
. Assume $a \leq b \leq c$ and take $c=a+x, b=a+y$, where $x \geq y \geq 0$. The inequality $3(a b+b c+c a+c-a-1) \leq(a+b+c)^{2}$ then reduces to $$ x^{2}-x y+y^{2}+3 \geq 3 x \text {. } $$ The latter inequality is equivalent to the inequality $$ \left(\frac{x}{2}-y\right)^{2}+\frac{3}{4} x^{2}-3 x+3 \geq 0 $$ which in turn is equivalent to the inequality $$ \frac{4}{3}\left(\frac{x}{2}-y\right)^{2}+(x-2)^{2} \geq 0 $$ Remark 1. The inequality $x^{2}-3 x-x y+y^{2}+3 \geq 0$ can also be proven by noticing that the discriminant of the LHS, $(y+3)^{2}-4\left(y^{2}+3\right)=-3(y-1)^{2}$, is non-positive. Since the quadratic polynomial in $x$ has positive leading coefficient, its all values are non-negative. Remark 2. Another way to prove the inequality $x^{2}-3 x-x y+y^{2}+3 \geq 0$ is, by AM-GM, the following: $$ \begin{aligned} & 3 x+x y=\sqrt{(\sqrt{2} x)^{2}\left(\frac{3}{\sqrt{2}}+\frac{y}{\sqrt{2}}\right)^{2}} \leq \frac{(\sqrt{2} x)^{2}+\left(\frac{3}{\sqrt{2}}+\frac{y}{\sqrt{2}}\right)^{2}}{2} \\ &= x^{2}+\frac{9}{4}+\frac{3}{2} y+\frac{y^{2}}{4}=3+x^{2}+y^{2}-\frac{3}{4}(y-1)^{2} \leq 3+x^{2}+y^{2} . \end{aligned} $$
{ "problem_match": "# Problem 2", "resource_path": "BalticWay/segmented/en-bw12sol.jsonl", "solution_match": "\nSolution 3" }
63
503