problem:
Amy and Bob play the game. At the beginning, Amy writes down a positive integer on the board. Then the players take moves in turn, Bob moves first. On any move of his, Bob replaces the number $n$ on the blackboard with a number of the form $n-a^{2}$, where $a$ is a positive integer. On any move of hers, Amy replaces the number $n$ on the blackboard with a number of the form $n^{k}$, where $k$ is a positive integer. Bob wins if the number on the board becomes zero. Can Amy prevent Bob's win?

Russia, Maxim Didin

solution:
The answer is in the negative. For a positive integer $n$, we define its square-free part $S(n)$ to be the smallest positive integer $a$ such that $n / a$ is a square of an integer. In other words, $S(n)$ is the product of all primes having odd exponents in the prime expansion of $n$. We also agree that $S(0)=0$.

Now we show that (i) on any move of hers, Amy does not increase the square-free part of the positive integer on the board; and (ii) on any move of his, Bob always can replace a positive integer $n$ with a non-negative integer $k$ with $S(k)<S(n)$. Thus, if the game starts by a positive integer $N$, Bob can win in at most $S(N)$ moves.

Part (i) is trivial, as the definition of the square-part yields $S\left(n^{k}\right)=S(n)$ whenever $k$ is odd, and $S\left(n^{k}\right)=1 \leq S(n)$ whenever $k$ is even, for any positive integer $n$.

Part (ii) is also easy: if, before Bob's move, the board contains a number $n=S(n) \cdot b^{2}$, then Bob may replace it with $n^{\prime}=n-b^{2}=(S(n)-1) b^{2}$, whence $S\left(n^{\prime}\right) \leq S(n)-1$.

Remarks. (1) To make the argument more transparent, Bob may restrict himself to subtract only those numbers which are divisible by the maximal square dividing the current number. This restriction having been put, one may replace any number $n$ appearing on the board by $S(n)$, omitting the square factors.

After this change, Amy's moves do not increase the number, while Bob's moves decrease it. Thus, Bob wins.
(2) In fact, Bob may win even in at most 4 moves of his. For that purpose, use Lagrange's four squares theorem in order to expand $S(n)$ as the sum of at most four squares of positive integers: $S(n)=a_{1}^{2}+\cdots+a_{s}^{2}$. Then, on every move of his, Bob can replace the number $\left(a_{1}^{2}+\cdots+a_{k}^{2}\right) b^{2}$ on the board by $\left(a_{1}^{2}+\cdots+a_{k-1}^{2}\right) b^{2}$. The only chance for Amy to interrupt this process is to replace a current number by its even power; but in this case Bob wins immediately.

On the other hand, four is indeed the minimum number of moves in which Bob can guarantee himself to win. To show that, let Amy choose the number 7, and take just the first power on each of her subsequent moves.

problem_match: Problem 1.

solution_match: Solution.


problem:
Let $A B C D$ be an isosceles trapezoid with $A B \| C D$. Let $E$ be the midpoint of $A C$. Denote by $\omega$ and $\Omega$ the circumcircles of the triangles $A B E$ and $C D E$, respectively. Let $P$ be the crossing poitn of the tangent to $\omega$ at $A$ with the tangent to $\Omega$ at $D$. Prove that $P E$ is tangent to $\Omega$.

Slovenia, Jakob Jurij Snou

solution:
. If $A B C D$ is a rectangle, the statement is trivial due to symmetry. Hence, in what follows we assume $A D \nVdash B C$.

Let $F$ be the midpoint of $B D$; by symmetry, both $\omega$ and $\Omega$ pass through $F$. Let $P^{\prime}$ be the meeting point of tangents to $\omega$ at $F$ and to $\Omega$ at $E$. We aim to show that $P^{\prime}=P$, which yields the required result. For that purpose, we show that $P^{\prime} A$ and $P^{\prime} D$ are tangent to $\omega$ and $\Omega$, respectively.

Let $K$ be the midpoint of $A F$. Then $E K$ is a midline in the triangle $A C F$, so $\angle(A E, E K)=$ $\angle(E C, C F)$. Since $P^{\prime} E$ is tangent to $\Omega$, we get $\angle(E C, C F)=\angle\left(P^{\prime} E, E F\right)$. Thus, $\angle(A E, E K)=$ $\angle\left(P^{\prime} E, E F\right)$, so $E P^{\prime}$ is a symmedian in the triangle $A E F$. Therefore, $E P^{\prime}$ and the tangents to $\omega$ at $A$ and $F$ are concurrent, and the concurrency point is $P^{\prime}$ itself. Hence $P^{\prime} A$ is tangent to $\omega$.

