Let $n$ be an integer, and let $A$ be a subset of $\left\{0,1,2,3, \ldots, 5^{n}\right\}$ consisting of $4 n+2$ numbers. Prove that there exist $a, b, c \in A$ such that $a<b<c$ and $c+2 a>3 b$.

Solution: (By contradiction) Suppose that there exist $4 n+2$ non-negative integers $x_{0}<$ $x_{1}<\cdots<x_{4 n+1}$ that violate the problem statement. Then in particular $x_{4 n+1}+2 x_{i} \leqslant 3 x_{i+1}$ for all $i=0, \ldots, 4 n-1$, which gives  $$ x_{4 n+1}-x_{i} \geqslant \frac{3}{2}\left(x_{4 n+1}-x_{i+1}\right) . $$  By a trivial induction we then get  $$ x_{4 n+1}-x_{i} \geqslant\left(\frac{3}{2}\right)^{4 n-i}\left(x_{4 n+1}-x_{4 n}\right) \text {, } $$  which for $i=0$ yields the contradiction  $$ x_{4 n+1}-x_{0} \geqslant\left(\frac{3}{2}\right)^{4 n}\left(x_{4 n+1}-x_{4 n}\right)=\left(\frac{81}{16}\right)^{n}\left(x_{4 n+1}-x_{4 n}\right)>5^{n} \cdot 1 $$


Solution: Denote the maximum element of $A$ by $c$. For $k=0, \ldots, 4 n-1$ let  $$ A_{k}=\left\{x \in A:\left(1-(2 / 3)^{k}\right) c \leqslant x<\left(1-(2 / 3)^{k+1}\right) c\right\} $$  Note that  $$ \left(1-(2 / 3)^{4 n}\right) c=c-(16 / 81)^{n} c>c-(1 / 5)^{n} c \geqslant c-1 $$  which shows that the sets $A_{0}, A_{1}, \ldots, A_{4 n-1}$ form a partition of $A \backslash\{c\}$. Since $A \backslash\{c\}$ has $4 n+1$ elements, by the pigeonhole principle some set $A_{k}$ does contain at least two elements of $A \backslash\{c\}$. Denote these two elements $a$ and $b$ and assume $a<b$, so that $a<b<c$. Then  $$ c+2 a \geqslant c+2\left(1-(2 / 3)^{k}\right) c=\left(3-2(2 / 3)^{k}\right) c=3\left(1-(2 / 3)^{k+1}\right) c>3 b $$  as desired.


For every integer $n \geqslant 1$ consider the $n \times n$ table with entry $\left\lfloor\frac{i j}{n+1}\right\rfloor$ at the intersection of row $i$ and column $j$, for every $i=1, \ldots, n$ and $j=1, \ldots, n$. Determine all integers $n \geqslant 1$ for which the sum of the $n^{2}$ entries in the table is equal to $\frac{1}{4} n^{2}(n-1)$.

Solution: First, observe that every pair $x, y$ of real numbers for which the sum $x+y$ is integer satisfies  $$ \lfloor x\rfloor+\lfloor y\rfloor \geqslant x+y-1 $$  The inequality is strict if $x$ and $y$ are integers, and it holds with equality otherwise. We estimate the sum $S$ as follows.  $$ \begin{aligned} 2 S=\sum_{1 \leqslant i, j \leqslant n}\left(\left\lfloor\frac{i j}{n+1}\right\rfloor+\left\lfloor\frac{i j}{n+1}\right\rfloor\right)= & \sum_{1 \leqslant i, j \leqslant n}\left(\left\lfloor\frac{i j}{n+1}\right\rfloor+\left\lfloor\frac{(n+1-i) j}{n+1}\right\rfloor\right) \\ & \geqslant \sum_{1 \leqslant i, j \leqslant n}(j-1)=\frac{(n-1) n^{2}}{2} . \end{aligned} $$  The inequality in the last line follows from (1) by setting $x=i j /(n+1)$ and $y=(n+1-$ i) $j /(n+1)$, so that $x+y=j$ is integral.  Now $S=\frac{1}{4} n^{2}(n-1)$ if and only if the inequality in the last line holds with equality, which means that none of the values $i j /(n+1)$ with $1 \leqslant i, j \leqslant n$ may be integral.  Hence, if $n+1$ is composite with factorisation $n+1=a b$ for $2 \leqslant a, b \leqslant n$, one gets a strict inequality for $i=a$ and $j=b$. If $n+1$ is a prime, then $i j /(n+1)$ is never integral and $S=\frac{1}{4} n^{2}(n-1)$.


Solution: To simplify the calculation with indices, extend the table by adding a phantom column of index 0 with zero entries (which will not change the sum of the table). Fix a row $i$ with $1 \leqslant i \leqslant n$, and let $d:=\operatorname{gcd}(i, n+1)$ and $k:=(n+1) / d$. For columns $j=0, \ldots, n$, define the remainder $r_{j}:=i j \bmod (n+1)$. We first prove the following Claim. For every integer $g$ with $1 \leqslant g \leqslant d$, the remainders $r_{j}$ with indices $j$ in the range  $$ (g-1) k \leqslant j \leqslant g k-1 $$  form a permutation of the $k$ numbers $0 \cdot d, 1 \cdot d, 2 \cdot d, \ldots,(k-1) \cdot d$. Proof. If $r_{j^{\prime}}=r_{j}$ holds for two indices $j^{\prime}$ and $j$ in (2), then $i\left(j^{\prime}-j\right) \equiv 0 \bmod (n+1)$, so that $j^{\prime}-j$ is a multiple of $k$; since $\left|j^{\prime}-j\right| \leqslant k-1$, this implies $j^{\prime}=j$. Hence, the $k$ remainders are pairwise distinct. Moreover, each remainder $r_{j}=i j \bmod (n+1)$ is a multiple of $d=\operatorname{gcd}(i, n+1)$. This proves the claim.  We then have  $$ \sum_{j=0}^{n} r_{j}=\sum_{g=1}^{d} \sum_{\ell=0}^{(n+1) / d-1} \ell d=d^{2} \cdot \frac{1}{2}\left(\frac{n+1}{d}-1\right) \frac{n+1}{d}=\frac{(n+1-d)(n+1)}{2} $$  By using (3), compute the sum $S_{i}$ of row $i$ as follows:  $$ \begin{aligned} S_{i}=\sum_{j=0}^{n}\left\lfloor\frac{i j}{n+1}\right\rfloor= & \sum_{j=0}^{n} \frac{i j-r_{j}}{n+1}=\frac{i}{n+1} \sum_{j=0}^{n} j-\frac{1}{n+1} \sum_{j=0}^{n} r_{j} \\ & =\frac{i}{n+1} \cdot \frac{n(n+1)}{2}-\frac{1}{n+1} \cdot \frac{(n+1-d)(n+1)}{2}=\frac{(i n-n-1+d)}{2} . \end{aligned} $$  Equation (4) yields the following lower bound on the row sum $S_{i}$, which holds with equality if and only if $d=\operatorname{gcd}(i, n+1)=1$ :  $$ S_{i} \geqslant \frac{(i n-n-1+1)}{2}=\frac{n(i-1)}{2} $$  By summing up the bounds (5) for the rows $i=1, \ldots, n$, we get the following lower bound for the sum of all entries in the table  $$ \sum_{i=1}^{n} S_{i} \geqslant \sum_{i=1}^{n} \frac{n}{2}(i-1)=\frac{n^{2}(n-1)}{4} $$  In (6) we have equality if and only if equality holds in (5) for each $i=1, \ldots, n$, which happens if and only if $\operatorname{gcd}(i, n+1)=1$ for each $i=1, \ldots, n$, which is equivalent to the fact that $n+1$ is a prime. Thus the sum of the table entries is $\frac{1}{4} n^{2}(n-1)$ if and only if $n+1$ is a prime.  Comment. To simplify the answer, in the problem statement one can make a change of variables by introducing $m:=n+1$ and writing everything in terms of $m$. The drawback is that the expression for the sum will then be $\frac{1}{4}(m-1)^{2}(m-2)$ which seems more artificial.


Given a positive integer $n$, find the smallest value of $\left\lfloor\frac{a_{1}}{1}\right\rfloor+\left\lfloor\frac{a_{2}}{2}\right\rfloor+\cdots+\left\lfloor\frac{a_{n}}{n}\right\rfloor$ over all permutations $\left(a_{1}, a_{2}, \ldots, a_{n}\right)$ of $(1,2, \ldots, n)$.

Solution: Suppose that $2^{k} \leqslant n<2^{k+1}$ with some nonnegative integer $k$. First we show a permutation $\left(a_{1}, a_{2}, \ldots, a_{n}\right)$ such that $\left\lfloor\frac{a_{1}}{1}\right\rfloor+\left\lfloor\frac{a_{2}}{2}\right\rfloor+\cdots+\left\lfloor\frac{a_{n}}{n}\right\rfloor=k+1$; then we will prove that $\left\lfloor\frac{a_{1}}{1}\right\rfloor+\left\lfloor\frac{a_{2}}{2}\right\rfloor+\cdots+\left\lfloor\frac{a_{n}}{n}\right\rfloor \geqslant k+1$ for every permutation. Hence, the minimal possible value will be $k+1$. I. Consider the permutation  $$ \begin{gathered} \left(a_{1}\right)=(1), \quad\left(a_{2}, a_{3}\right)=(3,2), \quad\left(a_{4}, a_{5}, a_{6}, a_{7}\right)=(7,4,5,6) \\ \left(a_{2^{k-1}}, \ldots, a_{2^{k}-1}\right)=\left(2^{k}-1,2^{k-1}, 2^{k-1}+1, \ldots, 2^{k}-2\right) \\ \left(a_{2^{k}}, \ldots, a_{n}\right)=\left(n, 2^{k}, 2^{k}+1, \ldots, n-1\right) \end{gathered} $$  This permutation consists of $k+1$ cycles. In every cycle $\left(a_{p}, \ldots, a_{q}\right)=(q, p, p+1, \ldots, q-1)$ we have $q<2 p$, so  $$ \sum_{i=p}^{q}\left\lfloor\frac{a_{i}}{i}\right\rfloor=\left\lfloor\frac{q}{p}\right\rfloor+\sum_{i=p+1}^{q}\left\lfloor\frac{i-1}{i}\right\rfloor=1 ; $$  The total sum over all cycles is precisely $k+1$. II. In order to establish the lower bound, we prove a more general statement.  Claim. If $b_{1}, \ldots, b_{2^{k}}$ are distinct positive integers then  $$ \sum_{i=1}^{2^{k}}\left\lfloor\frac{b_{i}}{i}\right\rfloor \geqslant k+1 $$  From the Claim it follows immediately that $\sum_{i=1}^{n}\left\lfloor\frac{a_{i}}{i}\right\rfloor \geqslant \sum_{i=1}^{2^{k}}\left\lfloor\frac{a_{i}}{i}\right\rfloor \geqslant k+1$. Proof of the Claim. Apply induction on $k$. For $k=1$ the claim is trivial, $\left\lfloor\frac{b_{1}}{1}\right\rfloor \geqslant 1$. Suppose the Claim holds true for some positive integer $k$, and consider $k+1$.  If there exists an index $j$ such that $2^{k}<j \leqslant 2^{k+1}$ and $b_{j} \geqslant j$ then  $$ \sum_{i=1}^{2^{k+1}}\left\lfloor\frac{b_{i}}{i}\right\rfloor \geqslant \sum_{i=1}^{2^{k}}\left\lfloor\frac{b_{i}}{i}\right\rfloor+\left\lfloor\frac{b_{j}}{j}\right\rfloor \geqslant(k+1)+1 $$  by the induction hypothesis, so the Claim is satisfied. Otherwise we have $b_{j}<j \leqslant 2^{k+1}$ for every $2^{k}<j \leqslant 2^{k+1}$. Among the $2^{k+1}$ distinct numbers $b_{1}, \ldots, b_{2^{k+1}}$ there is some $b_{m}$ which is at least $2^{k+1}$; that number must be among $b_{1} \ldots, b_{2^{k}}$. Hence, $1 \leqslant m \leqslant 2^{k}$ and $b_{m} \geqslant 2^{k+1}$.  We will apply the induction hypothesis to the numbers  $$ c_{1}=b_{1}, \ldots, c_{m-1}=b_{m-1}, \quad c_{m}=b_{2^{k}+1}, \quad c_{m+1}=b_{m+1}, \ldots, c_{2^{k}}=b_{2^{k}} $$  so take the first $2^{k}$ numbers but replace $b_{m}$ with $b_{2^{k}+1}$. Notice that  $$ \left\lfloor\frac{b_{m}}{m}\right\rfloor \geqslant\left\lfloor\frac{2^{k+1}}{m}\right\rfloor=\left\lfloor\frac{2^{k}+2^{k}}{m}\right\rfloor \geqslant\left\lfloor\frac{b_{2^{k}+1}+m}{m}\right\rfloor=\left\lfloor\frac{c_{m}}{m}\right\rfloor+1 $$  For the other indices $i$ with $1 \leqslant i \leqslant 2^{k}, i \neq m$ we have $\left\lfloor\frac{b_{i}}{i}\right\rfloor=\left\lfloor\frac{c_{i}}{i}\right\rfloor$, so  $$ \sum_{i=1}^{2^{k+1}}\left\lfloor\frac{b_{i}}{i}\right\rfloor=\sum_{i=1}^{2^{k}}\left\lfloor\frac{b_{i}}{i}\right\rfloor \geqslant \sum_{i=1}^{2^{k}}\left\lfloor\frac{c_{i}}{i}\right\rfloor+1 \geqslant(k+1)+1 $$  That proves the Claim and hence completes the solution.


Solution: We present a different proof for the lower bound. Assume again $2^{k} \leqslant n<2^{k+1}$, and let $P=\left\{2^{0}, 2^{1}, \ldots, 2^{k}\right\}$ be the set of powers of 2 among $1,2, \ldots, n$. Call an integer $i \in\{1,2, \ldots, n\}$ and the interval $\left[i, a_{i}\right]$ good if $a_{i} \geqslant i$.  Lemma 1. The good intervals cover the integers $1,2, \ldots, n$. Proof. Consider an arbitrary $x \in\{1,2 \ldots, n\}$; we want to find a good interval $\left[i, a_{i}\right]$ that covers $x$; i.e., $i \leqslant x \leqslant a_{i}$. Take the cycle of the permutation that contains $x$, that is $\left(x, a_{x}, a_{a_{x}}, \ldots\right)$. In this cycle, let $i$ be the first element with $a_{i} \geqslant x$; then $i \leqslant x \leqslant a_{i}$.  Lemma 2. If a good interval $\left[i, a_{i}\right]$ covers $p$ distinct powers of 2 then $\left\lfloor\frac{a_{i}}{i}\right\rfloor \geqslant p$; more formally, $\left\lfloor\frac{a_{i}}{i}\right\rfloor \geqslant\left|\left[i, a_{i}\right] \cap P\right|$. Proof. The ratio of the smallest and largest powers of 2 in the interval is at least $2^{p-1}$. By Bernoulli's inequality, $\frac{a_{i}}{i} \geqslant 2^{p-1} \geqslant p$; that proves the lemma.  Now, by Lemma 1, the good intervals cover $P$. By applying Lemma 2 as well, we obtain that  $$ \sum_{i=1}^{n}\left\lfloor\frac{a_{i}}{i}\right\rfloor=\sum_{i \text { is good }}^{n}\left\lfloor\frac{a_{i}}{i}\right\rfloor \geqslant \sum_{i \text { is good }}^{n}\left|\left[i, a_{i}\right] \cap P\right| \geqslant|P|=k+1 $$


Solution: We show yet another proof for the lower bound, based on the following inequality.


Show that for all real numbers $x_{1}, \ldots, x_{n}$ the following inequality holds:  $$ \sum_{i=1}^{n} \sum_{j=1}^{n} \sqrt{\left|x_{i}-x_{j}\right|} \leqslant \sum_{i=1}^{n} \sum_{j=1}^{n} \sqrt{\left|x_{i}+x_{j}\right|} $$

Solution: If we add $t$ to all the variables then the left-hand side remains constant and the right-hand side becomes  $$ H(t):=\sum_{i=1}^{n} \sum_{j=1}^{n} \sqrt{\left|x_{i}+x_{j}+2 t\right|} $$  Let $T$ be large enough such that both $H(-T)$ and $H(T)$ are larger than the value $L$ of the lefthand side of the inequality we want to prove. Not necessarily distinct points $p_{i, j}:=-\left(x_{i}+x_{j}\right) / 2$ together with $T$ and $-T$ split the real line into segments and two rays such that on each of these segments and rays the function $H(t)$ is concave since $f(t):=\sqrt{|\ell+2 t|}$ is concave on both intervals $(-\infty,-\ell / 2]$ and $[-\ell / 2,+\infty)$. Let $[a, b]$ be the segment containing zero. Then concavity implies $H(0) \geqslant \min \{H(a), H(b)\}$ and, since $H( \pm T)>L$, it suffices to prove the inequalities $H\left(-\left(x_{i}+x_{j}\right) / 2\right) \geqslant L$, that is to prove the original inequality in the case when all numbers are shifted in such a way that two variables $x_{i}$ and $x_{j}$ add up to zero. In the following we denote the shifted variables still by $x_{i}$.  If $i=j$, i.e. $x_{i}=0$ for some index $i$, then we can remove $x_{i}$ which will decrease both sides by $2 \sum_{k} \sqrt{\left|x_{k}\right|}$. Similarly, if $x_{i}+x_{j}=0$ for distinct $i$ and $j$ we can remove both $x_{i}$ and $x_{j}$ which decreases both sides by  $$ 2 \sqrt{2\left|x_{i}\right|}+2 \cdot \sum_{k \neq i, j}\left(\sqrt{\left|x_{k}+x_{i}\right|}+\sqrt{\left|x_{k}+x_{j}\right|}\right) $$  In either case we reduced our inequality to the case of smaller $n$. It remains to note that for $n=0$ and $n=1$ the inequality is trivial.


Solution: For real $p$ consider the integral  $$ I(p)=\int_{0}^{\infty} \frac{1-\cos (p x)}{x \sqrt{x}} d x $$  which clearly converges to a strictly positive number. By changing the variable $y=|p| x$ one notices that $I(p)=\sqrt{|p|} I(1)$. Hence, by using the trigonometric formula $\cos (\alpha-\beta)-\cos (\alpha+$ $\beta)=2 \sin \alpha \sin \beta$ we obtain $\sqrt{|a+b|}-\sqrt{|a-b|}=\frac{1}{I(1)} \int_{0}^{\infty} \frac{\cos ((a-b) x)-\cos ((a+b) x)}{x \sqrt{x}} d x=\frac{1}{I(1)} \int_{0}^{\infty} \frac{2 \sin (a x) \sin (b x)}{x \sqrt{x}} d x$, from which our inequality immediately follows:  $$ \sum_{i=1}^{n} \sum_{j=1}^{n} \sqrt{\left|x_{i}+x_{j}\right|}-\sum_{i=1}^{n} \sum_{j=1}^{n} \sqrt{\left|x_{i}-x_{j}\right|}=\frac{2}{I(1)} \int_{0}^{\infty} \frac{\left(\sum_{i=1}^{n} \sin \left(x_{i} x\right)\right)^{2}}{x \sqrt{x}} d x \geqslant 0 $$  Comment 1. A more general inequality  $$ \sum_{i=1}^{n} \sum_{j=1}^{n}\left|x_{i}-x_{j}\right|^{r} \leqslant \sum_{i=1}^{n} \sum_{j=1}^{n}\left|x_{i}+x_{j}\right|^{r} $$  holds for any $r \in[0,2]$. The first solution can be repeated verbatim for any $r \in[0,1]$ but not for $r>1$. In the second solution, by putting $x^{r+1}$ in the denominator in place of $x \sqrt{x}$ we can prove the inequality for any $r \in(0,2)$ and the cases $r=0,2$ are easy to check by hand. Comment 2. In fact, the integral from Solution 2 can be computed explicitly, we have $I(1)=\sqrt{2 \pi}$.


Let $n \geqslant 2$ be an integer, and let $a_{1}, a_{2}, \ldots, a_{n}$ be positive real numbers such that $a_{1}+a_{2}+\cdots+a_{n}=1$. Prove that  $$ \sum_{k=1}^{n} \frac{a_{k}}{1-a_{k}}\left(a_{1}+a_{2}+\cdots+a_{k-1}\right)^{2}<\frac{1}{3} $$

Solution: For all $k \leqslant n$, let  $$ s_{k}=a_{1}+a_{2}+\cdots+a_{k} \quad \text { and } \quad b_{k}=\frac{a_{k} s_{k-1}^{2}}{1-a_{k}} $$  with the convention that $s_{0}=0$. Note that $b_{k}$ is exactly a summand in the sum we need to estimate. We shall prove the inequality  $$ b_{k}<\frac{s_{k}^{3}-s_{k-1}^{3}}{3} $$  Indeed, it suffices to check that  $$ \begin{aligned} (1) & \Longleftrightarrow 0<\left(1-a_{k}\right)\left(\left(s_{k-1}+a_{k}\right)^{3}-s_{k-1}^{3}\right)-3 a_{k} s_{k-1}^{2} \\ & \Longleftrightarrow 0<\left(1-a_{k}\right)\left(3 s_{k-1}^{2}+3 s_{k-1} a_{k}+a_{k}^{2}\right)-3 s_{k-1}^{2} \\ & \Longleftrightarrow 0<-3 a_{k} s_{k-1}^{2}+3\left(1-a_{k}\right) s_{k-1} a_{k}+\left(1-a_{k}\right) a_{k}^{2} \\ & \Longleftrightarrow 0<3\left(1-a_{k}-s_{k-1}\right) s_{k-1} a_{k}+\left(1-a_{k}\right) a_{k}^{2} \end{aligned} $$  which holds since $a_{k}+s_{k-1}=s_{k} \leqslant 1$ and $a_{k} \in(0,1)$. Thus, adding inequalities (1) for $k=1, \ldots, n$, we conclude that  $$ b_{1}+b_{2}+\cdots+b_{n}<\frac{s_{n}^{3}-s_{0}^{3}}{3}=\frac{1}{3} $$  as desired. Comment 1. There are many ways of proving (1) which can be written as  $$ \frac{a s^{2}}{1-a}-\frac{(a+s)^{3}-s^{3}}{3}<0 $$  for non-negative $a$ and $s$ satisfying $a+s \leqslant 1$ and $a>0$. E.g., note that for any fixed $a$ the expression in (2) is quadratic in $s$ with the leading coefficient $a /(1-a)-a>0$. Hence, it is convex as a function in $s$, so it suffices to check the inequality at $s=0$ and $s=1-a$. The former case is trivial and in the latter case the inequality can be rewritten as  $$ a s-\frac{3 a s(a+s)+a^{3}}{3}<0, $$  which is trivial since $a+s=1$.


Solution: First, let us define  $$ S\left(a_{1}, \ldots, a_{n}\right):=\sum_{k=1}^{n} \frac{a_{k}}{1-a_{k}}\left(a_{1}+a_{2}+\cdots+a_{k-1}\right)^{2} $$  For some index $i$, denote $a_{1}+\cdots+a_{i-1}$ by $s$. If we replace $a_{i}$ with two numbers $a_{i} / 2$ and $a_{i} / 2$, i.e. replace the tuple $\left(a_{1}, \ldots, a_{n}\right)$ with $\left(a_{1}, \ldots, a_{i-1}, a_{i} / 2, a_{i} / 2, a_{i+1}, \ldots, a_{n}\right)$, the sum will increase by  $$ \begin{aligned} S\left(a_{1}, \ldots, a_{i} / 2, a_{i} / 2, \ldots, a_{n}\right)-S\left(a_{1}, \ldots, a_{n}\right) & =\frac{a_{i} / 2}{1-a_{i} / 2}\left(s^{2}+\left(s+a_{i} / 2\right)^{2}\right)-\frac{a_{i}}{1-a_{i}} s^{2} \\ & =a_{i} \frac{\left(1-a_{i}\right)\left(2 s^{2}+s a_{i}+a_{i}^{2} / 4\right)-\left(2-a_{i}\right) s^{2}}{\left(2-a_{i}\right)\left(1-a_{i}\right)} \\ & =a_{i} \frac{\left(1-a_{i}-s\right) s a_{i}+\left(1-a_{i}\right) a_{i}^{2} / 4}{\left(2-a_{i}\right)\left(1-a_{i}\right)} \end{aligned} $$  which is strictly positive. So every such replacement strictly increases the sum. By repeating this process and making maximal number in the tuple tend to zero, we keep increasing the sum which will converge to  $$ \int_{0}^{1} x^{2} d x=\frac{1}{3} . $$  This completes the proof.


Solution: We sketch a probabilistic version of the first solution. Let $x_{1}, x_{2}, x_{3}$ be drawn uniformly and independently at random from the segment [0,1]. Let $I_{1} \cup I_{2} \cup \cdots \cup I_{n}$ be a partition of $[0,1]$ into segments of length $a_{1}, a_{2}, \ldots, a_{n}$ in this order. Let $J_{k}:=I_{1} \cup \cdots \cup I_{k-1}$ for $k \geqslant 2$ and $J_{1}:=\varnothing$. Then  $$ \begin{aligned} \frac{1}{3}= & \sum_{k=1}^{n} \mathbb{P}\left\{x_{1} \geqslant x_{2}, x_{3} ; x_{1} \in I_{k}\right\} \\ = & \sum_{k=1}^{n}\left(\mathbb{P}\left\{x_{1} \in I_{k} ; x_{2}, x_{3} \in J_{k}\right\}\right. \\ + & 2 \cdot \mathbb{P}\left\{x_{1} \geqslant x_{2} ; x_{1}, x_{2} \in I_{k} ; x_{3} \in J_{k}\right\} \\ & \left.+\mathbb{P}\left\{x_{1} \geqslant x_{2}, x_{3} ; x_{1}, x_{2}, x_{3} \in I_{k}\right\}\right) \\ = & \sum_{k=1}^{n}\left(a_{k}\left(a_{1}+\cdots+a_{k-1}\right)^{2}+2 \cdot \frac{a_{k}^{2}}{2} \cdot\left(a_{1}+\cdots+a_{k-1}\right)+\frac{a_{k}^{3}}{3}\right) \\ > & \sum_{k=1}^{n}\left(a_{k}\left(a_{1}+\cdots+a_{k-1}\right)^{2}+a_{k}^{2}\left(a_{1}+\cdots+a_{k-1}\right) \cdot \frac{a_{1}+\cdots+a_{k-1}}{1-a_{k}}\right) \end{aligned} $$  where for the last inequality we used that $1-a_{k} \geqslant a_{1}+\cdots+a_{k-1}$. This completes the proof since  $$ a_{k}+\frac{a_{k}^{2}}{1-a_{k}}=\frac{a_{k}}{1-a_{k}} $$


Let $A$ be a finite set of (not necessarily positive) integers, and let $m \geqslant 2$ be an integer. Assume that there exist non-empty subsets $B_{1}, B_{2}, B_{3}, \ldots, B_{m}$ of $A$ whose elements add up to the sums $m^{1}, m^{2}, m^{3}, \ldots, m^{m}$, respectively. Prove that $A$ contains at least $m / 2$ elements.

Solution: Let $A=\left\{a_{1}, \ldots, a_{k}\right\}$. Assume that, on the contrary, $k=|A|<m / 2$. Let  $$ s_{i}:=\sum_{j: a_{j} \in B_{i}} a_{j} $$  be the sum of elements of $B_{i}$. We are given that $s_{i}=m^{i}$ for $i=1, \ldots, m$. Now consider all $m^{m}$ expressions of the form  $$ f\left(c_{1}, \ldots, c_{m}\right):=c_{1} s_{1}+c_{2} s_{2}+\ldots+c_{m} s_{m}, c_{i} \in\{0,1, \ldots, m-1\} \text { for all } i=1,2, \ldots, m $$  Note that every number $f\left(c_{1}, \ldots, c_{m}\right)$ has the form  $$ \alpha_{1} a_{1}+\ldots+\alpha_{k} a_{k}, \alpha_{i} \in\{0,1, \ldots, m(m-1)\} $$  Hence, there are at most $(m(m-1)+1)^{k}<m^{2 k}<m^{m}$ distinct values of our expressions; therefore, at least two of them coincide.  Since $s_{i}=m^{i}$, this contradicts the uniqueness of representation of positive integers in the base- $m$ system.  Comment 1. For other rapidly increasing sequences of sums of $B_{i}$ 's the similar argument also provides lower estimates on $k=|A|$. For example, if the sums of $B_{i}$ are equal to 1!, 2!, 3!, $\ldots, m$ !, then for any fixed $\varepsilon>0$ and large enough $m$ we get $k \geqslant(1 / 2-\varepsilon) m$. The proof uses the fact that the combinations $\sum c_{i}$ ! with $c_{i} \in\{0,1, \ldots, i\}$ are all distinct.  Comment 2. The problem statement holds also if $A$ is a set of real numbers (not necessarily integers), the above proofs work in the real case.


Let $n \geqslant 1$ be an integer, and let $x_{0}, x_{1}, \ldots, x_{n+1}$ be $n+2$ non-negative real numbers that satisfy $x_{i} x_{i+1}-x_{i-1}^{2} \geqslant 1$ for all $i=1,2, \ldots, n$. Show that  $$ x_{0}+x_{1}+\cdots+x_{n}+x_{n+1}>\left(\frac{2 n}{3}\right)^{3 / 2} $$

Solution: Lemma 1.1. If $a, b, c$ are non-negative numbers such that $a b-c^{2} \geqslant 1$, then  $$ (a+2 b)^{2} \geqslant(b+2 c)^{2}+6 $$  Proof. $(a+2 b)^{2}-(b+2 c)^{2}=(a-b)^{2}+2(b-c)^{2}+6\left(a b-c^{2}\right) \geqslant 6$. Lemma 1.2. $\sqrt{1}+\cdots+\sqrt{n}>\frac{2}{3} n^{3 / 2}$. Proof. Bernoulli's inequality $(1+t)^{3 / 2}>1+\frac{3}{2} t$ for $0>t \geqslant-1$ (or, alternatively, a straightforward check) gives  $$ (k-1)^{3 / 2}=k^{3 / 2}\left(1-\frac{1}{k}\right)^{3 / 2}>k^{3 / 2}\left(1-\frac{3}{2 k}\right)=k^{3 / 2}-\frac{3}{2} \sqrt{k} . $$  Summing up (*) over $k=1,2, \ldots, n$ yields  $$ 0>n^{3 / 2}-\frac{3}{2}(\sqrt{1}+\cdots+\sqrt{n}) . $$  Now put $y_{i}:=2 x_{i}+x_{i+1}$ for $i=0,1, \ldots, n$. We get $y_{0} \geqslant 0$ and $y_{i}^{2} \geqslant y_{i-1}^{2}+6$ for $i=1,2, \ldots, n$ by Lemma 1.1. Thus, an easy induction on $i$ gives $y_{i} \geqslant \sqrt{6 i}$. Using this estimate and Lemma 1.2 we get  $$ 3\left(x_{0}+\ldots+x_{n+1}\right) \geqslant y_{1}+\ldots+y_{n} \geqslant \sqrt{6}(\sqrt{1}+\sqrt{2}+\ldots+\sqrt{n})>\sqrt{6} \cdot \frac{2}{3} n^{3 / 2}=3\left(\frac{2 n}{3}\right)^{3 / 2} $$