The second claim is similar. Taking $L$ to be the midpoint of $D E$, we have $\angle(D F, F L)=$ $\angle(F B, B E)=\angle\left(P^{\prime} F, F E\right)$, so $P^{\prime} F$ is a symmedian in the triangle $D E F$, and hence $P^{\prime}$ is the meeting point of the tangents to $\Omega$ at $D$ and $E$.
![](https://cdn.mathpix.com/cropped/2024_11_22_1c210568c2e1d2cf3e6fg-2.jpg?height=684&width=678&top_left_y=1120&top_left_x=666)

Remark. The above arguments may come in different orders. E.g., one may define $P^{\prime}$ to be the point of intersection of the tangents to $\Omega$ at $D$ and $E$ - hence obtaining that $P^{\prime} F$ is a symmedian in $\triangle D E F$, then deduce that $P^{\prime} F$ is tangent to $\omega$, and then apply a similar argument to show that $P^{\prime} E$ is a symmedian in $\triangle A E F$, whence $P^{\prime} A$ is tangent to $\omega$.

problem_match: Problem 2.

solution_match: Solution 1


solution:
. Let $Q$ be the isogonal conjugate of $P$ with respect to $\triangle A E D$, so $\angle(Q A, A D)=$ $\angle(E A, A P)=\angle(E B, B A)$ and $\angle(Q D, D A)=\angle(E D, D P)=\angle(E C, C D)$. Now our aim is to prove that $Q E \| C D$; this will yield that $\angle(E C, C D)=\angle(A E, E Q)=\angle(P E, E D)$, whence $P E$ is tangent to $\Omega$.

Let $D Q$ meet $A B$ at $X$. Then we have $\angle(X D, D A)=\angle(E C, C D)=\angle(E A, A B)$ and $\angle(D A, A X)=\angle(A B, B C)$, hence the triangles $D A X$ and $A B C$ are similar. Since $\angle(A B, B E)=$ $\angle(D A, A Q)$, the points $Q$ and $E$ correspond to each other in these triangles, hence $Q$ is the midpoint of $D X$. This yields that the points $Q$ and $E$ lie on the midline of the trapezoid parallel to $C D$, as desired.
![](https://cdn.mathpix.com/cropped/2024_11_22_1c210568c2e1d2cf3e6fg-3.jpg?height=407&width=825&top_left_y=148&top_left_x=590)

Remark. The last step could be replaced with another application of isogonal conjugacy in the following manner. Reflect $Q$ in the common perpendicular bisector of $A B$ and $C D$ to obtain a point $R$ such that $\angle(C B, B R)=\angle(Q A, A D)=\angle(E B, B A)$ and $\angle(B C, C R)=\angle(Q D, D A)=$ $\angle(E C, C D)$. These relations yield that the points $E$ and $R$ are isogonally conjugate in a triangle $B C I$, where $I$ is the (ideal) point of intersection of $B A$ with $C D$. Since $E$ is equidistant from $A B$ and $C D, R$ is also equidistant from them, which yields what we need. (The last step deserves some explanation, since one vertex of the triangle is ideal. Such explanation may be obtained in many different ways - e.g., by a short computation in sines, or by noticing that, as in the usual case, $R$ is the circumcenter of the triangle formed by the reflections of $E$ in the sidelines $A B$, $B C$, and $C D$.)

solution_match: Solution 2


solution:
. (Dan Carmon) Let $O$ be the intersection of the diagonals $A C$ and $B D$. Let $F$ be the midpoint of $B D$. Let $S$ be the second intersection point of the circumcircles of triangles $A O F$ and $D O E$. We will prove that $S D$ and $S E$ are tangent to $\Omega$; the symmetric argument would then imply also that $S A$ and $S F$ are tangent to $\Gamma$. Thus $S=P$ and the claimed tangency holds.

We first prove that $O S$ is parallel to $A B$ and $D C$. Compute the powers of the points $A, B$ with respect to the circumcircles of $A O F$ and $D O E$ :

$$
\begin{gathered}
d(A, A O F)=0, \quad d(A, D O E)=A O \cdot A E \\
d(B, A O F)=B O \cdot B F, \quad d(B, D O E)=B O \cdot B D=2 B O \cdot B F
\end{gathered}
$$

And therefore

$$
d(B, D O E)-d(B, A O F)=B O \cdot B F=A O \cdot A E=d(A, D O E)-d(A, A O F)
$$

Thus both $A$ and $B$ belong to a locus of the form

$$
d(X, D O E)-d(X, A O F)=\mathrm{const}
$$

which is always a lines parallel to the radical axis of the respective circles. Since this radical axis is $O S$ by definition, it follows that $A B$ is parallel to $O S$, as claimed.

Now by angle chasing in the cyclic quadrilateral $D S O E$, we find

$$
\begin{gathered}
\angle(S D, D E)=\angle(S O, O E)=\angle(D C, C E), \\
\angle(S E, E D)=\angle(S O, O D)=\angle(D C, D B)=\angle(A C, C D)=\angle(E C, C D),
\end{gathered}
$$

and these angle equalities are exactly the conditions of $S D, S E$ being tanget to $\Omega$, as claimed.
Remarks. (1) The solution was motivated by the following observation: Suppose $P$ is the intersection of the tangents to $\Omega$ at $D$ and $E$ as claimed. Then by single angle chasing we observe that the isogonal conjugate of $P$ in the triangle $D O E$ is the common ideal point at infinity of $D C$ and $E F$. This implies that $P$ is on the circumcircle of $D O E$ and that $O P$ is parallel to $D C$ (to be precise, it implies that the reflection of $O P$ in the angle bisector of $D O E$ is parallel to $D C$ and $E F$ - but the angle bisector is also parallel to these lines, so in fact $O P$ is the angle bisector). By symmetry it follows that $P$ is also on the circumcircle of $A O F$, thus the construction.
(2) The key parts of the proof can be described as (1) Constructing $S$, (2) Proving that $O S$ is parallel to $A B$ and $C D$, and (3) Concluding that $S=P$ and finishing the problem. Parts (2) and (3) can be performed in various other ways. For example, part (2) can be proved by showing that the circumcentres of $A O F$ and $D O E$ lie on a line perpendicular to the trapezium's bases; part (3) can be proved considering the spiral map taking the circumcircle of $D O C$ to the circumcircle of $D S E$. Since $O$ is the second intersction point of these circles, and since $O C E$ are collinear and $S O$ is tangent to the circumcircle of $D O C$ at $O$ (by symmetry), it follows that the spiral map sends $C$ to $E$ and $O$ to $S$, i.e. the triangle $D S E$ is similar to the isoceles triangle $D O C$, from which the remainder of the angle chase is trivial.

solution_match: Solution 3


problem:
Given any positive real number $\varepsilon$, prove that, for all but finitely many positive integers $v$, any graph on $v$ vertices with at least $(1+\varepsilon) v$ edges has two distinct simple cycles of equal lengths.
(Recall that the notion of a simple cycle does not allow repetition of vertices in a cycle.)

Russia, Fedor Petrov

solution:
Fix a positive real number $\varepsilon$, and let $G$ be a graph on $v$ vertices with at least $(1+\varepsilon) v$ edges, all of whose simple cycles have pairwise distinct lengths.

Assuming $\varepsilon^{2} v \geq 1$, we exhibit an upper bound linear in $v$ and a lower bound quadratic in $v$ for the total number of simple cycles in $G$, showing thereby that $v$ cannot be arbitrarily large, whence the conclusion.

Since a simple cycle in $G$ has at most $v$ vertices, and each length class contains at most one such, $G$ has at most $v$ pairwise distinct simple cycles. This establishes the desired upper bound.

For the lower bound, consider a spanning tree for each component of $G$, and collect them all together to form a spanning forest $F$. Let $A$ be the set of edges of $F$, and let $B$ be the set of all other edges of $G$. Clearly, $|A| \leq v-1$, so $|B| \geq(1+\varepsilon) v-|A| \geq(1+\varepsilon) v-(v-1)=\varepsilon v+1>\varepsilon v$.

For each edge $b$ in $B$, adjoining $b$ to $F$ produces a unique simple cycle $C_{b}$ through $b$. Let $S_{b}$ be the set of edges in $A$ along $C_{b}$. Since the $C_{b}$ have pairwise distinct lengths, $\sum_{b \in B}\left|S_{b}\right| \geq$ $2+\cdots+(|B|+1)=|B|(|B|+3) / 2>|B|^{2} / 2>\varepsilon^{2} v^{2} / 2$.

Consequently, some edge in $A$ lies in more than $\varepsilon^{2} v^{2} /(2 v)=\varepsilon^{2} v / 2$ of the $S_{b}$. Fix such an edge $a$ in $A$, and let $B^{\prime}$ be the set of all edges $b$ in $B$ whose corresponding $S_{b}$ contain $a$, so $\left|B^{\prime}\right|>\varepsilon^{2} v / 2$.

For each 2-edge subset $\left\{b_{1}, b_{2}\right\}$ of $B^{\prime}$, the union $C_{b_{1}} \cup C_{b_{2}}$ of the cycles $C_{b_{1}}$ and $C_{b_{2}}$ forms a $\theta$-graph, since their common part is a path in $F$ through $a$; and since neither of the $b_{i}$ lies along this path, $C_{b_{1}} \cup C_{b_{2}}$ contains a third simple cycle $C_{b_{1}, b_{2}}$ through both $b_{1}$ and $b_{2}$. Finally, since $B^{\prime} \cap C_{b_{1}, b_{2}}=\left\{b_{1}, b_{2}\right\}$, the assignment $\left\{b_{1}, b_{2}\right\} \mapsto C_{b_{1}, b_{2}}$ is injective, so the total number of simple cycles in $G$ is at least $\binom{\left|B^{\prime}\right|}{2}>\binom{\varepsilon^{2} v / 2}{2}$. This establishes the desired lower bound and concludes the proof.

Remarks. (1) The problem of finding two cycles of equal lengths in a graph on $v$ vertices with $2 v$ edges is known and much easier - simply consider all cycles of the form $C_{b}$.

The solution above shows that a graph on $v$ vertices with at least $v+\Theta\left(v^{3 / 4}\right)$ edges has two cycles of equal lengths. The constant $3 / 4$ is not sharp; a harder proof seems to show that $v+\Theta(\sqrt{v \log v})$ edges would suffice. On the other hand, there exist graphs on $v$ vertices with $v+\Theta(\sqrt{v})$ edges having no such cycles.
(2) To avoid graph terminology, the statement of the problem may be rephrased as follows:

Given any positive real number $\varepsilon$, prove that, for all but finitely many positive integers $v$, any $v$-member company, within which there are at least $(1+\varepsilon) v$ friendship relations, satisfies the following condition: For some integer $u \geq 3$, there exist two distinct $u$ member cyclic arrangements in each of which any two neighbours are friends. (Two arrangements are distinct if they are not obtained from one another through rotation and/or symmetry; a member of the company may be included in neither arrangement, in one of them or in both.)

Sketch of solution 2. (Po-Shen Loh) Recall that the girth of a graph $G$ is the minimal length of a (simple) cycle in this graph.

Lemma. For any fixed positive $\delta$, a graph on $v$ vertices whose girth is at least $\delta v$ has at most $v+o(v)$ edges.
Proof. Define $f(v)$ to be the maximal number $f$ such that a graph on $v$ vertices whose girth is at least $\delta v$ may have $v+f$ edges. We are interested in the recursive estimates for $f$.

Let $G$ be a graph on $v$ vertices whose gifth is at least $\delta v$ containing $v+f(v)$ edges. If $G$ contains a leaf (i.e., a vertex of degree 1 ), then one may remove this vertex along with its edge, obtaining a graph with at most $v-1+f(v-1)$ edges. Thus, in this case $f(v) \leq f(v-1)$.

Define an isolated path of length $k$ to be a sequence of vertices $v_{0}, v_{1}, \ldots, v_{k}$, such that $v_{i}$ is connected to $v_{i+1}$, and each of the vertices $v_{1}, \ldots, v_{k-1}$ has degree 2 (so, these vertices are connected only to their neighbors in the path). If $G$ contains an isolated path $v_{0}, \ldots, v_{k}$ of length, say, $k>\sqrt{v}$, then one may remove all its middle vertices $v_{1}, \ldots, v_{k-1}$, along with all their $k$ edges. We obtain a graph on $v-k+1$ vertices with at most $(v-k+1)+f(v-k+1)$ edges. Thus, in this case $f(v) \leq f(v-k+1)+1$.

Assume now that the lengths of all isolated paths do not exceed $\sqrt{v}$; we show that in this case $v$ is bounded from above. For that purpose, we replace each maximal isolated path by an edge between its endpoints, removing all middle vertices. We obtain a graph $H$ whose girth is at least $\delta v / \sqrt{v}=\delta \sqrt{v}$. Each vertex of $H$ has degree at least 3. By the girth condition, the neighborhood of any vertex $x$ of radius $r=\lfloor(\delta \sqrt{v}-1) / 2\rfloor$ is a tree rooted at $x$. Any vertex at level $i<r$ has at least two sons; so the tree contains at least $2^{\lfloor(\delta \sqrt{v}-1) / 2\rfloor}$ vertices (even at the last level). So, $v \geq 2^{\lfloor(\delta \sqrt{v}-1) / 2\rfloor}$ which may happen only for a finite number of values of $v$.

Thus, for all large enough values of $v$, we have either $f(v) \leq f(v-1)$ or $f(v) \leq f(v-k+1)$ for some $k>\sqrt{v}$. This easily yields $f(v)=o(v)$, as desired.

Now we proceed to the problem. Consider a graph on $v$ vertices containing no two simple cycles of the same length. Take its $\lfloor\varepsilon v / 2\rfloor$ shortest cycles (or all its cycles, if their total number is smaller) and remove an edge from each. We get a graph of girth at least $\varepsilon v / 2$. By the lemma, the number of edges in the obtained graph is at most $v+o(v)$, so the number of edges in the initial graph is at most $v+\varepsilon v / 2+o(v)$, which is smaller than $(1+\varepsilon) v$ if $v$ is large enough.

problem_match: Problem 3.