Solution: Say that an index $i \in\{0,1, \ldots, n+1\}$ is good, if $x_{i} \geqslant \sqrt{\frac{2}{3}} i$, otherwise call the index $i$ bad. Lemma 2.1. There are no two consecutive bad indices. Proof. Assume the contrary and consider two bad indices $j, j+1$ with minimal possible $j$. Since 0 is good, we get $j>0$, thus by minimality $j-1$ is a good index and we have  $$ \frac{2}{3} \sqrt{j(j+1)}>x_{j} x_{j+1} \geqslant x_{j-1}^{2}+1 \geqslant \frac{2}{3}(j-1)+1=\frac{2}{3} \cdot \frac{j+(j+1)}{2} $$  that contradicts the AM-GM inequality for numbers $j$ and $j+1$. Lemma 2.2. If an index $j \leqslant n-1$ is good, then  $$ x_{j+1}+x_{j+2} \geqslant \sqrt{\frac{2}{3}}(\sqrt{j+1}+\sqrt{j+2}) . $$  Proof. We have  $$ x_{j+1}+x_{j+2} \geqslant 2 \sqrt{x_{j+1} x_{j+2}} \geqslant 2 \sqrt{x_{j}^{2}+1} \geqslant 2 \sqrt{\frac{2}{3} j+1} \geqslant \sqrt{\frac{2}{3} j+\frac{2}{3}}+\sqrt{\frac{2}{3} j+\frac{4}{3}}, $$  the last inequality follows from concavity of the square root function, or, alternatively, from the AM-QM inequality for the numbers $\sqrt{\frac{2}{3} j+\frac{2}{3}}$ and $\sqrt{\frac{2}{3} j+\frac{4}{3}}$.  Let $S_{i}=x_{1}+\ldots+x_{i}$ and $T_{i}=\sqrt{\frac{2}{3}}(\sqrt{1}+\ldots+\sqrt{i})$. Lemma 2.3. If an index $i$ is good, then $S_{i} \geqslant T_{i}$. Proof. Induction on $i$. The base case $i=0$ is clear. Assume that the claim holds for good indices less than $i$ and prove it for a good index $i>0$.  If $i-1$ is good, then by the inductive hypothesis we get $S_{i}=S_{i-1}+x_{i} \geqslant T_{i-1}+\sqrt{\frac{2}{3} i}=T_{i}$. If $i-1$ is bad, then $i>1$, and $i-2$ is good by Lemma 2.1. Then using Lemma 2.2 and the inductive hypothesis we get  $$ S_{i}=S_{i-2}+x_{i-1}+x_{i} \geqslant T_{i-2}+\sqrt{\frac{2}{3}}(\sqrt{i-1}+\sqrt{i})=T_{i} $$  Since either $n$ or $n+1$ is good by Lemma 2.1, Lemma 2.3 yields in both cases $S_{n+1} \geqslant T_{n}$, and it remains to apply Lemma 1.2 from Solution 1.  Comment 1. Another way to get (*) is the integral bound  $$ k^{3 / 2}-(k-1)^{3 / 2}=\int_{k-1}^{k} \frac{3}{2} \sqrt{x} d x<\frac{3}{2} \sqrt{k} . $$  Comment 2. If $x_{i}=\sqrt{2 / 3} \cdot(\sqrt{i}+1)$, the conditions of the problem hold. Indeed, the inequality to check is  $$ (\sqrt{i}+1)(\sqrt{i+1}+1)-(\sqrt{i-1}+1)^{2} \geqslant 3 / 2 $$  that rewrites as  $$ \sqrt{i}+\sqrt{i+1}-2 \sqrt{i-1} \geqslant(i+1 / 2)-\sqrt{i(i+1)}=\frac{1 / 4}{i+1 / 2+\sqrt{i(i+1)}}, $$  which follows from  $$ \sqrt{i}-\sqrt{i-1}=\frac{1}{\sqrt{i}+\sqrt{i-1}}>\frac{1}{2 i} $$  For these numbers we have $x_{0}+\ldots+x_{n+1}=\left(\frac{2 n}{3}\right)^{3 / 2}+O(n)$, thus the multiplicative constant $(2 / 3)^{3 / 2}$ in the problem statement is sharp.


Determine all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ that satisfy  $$ (f(a)-f(b))(f(b)-f(c))(f(c)-f(a))=f\left(a b^{2}+b c^{2}+c a^{2}\right)-f\left(a^{2} b+b^{2} c+c^{2} a\right) $$  for all real numbers $a, b, c$.

Solution: It is straightforward to check that above functions satisfy the equation. Now let $f(x)$ satisfy the equation, which we denote $E(a, b, c)$. Then clearly $f(x)+C$ also does; therefore, we may suppose without loss of generality that $f(0)=0$.We start with proving Lemma. Either $f(x) \equiv 0$ or $f$ is injective. Proof. Denote by $\Theta \subseteq \mathbb{R}^{2}$ the set of points $(a, b)$ for which $f(a)=f(b)$. Let $\Theta^{*}=\{(x, y) \in \Theta$ : $x \neq y\}$. The idea is that if $(a, b) \in \Theta$, then by $E(a, b, x)$ we get  $$ H_{a, b}(x):=\left(a b^{2}+b x^{2}+x a^{2}, a^{2} b+b^{2} x+x^{2} a\right) \in \Theta $$  for all real $x$. Reproducing this argument starting with $(a, b) \in \Theta^{*}$, we get more and more points in $\Theta$. There are many ways to fill in the details, we give below only one of them.  Assume that $(a, b) \in \Theta^{*}$. Note that  $$ g_{-}(x):=\left(a b^{2}+b x^{2}+x a^{2}\right)-\left(a^{2} b+b^{2} x+x^{2} a\right)=(a-b)(b-x)(x-a) $$  and  $$ g_{+}(x):=\left(a b^{2}+b x^{2}+x a^{2}\right)+\left(a^{2} b+b^{2} x+x^{2} a\right)=\left(x^{2}+a b\right)(a+b)+x\left(a^{2}+b^{2}\right) . $$  Hence, there exists $x$ for which both $g_{-}(x) \neq 0$ and $g_{+}(x) \neq 0$. This gives a point $(\alpha, \beta)=$ $H_{a, b}(x) \in \Theta^{*}$ for which $\alpha \neq-\beta$. Now compare $E(\alpha, 1,0)$ and $E(\beta, 1,0)$. The left-hand side expressions coincide, on right-hand side we get $f(\alpha)-f\left(\alpha^{2}\right)=f(\beta)-f\left(\beta^{2}\right)$, respectively. Hence, $f\left(\alpha^{2}\right)=f\left(\beta^{2}\right)$ and we get a point $\left(\alpha_{1}, \beta_{1}\right):=\left(\alpha^{2}, \beta^{2}\right) \in \Theta^{*}$ with both coordinates $\alpha_{1}, \beta_{1}$ non-negative. Continuing squaring the coordinates, we get a point $(\gamma, \delta) \in \Theta^{*}$ for which $\delta>5 \gamma \geqslant 0$. Our nearest goal is to get a point $(0, r) \in \Theta^{*}$. If $\gamma=0$, this is already done. If $\gamma>0$, denote by $x$ a real root of the quadratic equation $\delta \gamma^{2}+\gamma x^{2}+x \delta^{2}=0$, which exists since the discriminant $\delta^{4}-4 \delta \gamma^{3}$ is positive. Also $x<0$ since this equation cannot have non-negative root. For the point $H_{\delta, \gamma}(x)=:(0, r) \in \Theta$ the first coordinate is 0 . The difference of coordinates equals $-r=(\delta-\gamma)(\gamma-x)(x-\delta)<0$, so $r \neq 0$ as desired.  Now, let $(0, r) \in \Theta^{*}$. We get $H_{0, r}(x)=\left(r x^{2}, r^{2} x\right) \in \Theta$. Thus $f\left(r x^{2}\right)=f\left(r^{2} x\right)$ for all $x \in \mathbb{R}$. Replacing $x$ to $-x$ we get $f\left(r x^{2}\right)=f\left(r^{2} x\right)=f\left(-r^{2} x\right)$, so $f$ is even: $(a,-a) \in \Theta$ for all $a$. Then $H_{a,-a}(x)=\left(a^{3}-a x^{2}+x a^{2},-a^{3}+a^{2} x+x^{2} a\right) \in \Theta$ for all real $a, x$. Putting $x=\frac{1+\sqrt{5}}{2} a$ we obtain $\left(0,(1+\sqrt{5}) a^{3}\right) \in \Theta$ which means that $f(y)=f(0)=0$ for every real $y$.  Hereafter we assume that $f$ is injective and $f(0)=0$. By $E(a, b, 0)$ we get  $$ f(a) f(b)(f(a)-f(b))=f\left(a^{2} b\right)-f\left(a b^{2}\right) . $$  Let $\kappa:=f(1)$ and note that $\kappa=f(1) \neq f(0)=0$ by injectivity. Putting $b=1$ in ( $\Omega$ ) we get  $$ \kappa f(a)(f(a)-\kappa)=f\left(a^{2}\right)-f(a) . $$  Subtracting the same equality for $-a$ we get  $$ \kappa(f(a)-f(-a))(f(a)+f(-a)-\kappa)=f(-a)-f(a) . $$  Now, if $a \neq 0$, by injectivity we get $f(a)-f(-a) \neq 0$ and thus  $$ f(a)+f(-a)=\kappa-\kappa^{-1}=: \lambda . $$  It follows that  $$ f(a)-f(b)=f(-b)-f(-a) $$  for all non-zero $a, b$. Replace non-zero numbers $a, b$ in ( $\odot$ ) with $-a,-b$, respectively, and add the two equalities. Due to ( $\boldsymbol{\uparrow}$ ) we get  $$ (f(a)-f(b))(f(a) f(b)-f(-a) f(-b))=0 $$  thus $f(a) f(b)=f(-a) f(-b)=(\lambda-f(a))(\lambda-f(b))$ for all non-zero $a \neq b$. If $\lambda \neq 0$, this implies $f(a)+f(b)=\lambda$ that contradicts injectivity when we vary $b$ with fixed $a$. Therefore, $\lambda=0$ and $\kappa= \pm 1$. Thus $f$ is odd. Replacing $f$ with $-f$ if necessary (this preserves the original equation) we may suppose that $f(1)=1$.  Now, (\&) yields $f\left(a^{2}\right)=f^{2}(a)$. Summing relations $(\bigcirc)$ for pairs $(a, b)$ and $(a,-b)$, we get $-2 f(a) f^{2}(b)=-2 f\left(a b^{2}\right)$, i.e. $f(a) f\left(b^{2}\right)=f\left(a b^{2}\right)$. Putting $b=\sqrt{x}$ for each non-negative $x$ we get $f(a x)=f(a) f(x)$ for all real $a$ and non-negative $x$. Since $f$ is odd, this multiplicativity relation is true for all $a, x$. Also, from $f\left(a^{2}\right)=f^{2}(a)$ we see that $f(x) \geqslant 0$ for $x \geqslant 0$. Next, $f(x)>0$ for $x>0$ by injectivity.  Assume that $f(x)$ for $x>0$ does not have the form $f(x)=x^{\tau}$ for a constant $\tau$. The known property of multiplicative functions yields that the graph of $f$ is dense on $(0, \infty)^{2}$. In particular, we may find positive $b<1 / 10$ for which $f(b)>1$. Also, such $b$ can be found if $f(x)=x^{\tau}$ for some $\tau<0$. Then for all $x$ we have $x^{2}+x b^{2}+b \geqslant 0$ and so $E(1, b, x)$ implies that  $$ f\left(b^{2}+b x^{2}+x\right)=f\left(x^{2}+x b^{2}+b\right)+(f(b)-1)(f(x)-f(b))(f(x)-1) \geqslant 0-\left((f(b)-1)^{3} / 4\right. $$  is bounded from below (the quadratic trinomial bound $(t-f(1))(t-f(b)) \geqslant-(f(b)-1)^{2} / 4$ for $t=f(x)$ is used). Hence, $f$ is bounded from below on $\left(b^{2}-\frac{1}{4 b},+\infty\right)$, and since $f$ is odd it is bounded from above on $\left(0, \frac{1}{4 b}-b^{2}\right)$. This is absurd if $f(x)=x^{\tau}$ for $\tau<0$, and contradicts to the above dense graph condition otherwise.  Therefore, $f(x)=x^{\tau}$ for $x>0$ and some constant $\tau>0$. Dividing $E(a, b, c)$ by $(a-b)(b-$ $c)(c-a)=\left(a b^{2}+b c^{2}+c a^{2}\right)-\left(a^{2} b+b^{2} c+c^{2} a\right)$ and taking a limit when $a, b, c$ all go to 1 (the divided ratios tend to the corresponding derivatives, say, $\frac{a^{\tau}-b^{\tau}}{a-b} \rightarrow\left(x^{\tau}\right)_{x=1}^{\prime}=\tau$ ), we get $\tau^{3}=\tau \cdot 3^{\tau-1}, \tau^{2}=3^{\tau-1}, F(\tau):=3^{\tau / 2-1 / 2}-\tau=0$. Since function $F$ is strictly convex, it has at most two roots, and we get $\tau \in\{1,3\}$.


Let $S$ be an infinite set of positive integers, such that there exist four pairwise distinct $a, b, c, d \in S$ with $\operatorname{gcd}(a, b) \neq \operatorname{gcd}(c, d)$. Prove that there exist three pairwise distinct $x, y, z \in S$ such that $\operatorname{gcd}(x, y)=\operatorname{gcd}(y, z) \neq \operatorname{gcd}(z, x)$.

Solution: There exists $\alpha \in S$ so that $\{\operatorname{gcd}(\alpha, s) \mid s \in S, s \neq \alpha\}$ contains at least two elements. Since $\alpha$ has only finitely many divisors, there is a $d \mid \alpha$ such that the set $B=\{\beta \in$ $S \mid \operatorname{gcd}(\alpha, \beta)=d\}$ is infinite. Pick $\gamma \in S$ so that $\operatorname{gcd}(\alpha, \gamma) \neq d$. Pick $\beta_{1}, \beta_{2} \in B$ so that $\operatorname{gcd}\left(\beta_{1}, \gamma\right)=\operatorname{gcd}\left(\beta_{2}, \gamma\right)=: d^{\prime}$. If $d=d^{\prime}$, then $\operatorname{gcd}\left(\alpha, \beta_{1}\right)=\operatorname{gcd}\left(\gamma, \beta_{1}\right) \neq \operatorname{gcd}(\alpha, \gamma)$. If $d \neq d^{\prime}$, then either $\operatorname{gcd}\left(\alpha, \beta_{1}\right)=\operatorname{gcd}\left(\alpha, \beta_{2}\right)=d$ and $\operatorname{gcd}\left(\beta_{1}, \beta_{2}\right) \neq d$ or $\operatorname{gcd}\left(\gamma, \beta_{1}\right)=\operatorname{gcd}\left(\gamma, \beta_{2}\right)=d^{\prime}$ and $\operatorname{gcd}\left(\beta_{1}, \beta_{2}\right) \neq d^{\prime}$.  Comment. The situation can be modelled as a complete graph on the infinite vertex set $S$, where every edge $\{s, t\}$ is colored by $c(s, t):=\operatorname{gcd}(s, t)$. For every vertex the incident edges carry only finitely many different colors, and by the problem statement at least two different colors show up on the edge set. The goal is to show that there exists a bi-colored triangle (a triangle, whose edges carry exactly two different colors).  For the proof, consider a vertex $v$ whose incident edges carry at least two different colors. Let $X \subset S$ be an infinite subset so that $c(v, x) \equiv c_{1}$ for all $x \in X$. Let $y \in S$ be a vertex so that $c(v, y) \neq c_{1}$. Let $x_{1}, x_{2} \in X$ be two vertices with $c\left(y, x_{1}\right)=c\left(y, x_{2}\right)=c_{2}$. If $c_{1}=c_{2}$, then the triangle $v, y, x_{1}$ is bi-colored. If $c_{1} \neq c_{2}$, then one of $v, x_{1}, x_{2}$ and $y, x_{1}, x_{2}$ is bi-colored.


Let $n \geqslant 3$ be an integer. An integer $m \geqslant n+1$ is called $n$-colourful if, given infinitely many marbles in each of $n$ colours $C_{1}, C_{2}, \ldots, C_{n}$, it is possible to place $m$ of them around a circle so that in any group of $n+1$ consecutive marbles there is at least one marble of colour $C_{i}$ for each $i=1, \ldots, n$.  Prove that there are only finitely many positive integers which are not $n$-colourful. Find the largest among them.

Solution: First suppose that there are $n(n-1)-1$ marbles. Then for one of the colours, say blue, there are at most $n-2$ marbles, which partition the non-blue marbles into at most $n-2$ groups with at least $(n-1)^{2}>n(n-2)$ marbles in total. Thus one of these groups contains at least $n+1$ marbles and this group does not contain any blue marble.  Now suppose that the total number of marbles is at least $n(n-1)$. Then we may write this total number as $n k+j$ with some $k \geqslant n-1$ and with $0 \leqslant j \leqslant n-1$. We place around a circle $k-j$ copies of the colour sequence $[1,2,3, \ldots, n]$ followed by $j$ copies of the colour sequence $[1,1,2,3, \ldots, n]$.


A thimblerigger has 2021 thimbles numbered from 1 through 2021. The thimbles are arranged in a circle in arbitrary order. The thimblerigger performs a sequence of 2021 moves; in the $k^{\text {th }}$ move, he swaps the positions of the two thimbles adjacent to thimble $k$.  Prove that there exists a value of $k$ such that, in the $k^{\text {th }}$ move, the thimblerigger swaps some thimbles $a$ and $b$ such that $a<k<b$.

Solution: Assume the contrary. Say that the $k^{\mathrm{th}}$ thimble is the central thimble of the $k^{\mathrm{th}}$ move, and its position on that move is the central position of the move.


The kingdom of Anisotropy consists of $n$ cities. For every two cities there exists exactly one direct one-way road between them. We say that a path from $X$ to $Y$ is a sequence of roads such that one can move from $X$ to $Y$ along this sequence without returning to an already visited city. A collection of paths is called diverse if no road belongs to two or more paths in the collection.  Let $A$ and $B$ be two distinct cities in Anisotropy. Let $N_{A B}$ denote the maximal number of paths in a diverse collection of paths from $A$ to $B$. Similarly, let $N_{B A}$ denote the maximal number of paths in a diverse collection of paths from $B$ to $A$. Prove that the equality $N_{A B}=N_{B A}$ holds if and only if the number of roads going out from $A$ is the same as the number of roads going out from $B$.

Solution: We write $X \rightarrow Y$ (or $Y \leftarrow X$ ) if the road between $X$ and $Y$ goes from $X$ to $Y$. Notice that, if there is any route moving from $X$ to $Y$ (possibly passing through some cities more than once), then there is a path from $X$ to $Y$ consisting of some roads in the route. Indeed, any cycle in the route may be removed harmlessly; after some removals one obtains a path.  Say that a path is short if it consists of one or two roads. Partition all cities different from $A$ and $B$ into four groups, $\mathcal{I}, \mathcal{O}, \mathcal{A}$, and $\mathcal{B}$ according to the following rules: for each city $C$,  $$ \begin{array}{ll} C \in \mathcal{I} \Longleftrightarrow A \rightarrow C \leftarrow B ; & \\ C \in \mathcal{A} \Longleftrightarrow \Longleftrightarrow \Longleftrightarrow A \leftarrow C \rightarrow B ; \\ C A ; C \rightarrow C \leftarrow B . \end{array} $$  Lemma. Let $\mathcal{P}$ be a diverse collection consisting of $p$ paths from $A$ to $B$. Then there exists a diverse collection consisting of at least $p$ paths from $A$ to $B$ and containing all short paths from $A$ to $B$. Proof. In order to obtain the desired collection, modify $\mathcal{P}$ as follows. If there is a direct road $A \rightarrow B$ and the path consisting of this single road is not in $\mathcal{P}$, merely add it to $\mathcal{P}$.  Now consider any city $C \in \mathcal{A}$ such that the path $A \rightarrow C \rightarrow B$ is not in $\mathcal{P}$. If $\mathcal{P}$ contains at most one path containing a road $A \rightarrow C$ or $C \rightarrow B$, remove that path (if it exists), and add the path $A \rightarrow C \rightarrow B$ to $\mathcal{P}$ instead. Otherwise, $\mathcal{P}$ contains two paths of the forms $A \rightarrow C \rightarrow B$ and $A \rightarrow C \rightarrow B$, where $C \rightarrow B$ and $A \rightarrow C$ are some paths. In this case, we recombine the edges to form two new paths $A \rightarrow C \rightarrow B$ and $A \rightarrow C \rightarrow B$ (removing cycles from the latter if needed). Now we replace the old two paths in $\mathcal{P}$ with the two new ones.  After any operation described above, the number of paths in the collection does not decrease, and the collection remains diverse. Applying such operation to each $C \in \mathcal{A}$, we obtain the desired collection.  Back to the problem, assume, without loss of generality, that there is a road $A \rightarrow B$, and let $a$ and $b$ denote the numbers of roads going out from $A$ and $B$, respectively. Choose a diverse collection $\mathcal{P}$ consisting of $N_{A B}$ paths from $A$ to $B$. We will transform it into a diverse collection $\mathcal{Q}$ consisting of at least $N_{A B}+(b-a)$ paths from $B$ to $A$. This construction yields  $$ N_{B A} \geqslant N_{A B}+(b-a) ; \quad \text { similarly, we get } \quad N_{A B} \geqslant N_{B A}+(a-b), $$  whence $N_{B A}-N_{A B}=b-a$. This yields the desired equivalence. Apply the lemma to get a diverse collection $\mathcal{P}^{\prime}$ of at least $N_{A B}$ paths containing all $|\mathcal{A}|+1$ short paths from $A$ to $B$. Notice that the paths in $\mathcal{P}^{\prime}$ contain no edge of a short path from $B$ to $A$. Each non-short path in $\mathcal{P}^{\prime}$ has the form $A \rightarrow C \rightarrow D \rightarrow B$, where $C \rightarrow D$ is a path from some city $C \in \mathcal{I}$ to some city $D \in \mathcal{O}$. For each such path, put into $\mathcal{Q}$ the path $B \rightarrow C \longrightarrow D \rightarrow A$; also put into $\mathcal{Q}$ all short paths from $B$ to $A$. Clearly, the collection $\mathcal{Q}$ is diverse.  Now, all roads going out from $A$ end in the cities from $\mathcal{I} \cup \mathcal{A} \cup\{B\}$, while all roads going out from $B$ end in the cities from $\mathcal{I} \cup \mathcal{B}$. Therefore,  $$ a=|\mathcal{I}|+|\mathcal{A}|+1, \quad b=|\mathcal{I}|+|\mathcal{B}|, \quad \text { and hence } \quad a-b=|\mathcal{A}|-|\mathcal{B}|+1 $$  On the other hand, since there are $|\mathcal{A}|+1$ short paths from $A$ to $B$ (including $A \rightarrow B$ ) and $|\mathcal{B}|$ short paths from $B$ to $A$, we infer  $$ |\mathcal{Q}|=\left|\mathcal{P}^{\prime}\right|-(|\mathcal{A}|+1)+|\mathcal{B}| \geqslant N_{A B}+(b-a), $$  as desired.


Solution: We recall some graph-theoretical notions. Let $G$ be a finite graph, and let $V$ be the set of its vertices; fix two distinct vertices $s, t \in V$. An $(s, t)$-cut is a partition of $V$ into two parts $V=S \sqcup T$ such that $s \in S$ and $t \in T$. The cut-edges in the cut $(S, T)$ are the edges going from $S$ to $T$, and the size $e(S, T)$ of the cut is the number of cut-edges.  We will make use of the following theorem (which is a partial case of the Ford-Fulkerson "min-cut max-flow" theorem). Theorem (Menger). Let $G$ be a directed graph, and let $s$ and $t$ be its distinct vertices. Then the maximal number of edge-disjoint paths from $s$ to $t$ is equal to the minimal size of an $(s, t)$-cut.  Back to the problem. Consider a directed graph $G$ whose vertices are the cities, and edges correspond to the roads. Then $N_{A B}$ is the maximal number of edge-disjoint paths from $A$ to $B$ in this graph; the number $N_{B A}$ is interpreted similarly.  As in the previous solution, denote by $a$ and $b$ the out-degrees of vertices $A$ and $B$, respectively. To solve the problem, we show that for any $(A, B)$-cut $\left(S_{A}, T_{A}\right)$ in our graph there exists a $(B, A)$-cut $\left(S_{B}, T_{B}\right)$ satisfying  $$ e\left(S_{B}, T_{B}\right)=e\left(S_{A}, T_{A}\right)+(b-a) . $$  This yields  $$ N_{B A} \leqslant N_{A B}+(b-a) ; \quad \text { similarly, we get } \quad N_{A B} \leqslant N_{B A}+(a-b), $$  whence again $N_{B A}-N_{A B}=b-a$. The construction is simple: we put $S_{B}=S_{A} \cup\{B\} \backslash\{A\}$ and hence $T_{B}=T_{A} \cup\{A\} \backslash\{B\}$. To show that it works, let A and B denote the sets of cut-edges in $\left(S_{A}, T_{A}\right)$ and $\left(S_{B}, T_{B}\right)$, respectively. Let $a_{s}$ and $a_{t}=a-a_{s}$ denote the numbers of edges going from $A$ to $S_{A}$ and $T_{A}$, respectively. Similarly, denote by $b_{s}$ and $b_{t}=b-b_{s}$ the numbers of edges going from $B$ to $S_{B}$ and $T_{B}$, respectively.  Notice that any edge incident to none of $A$ and $B$ either belongs to both A and B , or belongs to none of them. Denote the number of such edges belonging to A by $c$. The edges in A which are not yet accounted for split into two categories: those going out from $A$ to $T_{A}$ (including $A \rightarrow B$ if it exists), and those going from $S_{A} \backslash\{A\}$ to $B$ - in other words, going from $S_{B}$ to $B$. The numbers of edges in the two categories are $a_{t}$ and $\left|S_{B}\right|-1-b_{s}$, respectively. Therefore,  $$ |\mathrm{A}|=c+a_{t}+\left(\left|S_{B}\right|-b_{s}-1\right) . \quad \text { Similarly, we get } \quad|\mathrm{B}|=c+b_{t}+\left(\left|S_{A}\right|-a_{s}-1\right), $$  and hence  $$ |\mathrm{B}|-|\mathrm{A}|=\left(b_{t}+b_{s}\right)-\left(a_{t}+a_{s}\right)=b-a, $$  since $\left|S_{A}\right|=\left|S_{B}\right|$. This finishes the solution.


Let $n$ and $k$ be two integers with $n>k \geqslant 1$. There are $2 n+1$ students standing in a circle. Each student $S$ has $2 k$ neighbours - namely, the $k$ students closest to $S$ on the right, and the $k$ students closest to $S$ on the left.  Suppose that $n+1$ of the students are girls, and the other $n$ are boys. Prove that there is a girl with at least $k$ girls among her neighbours.

Solution: We replace the girls by 1's, and the boys by 0 's, getting the numbers $a_{1}, a_{2}, \ldots, a_{2 n+1}$ arranged in a circle. We extend this sequence periodically by letting $a_{2 n+1+k}=a_{k}$ for all $k \in \mathbb{Z}$. We get an infinite periodic sequence  $$ \ldots, a_{1}, a_{2}, \ldots, a_{2 n+1}, a_{1}, a_{2}, \ldots, a_{2 n+1}, \ldots $$  Consider the numbers $b_{i}=a_{i}+a_{i-k-1}-1 \in\{-1,0,1\}$ for all $i \in \mathbb{Z}$. We know that  $$ b_{m+1}+b_{m+2}+\cdots+b_{m+2 n+1}=1 \quad(m \in \mathbb{Z}) $$  in particular, this yields that there exists some $i_{0}$ with $b_{i_{0}}=1$. Now we want to find an index $i$ such that  $$ b_{i}=1 \quad \text { and } \quad b_{i+1}+b_{i+2}+\cdots+b_{i+k} \geqslant 0 $$  This will imply that $a_{i}=1$ and  $$ \left(a_{i-k}+a_{i-k+1}+\cdots+a_{i-1}\right)+\left(a_{i+1}+a_{i+2}+\cdots+a_{i+k}\right) \geqslant k $$  as desired. Suppose, to the contrary, that for every index $i$ with $b_{i}=1$ the sum $b_{i+1}+b_{i+2}+\cdots+b_{i+k}$ is negative. We start from some index $i_{0}$ with $b_{i_{0}}=1$ and construct a sequence $i_{0}, i_{1}, i_{2}, \ldots$, where $i_{j}(j>0)$ is the smallest possible index such that $i_{j}>i_{j-1}+k$ and $b_{i_{j}}=1$. We can choose two numbers among $i_{0}, i_{1}, \ldots, i_{2 n+1}$ which are congruent modulo $2 n+1$ (without loss of generality, we may assume that these numbers are $i_{0}$ and $i_{T}$ ).  On the one hand, for every $j$ with $0 \leqslant j \leqslant T-1$ we have  $$ S_{j}:=b_{i_{j}}+b_{i_{j}+1}+b_{i_{j}+2}+\cdots+b_{i_{j+1}-1} \leqslant b_{i_{j}}+b_{i_{j}+1}+b_{i_{j}+2}+\cdots+b_{i_{j}+k} \leqslant 0 $$  since $b_{i_{j}+k+1}, \ldots, b_{i_{j+1}-1} \leqslant 0$. On the other hand, since $\left(i_{T}-i_{0}\right) \mid(2 n+1)$, from (1) we deduce  $$ S_{0}+\cdots+S_{T-1}=\sum_{i=i_{0}}^{i_{T}-1} b_{i}=\frac{i_{T}-i_{0}}{2 n+1}>0 $$  This contradiction finishes the solution. Comment 1. After the problem is reduced to finding an index $i$ satisfying (2), one can finish the solution by applying the (existence part of) following statement. Lemma (Raney). If $\left\langle x_{1}, x_{2}, \ldots, x_{m}\right\rangle$ is any sequence of integers whose sum is +1 , exactly one of the cyclic shifts $\left\langle x_{1}, x_{2}, \ldots, x_{m}\right\rangle,\left\langle x_{2}, \ldots, x_{m}, x_{1}\right\rangle, \ldots,\left\langle x_{m}, x_{1}, \ldots, x_{m-1}\right\rangle$ has all of its partial sums positive.  A (possibly wider known) version of this lemma, which also can be used in order to solve the problem, is the following Claim (Gas stations problem). Assume that there are several fuel stations located on a circular route which together contain just enough gas to make one trip around. Then one can make it all the way around, starting at the right station with an empty tank.  Both Raney's theorem and the Gas stations problem admit many different (parallel) proofs. Their ideas can be disguised in direct solutions of the problem at hand (as it, in fact, happens in the above solution); such solutions may avoid the introduction of the $b_{i}$. Below, in Comment 2 we present a variant of such solution, while in Comment 3 we present an alternative proof of Raney's theorem.  Comment 2. Here is a version of the solution which avoids the use of the $b_{i}$. Suppose the contrary. Introduce the numbers $a_{i}$ as above. Starting from any index $s_{0}$ with $a_{s_{0}}=1$, we construct a sequence $s_{0}, s_{1}, s_{2}, \ldots$ by letting $s_{i}$ to be the smallest index larger than $s_{i-1}+k$ such that $a_{s_{i}}=1$, for $i=1,2, \ldots$. Choose two indices among $s_{1}, \ldots, s_{2 n+1}$ which are congruent modulo $2 n+1$; we assume those two are $s_{0}$ and $s_{T}$, with $s_{T}-s_{0}=t(2 n+1)$. Notice here that $s_{T+1}-s_{T}=s_{1}-s_{0}$.  For every $i=0,1,2, \ldots, T$, put  $$ L_{i}=s_{i+1}-s_{i} \quad \text { and } \quad S_{i}=a_{s_{i}}+a_{s_{i}+1}+\cdots+a_{s_{i+1}-1} . $$  Now, by the indirect assumption, for every $i=1,2, \ldots, T$, we have  $$ a_{s_{i}-k}+a_{s_{i}-k+1}+\cdots+a_{s_{i}+k} \leqslant a_{s_{i}}+(k-1)=k . $$  Recall that $a_{j}=0$ for all $j$ with $s_{i}+k<j<a_{s_{i+1}}$. Therefore,  $$ S_{i-1}+S_{i}=\sum_{j=s_{i-1}}^{s_{i}+k} a_{j}=\sum_{j=s_{i-1}}^{s_{i}-k-1} a_{j}+\sum_{j=s_{i}-k}^{s_{i}+k} a_{j} \leqslant\left(s_{i}-s_{i-1}-k\right)+k=L_{i-1} $$  Summing up these equalities over $i=1,2, \ldots, T$ we get  $$ 2 t(n+1)=\sum_{i=1}^{T}\left(S_{i-1}+S_{i}\right) \leqslant \sum_{i=1}^{T} L_{i-1}=(2 n+1) t $$  which is a contradiction. Comment 3. Here we present a proof of Raney's lemma different from the one used above. If we plot the partial sums $s_{n}=x_{1}+\cdots+x_{n}$ as a function of $n$, the graph of $s_{n}$ has an average slope of $1 / m$, because $s_{m+n}=s_{n}+1$. ![](https://cdn.mathpix.com/cropped/2024_11_18_7107063274cfa469597ag-33.jpg?height=281&width=1391&top_left_y=1787&top_left_x=338)  The entire graph can be contained between two lines of slope $1 / m$. In general these bounding lines touch the graph just once in each cycle of $m$ points, since lines of slope $1 / m$ hit points with integer coordinates only once per $m$ units. The unique (in one cycle) lower point of intersection is the only place in the cycle from which all partial sums will be positive.  Comment 4. The following example shows that for different values of $k$ the required girl may have different positions: 011001101.


A hunter and an invisible rabbit play a game on an infinite square grid. First the hunter fixes a colouring of the cells with finitely many colours. The rabbit then secretly chooses a cell to start in. Every minute, the rabbit reports the colour of its current cell to the hunter, and then secretly moves to an adjacent cell that it has not visited before (two cells are adjacent if they share a side). The hunter wins if after some finite time either  - the rabbit cannot move; or - the hunter can determine the cell in which the rabbit started.  Decide whether there exists a winning strategy for the hunter.

Solution: A central idea is that several colourings $C_{1}, C_{2}, \ldots, C_{k}$ can be merged together into a single product colouring $C_{1} \times C_{2} \times \cdots \times C_{k}$ as follows: the colours in the product colouring are ordered tuples $\left(c_{1}, \ldots, c_{n}\right)$ of colours, where $c_{i}$ is a colour used in $C_{i}$, so that each cell gets a tuple consisting of its colours in the individual colourings $C_{i}$. This way, any information which can be determined from one of the individual colourings can also be determined from the product colouring.  Now let the hunter merge the following colourings:  - The first two colourings $C_{1}$ and $C_{2}$ allow the tracking of the horizontal and vertical movements of the rabbit. The colouring $C_{1}$ colours the cells according to the residue of their $x$-coordinates modulo 3 , which allows to determine whether the rabbit moves left, moves right, or moves vertically. Similarly, the colouring $C_{2}$ uses the residues of the $y$-coordinates modulo 3, which allows to determine whether the rabbit moves up, moves down, or moves horizontally. - Under the condition that the rabbit's $x$-coordinate is unbounded, colouring $C_{3}$ allows to determine the exact value of the $x$-coordinate: In $C_{3}$, the columns are coloured white and black so that the gaps between neighboring black columns are pairwise distinct. As the rabbit's $x$-coordinate is unbounded, it will eventually visit two black cells in distinct columns. With the help of colouring $C_{1}$ the hunter can catch that moment, and determine the difference of $x$-coordinates of those two black cells, hence deducing the precise column. Symmetrically, under the condition that the rabbit's $y$-coordinate is unbounded, there is a colouring $C_{4}$ that allows the hunter to determine the exact value of the $y$-coordinate. - Finally, under the condition that the sum $x+y$ of the rabbit's coordinates is unbounded, colouring $C_{5}$ allows to determine the exact value of this sum: The diagonal lines $x+y=$ const are coloured black and white, so that the gaps between neighboring black diagonals are pairwise distinct.  Unless the rabbit gets stuck, at least two of the three values $x, y$ and $x+y$ must be unbounded as the rabbit keeps moving. Hence the hunter can eventually determine two of these three values; thus he does know all three. Finally the hunter works backwards with help of the colourings $C_{1}$ and $C_{2}$ and computes the starting cell of the rabbit.  Comment. There are some variations of the solution above: e.g., the colourings $C_{3}, C_{4}$ and $C_{5}$ can be replaced with different ones. However, such alternatives are more technically involved, and we do not present them here.


Consider a checkered $3 m \times 3 m$ square, where $m$ is an integer greater than 1 . A frog sits on the lower left corner cell $S$ and wants to get to the upper right corner cell $F$. The frog can hop from any cell to either the next cell to the right or the next cell upwards.  Some cells can be sticky, and the frog gets trapped once it hops on such a cell. A set $X$ of cells is called blocking if the frog cannot reach $F$ from $S$ when all the cells of $X$ are sticky. A blocking set is minimal if it does not contain a smaller blocking set. (a) Prove that there exists a minimal blocking set containing at least $3 m^{2}-3 m$ cells. (b) Prove that every minimal blocking set contains at most $3 m^{2}$ cells.  Note. An example of a minimal blocking set for $m=2$ is shown below. Cells of the set $X$ are marked by letters $x$. ![](https://cdn.mathpix.com/cropped/2024_11_18_7107063274cfa469597ag-07.jpg?height=324&width=335&top_left_y=843&top_left_x=866)


Determine the largest $N$ for which there exists a table $T$ of integers with $N$ rows and 100 columns that has the following properties: (i) Every row contains the numbers $1,2, \ldots, 100$ in some order. (ii) For any two distinct rows $r$ and $s$, there is a column $c$ such that $|T(r, c)-T(s, c)| \geqslant 2$.  Here $T(r, c)$ means the number at the intersection of the row $r$ and the column $c$.

Solution: Non-existence of a larger table. Let us consider some fixed row in the table, and let us replace (for $k=1,2, \ldots, 50$ ) each of two numbers $2 k-1$ and $2 k$ respectively by the symbol $x_{k}$. The resulting pattern is an arrangement of 50 symbols $x_{1}, x_{2}, \ldots, x_{50}$, where every symbol occurs exactly twice. Note that there are $N=100!/ 2^{50}$ distinct patterns $P_{1}, \ldots, P_{N}$.  If two rows $r \neq s$ in the table have the same pattern $P_{i}$, then $|T(r, c)-T(s, c)| \leqslant 1$ holds for all columns $c$. As this violates property (ii) in the problem statement, different rows have different patterns. Hence there are at most $N=100!/ 2^{50}$ rows.  Existence of a table with $N$ rows. We construct the table by translating every pattern $P_{i}$ into a corresponding row with the numbers $1,2, \ldots, 100$. We present a procedure that inductively replaces the symbols by numbers. The translation goes through steps $k=1,2, \ldots, 50$ in increasing order and at step $k$ replaces the two occurrences of symbol $x_{k}$ by $2 k-1$ and $2 k$.  - The left occurrence of $x_{1}$ is replaced by 1 , and its right occurrence is replaced by 2. - For $k \geqslant 2$, we already have the number $2 k-2$ somewhere in the row, and now we are looking for the places for $2 k-1$ and $2 k$. We make the three numbers $2 k-2,2 k-1,2 k$ show up (ordered from left to right) either in the order $2 k-2,2 k-1,2 k$, or as $2 k, 2 k-2,2 k-1$, or as $2 k-1,2 k, 2 k-2$. This is possible, since the number $2 k-2$ has been placed in the preceding step, and shows up before / between / after the two occurrences of the symbol $x_{k}$. We claim that the $N$ rows that result from the $N$ patterns yield a table with the desired property (ii). Indeed, consider the $r$-th and the $s$-th row ( $r \neq s$ ), which by construction result from patterns $P_{r}$ and $P_{s}$. Call a symbol $x_{i}$ aligned, if it occurs in the same two columns in $P_{r}$ and in $P_{s}$. Let $k$ be the largest index, for which symbol $x_{k}$ is not aligned. Note that $k \geqslant 2$. Consider the column $c^{\prime}$ with $T\left(r, c^{\prime}\right)=2 k$ and the column $c^{\prime \prime}$ with $T\left(s, c^{\prime \prime}\right)=2 k$. Then $T\left(r, c^{\prime \prime}\right) \leqslant 2 k$ and $T\left(s, c^{\prime}\right) \leqslant 2 k$, as all symbols $x_{i}$ with $i \geqslant k+1$ are aligned. - If $T\left(r, c^{\prime \prime}\right) \leqslant 2 k-2$, then $\left|T\left(r, c^{\prime \prime}\right)-T\left(s, c^{\prime \prime}\right)\right| \geqslant 2$ as desired. - If $T\left(s, c^{\prime}\right) \leqslant 2 k-2$, then $\left|T\left(r, c^{\prime}\right)-T\left(s, c^{\prime}\right)\right| \geqslant 2$ as desired. - If $T\left(r, c^{\prime \prime}\right)=2 k-1$ and $T\left(s, c^{\prime}\right)=2 k-1$, then the symbol $x_{k}$ is aligned; contradiction.  In the only remaining case we have $c^{\prime}=c^{\prime \prime}$, so that $T\left(r, c^{\prime}\right)=T\left(s, c^{\prime}\right)=2 k$ holds. Now let us consider the columns $d^{\prime}$ and $d^{\prime \prime}$ with $T\left(r, d^{\prime}\right)=2 k-1$ and $T\left(s, d^{\prime \prime}\right)=2 k-1$. Then $d \neq d^{\prime \prime}$ (as the symbol $x_{k}$ is not aligned), and $T\left(r, d^{\prime \prime}\right) \leqslant 2 k-2$ and $T\left(s, d^{\prime}\right) \leqslant 2 k-2$ (as all symbols $x_{i}$ with $i \geqslant k+1$ are aligned).  - If $T\left(r, d^{\prime \prime}\right) \leqslant 2 k-3$, then $\left|T\left(r, d^{\prime \prime}\right)-T\left(s, d^{\prime \prime}\right)\right| \geqslant 2$ as desired. - If $T\left(s, c^{\prime}\right) \leqslant 2 k-3$, then $\left|T\left(r, d^{\prime}\right)-T\left(s, d^{\prime}\right)\right| \geqslant 2$ as desired.  In the only remaining case we have $T\left(r, d^{\prime \prime}\right)=2 k-2$ and $T\left(s, d^{\prime}\right)=2 k-2$. Now the row $r$ has the numbers $2 k-2,2 k-1,2 k$ in the three columns $d^{\prime}, d^{\prime \prime}, c^{\prime}$. As one of these triples violates the ordering property of $2 k-2,2 k-1,2 k$, we have the final contradiction.  Comment 1. We can identify rows of the table $T$ with permutations of $\mathcal{M}:=\{1, \ldots, 100\}$; also for every set $S \subset \mathcal{M}$ each row induces a subpermutation of $S$ obtained by ignoring all entries not from $S$.  The example from Solution 1 consists of all permutations for which all subpermutations of the 50 sets $\{1,2\},\{2,3,4\},\{4,5,6\}, \ldots,\{98,99,100\}$ are even.


Solution: We provide a bit different proof why the example from  Lemma. Let $\pi_{1}$ and $\pi_{2}$ be two permutations of the set $\{1,2, \ldots, n\}$ such that $\left|\pi_{1}(i)-\pi_{2}(i)\right| \leqslant 1$ for every $i$. Then there exists a set of disjoint pairs $(i, i+1)$ such that $\pi_{2}$ is obtained from $\pi_{1}$ by swapping elements in each pair from the set. Proof. We may assume that $\pi_{1}(i)=i$ for every $i$ and proceed by induction on $n$. The case $n=1$ is trivial. If $\pi_{2}(n)=n$, we simply apply the induction hypothesis. If $\pi_{2}(n)=n-1$, then $\pi_{2}(i)=n$ for some $i<n$. It is clear that $i=n-1$, and we can also use the induction hypothesis.  Now let $\pi_{1}$ and $\pi_{2}$ be two rows (which we identify with permutations of $\{1,2, \ldots, 100\}$ ) of the table constructed in Solution 1. Assume that $\left|\pi_{1}(i)-\pi_{2}(i)\right| \leqslant 1$ for any $i$. From the Lemma it follows that there exists a set $S \subset\{1, \ldots, 99\}$ such that any two numbers from $S$ differ by at least 2 and $\pi_{2}$ is obtained from $\pi_{1}$ by applying the permutations $(j, j+1)$, $j \in S$. Let $r=\min (S)$. If $r=2 k-1$ is odd, then $\pi_{1}$ and $\pi_{2}$ induce two subpermutations of $\{2 k-2,2 k-1,2 k\}$ (or of $\{1,2\}$ for $k=1$ ) of opposite parities. Thus $r=2 k$ is even. Since $\pi_{1}$ and $\pi_{2}$ induce subpermutations of the same (even) parity of $\{2 k, 2 k+1,2 k+2\}$, we must have $2 k+2 \in S$. Next, $2 k+4 \in S$ and so on, we get $98 \in S$, but then the parities of the subpermutations of $\{98,99,100\}$ in $\pi_{1}, \pi_{2}$ are opposite. A contradiction.  Comment 2. In Solution 2 we only used that for each set from $\{1,2\},\{2,3,4\},\{4,5,6\}, \ldots,\{98,99,100\}$ any two rows of $T$ induce a subpermutation of the same parity, not necessarily even.  This page is intentionally left blank


Let $A B C D$ be a parallelogram such that $A C=B C$. A point $P$ is chosen on the extension of the segment $A B$ beyond $B$. The circumcircle of the triangle $A C D$ meets the segment $P D$ again at $Q$, and the circumcircle of the triangle $A P Q$ meets the segment $P C$ again at $R$. Prove that the lines $C D, A Q$, and $B R$ are concurrent.

Solution: Introduce the point $X=A Q \cap C D$; we need to prove that $B, R$ and $X$ are collinear.  By means of the circle $(A P R Q)$ we have  $$ \angle R Q X=180^{\circ}-\angle A Q R=\angle R P A=\angle R C X $$  (the last equality holds in view of $A B \| C D$ ), which means that the points $C, Q, R$, and $X$ also lie on some circle $\delta$.  Using the circles $\delta$ and $\gamma$ we finally obtain  $$ \angle X R C=\angle X Q C=180^{\circ}-\angle C Q A=\angle A D C=\angle B A C=180^{\circ}-\angle C R B, $$  that proves the desired collinearity. ![](https://cdn.mathpix.com/cropped/2024_11_18_7107063274cfa469597ag-42.jpg?height=690&width=1169&top_left_y=1454&top_left_x=446)


Solution: Let $\alpha$ denote the circle ( $A P R Q)$. Since  $$ \angle C A P=\angle A C D=\angle A Q D=180^{\circ}-\angle A Q P $$  the line $A C$ is tangent to $\alpha$. Now, let $A D$ meet $\alpha$ again at a point $Y$ (which necessarily lies on the extension of $D A$ beyond $A$ ). Using the circle $\gamma$, along with the fact that $A C$ is tangent to $\alpha$, we have  $$ \angle A R Y=\angle C A D=\angle A C B=\angle A R B, $$  so the points $Y, B$, and $R$ are collinear. Applying Pascal's theorem to the hexagon $A A Y R P Q$ (where $A A$ is regarded as the tangent to $\alpha$ at $A$ ), we see that the points $A A \cap R P=C, A Y \cap P Q=D$, and $Y R \cap Q A$ are collinear. Hence the lines $C D, A Q$, and $B R$ are concurrent.  Comment 1. Solution 2 consists of two parts: (1) showing that $B R$ and $D A$ meet on $\alpha$; and (2) showing that this yields the desired concurrency. Solution 3 also splits into those parts, but the proofs are different. ![](https://cdn.mathpix.com/cropped/2024_11_18_7107063274cfa469597ag-43.jpg?height=1078&width=1175&top_left_y=335&top_left_x=446)


Solution: As in   Using the circle $\alpha$ and noticing that $C D$ is tangent to $\gamma$, we obtain  $$ \angle R Y A=\angle R P A=\angle R C X=\angle R B C . $$  So $A Y \| B C$, and hence $Y$ lies on $D A$. Now the chain of equalities (1) shows also that $\angle R Y D=\angle R C X$, which implies that the points $C, D, Y$, and $R$ lie on some circle $\beta$. Hence, the lines $C D, A Q$, and $Y B R$ are the pairwise radical axes of the circles $(A Q C D), \alpha$, and $\beta$, so those lines are concurrent.  Comment 2. The original problem submission contained an additional assumption that $B P=A B$. The Problem Selection Committee removed this assumption as superfluous.


Let $A B C D$ be a convex quadrilateral circumscribed around a circle with centre $I$.  Let $\omega$ be the circumcircle of the triangle $A C I$. The extensions of $B A$ and $B C$ beyond $A$ and $C$ meet $\omega$ at $X$ and $Z$, respectively. The extensions of $A D$ and $C D$ beyond $D$ meet $\omega$ at $Y$ and $T$, respectively. Prove that the perimeters of the (possibly self-intersecting) quadrilaterals $A D T X$ and $C D Y Z$ are equal.

Solution: The point $I$ is the intersection of the external bisector of the angle $T C Z$ with the circumcircle $\omega$ of the triangle $T C Z$, so $I$ is the midpoint of the $\operatorname{arc} T C Z$ and $I T=I Z$. Similarly, $I$ is the midpoint of the arc $Y A X$ and $I X=I Y$. Let $O$ be the centre of $\omega$. Then $X$ and $T$ are the reflections of $Y$ and $Z$ in $I O$, respectively. So $X T=Y Z$. ![](https://cdn.mathpix.com/cropped/2024_11_18_7107063274cfa469597ag-44.jpg?height=912&width=958&top_left_y=726&top_left_x=549)  Let the incircle of $A B C D$ touch $A B, B C, C D$, and $D A$ at points $P, Q, R$, and $S$, respectively.  The right triangles $I X P$ and $I Y S$ are congruent, since $I P=I S$ and $I X=I Y$. Similarly, the right triangles $I R T$ and $I Q Z$ are congruent. Therefore, $X P=Y S$ and $R T=Q Z$.  Denote the perimeters of $A D T X$ and $C D Y Z$ by $P_{A D T X}$ and $P_{C D Y Z}$ respectively. Since $A S=A P, C Q=R C$, and $S D=D R$, we obtain  $$ \begin{aligned} P_{A D T X}=X T+X A+A S+ & S D+D T=X T+X P+R T \\ & =Y Z+Y S+Q Z=Y Z+Y D+D R+R C+C Z=P_{C D Y Z} \end{aligned} $$  as required. Comment 1. After proving that $X$ and $T$ are the reflections of $Y$ and $Z$ in $I O$, respectively, one can finish the solution as follows. Since $X T=Y Z$, the problem statement is equivalent to  $$ X A+A D+D T=Y D+D C+C Z $$  Since $A B C D$ is circumscribed, $A B-A D=B C-C D$. Adding this to (1), we come to an equivalent equality $X A+A B+D T=Y D+B C+C Z$, or  $$ X B+D T=Y D+B Z . $$  Let $\lambda=\frac{X Z}{A C}=\frac{T Y}{A C}$. Since $X A C Z$ is cyclic, the triangles $Z B X$ and $A B C$ are similar, hence  $$ \frac{X B}{B C}=\frac{B Z}{A B}=\frac{X Z}{A C}=\lambda . $$  It follows that $X B=\lambda B C$ and $B Z=\lambda A B$. Likewise, the triangles $T D Y$ and $A D C$ are similar, hence  $$ \frac{D T}{A D}=\frac{D Y}{C D}=\frac{T Y}{A C}=\lambda $$  Therefore, (2) rewrites as $\lambda B C+\lambda A D=\lambda C D+\lambda A B$. This is equivalent to $B C+A D=C D+A B$ which is true as $A B C D$ is circumscribed. Comment 2. Here is a more difficult modification of the original problem, found by the PSC. Let $A B C D$ be a convex quadrilateral circumscribed around a circle with centre $I$. Let $\omega$ be the circumcircle of the triangle $A C I$. The extensions of $B A$ and $B C$ beyond $A$ and $C$ meet $\omega$ at $X$ and $Z$, respectively. The extensions of $A D$ and $C D$ beyond $D$ meet $\omega$ at $Y$ and $T$, respectively. Let $U=B C \cap A D$ and $V=B A \cap C D$. Let $I_{U}$ be the incentre of $U Y Z$ and let $J_{V}$ be the $V$-excentre of $V X T$. Then $I_{U} J_{V} \perp B D$.


Version 1. Let $n$ be a fixed positive integer, and let S be the set of points $(x, y)$ on the Cartesian plane such that both coordinates $x$ and $y$ are nonnegative integers smaller than $2 n$ (thus $|S|=4 n^{2}$ ). Assume that $\mathcal{F}$ is a set consisting of $n^{2}$ quadrilaterals such that all their vertices lie in $S$, and each point in $S$ is a vertex of exactly one of the quadrilaterals in $\mathcal{F}$.  Determine the largest possible sum of areas of all $n^{2}$ quadrilaterals in $\mathcal{F}$. Version 2. Let $n$ be a fixed positive integer, and let S be the set of points $(x, y)$ on the Cartesian plane such that both coordinates $x$ and $y$ are nonnegative integers smaller than $2 n$ (thus $|\mathrm{S}|=4 n^{2}$ ). Assume that $\mathcal{F}$ is a set of polygons such that all vertices of polygons in $\mathcal{F}$ lie in S , and each point in S is a vertex of exactly one of the polygons in $\mathcal{F}$.  Determine the largest possible sum of areas of all polygons in $\mathcal{F}$.


Let $A B C D$ be a quadrilateral inscribed in a circle $\Omega$. Let the tangent to $\Omega$ at $D$ intersect the rays $B A$ and $B C$ at points $E$ and $F$, respectively. A point $T$ is chosen inside the triangle $A B C$ so that $T E \| C D$ and $T F \| A D$. Let $K \neq D$ be a point on the segment $D F$ such that $T D=T K$. Prove that the lines $A C, D T$ and $B K$ intersect at one point.

Solution: Let the segments $T E$ and $T F$ cross $A C$ at $P$ and $Q$, respectively. Since $P E \| C D$ and $E D$ is tangent to the circumcircle of $A B C D$, we have  $$ \angle E P A=\angle D C A=\angle E D A, $$  and so the points $A, P, D$, and $E$ lie on some circle $\alpha$. Similarly, the points $C, Q, D$, and $F$ lie on some circle $\gamma$.  We now want to prove that the line $D T$ is tangent to both $\alpha$ and $\gamma$ at $D$. Indeed, since $\angle F C D+\angle E A D=180^{\circ}$, the circles $\alpha$ and $\gamma$ are tangent to each other at $D$. To prove that $T$ lies on their common tangent line at $D$ (i.e., on their radical axis), it suffices to check that $T P \cdot T E=T Q \cdot T F$, or that the quadrilateral $P E F Q$ is cyclic. This fact follows from  $$ \angle Q F E=\angle A D E=\angle A P E . $$  Since $T D=T K$, we have $\angle T K D=\angle T D K$. Next, as $T D$ and $D E$ are tangent to $\alpha$ and $\Omega$, respectively, we obtain  $$ \angle T K D=\angle T D K=\angle E A D=\angle B D E, $$  which implies $T K \| B D$. Next we prove that the five points $T, P, Q, D$, and $K$ lie on some circle $\tau$. Indeed, since $T D$ is tangent to the circle $\alpha$ we have  $$ \angle E P D=\angle T D F=\angle T K D, $$  which means that the point $P$ lies on the circle (TDK). Similarly, we have $Q \in(T D K)$. Finally, we prove that $P K \| B C$. Indeed, using the circles $\tau$ and $\gamma$ we conclude that  $$ \angle P K D=\angle P Q D=\angle D F C, $$  which means that $P K \| B C$. Triangles $T P K$ and $D C B$ have pairwise parallel sides, which implies the fact that $T D, P C$ and $K B$ are concurrent, as desired. ![](https://cdn.mathpix.com/cropped/2024_11_18_7107063274cfa469597ag-49.jpg?height=866&width=1257&top_left_y=1897&top_left_x=405)  Comment 1. There are several variations of the above solution. E.g., after finding circles $\alpha$ and $\gamma$, one can notice that there exists a homothety $h$ mapping the triangle $T P Q$ to the triangle $D C A$; the centre of that homothety is $Y=A C \cap T D$. Since  $$ \angle D P E=\angle D A E=\angle D C B=\angle D Q T, $$  the quadrilateral $T P D Q$ is inscribed in some circle $\tau$. We have $h(\tau)=\Omega$, so the point $D^{*}=h(D)$ lies on $\Omega$.  Finally, by  $$ \angle D C D^{*}=\angle T P D=\angle B A D, $$  the points $B$ and $D^{*}$ are symmetric with respect to the diameter of $\Omega$ passing through $D$. This yields $D B=D D^{*}$ and $B D^{*} \| E F$, so $h(K)=B$, and $B K$ passes through $Y$.


Solution: Consider the spiral similarity $\phi$ centred at $D$ which maps $B$ to $F$. Recall that for any two points $X$ and $Y$, the triangles $D X \phi(X)$ and $D Y \phi(Y)$ are similar.  Define $T^{\prime}=\phi(E)$. Then  $$ \angle C D F=\angle F B D=\angle \phi(B) B D=\angle \phi(E) E D=\angle T^{\prime} E D, $$  so $C D \| T^{\prime} E$. Using the fact that $D E$ is tangent to $(A B D)$ and then applying $\phi$ we infer  $$ \angle A D E=\angle A B D=\angle T^{\prime} F D, $$  so $A D \| T^{\prime} F$; hence $T^{\prime}$ coincides with $T$. Therefore,  $$ \angle B D E=\angle F D T=\angle D K T, $$  whence $T K \| B D$. Let $B K \cap T D=X, A C \cap T D=Y$, and $A C \cap T F=Q$. Notice that $T K \| B D$ implies  $$ \frac{T X}{X D}=\frac{T K}{B D}=\frac{T D}{B D} $$  So we wish to prove that $\frac{T Y}{Y D}$ is equal to the same ratio. We first show that $\phi(A)=Q$. Indeed,  $$ \angle D A \phi(A)=\angle D B F=\angle D A C, $$  and so $\phi(A) \in A C$. Together with $\phi(A) \in \phi(E B)=T F$ this yields $\phi(A)=Q$. It follows that  $$ \frac{T Q}{A E}=\frac{T D}{E D} $$  ![](https://cdn.mathpix.com/cropped/2024_11_18_7107063274cfa469597ag-50.jpg?height=858&width=1238&top_left_y=1901&top_left_x=406)  Now, since $T F \| A D$ and $\triangle E A D \sim \triangle E D B$, we have  $$ \frac{T Y}{Y D}=\frac{T Q}{A D}=\frac{T Q}{A E} \cdot \frac{A E}{A D}=\frac{T D}{E D} \cdot \frac{E D}{B D}=\frac{T D}{B D} $$  which completes the proof. Comment 2. The point $D$ is the Miquel point for any 4 of the 5 lines $B A, B C, T E, T F$ and $A C$. Essentially, this is proved in both solutions by different methods.


Let $A B C D$ be a cyclic quadrilateral whose sides have pairwise different lengths. Let $O$ be the circumcentre of $A B C D$. The internal angle bisectors of $\angle A B C$ and $\angle A D C$ meet $A C$ at $B_{1}$ and $D_{1}$, respectively. Let $O_{B}$ be the centre of the circle which passes through $B$ and is tangent to $A C$ at $D_{1}$. Similarly, let $O_{D}$ be the centre of the circle which passes through $D$ and is tangent to $A C$ at $B_{1}$.  Assume that $B D_{1} \| D B_{1}$. Prove that $O$ lies on the line $O_{B} O_{D}$.

Solution: Let the diagonals $A C$ and $B D$ cross at $H$. Consider the homothety $h$ centred at $H$ and mapping $B$ to $D$. Since $B D_{1} \| D B_{1}$, we have $h\left(D_{1}\right)=B_{1}$.  Let the tangents to $\Omega$ at $B$ and $D$ meet $A C$ at $L_{B}$ and $L_{D}$, respectively. We have  $$ \angle L_{B} B B_{1}=\angle L_{B} B C+\angle C B B_{1}=\angle B A L_{B}+\angle B_{1} B A=\angle B B_{1} L_{B}, $$  which means that the triangle $L_{B} B B_{1}$ is isosceles, $L_{B} B=L_{B} B_{1}$. The powers of $L_{B}$ with respect to $\Omega$ and $\gamma_{D}$ are $L_{B} B^{2}$ and $L_{B} B_{1}^{2}$, respectively; so they are equal, whence $L_{B}$ lies on the radical axis $T_{D} D$ of those two circles. Similarly, $L_{D}$ lies on the radical axis $T_{B} B$ of $\Omega$ and $\gamma_{B}$.  By the sine rule in the triangle $B H L_{B}$, we obtain  $$ \frac{H L_{B}}{\sin \angle H B L_{B}}=\frac{B L_{B}}{\sin \angle B H L_{B}}=\frac{B_{1} L_{B}}{\sin \angle B H L_{B}} $$  similarly,  $$ \frac{H L_{D}}{\sin \angle H D L_{D}}=\frac{D L_{D}}{\sin \angle D H L_{D}}=\frac{D_{1} L_{D}}{\sin \angle D H L_{D}} $$  Clearly, $\angle B H L_{B}=\angle D H L_{D}$. In the circle $\Omega$, tangent lines $B L_{B}$ and $D L_{D}$ form equal angles with the chord $B D$, so $\sin \angle H B L_{B}=\sin \angle H D L_{D}$ (this equality does not depend on the picture). Thus, dividing (2) by (3) we get  $$ \frac{H L_{B}}{H L_{D}}=\frac{B_{1} L_{B}}{D_{1} L_{D}}, \quad \text { and hence } \quad \frac{H L_{B}}{H L_{D}}=\frac{H L_{B}-B_{1} L_{B}}{H L_{D}-D_{1} L_{D}}=\frac{H B_{1}}{H D_{1}} $$  Since $h\left(D_{1}\right)=B_{1}$, the obtained relation yields $h\left(L_{D}\right)=L_{B}$, so $h$ maps the line $L_{D} B$ to $L_{B} D$, and these lines are parallel, as desired. ![](https://cdn.mathpix.com/cropped/2024_11_18_7107063274cfa469597ag-53.jpg?height=843&width=1477&top_left_y=204&top_left_x=292)  Comment 2. In the solution above, the key relation $h\left(L_{D}\right)=L_{B}$ was obtained via a short computation in sines. Here we present an alternative, pure synthetical way of establishing that.  Let the external bisectors of $\angle A B C$ and $\angle A D C$ cross $A C$ at $B_{2}$ and $D_{2}$, respectively; assume that $\overparen{A B}>\overparen{C B}$. In the right-angled triangle $B B_{1} B_{2}$, the point $L_{B}$ is a point on the hypothenuse such that $L_{B} B_{1}=L_{B} B$, so $L_{B}$ is the midpoint of $B_{1} B_{2}$.  Since $D D_{1}$ is the internal angle bisector of $\angle A D C$, we have  $$ \angle B D D_{1}=\frac{\angle B D A-\angle C D B}{2}=\frac{\angle B C A-\angle C A B}{2}=\angle B B_{2} D_{1}, $$  so the points $B, B_{2}, D$, and $D_{1}$ lie on some circle $\omega_{B}$. Similarly, $L_{D}$ is the midpoint of $D_{1} D_{2}$, and the points $D, D_{2}, B$, and $B_{1}$ lie on some circle $\omega_{D}$.  Now we have  $$ \angle B_{2} D B_{1}=\angle B_{2} D B-\angle B_{1} D B=\angle B_{2} D_{1} B-\angle B_{1} D_{2} B=\angle D_{2} B D_{1} . $$  Therefore, the corresponding sides of the triangles $D B_{1} B_{2}$ and $B D_{1} D_{2}$ are parallel, and the triangles are homothetical (in $H$ ). So their corresponding medians $D L_{B}$ and $B L_{D}$ are also parallel. ![](https://cdn.mathpix.com/cropped/2024_11_18_7107063274cfa469597ag-53.jpg?height=535&width=1492&top_left_y=1914&top_left_x=285)  Yet alternatively, after obtaining the circles $\omega_{B}$ and $\omega_{D}$, one may notice that $H$ lies on their radical axis $B D$, whence $H B_{1} \cdot H D_{2}=H D_{1} \cdot H B_{2}$, or  $$ \frac{H B_{1}}{H D_{1}}=\frac{H B_{2}}{H D_{1}} . $$  Since $h\left(D_{1}\right)=B_{1}$, this yields $h\left(D_{2}\right)=B_{2}$ and hence $h\left(L_{D}\right)=L_{B}$.  Comment 3. Since $h$ preserves the line $A C$ and maps $B \mapsto D$ and $D_{1} \mapsto B_{1}$, we have $h\left(\gamma_{B}\right)=\gamma_{D}$. Therefore, $h\left(O_{B}\right)=O_{D}$; in particular, $H$ also lies on $O_{B} O_{D}$.


Solution: Let $B D_{1}$ and $T_{B} D_{1}$ meet $\Omega$ again at $X_{B}$ and $Y_{B}$, respectively. Then  $$ \angle B D_{1} C=\angle B T_{B} D_{1}=\angle B T_{B} Y_{B}=\angle B X_{B} Y_{B} $$  which shows that $X_{B} Y_{B} \| A C$. Similarly, let $D B_{1}$ and $T_{D} B_{1}$ meet $\Omega$ again at $X_{D}$ and $Y_{D}$, respectively; then $X_{D} Y_{D} \| A C$.  Let $M_{D}$ and $M_{B}$ be the midpoints of the arcs $A B C$ and $A D C$, respectively; then the points $D_{1}$ and $B_{1}$ lie on $D M_{D}$ and $B M_{B}$, respectively. Let $K$ be the midpoint of $A C$ (which lies on $M_{B} M_{D}$ ). Applying Pascal's theorem to $M_{D} D X_{D} X_{B} B M_{B}$, we obtain that the points $D_{1}=M_{D} D \cap X_{B} B, B_{1}=D X_{D} \cap B M_{B}$, and $X_{D} X_{B} \cap M_{B} M_{D}$ are collinear, which means that $X_{B} X_{D}$ passes through $K$. Due to symmetry, the diagonals of an isosceles trapezoid $X_{B} Y_{B} X_{D} Y_{D}$ cross at $K$. ![](https://cdn.mathpix.com/cropped/2024_11_18_7107063274cfa469597ag-54.jpg?height=1143&width=1164&top_left_y=888&top_left_x=446)  Let $b$ and $d$ denote the distances from the lines $X_{B} Y_{B}$ and $X_{D} Y_{D}$, respectively, to $A C$. Then we get  $$ \frac{X_{B} Y_{B}}{X_{D} Y_{D}}=\frac{b}{d}=\frac{D_{1} X_{B}}{B_{1} X_{D}} $$  where the second equation holds in view of $D_{1} X_{B} \| B_{1} X_{D}$. Therefore, the triangles $D_{1} X_{B} Y_{B}$ and $B_{1} X_{D} Y_{D}$ are similar. The triangles $D_{1} T_{B} B$ and $B_{1} T_{D} D$ are similar to them and hence to each other. Since $B D_{1} \| D B_{1}$, these triangles are also homothetical. This yields $B T_{B} \| D T_{D}$, as desired.  Comment 4. The original problem proposal asked to prove that the relations $B D_{1} \| D B_{1}$ and $O \in O_{1} O_{2}$ are equivalent. After obtaining $B D_{1} \| D B_{1} \Rightarrow O \in O_{1} O_{2}$, the converse proof is either repeated backwards mutatis mutandis, or can be obtained by the usual procedure of varying some points in the construction.  The Problem Selection Committee chose the current version, because it is less technical, yet keeps most of the ideas.


Determine all integers $n \geqslant 3$ satisfying the following property: every convex $n$-gon whose sides all have length 1 contains an equilateral triangle of side length 1. (Every polygon is assumed to contain its boundary.)

Solution: First we show that for every even $n \geqslant 4$ there exists a polygon violating the required statement. Consider a regular $k$-gon $A_{0} A_{1}, \ldots A_{k-1}$ with side length 1 . Let $B_{1}, B_{2}, \ldots, B_{n / 2-1}$ be the points symmetric to $A_{1}, A_{2}, \ldots, A_{n / 2-1}$ with respect to the line $A_{0} A_{n / 2}$. Then $P=$ $A_{0} A_{1} A_{2} \ldots A_{n / 2-1} A_{n / 2} B_{n / 2-1} B_{n / 2-2} \ldots B_{2} B_{1}$ is a convex $n$-gon whose sides all have length 1 . If $k$ is big enough, $P$ is contained in a strip of width $1 / 2$, which clearly does not contain any equilateral triangle of side length 1. ![](https://cdn.mathpix.com/cropped/2024_11_18_7107063274cfa469597ag-56.jpg?height=175&width=1363&top_left_y=826&top_left_x=346)  Assume now that $n=2 k+1$. As the case $k=1$ is trivially true, we assume $k \geqslant 2$ henceforth. Consider a convex $(2 k+1)$-gon $P$ whose sides all have length 1 . Let $d$ be its longest diagonal. The endpoints of $d$ split the perimeter of $P$ into two polylines, one of which has length at least $k+1$. Hence we can label the vertices of $P$ so that $P=A_{0} A_{1} \ldots A_{2 k}$ and $d=A_{0} A_{\ell}$ with $\ell \geqslant k+1$. We will show that, in fact, the polygon $A_{0} A_{1} \ldots A_{\ell}$ contains an equilateral triangle of side length 1 .  Suppose that $\angle A_{\ell} A_{0} A_{1} \geqslant 60^{\circ}$. Since $d$ is the longest diagonal, we have $A_{1} A_{\ell} \leqslant A_{0} A_{\ell}$, so $\angle A_{0} A_{1} A_{\ell} \geqslant \angle A_{\ell} A_{0} A_{1} \geqslant 60^{\circ}$. It follows that there exists a point $X$ inside the triangle $A_{0} A_{1} A_{\ell}$ such that the triangle $A_{0} A_{1} X$ is equilateral, and this triangle is contained in $P$. Similar arguments apply if $\angle A_{\ell-1} A_{\ell} A_{0} \geqslant 60^{\circ}$. ![](https://cdn.mathpix.com/cropped/2024_11_18_7107063274cfa469597ag-56.jpg?height=224&width=730&top_left_y=1524&top_left_x=663)  From now on, assume $\angle A_{\ell} A_{0} A_{1}<60^{\circ}$ and $A_{\ell-1} A_{\ell} A_{0}<60^{\circ}$. Consider an isosceles trapezoid $A_{0} Y Z A_{\ell}$ such that $A_{0} A_{\ell} \| Y Z, A_{0} Y=Z A_{\ell}=1$, and $\angle A_{\ell} A_{0} Y=\angle Z A_{\ell} A_{0}=60^{\circ}$. Suppose that $A_{0} A_{1} \ldots A_{\ell}$ is contained in $A_{0} Y Z A_{\ell}$. Note that the perimeter of $A_{0} A_{1} \ldots A_{\ell}$ equals $\ell+A_{0} A_{\ell}$ and the perimeter of $A_{0} Y Z A_{\ell}$ equals $2 A_{0} A_{\ell}+1$. ![](https://cdn.mathpix.com/cropped/2024_11_18_7107063274cfa469597ag-56.jpg?height=209&width=1320&top_left_y=1957&top_left_x=371)  Recall a well-known fact stating that if a convex polygon $P_{1}$ is contained in a convex polygon $P_{2}$, then the perimeter of $P_{1}$ is at most the perimeter of $P_{2}$. Hence we obtain  $$ \ell+A_{0} A_{\ell} \leqslant 2 A_{0} A_{\ell}+1, \quad \text { i.e. } \quad \ell-1 \leqslant A_{0} A_{\ell} . $$  On the other hand, the triangle inequality yields  $$ A_{0} A_{\ell}<A_{\ell} A_{\ell+1}+A_{\ell+1} A_{\ell+2}+\ldots+A_{2 k} A_{0}=2 k+1-\ell \leqslant \ell-1 $$  which gives a contradiction. Therefore, there exists a vertex $A_{m}$ of $A_{0} A_{1} \ldots A_{\ell}$ which lies outside $A_{0} Y Z A_{\ell}$. Since  $$ \angle A_{\ell} A_{0} A_{1}<60^{\circ}=\angle A_{\ell} A_{0} Y \quad \text { and } \quad A_{\ell-1} A_{\ell} A_{0}<60^{\circ}=\angle Z A_{\ell} A_{0} $$  the distance between $A_{m}$ and $A_{0} A_{\ell}$ is at least $\sqrt{3} / 2$. Let $P$ be the projection of $A_{m}$ to $A_{0} A_{\ell}$. Then $P A_{m} \geqslant \sqrt{3} / 2$, and by (1) we have $A_{0} P>1 / 2$ and $P A_{\ell}>1 / 2$. Choose points $Q \in A_{0} P, R \in P A_{\ell}$, and $S \in P A_{m}$ such that $P Q=P R=1 / 2$ and $P S=\sqrt{3} / 2$. Then $Q R S$ is an equilateral triangle of side length 1 contained in $A_{0} A_{1} \ldots A_{\ell}$. ![](https://cdn.mathpix.com/cropped/2024_11_18_7107063274cfa469597ag-57.jpg?height=335&width=1332&top_left_y=404&top_left_x=365)  Comment. In fact, for every odd $n$ a stronger statement holds, which is formulated in terms defined in the solution above: there exists an equilateral triangle $A_{i} A_{i+1} B$ contained in $A_{0} A_{1} \ldots A_{\ell}$ for some $0 \leqslant i<\ell$. We sketch an indirect proof below.  As above, we get $\angle A_{\ell} A_{0} A_{1}<60^{\circ}$ and $A_{\ell-1} A_{\ell} A_{0}<60^{\circ}$. Choose an index $m \in[1, \ell-1]$ maximising the distance between $A_{m}$ and $A_{0} A_{\ell}$. Arguments from the above solution yield $1<m<\ell-1$. Then $\angle A_{0} A_{m-1} A_{m}>120^{\circ}$ and $\angle A_{m-1} A_{m} A_{\ell}>\angle A_{0} A_{m} A_{\ell} \geqslant 60^{\circ}$. We construct an equilateral triangle $A_{m-1} A_{m} B$ as in the figure below. If $B$ lies in $A_{0} A_{m-1} A_{m} A_{\ell}$, then we are done. Otherwise $B$ and $A_{m}$ lie on different sides of $A_{0} A_{\ell}$. As before, let $P$ be the projection of $A_{m}$ to $A_{0} A_{\ell}$. We will show that  $$ A_{0} A_{1}+A_{1} A_{2}+\ldots+A_{m-1} A_{m}<A_{0} P+1 / 2 $$  ![](https://cdn.mathpix.com/cropped/2024_11_18_7107063274cfa469597ag-57.jpg?height=358&width=1558&top_left_y=1232&top_left_x=249)  There exists a point $C$ on the segment $A_{0} P$ such that $\angle A_{m-1} C P=60^{\circ}$. Construct a parallelogram $A_{0} C A_{m-1} K$. Then the polyline $A_{0} A_{1} \ldots A_{m-1}$ is contained in the triangle $A_{m-1} K A_{0}$, so  $$ A_{0} A_{1}+A_{1} A_{2}+\ldots+A_{m-2} A_{m-1}+A_{m-1} A_{m} \leqslant A_{0} K+K A_{m-1}+A_{m-1} A_{m}=A_{0} C+C A_{m-1}+1 $$  To prove (2), it suffices to show that $C A_{m-1}<C P-1 / 2$. Let the line through $B$ parallel to $C P$ intersect the rays $A_{m-1} C$ and $A_{m} P$ at $D$ and $T$, respectively. It is easy to see that the desired inequality will follow from $D A_{m-1} \leqslant D T-1 / 2$.  Two possible arrangements of points are shown in the figures below. Observe that $\angle D A_{m-1} B \geqslant 60^{\circ}$, so there is a point $M$ on the segment $D B$ such that the triangle $D M A_{m-1}$ is equilateral. Then $\angle A_{m-1} M D=60^{\circ}=\angle A_{m-1} A_{m} B$, so $A_{m-1} M B A_{m}$ is a cyclic quadrilateral. Therefore, $\angle A_{m} M B=60^{\circ}$. Thus, $T$ lies on the ray $M B$ and we have to show that $M T \geqslant 1 / 2$. Indeed, $M T=A_{m} M / 2$ and $A_{m} M \geqslant A_{m} B=1$. This completes the proof of the inequality (2). ![](https://cdn.mathpix.com/cropped/2024_11_18_7107063274cfa469597ag-57.jpg?height=603&width=1490&top_left_y=2160&top_left_x=291)  Similarly, either there exists an equilateral triangle $A_{m} A_{m+1} B^{\prime}$ contained in $A_{0} A_{1} \ldots A_{\ell}$, or  $$ A_{m} A_{m+1}+A_{m+1} A_{m+2}+\ldots+A_{\ell-1} A_{\ell}<A_{\ell} P+1 / 2 $$  Adding (2) and (3) yields $A_{0} A_{1}+A_{1} A_{2}+\ldots+A_{\ell-1} A_{\ell}<A_{0} A_{\ell}+1$, which gives a contradiction.  This page is intentionally left blank


A point $D$ is chosen inside an acute-angled triangle $A B C$ with $A B>A C$ so that $\angle B A D=\angle D A C$. A point $E$ is constructed on the segment $A C$ so that $\angle A D E=\angle D C B$. Similarly, a point $F$ is constructed on the segment $A B$ so that $\angle A D F=\angle D B C$. A point $X$ is chosen on the line $A C$ so that $C X=B X$. Let $O_{1}$ and $O_{2}$ be the circumcentres of the triangles $A D C$ and $D X E$. Prove that the lines $B C, E F$, and $O_{1} O_{2}$ are concurrent.

Solution: Let $T A$ intersect the circle $(A B C)$ again at $M$. Due to the circles ( $B C E F$ ) and $(A M C B)$, and using the above Claim, we get $T M \cdot T A=T F \cdot T E=T B \cdot T C=T D^{2}$; in particular, the points $A, M, E$, and $F$ are concyclic.  Under the inversion with centre $T$ and radius $T D$, the point $M$ maps to $A$, and $B$ maps to $C$, which implies that the circle $(M B D)$ maps to the circle $(A D C)$. Their common point $D$ lies on the circle of the inversion, so the second intersection point $K$ also lies on that circle, which means $T K=T D$. It follows that the point $T$ and the centres of the circles ( $K D E$ ) and $(A D C)$ lie on the perpendicular bisector of $K D$.  Since the center of $(A D C)$ is $O_{1}$, it suffices to show now that the points $D, K, E$, and $X$ are concyclic (the center of the corresponding circle will be $O_{2}$ ).  The lines $B M, D K$, and $A C$ are the pairwise radical axes of the circles $(A B C M),(A C D K)$ and $(B M D K)$, so they are concurrent at some point $P$. Also, $M$ lies on the circle $(A E F)$, thus  $$ \begin{aligned} \Varangle(E X, X B) & =\Varangle(C X, X B)=\Varangle(X C, B C)+\Varangle(B C, B X)=2 \Varangle(A C, C B) \\ & =\Varangle(A C, C B)+\Varangle(E F, F A)=\Varangle(A M, B M)+\Varangle(E M, M A)=\Varangle(E M, B M), \end{aligned} $$  so the points $M, E, X$, and $B$ are concyclic. Therefore, $P E \cdot P X=P M \cdot P B=P K \cdot P D$, so the points $E, K, D$, and $X$ are concyclic, as desired. ![](https://cdn.mathpix.com/cropped/2024_11_18_7107063274cfa469597ag-61.jpg?height=935&width=1466&top_left_y=195&top_left_x=295)  Comment 1. We present here a different solution which uses similar ideas. Perform the inversion $\iota$ with centre $T$ and radius $T D$. It swaps $B$ with $C$ and $E$ with $F$; the point $D$ maps to itself. Let $X^{\prime}=\iota(X)$. Observe that the points $E, F, X$, and $X^{\prime}$ are concyclic, as well as the points $B, C, X$, and $X^{\prime}$. Then  $$ \begin{aligned} & \Varangle\left(C X^{\prime}, X^{\prime} F\right)=\Varangle\left(C X^{\prime}, X^{\prime} X\right)+\Varangle\left(X^{\prime} X, X^{\prime} F\right)=\Varangle(C B, B X)+\Varangle(E X, E F) \\ &=\Varangle(X C, C B)+\Varangle(E C, E F)=\Varangle(C A, C B)+\Varangle(B C, B F)=\Varangle(C A, A F), \end{aligned} $$  therefore the points $C, X^{\prime}, A$, and $F$ are concyclic. Let $X^{\prime} F$ intersect $A C$ at $P$, and let $K$ be the second common point of $D P$ and the circle $(A C D)$. Then  $$ P K \cdot P D=P A \cdot P C=P X^{\prime} \cdot P F=P E \cdot P X $$  hence, the points $K, X, D$, and $E$ lie on some circle $\omega_{1}$, while the points $K, X^{\prime}, D$, and $F$ lie on some circle $\omega_{2}$. (These circles are distinct since $\angle E X F+\angle E D F<\angle E A F+\angle D C B+\angle D B C<180^{\circ}$ ). The inversion $\iota$ swaps $\omega_{1}$ with $\omega_{2}$ and fixes their common point $D$, so it fixes their second common point $K$. Thus $T D=T K$ and the perpendicular bisector of $D K$ passes through $T$, as well as through the centres of the circles $(C D K A)$ and $(D E K X)$. ![](https://cdn.mathpix.com/cropped/2024_11_18_7107063274cfa469597ag-61.jpg?height=775&width=1154&top_left_y=1994&top_left_x=451)


Solution: We use only the first part of the Common remarks, namely, the facts that the tuples $(C, D, Q, E)$ and $(B, C, E, F)$ are both concyclic. We also introduce the point $T=$ $B C \cap E F$. Let the circle $(C D E)$ meet $B C$ again at $E_{1}$. Since $\angle E_{1} C Q=\angle D C E$, the $\operatorname{arcs} D E$ and $Q E_{1}$ of the circle $(C D Q)$ are equal, so $D Q \| E E_{1}$.  Since $B F E C$ is cyclic, the line $A D$ forms equal angles with $B C$ and $E F$, hence so does $E E_{1}$. Therefore, the triangle $E E_{1} T$ is isosceles, $T E=T E_{1}$, and $T$ lies on the common perpendicular bisector of $E E_{1}$ and $D Q$.  Let $U$ and $V$ be the centres of circles $(A D E)$ and $(C D Q E)$, respectively. Then $U O_{1}$ is the perpendicular bisector of $A D$. Moreover, the points $U, V$, and $O_{2}$ belong to the perpendicular bisector of $D E$. Since $U O_{1} \| V T$, in order to show that $O_{1} O_{2}$ passes through $T$, it suffices to show that  $$ \frac{O_{2} U}{O_{2} V}=\frac{O_{1} U}{T V} $$  Denote angles $A, B$, and $C$ of the triangle $A B C$ by $\alpha, \beta$, and $\gamma$, respectively. Projecting onto $A C$ we obtain  $$ \frac{O_{2} U}{O_{2} V}=\frac{(X E-A E) / 2}{(X E+E C) / 2}=\frac{A X}{C X}=\frac{A X}{B X}=\frac{\sin (\gamma-\beta)}{\sin \alpha} $$  The projection of $O_{1} U$ onto $A C$ is $(A C-A E) / 2=C E / 2$; the angle between $O_{1} U$ and $A C$ is $90^{\circ}-\alpha / 2$, so  $$ \frac{O_{1} U}{E C}=\frac{1}{2 \sin (\alpha / 2)} $$  Next, we claim that $E, V, C$, and $T$ are concyclic. Indeed, the point $V$ lies on the perpendicular bisector of $C E$, as well as on the internal angle bisector of $\angle C T F$. Therefore, $V$ coincides with the midpoint of the arc $C E$ of the circle (TCE).  Now we have $\angle E V C=2 \angle E E_{1} C=180^{\circ}-(\gamma-\beta)$ and $\angle V E T=\angle V E_{1} T=90^{\circ}-\angle E_{1} E C=$ $90^{\circ}-\alpha / 2$. Therefore,  $$ \frac{E C}{T V}=\frac{\sin \angle E T C}{\sin \angle V E T}=\frac{\sin (\gamma-\beta)}{\cos (\alpha / 2)} . $$  ![](https://cdn.mathpix.com/cropped/2024_11_18_7107063274cfa469597ag-62.jpg?height=986&width=1512&top_left_y=1774&top_left_x=266)  Recalling (2) and multiplying (3) and (4) we establish (1):  $$ \frac{O_{2} U}{O_{2} V}=\frac{\sin (\gamma-\beta)}{\sin \alpha}=\frac{1}{2 \sin (\alpha / 2)} \cdot \frac{\sin (\gamma-\beta)}{\cos (\alpha / 2)}=\frac{O_{1} U}{E C} \cdot \frac{E C}{T V}=\frac{O_{1} U}{T V} $$


Solution: Notice that $\angle A Q E=\angle Q C B$ and $\angle A Q F=\angle Q B C$; so, if we replace the point $D$ with $Q$ in the problem set up, the points $E, F$, and $T$ remain the same. So, by the Claim, we have $T Q^{2}=T B \cdot T C=T D^{2}$.  Thus, there exists a circle $\Gamma$ centred at $T$ and passing through $D$ and $Q$. We denote the second meeting point of the circles $\Gamma$ and $(A D C)$ by $K$. Let the line $A C$ meet the circle ( $D E K$ ) again at $Y$; we intend to prove that $Y=X$. As in Solution 1, this will yield that the point $T$, as well as the centres $O_{1}$ and $O_{2}$, all lie on the perpendicular bisector of $D K$.  Let $L=A D \cap B C$. We perform an inversion centred at $C$; the images of the points will be denoted by primes, e.g., $A^{\prime}$ is the image of $A$. We obtain the following configuration, constructed in a triangle $A^{\prime} C L^{\prime}$.  The points $D^{\prime}$ and $Q^{\prime}$ are chosen on the circumcircle $\Omega$ of $A^{\prime} L^{\prime} C$ such that $\Varangle\left(L^{\prime} C, D^{\prime} C\right)=$ $\Varangle\left(Q^{\prime} C, A^{\prime} C\right)$, which means that $A^{\prime} L^{\prime} \| D^{\prime} Q^{\prime}$. The lines $D^{\prime} Q^{\prime}$ and $A^{\prime} C$ meet at $E^{\prime}$.  A circle $\Gamma^{\prime}$ centred on $C L^{\prime}$ passes through $D^{\prime}$ and $Q^{\prime}$. Notice here that $B^{\prime}$ lies on the segment $C L^{\prime}$, and that $\angle A^{\prime} B^{\prime} C=\angle B A C=2 \angle L A C=2 \angle A^{\prime} L^{\prime} C$, so that $B^{\prime} L^{\prime}=B^{\prime} A^{\prime}$, and $B^{\prime}$ lies on the perpendicular bisector of $A^{\prime} L^{\prime}$ (which coincides with that of $D^{\prime} Q^{\prime}$ ). All this means that $B^{\prime}$ is the centre of $\Gamma^{\prime}$.  Finally, $K^{\prime}$ is the second meeting point of $A^{\prime} D^{\prime}$ and $\Gamma^{\prime}$, and $Y^{\prime}$ is the second meeting point of the circle $\left(D^{\prime} K^{\prime} E^{\prime}\right)$ and the line $A^{\prime} E^{\prime}$, We have $\Varangle\left(Y^{\prime} K^{\prime}, K^{\prime} A^{\prime}\right)=\Varangle\left(Y^{\prime} E^{\prime}, E^{\prime} D^{\prime}\right)=$ $\Varangle\left(Y^{\prime} A^{\prime}, A^{\prime} L^{\prime}\right)$, so $A^{\prime} L^{\prime}$ is tangent to the circumcircle $\omega$ of the triangle $Y^{\prime} A^{\prime} K^{\prime}$.  Let $O$ and $O^{*}$ be the centres of $\Omega$ and $\omega$, respectively. Then $O^{*} A^{\prime} \perp A^{\prime} L^{\prime} \perp B^{\prime} O$. The projections of vectors $\overrightarrow{O^{*} A^{\prime}}$ and $\overrightarrow{B^{\prime} O}$ onto $K^{\prime} D^{\prime}$ are equal to $\overrightarrow{K^{\prime} A^{\prime}} / 2=\overrightarrow{K^{\prime} D^{\prime}} / 2-\overrightarrow{A^{\prime} D^{\prime}} / 2$. So $\overrightarrow{O^{*} A^{\prime}}=\overrightarrow{B^{\prime} O}$, or equivalently $\overrightarrow{A^{\prime} O}=\overrightarrow{O^{*} B^{\prime}}$. Projecting this equality onto $A^{\prime} C$, we see that the projection of $\overrightarrow{O^{*} \overrightarrow{B^{\prime}}}$ equals $\overrightarrow{A^{\prime} C} / 2$. Since $O^{*}$ is projected to the midpoint of $A^{\prime} Y^{\prime}$, this yields that $B^{\prime}$ is projected to the midpoint of $C Y^{\prime}$, i.e., $B^{\prime} Y^{\prime}=B^{\prime} C$ and $\angle B^{\prime} Y^{\prime} C=\angle B^{\prime} C Y^{\prime}$. In the original figure, this rewrites as $\angle C B Y=\angle B C Y$, so $Y$ lies on the perpendicular bisector of $B C$, as desired. ![](https://cdn.mathpix.com/cropped/2024_11_18_7107063274cfa469597ag-63.jpg?height=843&width=1306&top_left_y=1783&top_left_x=381)  Comment 2. The point $K$ appears to be the same in Solutions 1 and 3 (and Comment 1 as well). One can also show that $K$ lies on the circle passing through $A, X$, and the midpoint of the arc $B A C$.  Comment 3. There are different proofs of the facts from the Common remarks, namely, the cyclicity of $B, C, E$, and $F$, and the Claim. We present one such alternative proof here.  We perform the composition $\phi$ of a homothety with centre $A$ and the reflection in $A D$, which maps $E$ to $B$. Let $U=\phi(D)$. Then $\Varangle(B C, C D)=\Varangle(A D, D E)=\Varangle(B U, U D)$, so the points $B, U, C$, and $D$ are concyclic. Therefore, $\Varangle(C U, U D)=\Varangle(C B, B D)=\Varangle(A D, D F)$, so $\phi(F)=C$. Then the coefficient of the homothety is $A C / A F=A B / A E$, and thus points $C, E, F$, and $B$ are concyclic.  Denote the centres of the circles $(E D F)$ and $(B U C D)$ by $O_{3}$ and $O_{4}$, respectively. Then $\phi\left(O_{3}\right)=$ $O_{4}$, hence $\Varangle\left(O_{3} D, D A\right)=-\Varangle\left(O_{4} U, U A\right)=\Varangle\left(O_{4} D, D A\right)$, whence the circle $(B D C)$ is tangent to the circle ( $E D F$ ).  Now, the radical axes of circles $(D E F),(B D C)$ and $(B C E F)$ intersect at $T$, and the claim follows. ![](https://cdn.mathpix.com/cropped/2024_11_18_7107063274cfa469597ag-64.jpg?height=869&width=941&top_left_y=682&top_left_x=563)  This suffices for Solution 1 to work. However, Solutions 2 and 3 need properties of point $Q$, established in Common remarks before Solution 1.  Comment 4. In the original problem proposal, the point $X$ was hidden. Instead, a circle $\gamma$ was constructed such that $D$ and $E$ lie on $\gamma$, and its center is collinear with $O_{1}$ and $T$. The problem requested to prove that, in a fixed triangle $A B C$, independently from the choice of $D$ on the bisector of $\angle B A C$, all circles $\gamma$ pass through a fixed point.


Let $\omega$ be the circumcircle of a triangle $A B C$, and let $\Omega_{A}$ be its excircle which is tangent to the segment $B C$. Let $X$ and $Y$ be the intersection points of $\omega$ and $\Omega_{A}$. Let $P$ and $Q$ be the projections of $A$ onto the tangent lines to $\Omega_{A}$ at $X$ and $Y$, respectively. The tangent line at $P$ to the circumcircle of the triangle $A P X$ intersects the tangent line at $Q$ to the circumcircle of the triangle $A Q Y$ at a point $R$. Prove that $A R \perp B C$.

Solution: Let $D$ be the point of tangency of $B C$ and $\Omega_{A}$. Let $D^{\prime}$ be the point such that $D D^{\prime}$ is a diameter of $\Omega_{A}$. Let $R^{\prime}$ be (the unique) point such that $A R^{\prime} \perp B C$ and $R^{\prime} D^{\prime} \| B C$. We shall prove that $R^{\prime}$ coincides with $R$.  Let $P X$ intersect $A B$ and $D^{\prime} R^{\prime}$ at $S$ and $T$, respectively. Let $U$ be the ideal common point of the parallel lines $B C$ and $D^{\prime} R^{\prime}$. Note that the (degenerate) hexagon $A S X T U C$ is circumscribed around $\Omega_{A}$, hence by the Brianchon theorem $A T, S U$, and $X C$ concur at a point which we denote by $V$. Then $V S \| B C$. It follows that $\Varangle(S V, V X)=\Varangle(B C, C X)=$ $\Varangle(B A, A X)$, hence $A X S V$ is cyclic. Therefore, $\Varangle(P X, X A)=\Varangle(S V, V A)=\Varangle\left(R^{\prime} T, T A\right)$. Since $\angle A P T=\angle A R^{\prime} T=90^{\circ}$, the quadrilateral $A P R^{\prime} T$ is cyclic. Hence,  $$ \Varangle(X A, A P)=90^{\circ}-\Varangle(P X, X A)=90^{\circ}-\Varangle\left(R^{\prime} T, T A\right)=\Varangle\left(T A, A R^{\prime}\right)=\Varangle\left(T P, P R^{\prime}\right) . $$  It follows that $P R^{\prime}$ is tangent to the circle $(A P X)$. Analogous argument shows that $Q R^{\prime}$ is tangent to the circle $(A Q Y)$. Therefore, $R=R^{\prime}$ and $A R \perp B C$. ![](https://cdn.mathpix.com/cropped/2024_11_18_7107063274cfa469597ag-65.jpg?height=995&width=1380&top_left_y=1333&top_left_x=349)  Comment 1. After showing $\Varangle(P X, X A)=\Varangle\left(R^{\prime} T, T A\right)$ one can finish the solution as follows. There exists a spiral similarity mapping the triangle $A T R^{\prime}$ to the triangle $A X P$. So the triangles $A T X$ and $A R^{\prime} P$ are similar and equioriented. Thus, $\Varangle(T X, X A)=\Varangle\left(R^{\prime} P, P A\right)$, which implies that $P R^{\prime}$ is tangent to the circle ( $A P X$ ).