Version 1. Let $n$ be a positive integer, and set $N=2^{n}$. Determine the smallest real number $a_{n}$ such that, for all real $x$,  $$ \sqrt[N]{\frac{x^{2 N}+1}{2}} \leqslant a_{n}(x-1)^{2}+x $$  Version 2. For every positive integer $N$, determine the smallest real number $b_{N}$ such that, for all real $x$,  $$ \sqrt[N]{\frac{x^{2 N}+1}{2}} \leqslant b_{N}(x-1)^{2}+x $$  (Ireland)

Solution: 1 (for Version 2). Like in   First of all, $\mathcal{I}(N, 0)$ is obvious. Further, if $x>0$, then the left hand sides of $\mathcal{I}(N,-x)$ and $\mathcal{I}(N, x)$ coincide, while the right hand side of $\mathcal{I}(N,-x)$ is larger than that of $\mathcal{I}(N,-x)$ (their difference equals $2(N-1) x \geqslant 0)$. Therefore, $\mathcal{I}(N,-x)$ follows from $\mathcal{I}(N, x)$. So, hereafter we suppose that $x>0$.  Divide $\mathcal{I}(N, x)$ by $x$ and let $t=(x-1)^{2} / x=x-2+1 / x$; then $\mathcal{I}(n, x)$ reads as  $$ f_{N}:=\frac{x^{N}+x^{-N}}{2} \leqslant\left(1+\frac{N}{2} t\right)^{N} $$  The key identity is the expansion of $f_{N}$ as a polynomial in $t$ :


Solution: 2 (for Version 2). Here we present another proof of the inequality (2) for $x>0$, or, equivalently, for $t=(x-1)^{2} / x \geqslant 0$. Instead of finding the coefficients of the polynomial $f_{N}=f_{N}(t)$ we may find its roots, which is in a sense more straightforward. Note that the recurrence (4) and the initial conditions $f_{0}=1, f_{1}=1+t / 2$ imply that $f_{N}$ is a polynomial in $t$ of degree $N$. It also follows by induction that $f_{N}(0)=1, f_{N}^{\prime}(0)=N^{2} / 2$ : the recurrence relations read as $f_{N+1}(0)+f_{N-1}(0)=2 f_{N}(0)$ and $f_{N+1}^{\prime}(0)+f_{N-1}^{\prime}(0)=2 f_{N}^{\prime}(0)+f_{N}(0)$, respectively.  Next, if $x_{k}=\exp \left(\frac{i \pi(2 k-1)}{2 N}\right)$ for $k \in\{1,2, \ldots, N\}$, then  $$ -t_{k}:=2-x_{k}-\frac{1}{x_{k}}=2-2 \cos \frac{\pi(2 k-1)}{2 N}=4 \sin ^{2} \frac{\pi(2 k-1)}{4 N}>0 $$  and  $$ f_{N}\left(t_{k}\right)=\frac{x_{k}^{N}+x_{k}^{-N}}{2}=\frac{\exp \left(\frac{i \pi(2 k-1)}{2}\right)+\exp \left(-\frac{i \pi(2 k-1)}{2}\right)}{2}=0 . $$  So the roots of $f_{N}$ are $t_{1}, \ldots, t_{N}$ and by the AM-GM inequality we have  $$ \begin{aligned} f_{N}(t)=\left(1-\frac{t}{t_{1}}\right)\left(1-\frac{t}{t_{2}}\right) \ldots\left(1-\frac{t}{t_{N}}\right) & \leqslant\left(1-\frac{t}{N}\left(\frac{1}{t_{1}}+\ldots+\frac{1}{t_{n}}\right)\right)^{N}= \\ \left(1+\frac{t f_{N}^{\prime}(0)}{N}\right)^{N} & =\left(1+\frac{N}{2} t\right)^{N} \end{aligned} $$  Comment. The polynomial $f_{N}(t)$ equals to $\frac{1}{2} T_{N}(t+2)$, where $T_{n}$ is the $n^{\text {th }}$ Chebyshev polynomial of the first kind: $T_{n}(2 \cos s)=2 \cos n s, T_{n}(x+1 / x)=x^{n}+1 / x^{n}$.


Solution: 3 (for Version 2). Here we solve the problem when $N \geqslant 1$ is an arbitrary real number. For a real number $a$ let  $$ f(x)=\left(\frac{x^{2 N}+1}{2}\right)^{\frac{1}{N}}-a(x-1)^{2}-x $$  Then $f(1)=0$,  $$ f^{\prime}(x)=\left(\frac{x^{2 N}+1}{2}\right)^{\frac{1}{N}-1} x^{2 N-1}-2 a(x-1)-1 \quad \text { and } \quad f^{\prime}(1)=0 $$  $f^{\prime \prime}(x)=(1-N)\left(\frac{x^{2 N}+1}{2}\right)^{\frac{1}{N}-2} x^{4 N-2}+(2 N-1)\left(\frac{x^{2 N}+1}{2}\right)^{\frac{1}{N}-1} x^{2 N-2}-2 a \quad$ and $\quad f^{\prime \prime}(1)=N-2 a$. So if $a<\frac{N}{2}$, the function $f$ has a strict local minimum at point 1 , and the inequality $f(x) \leqslant$ $0=f(1)$ does not hold. This proves $b_{N} \geqslant N / 2$.  For $a=\frac{N}{2}$ we have $f^{\prime \prime}(1)=0$ and  $$ f^{\prime \prime \prime}(x)=\frac{1}{2}(1-N)(1-2 N)\left(\frac{x^{2 N}+1}{2}\right)^{\frac{1}{N}-3} x^{2 N-3}\left(1-x^{2 N}\right) \quad \begin{cases}>0 & \text { if } 0<x<1 \text { and } \\ <0 & \text { if } x>1\end{cases} $$  Hence, $f^{\prime \prime}(x)<0$ for $x \neq 1 ; f^{\prime}(x)>0$ for $x<1$ and $f^{\prime}(x)<0$ for $x>1$, finally $f(x)<0$ for $x \neq 1$.  Comment. Version 2 is much more difficult, of rather A5 or A6 difficulty. The induction in Version 1 is rather straightforward, while all three above solutions of Version 2 require some creativity.  This page is intentionally left blank


Let $\mathcal{A}$ denote the set of all polynomials in three variables $x, y, z$ with integer coefficients. Let $\mathcal{B}$ denote the subset of $\mathcal{A}$ formed by all polynomials which can be expressed as  $$ (x+y+z) P(x, y, z)+(x y+y z+z x) Q(x, y, z)+x y z R(x, y, z) $$  with $P, Q, R \in \mathcal{A}$. Find the smallest non-negative integer $n$ such that $x^{i} y^{j} z^{k} \in \mathcal{B}$ for all nonnegative integers $i, j, k$ satisfying $i+j+k \geqslant n$. (Venezuela)

Solution: We start by showing that $n \leqslant 4$, i.e., any monomial $f=x^{i} y^{j} z^{k}$ with $i+j+k \geqslant 4$ belongs to $\mathcal{B}$. Assume that $i \geqslant j \geqslant k$, the other cases are analogous.  Let $x+y+z=p, x y+y z+z x=q$ and $x y z=r$. Then  $$ 0=(x-x)(x-y)(x-z)=x^{3}-p x^{2}+q x-r $$  therefore $x^{3} \in \mathcal{B}$. Next, $x^{2} y^{2}=x y q-(x+y) r \in \mathcal{B}$. If $k \geqslant 1$, then $r$ divides $f$, thus $f \in \mathcal{B}$. If $k=0$ and $j \geqslant 2$, then $x^{2} y^{2}$ divides $f$, thus we have $f \in \mathcal{B}$ again. Finally, if $k=0, j \leqslant 1$, then $x^{3}$ divides $f$ and $f \in \mathcal{B}$ in this case also.  In order to prove that $n \geqslant 4$, we show that the monomial $x^{2} y$ does not belong to $\mathcal{B}$. Assume the contrary:  $$ x^{2} y=p P+q Q+r R $$  for some polynomials $P, Q, R$. If polynomial $P$ contains the monomial $x^{2}$ (with nonzero coefficient), then $p P+q Q+r R$ contains the monomial $x^{3}$ with the same nonzero coefficient. So $P$ does not contain $x^{2}, y^{2}, z^{2}$ and we may write  $$ x^{2} y=(x+y+z)(a x y+b y z+c z x)+(x y+y z+z x)(d x+e y+f z)+g x y z $$  where $a, b, c ; d, e, f ; g$ are the coefficients of $x y, y z, z x ; x, y, z ; x y z$ in the polynomials $P$; $Q ; R$, respectively (the remaining coefficients do not affect the monomials of degree 3 in $p P+q Q+r R)$. By considering the coefficients of $x y^{2}$ we get $e=-a$, analogously $e=-b$, $f=-b, f=-c, d=-c$, thus $a=b=c$ and $f=e=d=-a$, but then the coefficient of $x^{2} y$ in the right hand side equals $a+d=0 \neq 1$.  Comment 1. The general question is the following. Call a polynomial $f\left(x_{1}, \ldots, x_{n}\right)$ with integer coefficients nice, if $f(0,0, \ldots, 0)=0$ and $f\left(x_{\pi_{1}}, \ldots, x_{\pi_{n}}\right)=f\left(x_{1}, \ldots, x_{n}\right)$ for any permutation $\pi$ of $1, \ldots, n$ (in other words, $f$ is symmetric and its constant term is zero.) Denote by $\mathcal{I}$ the set of polynomials of the form  $$ p_{1} q_{1}+p_{2} q_{2}+\ldots+p_{m} q_{m} $$  where $m$ is an integer, $q_{1}, \ldots, q_{m}$ are polynomials with integer coefficients, and $p_{1}, \ldots, p_{m}$ are nice polynomials. Find the least $N$ for which any monomial of degree at least $N$ belongs to $\mathcal{I}$.  The answer is $n(n-1) / 2+1$. The lower bound follows from the following claim: the polynomial  $$ F\left(x_{1}, \ldots, x_{n}\right)=x_{2} x_{3}^{2} x_{4}^{3} \cdot \ldots \cdot x_{n}^{n-1} $$  does not belong to $\mathcal{I}$. Assume that $F=\sum p_{i} q_{i}$, according to (2). By taking only the monomials of degree $n(n-1) / 2$, we can additionally assume that every $p_{i}$ and every $q_{i}$ is homogeneous, $\operatorname{deg} p_{i}>0$, and $\operatorname{deg} p_{i}+\operatorname{deg} q_{i}=$ $\operatorname{deg} F=n(n-1) / 2$ for all $i$.  Consider the alternating sum  $$ \sum_{\pi} \operatorname{sign}(\pi) F\left(x_{\pi_{1}}, \ldots, x_{\pi_{n}}\right)=\sum_{i=1}^{m} p_{i} \sum_{\pi} \operatorname{sign}(\pi) q_{i}\left(x_{\pi_{1}}, \ldots, x_{\pi_{n}}\right):=S $$  where the summation is done over all permutations $\pi$ of $1, \ldots n$, and $\operatorname{sign}(\pi)$ denotes the sign of the permutation $\pi$. Since $\operatorname{deg} q_{i}=n(n-1) / 2-\operatorname{deg} p_{i}<n(n-1) / 2$, in any monomial $Q$ of $q_{i}$, there are at least two variables, say $x_{\alpha}$ and $x_{\beta}$, with equal exponents. Therefore $\sum_{\pi} \operatorname{sign}(\pi) Q\left(x_{\pi_{1}}, \ldots, x_{\pi_{n}}\right)=0$, because each pair of terms that corresponds to permutations which differ by the transposition of $\alpha$ and $\beta$, cancels out. This holds for any $i=1, \ldots, m$ and any monomial of $q_{i}$, so $S=0$. But the left hand side of (3) is a non-zero polynomial. This is a contradiction.  Let us now prove, using induction on $n$, that any monomial $h=x_{1}^{c_{1}} \ldots x_{n}^{c_{n}}$ of degree $n(n-1) / 2+1$ belongs to $\mathcal{I}$, and additionally all $p_{i}, q_{i}$ in the representation (2) can be chosen homogeneous with sum of degrees equal to $n(n-1) / 2+1$. (Obviously, any monomial of degree at least $n(n-1) / 2+1$ is divisible by a monomial of degree exactly $n(n-1) / 2+1$, thus this suffices.) The proposition is true for $n=1$, so assume that $n>1$ and that the proposition is proved for smaller values of $n$.  We proceed by an internal induction on $S:=\left|\left\{i: c_{i}=0\right\}\right|$. In the base case $S=0$ the monomial $h$ is divisible by the nice polynomial $x_{1} \cdot \ldots x_{n}$, therefore $h \in \mathcal{I}$. Now assume that $S>0$ and that the claim holds for smaller values of $S$. Let $T=n-S$. We may assume that $c_{T+1}=\ldots=c_{n}=0$ and $h=x_{1} \cdot \ldots \cdot x_{T} g\left(x_{1}, \ldots, x_{n-1}\right)$, where $\operatorname{deg} g=n(n-1) / 2-T+1 \geqslant(n-1)(n-2) / 2+1$. Using the outer induction hypothesis we represent $g$ as $p_{1} q_{1}+\ldots+p_{m} q_{m}$, where $p_{i}\left(x_{1}, \ldots, x_{n-1}\right)$ are nice polynomials in $n-1$ variables. There exist nice homogeneous polynomials $P_{i}\left(x_{1}, \ldots, x_{n}\right)$ such that $P_{i}\left(x_{1}, \ldots, x_{n-1}, 0\right)=p_{i}\left(x_{1}, \ldots, x_{n-1}\right)$. In other words, $\Delta_{i}:=p_{i}\left(x_{1}, \ldots, x_{n-1}\right)-P_{i}\left(x_{1}, \ldots, x_{n-1}, x_{n}\right)$ is divisible by $x_{n}$, let $\Delta_{i}=x_{n} g_{i}$. We get  $$ h=x_{1} \cdot \ldots \cdot x_{T} \sum p_{i} q_{i}=x_{1} \cdot \ldots \cdot x_{T} \sum\left(P_{i}+x_{n} g_{i}\right) q_{i}=\left(x_{1} \cdot \ldots \cdot x_{T} x_{n}\right) \sum g_{i} q_{i}+\sum P_{i} q_{i} \in \mathcal{I} $$  The first term belongs to $\mathcal{I}$ by the inner induction hypothesis. This completes both inductions. Comment 2. The solutions above work smoothly for the versions of the original problem and its extensions to the case of $n$ variables, where all polynomials are assumed to have real coefficients. In the version with integer coefficients, the argument showing that $x^{2} y \notin \mathcal{B}$ can be simplified: it is not hard to show that in every polynomial $f \in \mathcal{B}$, the sum of the coefficients of $x^{2} y, x^{2} z, y^{2} x, y^{2} z, z^{2} x$ and $z^{2} y$ is even. A similar fact holds for any number of variables and also implies that $N \geqslant n(n-1) / 2+1$ in terms of the previous comment.


Suppose that $a, b, c, d$ are positive real numbers satisfying $(a+c)(b+d)=a c+b d$. Find the smallest possible value of  $$ \frac{a}{b}+\frac{b}{c}+\frac{c}{d}+\frac{d}{a} $$

Solution: To show that $S \geqslant 8$, apply the AM-GM inequality twice as follows:  $$ \left(\frac{a}{b}+\frac{c}{d}\right)+\left(\frac{b}{c}+\frac{d}{a}\right) \geqslant 2 \sqrt{\frac{a c}{b d}}+2 \sqrt{\frac{b d}{a c}}=\frac{2(a c+b d)}{\sqrt{a b c d}}=\frac{2(a+c)(b+d)}{\sqrt{a b c d}} \geqslant 2 \cdot \frac{2 \sqrt{a c} \cdot 2 \sqrt{b d}}{\sqrt{a b c d}}=8 . $$  The above inequalities turn into equalities when $a=c$ and $b=d$. Then the condition $(a+c)(b+d)=a c+b d$ can be rewritten as $4 a b=a^{2}+b^{2}$. So it is satisfied when $a / b=2 \pm \sqrt{3}$. Hence, $S$ attains value 8 , e.g., when $a=c=1$ and $b=d=2+\sqrt{3}$.


Solution: By homogeneity we may suppose that $a b c d=1$. Let $a b=C, b c=A$ and $c a=B$. Then $a, b, c$ can be reconstructed from $A, B$ and $C$ as $a=\sqrt{B C / A}, b=\sqrt{A C / B}$ and $c=\sqrt{A B / C}$. Moreover, the condition $(a+c)(b+d)=a c+b d$ can be written in terms of $A, B, C$ as  $$ A+\frac{1}{A}+C+\frac{1}{C}=b c+a d+a b+c d=(a+c)(b+d)=a c+b d=B+\frac{1}{B} . $$  We then need to minimize the expression  $$ \begin{aligned} S & :=\frac{a d+b c}{b d}+\frac{a b+c d}{a c}=\left(A+\frac{1}{A}\right) B+\left(C+\frac{1}{C}\right) \frac{1}{B} \\ & =\left(A+\frac{1}{A}\right)\left(B-\frac{1}{B}\right)+\left(A+\frac{1}{A}+C+\frac{1}{C}\right) \frac{1}{B} \\ & =\left(A+\frac{1}{A}\right)\left(B-\frac{1}{B}\right)+\left(B+\frac{1}{B}\right) \frac{1}{B} . \end{aligned} $$  Without loss of generality assume that $B \geqslant 1$ (otherwise, we may replace $B$ by $1 / B$ and swap $A$ and $C$, this changes neither the relation nor the function to be maximized). Therefore, we can write  $$ S \geqslant 2\left(B-\frac{1}{B}\right)+\left(B+\frac{1}{B}\right) \frac{1}{B}=2 B+\left(1-\frac{1}{B}\right)^{2}=: f(B) $$  Clearly, $f$ increases on $[1, \infty)$. Since  $$ B+\frac{1}{B}=A+\frac{1}{A}+C+\frac{1}{C} \geqslant 4, $$  we have $B \geqslant B^{\prime}$, where $B^{\prime}=2+\sqrt{3}$ is the unique root greater than 1 of the equation $B^{\prime}+1 / B^{\prime}=4$. Hence,  $$ S \geqslant f(B) \geqslant f\left(B^{\prime}\right)=2\left(B^{\prime}-\frac{1}{B^{\prime}}\right)+\left(B^{\prime}+\frac{1}{B^{\prime}}\right) \frac{1}{B^{\prime}}=2 B^{\prime}-\frac{2}{B^{\prime}}+\frac{4}{B^{\prime}}=8 $$  It remains to note that when $A=C=1$ and $B=B^{\prime}$ we have the equality $S=8$.


Solution: We present another proof of the inequality $S \geqslant 8$. We start with the estimate  $$ \left(\frac{a}{b}+\frac{c}{d}\right)+\left(\frac{b}{c}+\frac{d}{a}\right) \geqslant 2 \sqrt{\frac{a c}{b d}}+2 \sqrt{\frac{b d}{a c}} $$  Let $y=\sqrt{a c}$ and $z=\sqrt{b d}$, and assume, without loss of generality, that $a c \geqslant b d$. By the AM-GM inequality, we have  $$ y^{2}+z^{2}=a c+b d=(a+c)(b+d) \geqslant 2 \sqrt{a c} \cdot 2 \sqrt{b d}=4 y z . $$  Substituting $x=y / z$, we get $4 x \leqslant x^{2}+1$. For $x \geqslant 1$, this holds if and only if $x \geqslant 2+\sqrt{3}$. Now we have  $$ 2 \sqrt{\frac{a c}{b d}}+2 \sqrt{\frac{b d}{a c}}=2\left(x+\frac{1}{x}\right) . $$  Clearly, this is minimized by setting $x(\geqslant 1)$ as close to 1 as possible, i.e., by taking $x=2+\sqrt{3}$. Then $2(x+1 / x)=2((2+\sqrt{3})+(2-\sqrt{3}))=8$, as required.


Let $a, b, c, d$ be four real numbers such that $a \geqslant b \geqslant c \geqslant d>0$ and $a+b+c+d=1$. Prove that  $$ (a+2 b+3 c+4 d) a^{a} b^{b} c^{c} d^{d}<1 $$  (Belgium)

Solution: The weighted AM-GM inequality with weights $a, b, c, d$ gives  $$ a^{a} b^{b} c^{c} d^{d} \leqslant a \cdot a+b \cdot b+c \cdot c+d \cdot d=a^{2}+b^{2}+c^{2}+d^{2} $$  so it suffices to prove that $(a+2 b+3 c+4 d)\left(a^{2}+b^{2}+c^{2}+d^{2}\right)<1=(a+b+c+d)^{3}$. This can be done in various ways, for example:  $$ \begin{aligned} (a+b+c+d)^{3}> & a^{2}(a+3 b+3 c+3 d)+b^{2}(3 a+b+3 c+3 d) \\ & \quad+c^{2}(3 a+3 b+c+3 d)+d^{2}(3 a+3 b+3 c+d) \\ \geqslant & \left(a^{2}+b^{2}+c^{2}+d^{2}\right) \cdot(a+2 b+3 c+4 d) \end{aligned} $$


Solution: From $b \geqslant d$ we get  $$ a+2 b+3 c+4 d \leqslant a+3 b+3 c+3 d=3-2 a $$  If $a<\frac{1}{2}$, then the statement can be proved by  $$ (a+2 b+3 c+4 d) a^{a} b^{b} c^{c} d^{d} \leqslant(3-2 a) a^{a} a^{b} a^{c} a^{d}=(3-2 a) a=1-(1-a)(1-2 a)<1 $$  From now on we assume $\frac{1}{2} \leqslant a<1$. By $b, c, d<1-a$ we have  $$ b^{b} c^{c} d^{d}<(1-a)^{b} \cdot(1-a)^{c} \cdot(1-a)^{d}=(1-a)^{1-a} . $$  Therefore,  $$ (a+2 b+3 c+4 d) a^{a} b^{b} c^{c} d^{d}<(3-2 a) a^{a}(1-a)^{1-a} $$  For $0<x<1$, consider the functions $f(x)=(3-2 x) x^{x}(1-x)^{1-x} \quad$ and $\quad g(x)=\log f(x)=\log (3-2 x)+x \log x+(1-x) \log (1-x) ;$ hereafter, $\log$ denotes the natural logarithm. It is easy to verify that  $$ g^{\prime \prime}(x)=-\frac{4}{(3-2 x)^{2}}+\frac{1}{x}+\frac{1}{1-x}=\frac{1+8(1-x)^{2}}{x(1-x)(3-2 x)^{2}}>0 $$  so $g$ is strictly convex on $(0,1)$. By $g\left(\frac{1}{2}\right)=\log 2+2 \cdot \frac{1}{2} \log \frac{1}{2}=0$ and $\lim _{x \rightarrow 1-} g(x)=0$, we have $g(x) \leqslant 0$ (and hence $f(x) \leqslant 1$ ) for all $x \in\left[\frac{1}{2}, 1\right)$, and therefore  $$ (a+2 b+3 c+4 d) a^{a} b^{b} c^{c} d^{d}<f(a) \leqslant 1 $$  Comment. For a large number of variables $a_{1} \geqslant a_{2} \geqslant \ldots \geqslant a_{n}>0$ with $\sum_{i} a_{i}=1$, the inequality  $$ \left(\sum_{i} i a_{i}\right) \prod_{i} a_{i}^{a_{i}} \leqslant 1 $$  does not necessarily hold. Indeed, let $a_{2}=a_{3}=\ldots=a_{n}=\varepsilon$ and $a_{1}=1-(n-1) \varepsilon$, where $n$ and $\varepsilon \in(0,1 / n)$ will be chosen later. Then  $$ \left(\sum_{i} i a_{i}\right) \prod_{i} a_{i}^{a_{i}}=\left(1+\frac{n(n-1)}{2} \varepsilon\right) \varepsilon^{(n-1) \varepsilon}(1-(n-1) \varepsilon)^{1-(n-1) \varepsilon} $$  If $\varepsilon=C / n^{2}$ with an arbitrary fixed $C>0$ and $n \rightarrow \infty$, then the factors $\varepsilon^{(n-1) \varepsilon}=\exp ((n-1) \varepsilon \log \varepsilon)$ and $(1-(n-1) \varepsilon)^{1-(n-1) \varepsilon}$ tend to 1 , so the limit of (1) in this set-up equals $1+C / 2$. This is not simply greater than 1 , but it can be arbitrarily large.


A magician intends to perform the following trick. She announces a positive integer $n$, along with $2 n$ real numbers $x_{1}<\ldots<x_{2 n}$, to the audience. A member of the audience then secretly chooses a polynomial $P(x)$ of degree $n$ with real coefficients, computes the $2 n$ values $P\left(x_{1}\right), \ldots, P\left(x_{2 n}\right)$, and writes down these $2 n$ values on the blackboard in non-decreasing order. After that the magician announces the secret polynomial to the audience.  Can the magician find a strategy to perform such a trick? (Luxembourg)

Solution: Let $x_{1}<x_{2}<\ldots<x_{2 n}$ be real numbers chosen by the magician. We will construct two distinct polynomials $P(x)$ and $Q(x)$, each of degree $n$, such that the member of audience will write down the same sequence for both polynomials. This will mean that the magician cannot distinguish $P$ from $Q$. Claim. There exists a polynomial $P(x)$ of degree $n$ such that $P\left(x_{2 i-1}\right)+P\left(x_{2 i}\right)=0$ for $i=$ $1,2, \ldots, n$. Proof. We want to find a polynomial $a_{n} x^{n}+\ldots+a_{1} x+a_{0}$ satisfying the following system of equations:  $$ \left\{\begin{array}{l} \left(x_{1}^{n}+x_{2}^{n}\right) a_{n}+\left(x_{1}^{n-1}+x_{2}^{n-1}\right) a_{n-1}+\ldots+2 a_{0}=0 \\ \left(x_{3}^{n}+x_{4}^{n}\right) a_{n}+\left(x_{3}^{n-1}+x_{4}^{n-1}\right) a_{n-1}+\ldots+2 a_{0}=0 \\ \cdots \\ \left(x_{2 n-1}^{n}+x_{2 n}^{n}\right) a_{n}+\left(x_{2 n-1}^{n-1}+x_{2 n}^{n-1}\right) a_{n-1}+\ldots+2 a_{0}=0 \end{array}\right. $$  We use the well known fact that a homogeneous system of $n$ linear equations in $n+1$ variables has a nonzero solution. (This fact can be proved using induction on $n$, via elimination of variables.) Applying this fact to the above system, we find a nonzero polynomial $P(x)$ of degree not exceeding $n$ such that its coefficients $a_{0}, \ldots, a_{n}$ satisfy this system. Therefore $P\left(x_{2 i-1}\right)+P\left(x_{2 i}\right)=0$ for all $i=1,2, \ldots, n$. Notice that $P$ has a root on each segment $\left[x_{2 i-1}, x_{2 i}\right]$ by the Intermediate Value theorem, so $n$ roots in total. Since $P$ is nonzero, we get $\operatorname{deg} P=n$.  Now consider a polynomial $P(x)$ provided by the Claim, and take $Q(x)=-P(x)$. The properties of $P(x)$ yield that $P\left(x_{2 i-1}\right)=Q\left(x_{2 i}\right)$ and $Q\left(x_{2 i-1}\right)=P\left(x_{2 i}\right)$ for all $i=1,2, \ldots, n$. It is also clear that $P \neq-P=Q$ and $\operatorname{deg} Q=\operatorname{deg} P=n$.  Comment. It can be shown that for any positive integer $n$ the magician can choose $2 n+1$ distinct real numbers so as to perform such a trick. Moreover, she can perform such a trick with almost all (in a proper sense) $(2 n+1)$-tuples of numbers.


Determine all functions $f: \mathbb{Z} \rightarrow \mathbb{Z}$ such that  $$ f^{a^{2}+b^{2}}(a+b)=a f(a)+b f(b) \quad \text { for every } a, b \in \mathbb{Z} $$  Here, $f^{n}$ denotes the $n^{\text {th }}$ iteration of $f$, i.e., $f^{0}(x)=x$ and $f^{n+1}(x)=f\left(f^{n}(x)\right)$ for all $n \geqslant 0$.

Solution: Refer to the main equation as $E(a, b)$. $E(0, b)$ reads as $f^{b^{2}}(b)=b f(b)$. For $b=-1$ this gives $f(-1)=0$. Now $E(a,-1)$ reads as  $$ f^{a^{2}+1}(a-1)=a f(a)=f^{a^{2}}(a) . $$  For $x \in \mathbb{Z}$ define the orbit of $x$ by $\mathcal{O}(x)=\{x, f(x), f(f(x)), \ldots\} \subseteq \mathbb{Z}$. We see that the orbits $\mathcal{O}(a-1)$ and $\mathcal{O}(a)$ differ by finitely many terms. Hence, any two orbits differ by finitely many terms. In particular, this implies that either all orbits are finite or all orbits are infinite. Case 1: All orbits are finite. Then $\mathcal{O}(0)$ is finite. Using $E(a,-a)$ we get  $$ a(f(a)-f(-a))=a f(a)-a f(-a)=f^{2 a^{2}}(0) \in \mathcal{O}(0) $$  For $|a|>\max _{z \in \mathcal{O}(0)}|z|$, this yields $f(a)=f(-a)$ and $f^{2 a^{2}}(0)=0$. Therefore, the sequence $\left(f^{k}(0): k=0,1, \ldots\right)$ is purely periodic with a minimal period $T$ which divides $2 a^{2}$. Analogously, $T$ divides $2(a+1)^{2}$, therefore, $T \mid \operatorname{gcd}\left(2 a^{2}, 2(a+1)^{2}\right)=2$, i.e., $f(f(0))=0$ and $a(f(a)-f(-a))=f^{2 a^{2}}(0)=0$ for all $a$. Thus,  $$ \begin{array}{ll} f(a)=f(-a) \quad \text { for all } a \neq 0 \\ \text { in particular, } & f(1)=f(-1)=0 \end{array} $$  Next, for each $n \in \mathbb{Z}$, by $E(n, 1-n)$ we get  $$ n f(n)+(1-n) f(1-n)=f^{n^{2}+(1-n)^{2}}(1)=f^{2 n^{2}-2 n}(0)=0 $$  Assume that there exists some $m \neq 0$ such that $f(m) \neq 0$. Choose such an $m$ for which $|m|$ is minimal possible. Then $|m|>1$ due to $(\boldsymbol{\phi}) ; f(|m|) \neq 0$ due to ( $\boldsymbol{\phi})$; and $f(1-|m|) \neq 0$ due to $(\Omega)$ for $n=|m|$. This contradicts to the minimality assumption.  So, $f(n)=0$ for $n \neq 0$. Finally, $f(0)=f^{3}(0)=f^{4}(2)=2 f(2)=0$. Clearly, the function $f(x) \equiv 0$ satisfies the problem condition, which provides the first of the two answers. Case 2: All orbits are infinite. Since the orbits $\mathcal{O}(a)$ and $\mathcal{O}(a-1)$ differ by finitely many terms for all $a \in \mathbb{Z}$, each two orbits $\mathcal{O}(a)$ and $\mathcal{O}(b)$ have infinitely many common terms for arbitrary $a, b \in \mathbb{Z}$.  For a minute, fix any $a, b \in \mathbb{Z}$. We claim that all pairs $(n, m)$ of nonnegative integers such that $f^{n}(a)=f^{m}(b)$ have the same difference $n-m$. Arguing indirectly, we have $f^{n}(a)=f^{m}(b)$ and $f^{p}(a)=f^{q}(b)$ with, say, $n-m>p-q$, then $f^{p+m+k}(b)=f^{p+n+k}(a)=f^{q+n+k}(b)$, for all nonnegative integers $k$. This means that $f^{\ell+(n-m)-(p-q)}(b)=f^{\ell}(b)$ for all sufficiently large $\ell$, i.e., that the sequence $\left(f^{n}(b)\right)$ is eventually periodic, so $\mathcal{O}(b)$ is finite, which is impossible.  Now, for every $a, b \in \mathbb{Z}$, denote the common difference $n-m$ defined above by $X(a, b)$. We have $X(a-1, a)=1$ by (1). Trivially, $X(a, b)+X(b, c)=X(a, c)$, as if $f^{n}(a)=f^{m}(b)$ and $f^{p}(b)=f^{q}(c)$, then $f^{p+n}(a)=f^{p+m}(b)=f^{q+m}(c)$. These two properties imply that $X(a, b)=b-a$ for all $a, b \in \mathbb{Z}$.  But (1) yields $f^{a^{2}+1}(f(a-1))=f^{a^{2}}(f(a))$, so  $$ 1=X(f(a-1), f(a))=f(a)-f(a-1) \quad \text { for all } a \in \mathbb{Z} $$  Recalling that $f(-1)=0$, we conclude by (two-sided) induction on $x$ that $f(x)=x+1$ for all $x \in \mathbb{Z}$.  Finally, the obtained function also satisfies the assumption. Indeed, $f^{n}(x)=x+n$ for all $n \geqslant 0$, so  $$ f^{a^{2}+b^{2}}(a+b)=a+b+a^{2}+b^{2}=a f(a)+b f(b) $$  Comment. There are many possible variations of the solution above, but it seems that finiteness of orbits seems to be a crucial distinction in all solutions. However, the case distinction could be made in different ways; in particular, there exist some versions of Case 1 which work whenever there is at least one finite orbit.  We believe that Case 2 is conceptually harder than Case 1.


Let $n$ and $k$ be positive integers. Prove that for $a_{1}, \ldots, a_{n} \in\left[1,2^{k}\right]$ one has  $$ \sum_{i=1}^{n} \frac{a_{i}}{\sqrt{a_{1}^{2}+\ldots+a_{i}^{2}}} \leqslant 4 \sqrt{k n} $$

Solution: Partition the set of indices $\{1,2, \ldots, n\}$ into disjoint subsets $M_{1}, M_{2}, \ldots, M_{k}$ so that $a_{\ell} \in\left[2^{j-1}, 2^{j}\right]$ for $\ell \in M_{j}$. Then, if $\left|M_{j}\right|=: p_{j}$, we have  $$ \sum_{\ell \in M_{j}} \frac{a_{\ell}}{\sqrt{a_{1}^{2}+\ldots+a_{\ell}^{2}}} \leqslant \sum_{i=1}^{p_{j}} \frac{2^{j}}{2^{j-1} \sqrt{i}}=2 \sum_{i=1}^{p_{j}} \frac{1}{\sqrt{i}} $$  where we used that $a_{\ell} \leqslant 2^{j}$ and in the denominator every index from $M_{j}$ contributes at least $\left(2^{j-1}\right)^{2}$. Now, using $\sqrt{i}-\sqrt{i-1}=\frac{1}{\sqrt{i}+\sqrt{i-1}} \geqslant \frac{1}{2 \sqrt{i}}$, we deduce that  $$ \sum_{\ell \in M_{j}} \frac{a_{\ell}}{\sqrt{a_{1}^{2}+\ldots+a_{\ell}^{2}}} \leqslant 2 \sum_{i=1}^{p_{j}} \frac{1}{\sqrt{i}} \leqslant 2 \sum_{i=1}^{p_{j}} 2(\sqrt{i}-\sqrt{i-1})=4 \sqrt{p_{j}} $$  Therefore, summing over $j=1, \ldots, k$ and using the QM-AM inequality, we obtain  $$ \sum_{\ell=1}^{n} \frac{a_{\ell}}{\sqrt{a_{1}^{2}+\ldots+a_{\ell}^{2}}} \leqslant 4 \sum_{j=1}^{k} \sqrt{\left|M_{j}\right|} \leqslant 4 \sqrt{k \sum_{j=1}^{k}\left|M_{j}\right|}=4 \sqrt{k n} $$  Comment. Consider the function $f\left(a_{1}, \ldots, a_{n}\right)=\sum_{i=1}^{n} \frac{a_{i}}{\sqrt{a_{1}^{2}+\ldots+a_{i}^{2}}}$. One can see that rearranging the variables in increasing order can only increase the value of $f\left(a_{1}, \ldots, a_{n}\right)$. Indeed, if $a_{j}>a_{j+1}$ for some index $j$ then we have  $$ f\left(a_{1}, \ldots, a_{j-1}, a_{j+1}, a_{j}, a_{j+2}, \ldots, a_{n}\right)-f\left(a_{1}, \ldots, a_{n}\right)=\frac{a}{S}+\frac{b}{\sqrt{S^{2}-a^{2}}}-\frac{b}{S}-\frac{a}{\sqrt{S^{2}-b^{2}}} $$  where $a=a_{j}, b=a_{j+1}$, and $S=\sqrt{a_{1}^{2}+\ldots+a_{j+1}^{2}}$. The positivity of the last expression above follows from  $$ \frac{b}{\sqrt{S^{2}-a^{2}}}-\frac{b}{S}=\frac{a^{2} b}{S \sqrt{S^{2}-a^{2}} \cdot\left(S+\sqrt{S^{2}-a^{2}}\right)}>\frac{a b^{2}}{S \sqrt{S^{2}-b^{2}} \cdot\left(S+\sqrt{S^{2}-b^{2}}\right)}=\frac{a}{\sqrt{S^{2}-b^{2}}}-\frac{a}{S} . $$  Comment. If $k<n$, the example $a_{m}:=2^{k(m-1) / n}$ shows that the problem statement is sharp up to a multiplicative constant. For $k \geqslant n$ the trivial upper bound $n$ becomes sharp up to a multiplicative constant.


Solution: Apply induction on $n$. The base $n \leqslant 16$ is clear: our sum does not exceed $n \leqslant 4 \sqrt{n k}$. For the inductive step from $1, \ldots, n-1$ to $n \geqslant 17$ consider two similar cases. Case 1: $n=2 t$.  Let $x_{\ell}=\frac{a_{\ell}}{\sqrt{a_{1}^{2}+\ldots+a_{\ell}^{2}}}$. We have  $$ \exp \left(-x_{t+1}^{2}-\ldots-x_{2 t}^{2}\right) \geqslant\left(1-x_{t+1}^{2}\right) \ldots\left(1-x_{2 t}^{2}\right)=\frac{a_{1}^{2}+\ldots+a_{t}^{2}}{a_{1}^{2}+\ldots+a_{2 t}^{2}} \geqslant \frac{1}{1+4^{k}} $$  where we used that the product is telescopic and then an estimate $a_{t+i} \leqslant 2^{k} a_{i}$ for $i=1, \ldots, t$. Therefore, $x_{t+1}^{2}+\ldots+x_{2 t}^{2} \leqslant \log \left(4^{k}+1\right) \leqslant 2 k$, where log denotes the natural logarithm. This implies $x_{t+1}+\ldots+x_{2 t} \leqslant \sqrt{2 k t}$. Hence, using the inductive hypothesis for $n=t$ we get  $$ \sum_{\ell=1}^{2 t} x_{\ell} \leqslant 4 \sqrt{k t}+\sqrt{2 k t} \leqslant 4 \sqrt{2 k t} $$  Case 2: $n=2 t+1$. Analogously, we get $x_{t+2}^{2}+\ldots+x_{2 t+1}^{2} \leqslant \log \left(4^{k}+1\right) \leqslant 2 k$ and  $$ \sum_{\ell=1}^{2 t+1} x_{\ell} \leqslant 4 \sqrt{k(t+1)}+\sqrt{2 k t} \leqslant 4 \sqrt{k(2 t+1)} $$  The last inequality is true for all $t \geqslant 8$ since  $$ 4 \sqrt{2 t+1}-\sqrt{2 t} \geqslant 3 \sqrt{2 t}=\sqrt{18 t} \geqslant \sqrt{16 t+16}=4 \sqrt{t+1} $$


Let $\mathbb{R}^{+}$be the set of positive real numbers. Determine all functions $f: \mathbb{R}^{+} \rightarrow \mathbb{R}^{+}$ such that, for all positive real numbers $x$ and $y$,  $$ f(x+f(x y))+y=f(x) f(y)+1 $$

Solution: A straightforward check shows that $f(x)=x+1$ satisfies (*). We divide the proof of the converse statement into a sequence of steps. Step 1: $f$ is injective. Put $x=1$ in (*) and rearrange the terms to get  $$ y=f(1) f(y)+1-f(1+f(y)) $$  Therefore, if $f\left(y_{1}\right)=f\left(y_{2}\right)$, then $y_{1}=y_{2}$. Step 2: $f$ is (strictly) monotone increasing. For any fixed $y \in \mathbb{R}^{+}$, the function  $$ g(x):=f(x+f(x y))=f(x) f(y)+1-y $$  is injective by Step 1. Therefore, $x_{1}+f\left(x_{1} y\right) \neq x_{2}+f\left(x_{2} y\right)$ for all $y, x_{1}, x_{2} \in \mathbb{R}^{+}$with $x_{1} \neq x_{2}$. Plugging in $z_{i}=x_{i} y$, we arrive at  $$ \frac{z_{1}-z_{2}}{y} \neq f\left(z_{2}\right)-f\left(z_{1}\right), \quad \text { or } \quad \frac{1}{y} \neq \frac{f\left(z_{2}\right)-f\left(z_{1}\right)}{z_{1}-z_{2}} $$  for all $y, z_{1}, z_{2} \in \mathbb{R}^{+}$with $z_{1} \neq z_{2}$. This means that the right-hand side of the rightmost relation is always non-positive, i.e., $f$ is monotone non-decreasing. Since $f$ is injective, it is strictly monotone. Step 3: There exist constants $a$ and $b$ such that $f(y)=a y+b$ for all $y \in \mathbb{R}^{+}$. Since $f$ is monotone and bounded from below by 0 , for each $x_{0} \geqslant 0$, there exists a right limit $\lim _{x \backslash x_{0}} f(x) \geqslant 0$. Put $p=\lim _{x \backslash 0} f(x)$ and $q=\lim _{x \backslash p} f(x)$.  Fix an arbitrary $y$ and take the limit of $(*)$ as $x \searrow 0$. We have $f(x y) \searrow p$ and hence $f(x+f(x y)) \searrow q$; therefore, we obtain  $$ q+y=p f(y)+1, \quad \text { or } \quad f(y)=\frac{q+y-1}{p} $$  (Notice that $p \neq 0$, otherwise $q+y=1$ for all $y$, which is absurd.) The claim is proved. Step 4: $f(x)=x+1$ for all $x \in \mathbb{R}^{+}$. Based on the previous step, write $f(x)=a x+b$. Putting this relation into (*) we get  $$ a(x+a x y+b)+b+y=(a x+b)(a y+b)+1, $$  which can be rewritten as  $$ (a-a b) x+(1-a b) y+a b+b-b^{2}-1=0 \quad \text { for all } x, y \in \mathbb{R}^{+} . $$  This identity may hold only if all the coefficients are 0 , i.e.,  $$ a-a b=1-a b=a b+b-b^{2}-1=0 . $$  Hence, $a=b=1$.


Solution: We provide another proof that $f(x)=x+1$ is the only function satisfying (*). Put $a=f(1)$. Define the function $\phi: \mathbb{R}^{+} \rightarrow \mathbb{R}$ by  $$ \phi(x)=f(x)-x-1 $$  Then equation (*) reads as  $$ \phi(x+f(x y))=f(x) f(y)-f(x y)-x-y $$  Since the right-hand side of (1) is symmetric under swapping $x$ and $y$, we obtain  $$ \phi(x+f(x y))=\phi(y+f(x y)) $$  In particular, substituting $(x, y)=(t, 1 / t)$ we get  $$ \phi(a+t)=\phi\left(a+\frac{1}{t}\right), \quad t \in \mathbb{R}^{+} . $$  Notice that the function $f$ is bounded from below by a positive constant. Indeed, for each $y \in \mathbb{R}^{+}$, the relation (*) yields $f(x) f(y)>y-1$, hence  $$ f(x)>\frac{y-1}{f(y)} \quad \text { for all } x \in \mathbb{R}^{+} $$  If $y>1$, this provides a desired positive lower bound for $f(x)$. Now, let $M=\inf _{x \in \mathbb{R}^{+}} f(x)>0$. Then, for all $y \in \mathbb{R}^{+}$,  $$ M \geqslant \frac{y-1}{f(y)}, \quad \text { or } \quad f(y) \geqslant \frac{y-1}{M} $$  Lemma 1. The function $f(x)$ (and hence $\phi(x)$ ) is bounded on any segment $[p, q]$, where $0<p<q<+\infty$. Proof. $f$ is bounded from below by $M$. It remains to show that $f$ is bounded from above on $[p, q]$. Substituting $y=1$ into (*), we get  $$ f(x+f(x))=a f(x) $$  Take $z \in[p, q]$ and put $s=f(z)$. By (4), we have  $$ f(z+s)=a s \quad \text { and } \quad f(z+s+a s)=f(z+s+f(z+s))=a^{2} s $$  Plugging in $(x, y)=\left(z, 1+\frac{s}{z}\right)$ to $(*)$ and using (3), we obtain  $$ f(z+a s)=f(z+f(z+s))=s f\left(1+\frac{s}{z}\right)-\frac{s}{z} \geqslant \frac{s^{2}}{M z}-\frac{s}{z} $$  Now, substituting $(x, y)=\left(z+a s, \frac{z}{z+a s}\right)$ to $(*)$ and applying the above estimate and the estimate $f(y) \geqslant M$, we obtain  $$ \begin{aligned} a^{2} s=f(z+s+a s)=f(z+a s+f(z))=f(z+a s) & f\left(\frac{z}{z+a s}\right)+1-\frac{z}{z+a s} \\ & \geqslant M f(z+a s) \geqslant \frac{s^{2}}{z}-\frac{M s}{z} \geqslant \frac{s^{2}}{q}-\frac{M s}{p} \end{aligned} $$  This yields $s \leqslant q\left(\frac{M}{p}+a^{2}\right)=: L$, and $f$ is bounded from above by $L$ on $[p, q]$.  Applying Lemma 1 to the segment $[a, a+1]$, we see that $\phi$ is bounded on it. By (2) we get that $\phi$ is also bounded on $[a+1,+\infty)$, and hence on $[a,+\infty)$. Put $C=\max \{a, 3\}$. Lemma 2. For all $x \geqslant C$, we have $\phi(x)=0$ (and hence $f(x)=x+1$ ). Proof. Substituting $y=x$ to (1), we obtain  $$ \phi\left(x+f\left(x^{2}\right)\right)=f(x)^{2}-f\left(x^{2}\right)-2 x $$  hence,  $$ \phi\left(x+f\left(x^{2}\right)\right)+\phi\left(x^{2}\right)=f(x)^{2}-(x+1)^{2}=\phi(x)(f(x)+x+1) $$  Since $f(x)+x+1 \geqslant C+1 \geqslant 4$, we obtain that  $$ |\phi(x)| \leqslant \frac{1}{4}\left(\left|\phi\left(x+f\left(x^{2}\right)\right)\right|+\left|\phi\left(x^{2}\right)\right|\right) $$  Since $C \geqslant a$, there exists a finite supremum $S=\sup _{x \geqslant C}|\phi(x)|$. For each $x \in[C,+\infty)$, both $x+f\left(x^{2}\right)$ and $x^{2}$ are greater than $x$; hence they also lie in $[C,+\infty)$. Therefore, taking the supremum of the left-hand side of (6) over $x \in[C,+\infty$ ), we obtain $S \leqslant S / 2$ and hence $S=0$. Thus, $\phi(x)=0$ for all $x \geqslant C$.  It remains to show that $f(y)=y+1$ when $0<y<C$. For each $y$, choose $x>\max \left\{C, \frac{C}{y}\right\}$. Then all three numbers $x, x y$, and $x+f(x y)$ are greater than $C$, so (*) reads as  $$ (x+x y+1)+1+y=(x+1) f(y)+1, \text { hence } f(y)=y+1 $$  Comment 1. It may be useful to rewrite (*) in the form  $$ \phi(x+f(x y))+\phi(x y)=\phi(x) \phi(y)+x \phi(y)+y \phi(x)+\phi(x)+\phi(y) $$  This general identity easily implies both (1) and (5). Comment 2. There are other ways to prove that $f(x) \geqslant x+1$. Once one has proved this, they can use this stronger estimate instead of (3) in the proof of Lemma 1. Nevertheless, this does not make this proof simpler. So proving that $f(x) \geqslant x+1$ does not seem to be a serious progress towards the solution of the problem. In what follows, we outline one possible proof of this inequality.  First of all, we improve inequality (3) by noticing that, in fact, $f(x) f(y) \geqslant y-1+M$, and hence  $$ f(y) \geqslant \frac{y-1}{M}+1 $$  Now we divide the argument into two steps. Step 1: We show that $M \leqslant 1$. Suppose that $M>1$; recall the notation $a=f(1)$. Substituting $y=1 / x$ in (*), we get  $$ f(x+a)=f(x) f\left(\frac{1}{x}\right)+1-\frac{1}{x} \geqslant M f(x), $$  provided that $x \geqslant 1$. By a straightforward induction on $\lceil(x-1) / a\rceil$, this yields  $$ f(x) \geqslant M^{(x-1) / a} $$  Now choose an arbitrary $x_{0} \in \mathbb{R}^{+}$and define a sequence $x_{0}, x_{1}, \ldots$ by $x_{n+1}=x_{n}+f\left(x_{n}\right) \geqslant x_{n}+M$ for all $n \geqslant 0$; notice that the sequence is unbounded. On the other hand, by (4) we get  $$ a x_{n+1}>a f\left(x_{n}\right)=f\left(x_{n+1}\right) \geqslant M^{\left(x_{n+1}-1\right) / a}, $$  which cannot hold when $x_{n+1}$ is large enough.  Step 2: We prove that $f(y) \geqslant y+1$ for all $y \in \mathbb{R}^{+}$. Arguing indirectly, choose $y \in \mathbb{R}^{+}$such that $f(y)<y+1$, and choose $\mu$ with $f(y)<\mu<y+1$. Define a sequence $x_{0}, x_{1}, \ldots$ by choosing a large $x_{0} \geqslant 1$ and setting $x_{n+1}=x_{n}+f\left(x_{n} y\right) \geqslant x_{n}+M$ for all $n \geqslant 0$ (this sequence is also unbounded). If $x_{0}$ is large enough, then (7) implies that $(\mu-f(y)) f\left(x_{n}\right) \geqslant 1-y$ for all $n$. Therefore,  $$ f\left(x_{n+1}\right)=f(y) f\left(x_{n}\right)+1-y \leqslant \mu f\left(x_{n}\right) . $$  On the other hand, since $M \leqslant 1$, inequality (7) implies that $f(z) \geqslant z$, provided that $z \geqslant 1$. Hence, if $x_{0}$ is large enough, we have $x_{n+1} \geqslant x_{n}(1+y)$ for all $n$. Therefore,  $$ x_{0}(1+y)^{n} \leqslant x_{n} \leqslant f\left(x_{n}\right) \leqslant \mu^{n} f\left(x_{0}\right) $$  which cannot hold when $n$ is large enough.


Let $n$ be a positive integer. Find the number of permutations $a_{1}, a_{2}, \ldots, a_{n}$ of the sequence $1,2, \ldots, n$ satisfying  $$ a_{1} \leqslant 2 a_{2} \leqslant 3 a_{3} \leqslant \ldots \leqslant n a_{n} $$  (United Kingdom)

Solution: Denote by $P_{n}$ the number of permutations that satisfy (*). It is easy to see that $P_{1}=1$ and $P_{2}=2$. Lemma 1. Let $n \geqslant 3$. If a permutation $a_{1}, \ldots, a_{n}$ satisfies (*) then either $a_{n}=n$, or $a_{n-1}=n$ and $a_{n}=n-1$. Proof. Let $k$ be the index for which $a_{k}=n$. If $k=n$ then we are done. If $k=n-1$ then, by $(*)$, we have $n(n-1)=(n-1) a_{n-1} \leqslant n a_{n}$, so $a_{n} \geqslant n-1$. Since $a_{n} \neq a_{n-1}=n$, the only choice for $a_{n}$ is $a_{n}=n-1$.  Now suppose that $k \leqslant n-2$. For every $k<i<n$ we have $k n=k a_{k} \leqslant i a_{i}<n a_{i}$, so $a_{i} \geqslant k+1$. Moreover, $n a_{n} \geqslant(n-1) a_{n-1} \geqslant(n-1)(k+1)=n k+(n-1-k)>n k$, so $a_{n} \geqslant k+1$. Now the $n-k+1$ numbers $a_{k}, a_{k+1}, \ldots, a_{n}$ are all greater than $k$; but there are only $n-k$ such values; this is not possible.  If $a_{n}=n$ then $a_{1}, a_{2}, \ldots, a_{n-1}$ must be a permutation of the numbers $1, \ldots, n-1$ satisfying $a_{1} \leqslant 2 a_{2} \leqslant \ldots \leqslant(n-1) a_{n-1}$; there are $P_{n-1}$ such permutations. The last inequality in (*), $(n-1) a_{n-1} \leqslant n a_{n}=n^{2}$, holds true automatically.  If $\left(a_{n-1}, a_{n}\right)=(n, n-1)$, then $a_{1}, \ldots, a_{n-2}$ must be a permutation of $1, \ldots, n-2$ satisfying $a_{1} \leqslant \ldots \leqslant(n-2) a_{n-2}$; there are $P_{n-2}$ such permutations. The last two inequalities in (*) hold true automatically by $(n-2) a_{n-2} \leqslant(n-2)^{2}<n(n-1)=(n-1) a_{n-1}=n a_{n}$.  Hence, the sequence $\left(P_{1}, P_{2}, \ldots\right)$ satisfies the recurrence relation $P_{n}=P_{n-1}+P_{n-2}$ for $n \geqslant 3$. The first two elements are $P_{1}=F_{2}$ and $P_{2}=F_{3}$, so by a trivial induction we have $P_{n}=F_{n+1}$.


Solution: We claim that all sought permutations are of the following kind. Split $\{1,2, \ldots, n\}$ into singletons and pairs of adjacent numbers. In each pair, swap the two numbers and keep the singletons unchanged.  Such permutations correspond to tilings of a $1 \times n$ chessboard using dominoes and unit squares; it is well-known that the number of such tilings is the Fibonacci number $F_{n+1}$.  The claim follows by induction from Lemma 2. Assume that $a_{1}, \ldots, a_{n}$ is a permutation satisfying (*), and $k$ is an integer such that $1 \leqslant k \leqslant n$ and $\left\{a_{1}, a_{2}, \ldots, a_{k-1}\right\}=\{1,2, \ldots, k-1\}$. (If $k=1$, the condition is empty.) Then either $a_{k}=k$, or $a_{k}=k+1$ and $a_{k+1}=k$. Proof. Choose $t$ with $a_{t}=k$. Since $k \notin\left\{a_{1}, \ldots, a_{k-1}\right\}$, we have either $t=k$ or $t>k$. If $t=k$ then we are done, so assume $t>k$.  Notice that one of the numbers among the $t-k$ numbers $a_{k}, a_{k+1}, \ldots, a_{t-1}$ is at least $t$, because there are only $t-k-1$ values between $k$ and $t$. Let $i$ be an index with $k \leqslant i<t$ and $a_{i} \geqslant t$; then $k t=t a_{t} \geqslant i a_{i} \geqslant i t \geqslant k t$, so that all the inequalities turn into equalities, hence $i=k$ and $a_{k}=t$. If $t=k+1$, we are done.  Suppose that $t>k+1$. Then the chain of inequalities $k t=k a_{k} \leqslant \ldots \leqslant t a_{t}=k t$ should also turn into a chain of equalities. From this point we can find contradictions in several ways; for example by pointing to $a_{t-1}=\frac{k t}{t-1}=k+\frac{k}{t-1}$ which cannot be an integer, or considering the product of the numbers $(k+1) a_{k+1}, \ldots,(t-1) a_{t-1}$; the numbers $a_{k+1}, \ldots, a_{t-1}$ are distinct and greater than $k$, so  $$ (k t)^{t-k-1}=(k+1) a_{k+1} \cdot(k+2) a_{k+2} \cdot \ldots \cdot(t-1) a_{t-1} \geqslant((k+1)(k+2) \cdot \ldots \cdot(t-1))^{2} $$  Notice that $(k+i)(t-i)=k t+i(t-k-i)>k t$ for $1 \leqslant i<t-k$. This leads to the contradiction  $$ (k t)^{t-k-1} \geqslant((k+1)(k+2) \cdot \ldots \cdot(t-1))^{2}=\prod_{i=1}^{t-k-1}(k+i)(t-i)>(k t)^{t-k-1} $$  Therefore, the case $t>k+1$ is not possible.


In a regular 100-gon, 41 vertices are colored black and the remaining 59 vertices are colored white. Prove that there exist 24 convex quadrilaterals $Q_{1}, \ldots, Q_{24}$ whose corners are vertices of the 100 -gon, so that  - the quadrilaterals $Q_{1}, \ldots, Q_{24}$ are pairwise disjoint, and - every quadrilateral $Q_{i}$ has three corners of one color and one corner of the other color. (Austria)

Solution: Call a quadrilateral skew-colored, if it has three corners of one color and one corner of the other color. We will prove the following Claim. If the vertices of a convex $(4 k+1)$-gon $P$ are colored black and white such that each color is used at least $k$ times, then there exist $k$ pairwise disjoint skew-colored quadrilaterals whose vertices are vertices of $P$. (One vertex of $P$ remains unused.)  The problem statement follows by removing 3 arbitrary vertices of the 100-gon and applying the Claim to the remaining 97 vertices with $k=24$. Proof of the Claim. We prove by induction. For $k=1$ we have a pentagon with at least one black and at least one white vertex. If the number of black vertices is even then remove a black vertex; otherwise remove a white vertex. In the remaining quadrilateral, there are an odd number of black and an odd number of white vertices, so the quadrilateral is skew-colored.  For the induction step, assume $k \geqslant 2$. Let $b$ and $w$ be the numbers of black and white vertices, respectively; then $b, w \geqslant k$ and $b+w=4 k+1$. Without loss of generality we may assume $w \geqslant b$, so $k \leqslant b \leqslant 2 k$ and $2 k+1 \leqslant w \leqslant 3 k+1$.  We want to find four consecutive vertices such that three of them are white, the fourth one is black. Denote the vertices by $V_{1}, V_{2}, \ldots, V_{4 k+1}$ in counterclockwise order, such that $V_{4 k+1}$ is black, and consider the following $k$ groups of vertices:  $$ \left(V_{1}, V_{2}, V_{3}, V_{4}\right),\left(V_{5}, V_{6}, V_{7}, V_{8}\right), \ldots,\left(V_{4 k-3}, V_{4 k-2}, V_{4 k-1}, V_{4 k}\right) $$  In these groups there are $w$ white and $b-1$ black vertices. Since $w>b-1$, there is a group, $\left(V_{i}, V_{i+1}, V_{i+2}, V_{i+3}\right)$ that contains more white than black vertices. If three are white and one is black in that group, we are done. Otherwise, if $V_{i}, V_{i+1}, V_{i+2}, V_{i+3}$ are all white then let $V_{j}$ be the first black vertex among $V_{i+4}, \ldots, V_{4 k+1}$ (recall that $V_{4 k+1}$ is black); then $V_{j-3}, V_{j-2}$ and $V_{j-1}$ are white and $V_{j}$ is black.  Now we have four consecutive vertices $V_{i}, V_{i+1}, V_{i+2}, V_{i+3}$ that form a skew-colored quadrilateral. The remaining vertices form a convex ( $4 k-3$ )-gon; $w-3$ of them are white and $b-1$ are black. Since $b-1 \geqslant k-1$ and $w-3 \geqslant(2 k+1)-3>k-1$, we can apply the Claim with $k-1$.  Comment. It is not true that the vertices of the 100 -gon can be split into 25 skew-colored quadrilaterals. A possible counter-example is when the vertices $V_{1}, V_{3}, V_{5}, \ldots, V_{81}$ are black and the other vertices, $V_{2}, V_{4}, \ldots, V_{80}$ and $V_{82}, V_{83}, \ldots, V_{100}$ are white. For having 25 skew-colored quadrilaterals, there should be 8 containing three black vertices. But such a quadrilateral splits the other 96 vertices into four sets in such a way that at least two sets contain odd numbers of vertices and therefore they cannot be grouped into disjoint quadrilaterals. ![](https://cdn.mathpix.com/cropped/2024_11_18_bcdd154f2030efbe2fa4g-34.jpg?height=318&width=552&top_left_y=2462&top_left_x=752)


Let $n$ be an integer with $n \geqslant 2$. On a slope of a mountain, $n^{2}$ checkpoints are marked, numbered from 1 to $n^{2}$ from the bottom to the top. Each of two cable car companies, $A$ and $B$, operates $k$ cable cars numbered from 1 to $k$; each cable car provides a transfer from some checkpoint to a higher one. For each company, and for any $i$ and $j$ with $1 \leqslant i<j \leqslant k$, the starting point of car $j$ is higher than the starting point of car $i$; similarly, the finishing point of car $j$ is higher than the finishing point of car $i$. Say that two checkpoints are linked by some company if one can start from the lower checkpoint and reach the higher one by using one or more cars of that company (no movement on foot is allowed).  Determine the smallest $k$ for which one can guarantee that there are two checkpoints that are linked by each of the two companies. (India)

Solution: We start with showing that for any $k \leqslant n^{2}-n$ there may be no pair of checkpoints linked by both companies. Clearly, it suffices to provide such an example for $k=n^{2}-n$.  Let company $A$ connect the pairs of checkpoints of the form $(i, i+1)$, where $n \nmid i$. Then all pairs of checkpoints $(i, j)$ linked by $A$ satisfy $\lceil i / n\rceil=\lceil j / n\rceil$.  Let company $B$ connect the pairs of the form $(i, i+n)$, where $1 \leqslant i \leqslant n^{2}-n$. Then pairs of checkpoints $(i, j)$ linked by $B$ satisfy $i \equiv j(\bmod n)$. Clearly, no pair $(i, j)$ satisfies both conditions, so there is no pair linked by both companies.  Now we show that for $k=n^{2}-n+1$ there always exist two required checkpoints. Define an $A$-chain as a sequence of checkpoints $a_{1}<a_{2}<\ldots<a_{t}$ such that company $A$ connects $a_{i}$ with $a_{i+1}$ for all $1 \leqslant i \leqslant t-1$, but there is no $A$-car transferring from some checkpoint to $a_{1}$ and no $A$-car transferring from $a_{t}$ to any other checkpoint. Define $B$-chains similarly. Moving forth and back, one easily sees that any checkpoint is included in a unique $A$-chain (possibly consisting of that single checkpoint), as well as in a unique $B$-chain. Now, put each checkpoint into a correspondence to the pair of the $A$-chain and the $B$-chain it belongs to.  All finishing points of $A$-cars are distinct, so there are $n^{2}-k=n-1$ checkpoints that are not such finishing points. Each of them is a starting point of a unique $A$-chain, so the number of $A$-chains is $n-1$. Similarly, the number of $B$-chains also equals $n-1$. Hence, there are $(n-1)^{2}$ pairs consisting of an $A$ - and a $B$-chain. Therefore, two of the $n^{2}$ checkpoints correspond to the same pair, so that they belong to the same $A$-chain, as well as to the same $B$-chain. This means that they are linked by both companies, as required.  Comment 1. The condition that the $i^{\text {th }}$ car starts and finishes lower than the $j^{\text {th }}$ one is used only in the "moving forth and back" argument and in the counting of starting points of the chains. In both cases, the following weaker assumption suffices: No two cars of the same company start at the same checkpoint, and no two such cars finish at the same checkpoint.  Thus, the problem conditions could be weakened in this way,, with no affect on the solution. Comment 2. If the number of checkpoints were $N$, then the answer would be $N-\lceil\sqrt{N}\rceil+1$. The solution above works verbatim for this generalization.


The Fibonacci numbers $F_{0}, F_{1}, F_{2}, \ldots$ are defined inductively by $F_{0}=0, F_{1}=1$, and $F_{n+1}=F_{n}+F_{n-1}$ for $n \geqslant 1$. Given an integer $n \geqslant 2$, determine the smallest size of a set $S$ of integers such that for every $k=2,3, \ldots, n$ there exist some $x, y \in S$ such that $x-y=F_{k}$. (Croatia)

Solution: First we show that if a set $S \subset \mathbb{Z}$ satisfies the conditions then $|S| \geqslant \frac{n}{2}+1$. Let $d=\lceil n / 2\rceil$, so $n \leqslant 2 d \leqslant n+1$. In order to prove that $|S| \geqslant d+1$, construct a graph as follows. Let the vertices of the graph be the elements of $S$. For each $1 \leqslant k \leqslant d$, choose two elements $x, y \in S$ such that $x-y=F_{2 k-1}$, and add the pair $(x, y)$ to the graph as edge. (Note that by the problem's constraints, there must be a pair $(x, y)$ with $x-y=F_{2 k-1}$ for every $3 \leqslant 2 k-1 \leqslant 2 d-1 \leqslant n$; moreover, due to $F_{1}=F_{2}$ we have a pair with $x-y=F_{1}$ as well.) We will say that the length of the edge $(x, y)$ is $|x-y|$.  We claim that the graph contains no cycle. For the sake of contradiction, suppose that the graph contains a cycle $\left(x_{1}, \ldots, x_{\ell}\right)$, and let the longest edge in the cycle be $\left(x_{1}, x_{\ell}\right)$ with length $F_{2 m+1}$. The other edges $\left(x_{1}, x_{2}\right), \ldots,\left(x_{\ell-1}, x_{\ell}\right)$ in the cycle are shorter than $F_{2 m+1}$ and distinct, their lengths form a subset of $\left\{F_{1}, F_{3}, \ldots, F_{2 m-1}\right\}$. But this is not possible because  $$ \begin{aligned} F_{2 m+1} & =\left|x_{\ell}-x_{1}\right| \leqslant \sum_{i=1}^{\ell-1}\left|x_{i+1}-x_{i}\right| \leqslant F_{1}+F_{3}+F_{5}+\ldots+F_{2 m-1} \\ & =F_{2}+\left(F_{4}-F_{2}\right)+\left(F_{6}-F_{4}\right)+\ldots+\left(F_{2 m}-F_{2 m-2}\right)=F_{2 m}<F_{2 m+1} \end{aligned} $$  Hence, the graph has $d$ edges and cannot contain a cycle, therefore it must contain at least $d+1$ vertices, so $|S| \geqslant d+1$.  Now we show a suitable set with $d+1$ elements. Let  $$ S=\left\{F_{0}, F_{2}, F_{4}, F_{5}, \ldots, F_{2 d}\right\} $$  For $1 \leqslant k \leqslant d$ we have $F_{0}, F_{2 k-2}, F_{2 k} \in S$ with differences $F_{2 k}-F_{2 k-2}=F_{2 k-1}$ and $F_{2 k}-F_{0}=F_{2 k}$, so each of $F_{1}, F_{2}, \ldots, F_{2 d}$ occurs as difference between two elements in $S$. So this set containing $d+1$ numbers is suitable.  This page is intentionally left blank


Let $p$ be an odd prime, and put $N=\frac{1}{4}\left(p^{3}-p\right)-1$. The numbers $1,2, \ldots, N$ are painted arbitrarily in two colors, red and blue. For any positive integer $n \leqslant N$, denote by $r(n)$ the fraction of integers in $\{1,2, \ldots, n\}$ that are red.  Prove that there exists a positive integer $a \in\{1,2, \ldots, p-1\}$ such that $r(n) \neq a / p$ for all $n=1,2, \ldots, N$. (Netherlands)

Solution: Denote by $R(n)$ the number of red numbers in $\{1,2, \ldots, n\}$, i.e., $R(n)=n r(n)$. Similarly, denote by $B(n)$ and $b(n)=B(n) / n$ the number and proportion of blue numbers in $\{1,2, \ldots, n\}$, respectively. Notice that $B(n)+R(n)=n$ and $b(n)+r(n)=1$. Therefore, the statement of the problem does not change after swapping the colors.  Arguing indirectly, for every $a \in\{1,2, \ldots, p-1\}$ choose some positive integer $n_{a}$ such that $r\left(n_{a}\right)=a / p$ and, hence, $R\left(n_{a}\right)=a n_{a} / p$. Clearly, $p \mid n_{a}$, so that $n_{a}=p m_{a}$ for some positive integer $m_{a}$, and $R\left(n_{a}\right)=a m_{a}$. Without loss of generality, we assume that $m_{1}<m_{p-1}$, as otherwise one may swap the colors. Notice that  $$ m_{a} \leqslant \frac{N}{p}<\frac{p^{2}-1}{4} \quad \text { for all } a=1,2, \ldots, p-1 $$  The solution is based on a repeated application of the following simple observation. Claim. Assume that $m_{a}<m_{b}$ for some $a, b \in\{1,2, \ldots, p-1\}$. Then  $$ m_{b} \geqslant \frac{a}{b} m_{a} \quad \text { and } \quad m_{b} \geqslant \frac{p-a}{p-b} m_{a} $$  Proof. The first inequality follows from $b m_{b}=R\left(n_{b}\right) \geqslant R\left(n_{a}\right)=a m_{a}$. The second inequality is obtained by swapping colors .  Let $q=(p-1) / 2$. We distinguish two cases. Case 1: All $q$ numbers $m_{1}, m_{2}, \ldots, m_{q}$ are smaller than $m_{p-1}$. Let $m_{a}$ be the maximal number among $m_{1}, m_{2}, \ldots, m_{q}$; then $m_{a} \geqslant q \geqslant a$. Applying the Claim, we get  $$ m_{p-1} \geqslant \frac{p-a}{p-(p-1)} m_{a} \geqslant(p-q) q=\frac{p^{2}-1}{4} $$  which contradicts (1). Case 2: There exists $k \leqslant q$ such that $m_{k}>m_{p-1}$. Choose $k$ to be the smallest index satisfying $m_{k}>m_{p-1}$; by our assumptions, we have $1<k \leqslant$ $q<p-1$.  Let $m_{a}$ be the maximal number among $m_{1}, m_{2}, \ldots, m_{k-1}$; then $a \leqslant k-1 \leqslant m_{a}<m_{p-1}$. Applying the Claim, we get  $$ \begin{aligned} m_{k} \geqslant \frac{p-1}{k} m_{p-1} \geqslant \frac{p-1}{k} & \cdot \frac{p-a}{p-(p-1)} m_{a} \\ & \geqslant \frac{p-1}{k} \cdot(p-k+1)(k-1) \geqslant \frac{k-1}{k} \cdot(p-1)(p-q) \geqslant \frac{1}{2} \cdot \frac{p^{2}-1}{2} \end{aligned} $$  which contradicts (1) again. Comment 1. The argument in Case 2, after a slight modification of estimates at the end, applies as soon as there exists $k<\frac{3(p+1)}{4}$ with $a_{k}<a_{p-1}$. However, this argument does not seem to work if there is no such $k$.  Comment 2. If $p$ is small enough, then one can color $\{1,2, \ldots, N+1\}$ so that there exist numbers $m_{1}$, $m_{2}, \ldots, m_{p-1}$ satisfying $r\left(p m_{a}\right)=a / p$. For $p=3,5,7$, one can find colorings providing the following sequences:  $$ \left(m_{1}, m_{2}\right)=(1,2), \quad\left(m_{1}, m_{2}, m_{3}, m_{4}\right)=(1,2,3,6), \quad \text { and } \quad\left(m_{1}, \ldots, m_{6}\right)=(1,2,3,4,6,12) $$  respectively. Thus, for small values of $p$, the number $N$ in the problem statement cannot be increased. However, a careful analysis of the estimates shows that this number can be slightly increased for $p \geqslant 11$.


$4 n$ coins of weights $1,2,3, \ldots, 4 n$ are given. Each coin is colored in one of $n$ colors and there are four coins of each color. Show that all these coins can be partitioned into two sets with the same total weight, such that each set contains two coins of each color. (Hungary)

Solution: Let us pair the coins with weights summing up to $4 n+1$, resulting in the set $S$ of $2 n$ pairs: $\{1,4 n\},\{2,4 n-1\}, \ldots,\{2 n, 2 n+1\}$. It suffices to partition $S$ into two sets, each consisting of $n$ pairs, such that each set contains two coins of each color.  Introduce a multi-graph $G$ (i.e., a graph with loops and multiple edges allowed) on $n$ vertices, so that each vertex corresponds to a color. For each pair of coins from $S$, we add an edge between the vertices corresponding to the colors of those coins. Note that each vertex has degree 4. Also, a desired partition of the coins corresponds to a coloring of the edges of $G$ in two colors, say red and blue, so that each vertex has degree 2 with respect to each color (i.e., each vertex has equal red and blue degrees).  To complete the solution, it suffices to provide such a coloring for each component $G^{\prime}$ of $G$. Since all degrees of the vertices are even, in $G^{\prime}$ there exists an Euler circuit $C$ (i.e., a circuit passing through each edge of $G^{\prime}$ exactly once). Note that the number of edges in $C$ is even (it equals twice the number of vertices in $G^{\prime}$ ). Hence all the edges can be colored red and blue so that any two edges adjacent in $C$ have different colors (one may move along $C$ and color the edges one by one alternating red and blue colors). Thus in $G^{\prime}$ each vertex has equal red and blue degrees, as desired.  Comment 1. To complete Solution 1, any partition of the edges of $G$ into circuits of even lengths could be used. In the solution above it was done by the reference to the well-known Euler Circuit Lemma: Let $G$ be a connected graph with all its vertices of even degrees. Then there exists a circuit passing through each edge of $G$ exactly once.


Solution: As in   Introduce a multi-graph (i.e., a graph with multiple edges allowed) $\Gamma$ whose vertices correspond to coins; thus we have $4 n$ vertices of $n$ colors so that there are four vertices of each color. Connect pairs of vertices $\{1,4 n\},\{2,4 n-1\}, \ldots,\{2 n, 2 n+1\}$ by $2 n$ black edges.  Further, for each monochromatic quadruple of vertices $i, j, k, \ell$ we add a pair of grey edges forming a matching, e.g., $(i, j)$ and $(k, \ell)$. In each of $n$ colors of coins we can choose one of three possible matchings; this results in $3^{n}$ ways of constructing grey edges. Let us call each of $3^{n}$ possible graphs $\Gamma$ a cyclic graph. Note that in a cyclic graph $\Gamma$ each vertex has both black and grey degrees equal to 1 . Hence $\Gamma$ is a union of disjoint cycles, and in each cycle black and grey edges alternate (in particular, all cycles have even lengths).  It suffices to find a cyclic graph with all its cycle lengths divisible by 4 . Indeed, in this case, for each cycle we start from some vertex, move along the cycle and recolor the black edges either to red or to blue, alternating red and blue colors. Now blue and red edges define the required partition, since for each monochromatic quadruple of vertices the grey edges provide a bijection between the endpoints of red and blue edges.  Among all possible cyclic graphs, let us choose graph $\Gamma_{0}$ having the minimal number of components (i.e., cycles). The following claim completes the solution. Claim. In $\Gamma_{0}$, all cycle lengths are divisible by 4. Proof. Assuming the contrary, choose a cycle $C_{1}$ with an odd number of grey edges. For some color $c$ the cycle $C_{1}$ contains exactly one grey edge joining two vertices $i, j$ of color $c$, while the other edge joining two vertices $k, \ell$ of color $c$ lies in another cycle $C_{2}$. Now delete edges $(i, j)$ and $(k, \ell)$ and add edges $(i, k)$ and $(j, \ell)$. By this switch we again obtain a cyclic graph $\Gamma_{0}^{\prime}$ and decrease the number of cycles by 1 . This contradicts the choice of $\Gamma_{0}$.  Comment 2. Use of an auxiliary graph and reduction to a new problem in terms of this graph is one of the crucial steps in both solutions presented. In fact, graph $G$ from Solution 1 could be obtained from any graph $\Gamma$ from Solution 2 by merging the vertices of the same color.


Consider any rectangular table having finitely many rows and columns, with a real number $a(r, c)$ in the cell in row $r$ and column $c$. A pair $(R, C)$, where $R$ is a set of rows and $C$ a set of columns, is called a saddle pair if the following two conditions are satisfied: (i) For each row $r^{\prime}$, there is $r \in R$ such that $a(r, c) \geqslant a\left(r^{\prime}, c\right)$ for all $c \in C$; (ii) For each column $c^{\prime}$, there is $c \in C$ such that $a(r, c) \leqslant a\left(r, c^{\prime}\right)$ for all $r \in R$.  A saddle pair $(R, C)$ is called a minimal pair if for each saddle pair ( $R^{\prime}, C^{\prime}$ ) with $R^{\prime} \subseteq R$ and $C^{\prime} \subseteq C$, we have $R^{\prime}=R$ and $C^{\prime}=C$.  Prove that any two minimal pairs contain the same number of rows. (Thailand)

Solution: We say that a pair $\left(R^{\prime}, C^{\prime}\right)$ of nonempty sets is a subpair of a pair $(R, C)$ if $R^{\prime} \subseteq R$ and $C^{\prime} \subseteq C$. The subpair is proper if at least one of the inclusions is strict.  Let $\left(R_{1}, C_{1}\right)$ and $\left(R_{2}, C_{2}\right)$ be two saddle pairs with $\left|R_{1}\right|>\left|R_{2}\right|$. We will find a saddle subpair ( $R^{\prime}, C^{\prime}$ ) of ( $R_{1}, C_{1}$ ) with $\left|R^{\prime}\right| \leqslant\left|R_{2}\right|$; clearly, this implies the desired statement. Step 1: We construct maps $\rho: R_{1} \rightarrow R_{1}$ and $\sigma: C_{1} \rightarrow C_{1}$ such that $\left|\rho\left(R_{1}\right)\right| \leqslant\left|R_{2}\right|$, and $a\left(\rho\left(r_{1}\right), c_{1}\right) \geqslant a\left(r_{1}, \sigma\left(c_{1}\right)\right)$ for all $r_{1} \in R_{1}$ and $c_{1} \in C_{1}$.  Since $\left(R_{1}, C_{1}\right)$ is a saddle pair, for each $r_{2} \in R_{2}$ there is $r_{1} \in R_{1}$ such that $a\left(r_{1}, c_{1}\right) \geqslant a\left(r_{2}, c_{1}\right)$ for all $c_{1} \in C_{1}$; denote one such an $r_{1}$ by $\rho_{1}\left(r_{2}\right)$. Similarly, we define four functions  $$ \begin{array}{llllll} \rho_{1}: R_{2} \rightarrow R_{1} & \text { such that } & a\left(\rho_{1}\left(r_{2}\right), c_{1}\right) \geqslant a\left(r_{2}, c_{1}\right) & \text { for all } & r_{2} \in R_{2}, & c_{1} \in C_{1} ; \\ \rho_{2}: R_{1} \rightarrow R_{2} & \text { such that } & a\left(\rho_{2}\left(r_{1}\right), c_{2}\right) \geqslant a\left(r_{1}, c_{2}\right) & \text { for all } & r_{1} \in R_{1}, & c_{2} \in C_{2} ; \\ \sigma_{1}: C_{2} \rightarrow C_{1} & \text { such that } & a\left(r_{1}, \sigma_{1}\left(c_{2}\right)\right) \leqslant a\left(r_{1}, c_{2}\right) & \text { for all } & r_{1} \in R_{1}, & c_{2} \in C_{2} ; \\ \sigma_{2}: C_{1} \rightarrow C_{2} & \text { such that } & a\left(r_{2}, \sigma_{2}\left(c_{1}\right)\right) \leqslant a\left(r_{2}, c_{1}\right) & \text { for all } & r_{2} \in R_{2}, & c_{1} \in C_{1} . \end{array} $$  Set now $\rho=\rho_{1} \circ \rho_{2}: R_{1} \rightarrow R_{1}$ and $\sigma=\sigma_{1} \circ \sigma_{2}: C_{1} \rightarrow C_{1}$. We have  $$ \left|\rho\left(R_{1}\right)\right|=\left|\rho_{1}\left(\rho_{2}\left(R_{1}\right)\right)\right| \leqslant\left|\rho_{1}\left(R_{2}\right)\right| \leqslant\left|R_{2}\right| . $$  Moreover, for all $r_{1} \in R_{1}$ and $c_{1} \in C_{1}$, we get  $$ \begin{aligned} a\left(\rho\left(r_{1}\right), c_{1}\right)=a\left(\rho_{1}\left(\rho_{2}\left(r_{1}\right)\right), c_{1}\right) \geqslant a\left(\rho_{2}\left(r_{1}\right), c_{1}\right) & \geqslant a\left(\rho_{2}\left(r_{1}\right), \sigma_{2}\left(c_{1}\right)\right) \\ & \geqslant a\left(r_{1}, \sigma_{2}\left(c_{1}\right)\right) \geqslant a\left(r_{1}, \sigma_{1}\left(\sigma_{2}\left(c_{1}\right)\right)\right)=a\left(r_{1}, \sigma\left(c_{1}\right)\right) \end{aligned} $$  as desired. Step 2: Given maps $\rho$ and $\sigma$, we construct a proper saddle subpair $\left(R^{\prime}, C^{\prime}\right)$ of $\left(R_{1}, C_{1}\right)$. The properties of $\rho$ and $\sigma$ yield that  $$ a\left(\rho^{i}\left(r_{1}\right), c_{1}\right) \geqslant a\left(\rho^{i-1}\left(r_{1}\right), \sigma\left(c_{1}\right)\right) \geqslant \ldots \geqslant a\left(r_{1}, \sigma^{i}\left(c_{1}\right)\right) $$  for each positive integer $i$ and all $r_{1} \in R_{1}, c_{1} \in C_{1}$. Consider the images $R^{i}=\rho^{i}\left(R_{1}\right)$ and $C^{i}=\sigma^{i}\left(C_{1}\right)$. Clearly, $R_{1}=R^{0} \supseteq R^{1} \supseteq R^{2} \supseteq \ldots$ and $C_{1}=C^{0} \supseteq C^{1} \supseteq C^{2} \supseteq \ldots$. Since both chains consist of finite sets, there is an index $n$ such that $R^{n}=R^{n+1}=\ldots$ and $C^{n}=C^{n+1}=\ldots$. Then $\rho^{n}\left(R^{n}\right)=R^{2 n}=R^{n}$, so $\rho^{n}$ restricted to $R^{n}$ is a bijection. Similarly, $\sigma^{n}$ restricted to $C^{n}$ is a bijection from $C^{n}$ to itself. Therefore, there exists a positive integer $k$ such that $\rho^{n k}$ acts identically on $R^{n}$, and $\sigma^{n k}$ acts identically on $C^{n}$.  We claim now that $\left(R^{n}, C^{n}\right)$ is a saddle subpair of $\left(R_{1}, C_{1}\right)$, with $\left|R^{n}\right| \leqslant\left|R^{1}\right|=\left|\rho\left(R_{1}\right)\right| \leqslant$ $\left|R_{2}\right|$, which is what we needed. To check that this is a saddle pair, take any row $r^{\prime}$; since $\left(R_{1}, C_{1}\right)$ is a saddle pair, there exists $r_{1} \in R_{1}$ such that $a\left(r_{1}, c_{1}\right) \geqslant a\left(r^{\prime}, c_{1}\right)$ for all $c_{1} \in C_{1}$. Set now $r_{*}=\rho^{n k}\left(r_{1}\right) \in R^{n}$. Then, for each $c \in C^{n}$ we have $c=\sigma^{n k}(c)$ and hence  $$ a\left(r_{*}, c\right)=a\left(\rho^{n k}\left(r_{1}\right), c\right) \geqslant a\left(r_{1}, \sigma^{n k}(c)\right)=a\left(r_{1}, c\right) \geqslant a\left(r^{\prime}, c\right) $$  which establishes condition $(i)$. Condition (ii) is checked similarly.


Solution: Denote by $\mathcal{R}$ and $\mathcal{C}$ the set of all rows and the set of all columns of the table, respectively. Let $\mathcal{T}$ denote the given table; for a set $R$ of rows and a set $C$ of columns, let $\mathcal{T}[R, C]$ denote the subtable obtained by intersecting rows from $R$ and columns from $C$.  We say that row $r_{1}$ exceeds row $r_{2}$ in range of columns $C$ (where $C \subseteq \mathcal{C}$ ) and write $r_{1} \succeq_{C} r_{2}$ or $r_{2} \leq_{C} r_{1}$, if $a\left(r_{1}, c\right) \geqslant a\left(r_{2}, c\right)$ for all $c \in C$. We say that a row $r_{1}$ is equal to a row $r_{2}$ in range of columns $C$ and write $r_{1} \equiv_{C} r_{2}$, if $a\left(r_{1}, c\right)=a\left(r_{2}, c\right)$ for all $c \in C$. We introduce similar notions, and use the same notation, for columns. Then conditions ( $i$ ) and (ii) in the definition of a saddle pair can be written as $(i)$ for each $r^{\prime} \in \mathcal{R}$ there exists $r \in R$ such that $r \geq_{C} r^{\prime}$; and (ii) for each $c^{\prime} \in \mathcal{C}$ there exists $c \in C$ such that $c \leq_{R} c^{\prime}$.  Lemma. Suppose that $(R, C)$ is a minimal pair. Remove from the table several rows outside of $R$ and/or several columns outside of $C$. Then $(R, C)$ remains a minimal pair in the new table. Proof. Obviously, $(R, C)$ remains a saddle pair. Suppose $\left(R^{\prime}, C^{\prime}\right)$ is a proper subpair of $(R, C)$. Since $(R, C)$ is a saddle pair, for each row $r^{*}$ of the initial table, there is a row $r \in R$ such that $r \geq_{C} r^{*}$. If ( $R^{\prime}, C^{\prime}$ ) became saddle after deleting rows not in $R$ and/or columns not in $C$, there would be a row $r^{\prime} \in R^{\prime}$ satisfying $r^{\prime} \geq_{C^{\prime}} r$. Therefore, we would obtain that $r^{\prime} \geq_{C^{\prime \prime}} r^{*}$, which is exactly condition $(i)$ for the pair ( $R^{\prime}, C^{\prime}$ ) in the initial table; condition (ii) is checked similarly. Thus, ( $\left.R^{\prime}, C^{\prime}\right)$ was saddle in the initial table, which contradicts the hypothesis that $(R, C)$ was minimal. Hence, $(R, C)$ remains minimal after deleting rows and/or columns.  By the Lemma, it suffices to prove the statement of the problem in the case $\mathcal{R}=R_{1} \cup R_{2}$ and $\mathcal{C}=C_{1} \cup C_{2}$. Further, suppose that there exist rows that belong both to $R_{1}$ and $R_{2}$. Duplicate every such row, and refer one copy of it to the set $R_{1}$, and the other copy to the set $R_{2}$. Then $\left(R_{1}, C_{1}\right)$ and $\left(R_{2}, C_{2}\right)$ will remain minimal pairs in the new table, with the same numbers of rows and columns, but the sets $R_{1}$ and $R_{2}$ will become disjoint. Similarly duplicating columns in $C_{1} \cap C_{2}$, we make $C_{1}$ and $C_{2}$ disjoint. Thus it is sufficient to prove the required statement in the case $R_{1} \cap R_{2}=\varnothing$ and $C_{1} \cap C_{2}=\varnothing$.  The rest of the solution is devoted to the proof of the following claim including the statement of the problem. Claim. Suppose that $\left(R_{1}, C_{1}\right)$ and $\left(R_{2}, C_{2}\right)$ are minimal pairs in table $\mathcal{T}$ such that $R_{2}=\mathcal{R} \backslash R_{1}$ and $C_{2}=\mathcal{C} \backslash C_{1}$. Then $\left|R_{1}\right|=\left|R_{2}\right|,\left|C_{1}\right|=\left|C_{2}\right| ;$ moreover, there are four bijections  $$ \begin{array}{llllll} \rho_{1}: R_{2} \rightarrow R_{1} & \text { such that } & \rho_{1}\left(r_{2}\right) \equiv_{C_{1}} r_{2} & \text { for all } & r_{2} \in R_{2} ; \\ \rho_{2}: R_{1} \rightarrow R_{2} & \text { such that } & \rho_{2}\left(r_{1}\right) \equiv_{C_{2}} r_{1} & \text { for all } & r_{1} \in R_{1} ; \\ \sigma_{1}: C_{2} \rightarrow C_{1} & \text { such that } & \sigma_{1}\left(c_{2}\right) \equiv_{R_{1}} c_{2} & \text { for all } & c_{2} \in C_{2} ; \\ \sigma_{2}: C_{1} \rightarrow C_{2} & \text { such that } & \sigma_{2}\left(c_{1}\right) \equiv_{R_{2}} c_{1} & \text { for all } & c_{1} \in C_{1} . \end{array} $$  We prove the Claim by induction on $|\mathcal{R}|+|\mathcal{C}|$. In the base case we have $\left|R_{1}\right|=\left|R_{2}\right|=$ $\left|C_{1}\right|=\left|C_{2}\right|=1$; let $R_{i}=\left\{r_{i}\right\}$ and $C_{i}=\left\{c_{i}\right\}$. Since $\left(R_{1}, C_{1}\right)$ and $\left(R_{2}, C_{2}\right)$ are saddle pairs, we have $a\left(r_{1}, c_{1}\right) \geqslant a\left(r_{2}, c_{1}\right) \geqslant a\left(r_{2}, c_{2}\right) \geqslant a\left(r_{1}, c_{2}\right) \geqslant a\left(r_{1}, c_{1}\right)$, hence, the table consists of four equal numbers, and the statement follows.  To prove the inductive step, introduce the maps $\rho_{1}, \rho_{2}, \sigma_{1}$, and $\sigma_{2}$ as in Solution 1 , see (1). Suppose first that all four maps are surjective. Then, in fact, we have $\left|R_{1}\right|=\left|R_{2}\right|,\left|C_{1}\right|=\left|C_{2}\right|$, and all maps are bijective. Moreover, for all $r_{2} \in R_{2}$ and $c_{2} \in C_{2}$ we have  $$ \begin{aligned} a\left(r_{2}, c_{2}\right) \leqslant a\left(r_{2}, \sigma_{2}^{-1}\left(c_{2}\right)\right) \leqslant a\left(\rho_{1}\left(r_{2}\right), \sigma_{2}^{-1}\left(c_{2}\right)\right) \leqslant a\left(\rho_{1}\left(r_{2}\right)\right. & \left., \sigma_{1}^{-1} \circ \sigma_{2}^{-1}\left(c_{2}\right)\right) \\ & \leqslant a\left(\rho_{2} \circ \rho_{1}\left(r_{2}\right), \sigma_{1}^{-1} \circ \sigma_{2}^{-1}\left(c_{2}\right)\right) \end{aligned} $$  Summing up, we get  $$ \sum_{\substack{r_{2} \in R_{2} \\ c_{2} \in C_{2}}} a\left(r_{2}, c_{2}\right) \leqslant \sum_{\substack{r_{2} \in R_{2} \\ c_{2} \in C_{2}}} a\left(\rho_{2} \circ \rho_{1}\left(r_{2}\right), \sigma_{1}^{-1} \circ \sigma_{2}^{-1}\left(c_{2}\right)\right) . $$  Since $\rho_{1} \circ \rho_{2}$ and $\sigma_{1}^{-1} \circ \sigma_{2}^{-1}$ are permutations of $R_{2}$ and $C_{2}$, respectively, this inequality is in fact equality. Therefore, all inequalities in (4) turn into equalities, which establishes the inductive step in this case.  It remains to show that all four maps are surjective. For the sake of contradiction, we assume that $\rho_{1}$ is not surjective. Now let $R_{1}^{\prime}=\rho_{1}\left(R_{2}\right)$ and $C_{1}^{\prime}=\sigma_{1}\left(C_{2}\right)$, and set $R^{*}=R_{1} \backslash R_{1}^{\prime}$ and $C^{*}=C_{1} \backslash C_{1}^{\prime}$. By our assumption, $R^{*} \neq \varnothing$.  Let $\mathcal{Q}$ be the table obtained from $\mathcal{T}$ by removing the rows in $R^{*}$ and the columns in $C^{*}$; in other words, $\mathcal{Q}=\mathcal{T}\left[R_{1}^{\prime} \cup R_{2}, C_{1}^{\prime} \cup C_{2}\right]$. By the definition of $\rho_{1}$, for each $r_{2} \in R_{2}$ we have $\rho_{1}\left(r_{2}\right) \geq_{C_{1}} r_{2}$, so a fortiori $\rho_{1}\left(r_{2}\right) \geq_{C_{1}^{\prime}} r_{2}$; moreover, $\rho_{1}\left(r_{2}\right) \in R_{1}^{\prime}$. Similarly, $C_{1}^{\prime} \ni \sigma_{1}\left(c_{2}\right) \leq_{R_{1}^{\prime}} c_{2}$ for each $c_{2} \in C_{2}$. This means that $\left(R_{1}^{\prime}, C_{1}^{\prime}\right)$ is a saddle pair in $\mathcal{Q}$. Recall that $\left(R_{2}, C_{2}\right)$ remains a minimal pair in $\mathcal{Q}$, due to the Lemma.  Therefore, $\mathcal{Q}$ admits a minimal pair $\left(\bar{R}_{1}, \bar{C}_{1}\right)$ such that $\bar{R}_{1} \subseteq R_{1}^{\prime}$ and $\bar{C}_{1} \subseteq C_{1}^{\prime}$. For a minute, confine ourselves to the subtable $\overline{\mathcal{Q}}=\mathcal{Q}\left[\bar{R}_{1} \cup R_{2}, \bar{C}_{1} \cup C_{2}\right]$. By the Lemma, the pairs $\left(\bar{R}_{1}, \bar{C}_{1}\right)$ and $\left(R_{2}, C_{2}\right)$ are also minimal in $\overline{\mathcal{Q}}$. By the inductive hypothesis, we have $\left|R_{2}\right|=\left|\bar{R}_{1}\right| \leqslant\left|R_{1}^{\prime}\right|=\left|\rho_{1}\left(R_{2}\right)\right| \leqslant\left|R_{2}\right|$, so all these inequalities are in fact equalities. This implies that $\bar{R}_{2}=R_{2}^{\prime}$ and that $\rho_{1}$ is a bijection $R_{2} \rightarrow R_{1}^{\prime}$. Similarly, $\bar{C}_{1}=C_{1}^{\prime}$, and $\sigma_{1}$ is a bijection $C_{2} \rightarrow C_{1}^{\prime}$. In particular, $\left(R_{1}^{\prime}, C_{1}^{\prime}\right)$ is a minimal pair in $\mathcal{Q}$.  Now, by inductive hypothesis again, we have $\left|R_{1}^{\prime}\right|=\left|R_{2}\right|,\left|C_{1}^{\prime}\right|=\left|C_{2}\right|$, and there exist four bijections  $$ \begin{array}{ccccc} \rho_{1}^{\prime}: R_{2} \rightarrow R_{1}^{\prime} & \text { such that } & \rho_{1}^{\prime}\left(r_{2}\right) \equiv_{C_{1}^{\prime}} r_{2} & \text { for all } & r_{2} \in R_{2} ; \\ \rho_{2}^{\prime}: R_{1}^{\prime} \rightarrow R_{2} & \text { such that } & \rho_{2}^{\prime}\left(r_{1}\right) \equiv_{C_{2}} r_{1} & \text { for all } & r_{1} \in R_{1}^{\prime} ; \\ \sigma_{1}^{\prime}: C_{2} \rightarrow C_{1}^{\prime} & \text { such that } & \sigma_{1}^{\prime}\left(c_{2}\right) \equiv_{R_{1}^{\prime}} c_{2} & \text { for all } & c_{2} \in C_{2} ; \\ \sigma_{2}^{\prime}: C_{1}^{\prime} \rightarrow C_{2} & \text { such that } & \sigma_{2}^{\prime}\left(c_{1}\right) \equiv_{R_{2}} c_{1} & \text { for all } & c_{1} \in C_{1}^{\prime} . \end{array} $$  Notice here that $\sigma_{1}$ and $\sigma_{1}^{\prime}$ are two bijections $C_{2} \rightarrow C_{1}^{\prime}$ satisfying $\sigma_{1}^{\prime}\left(c_{2}\right) \equiv_{R_{1}^{\prime}} c_{2} \geq_{R_{1}} \sigma_{1}\left(c_{2}\right)$ for all $c_{2} \in C_{2}$. Now, if $\sigma_{1}^{\prime}\left(c_{2}\right) \neq \sigma_{1}\left(c_{2}\right)$ for some $c_{2} \in C_{2}$, then we could remove column $\sigma_{1}^{\prime}\left(c_{2}\right)$ from $C_{1}^{\prime}$ obtaining another saddle pair $\left(R_{1}^{\prime}, C_{1}^{\prime} \backslash\left\{\sigma_{1}^{\prime}\left(c_{2}\right)\right\}\right)$ in $\mathcal{Q}$. This is impossible for a minimal pair $\left(R_{1}^{\prime}, C_{1}^{\prime}\right)$; hence the maps $\sigma_{1}$ and $\sigma_{1}^{\prime}$ coincide.  Now we are prepared to show that $\left(R_{1}^{\prime}, C_{1}^{\prime}\right)$ is a saddle pair in $\mathcal{T}$, which yields a desired contradiction (since ( $R_{1}, C_{1}$ ) is not minimal). By symmetry, it suffices to find, for each $r^{\prime} \in \mathcal{R}$, a row $r_{1} \in R_{1}^{\prime}$ such that $r_{1} \geq_{C_{1}^{\prime}} r^{\prime}$. If $r^{\prime} \in R_{2}$, then we may put $r_{1}=\rho_{1}\left(r^{\prime}\right)$; so, in the sequel we assume $r^{\prime} \in R_{1}$.  There exists $r_{2} \in R_{2}$ such that $r^{\prime} \leq_{C_{2}} r_{2}$; set $r_{1}=\left(\rho_{2}^{\prime}\right)^{-1}\left(r_{2}\right) \in R_{1}^{\prime}$ and recall that $r_{1} \equiv_{C_{2}}$ $r_{2} \geq_{C_{2}} r^{\prime}$. Therefore, implementing the bijection $\sigma_{1}=\sigma_{1}^{\prime}$, for each $c_{1} \in C_{1}^{\prime}$ we get  $$ a\left(r^{\prime}, c_{1}\right) \leqslant a\left(r^{\prime}, \sigma_{1}^{-1}\left(c_{1}\right)\right) \leqslant a\left(r_{1}, \sigma_{1}^{-1}\left(c_{1}\right)\right)=a\left(r_{1}, \sigma_{1}^{\prime} \circ \sigma_{1}^{-1}\left(c_{1}\right)\right)=a\left(r_{1}, c_{1}\right) $$  which shows $r^{\prime} \leq_{C_{1}^{\prime}} r_{1}$, as desired. The inductive step is completed. Comment 1. For two minimal pairs $\left(R_{1}, C_{1}\right)$ and $\left(R_{2}, C_{2}\right)$, Solution 2 not only proves the required equalities $\left|R_{1}\right|=\left|R_{2}\right|$ and $\left|C_{1}\right|=\left|C_{2}\right|$, but also shows the existence of bijections (3). In simple words, this means that the four subtables $\mathcal{T}\left[R_{1}, C_{1}\right], \mathcal{T}\left[R_{1}, C_{2}\right], \mathcal{T}\left[R_{2}, C_{1}\right]$, and $\mathcal{T}\left[R_{2}, C_{2}\right]$ differ only by permuting rows/columns. Notice that the existence of such bijections immediately implies that $\left(R_{1}, C_{2}\right)$ and $\left(R_{2}, C_{1}\right)$ are also minimal pairs.  This stronger claim may also be derived directly from the arguments in Solution 1, even without the assumptions $R_{1} \cap R_{2}=\varnothing$ and $C_{1} \cap C_{2}=\varnothing$. Indeed, if $\left|R_{1}\right|=\left|R_{2}\right|$ and $\left|C_{1}\right|=\left|C_{2}\right|$, then similar arguments show that $R^{n}=R_{1}, C^{n}=C_{1}$, and for any $r \in R^{n}$ and $c \in C^{n}$ we have  $$ a(r, c)=a\left(\rho^{n k}(r), c\right) \geqslant a\left(\rho^{n k-1}(r), \sigma(c)\right) \geqslant \ldots \geqslant a\left(r, \sigma^{n k}(c)\right)=a(r, c) . $$  This yields that all above inequalities turn into equalities. Moreover, this yields that all inequalities in (2) turn into equalities. Hence $\rho_{1}, \rho_{2}, \sigma_{1}$, and $\sigma_{2}$ satisfy (3).  It is perhaps worth mentioning that one cannot necessarily find the maps in (3) so as to satisfy $\rho_{1}=\rho_{2}^{-1}$ and $\sigma_{1}=\sigma_{2}^{-1}$, as shown by the table below.  | 1 | 0 | 0 | 1 | | :--- | :--- | :--- | :--- | | 0 | 1 | 1 | 0 | | 1 | 0 | 1 | 0 | | 0 | 1 | 0 | 1 |  Comment 2. One may use the following, a bit more entertaining formulation of the same problem. On a specialized market, a finite number of products are being sold, and there are finitely many retailers each selling all the products by some prices. Say that retailer $r_{1}$ dominates retailer $r_{2}$ with respect to a set of products $P$ if $r_{1}$ 's price of each $p \in P$ does not exceed $r_{2}$ 's price of $p$. Similarly, product $p_{1}$ exceeds product $p_{2}$ with respect to a set of retailers $R$, if $r$ 's price of $p_{1}$ is not less than $r$ 's price of $p_{2}$, for each $r \in R$.  Say that a set $R$ of retailers and a set $P$ of products form a saddle pair if for each retailer $r^{\prime}$ there is $r \in R$ dominating $r^{\prime}$ with respect to $P$, and for each product $p^{\prime}$ there is $p \in P$ exceeding $p^{\prime}$ with respect to $R$. A saddle pair $(R, P)$ is called a minimal pair if for each saddle pair $\left(R^{\prime}, P^{\prime}\right)$ with $R^{\prime} \subseteq R$ and $P^{\prime} \subseteq P$, we have $R^{\prime}=R$ and $P^{\prime}=P$.  Prove that any two minimal pairs contain the same number of retailers.


Players $A$ and $B$ play a game on a blackboard that initially contains 2020 copies of the number 1. In every round, player $A$ erases two numbers $x$ and $y$ from the blackboard, and then player $B$ writes one of the numbers $x+y$ and $|x-y|$ on the blackboard. The game terminates as soon as, at the end of some round, one of the following holds: (1) one of the numbers on the blackboard is larger than the sum of all other numbers; (2) there are only zeros on the blackboard.  Player $B$ must then give as many cookies to player $A$ as there are numbers on the blackboard. Player $A$ wants to get as many cookies as possible, whereas player $B$ wants to give as few as possible. Determine the number of cookies that $A$ receives if both players play optimally.

Solution: For a positive integer $n$, we denote by $S_{2}(n)$ the sum of digits in its binary representation. We prove that, in fact, if a board initially contains an even number $n>1$ of ones, then A can guarantee to obtain $S_{2}(n)$, but not more, cookies. The binary representation of 2020 is $2020=\overline{11111100100}_{2}$, so $S_{2}(2020)=7$, and the answer follows.  A strategy for $A$. At any round, while possible, A chooses two equal nonzero numbers on the board. Clearly, while $A$ can make such choice, the game does not terminate. On the other hand, $A$ can follow this strategy unless the game has already terminated. Indeed, if $A$ always chooses two equal numbers, then each number appearing on the board is either 0 or a power of 2 with non-negative integer exponent, this can be easily proved using induction on the number of rounds. At the moment when $A$ is unable to follow the strategy all nonzero numbers on the board are distinct powers of 2 . If the board contains at least one such power, then the largest of those powers is greater than the sum of the others. Otherwise there are only zeros on the blackboard, in both cases the game terminates.  For every number on the board, define its range to be the number of ones it is obtained from. We can prove by induction on the number of rounds that for any nonzero number $k$ written by $B$ its range is $k$, and for any zero written by $B$ its range is a power of 2 . Thus at the end of each round all the ranges are powers of two, and their sum is $n$. Since $S_{2}(a+b) \leqslant S_{2}(a)+S_{2}(b)$ for any positive integers $a$ and $b$, the number $n$ cannot be represented as a sum of less than $S_{2}(n)$ powers of 2 . Thus at the end of each round the board contains at least $S_{2}(n)$ numbers, while $A$ follows the above strategy. So $A$ can guarantee at least $S_{2}(n)$ cookies for himself.  Comment. There are different proofs of the fact that the presented strategy guarantees at least $S_{2}(n)$ cookies for $A$. For instance, one may denote by $\Sigma$ the sum of numbers on the board, and by $z$ the number of zeros. Then the board contains at least $S_{2}(\Sigma)+z$ numbers; on the other hand, during the game, the number $S_{2}(\Sigma)+z$ does not decrease, and its initial value is $S_{2}(n)$. The claim follows.  A strategy for $B$. Denote $s=S_{2}(n)$. Let $x_{1}, \ldots, x_{k}$ be the numbers on the board at some moment of the game after $B$ 's turn or at the beginning of the game. Say that a collection of $k$ signs $\varepsilon_{1}, \ldots, \varepsilon_{k} \in\{+1,-1\}$ is balanced if  $$ \sum_{i=1}^{k} \varepsilon_{i} x_{i}=0 $$  We say that a situation on the board is good if $2^{s+1}$ does not divide the number of balanced collections. An appropriate strategy for $B$ can be explained as follows: Perform a move so that the situation remains good, while it is possible. We intend to show that in this case $B$ will not lose more than $S_{2}(n)$ cookies. For this purpose, we prove several lemmas.  For a positive integer $k$, denote by $\nu_{2}(k)$ the exponent of the largest power of 2 that divides $k$. Recall that, by Legendre's formula, $\nu_{2}(n!)=n-S_{2}(n)$ for every positive integer $n$.  Lemma 1. The initial situation is good. Proof. In the initial configuration, the number of balanced collections is equal to $\binom{n}{n / 2}$. We have  $$ \nu_{2}\left(\binom{n}{n / 2}\right)=\nu_{2}(n!)-2 \nu_{2}((n / 2)!)=\left(n-S_{2}(n)\right)-2\left(\frac{n}{2}-S_{2}(n / 2)\right)=S_{2}(n)=s $$  Hence $2^{\text {s+1 }}$ does not divide the number of balanced collections, as desired. Lemma 2. B may play so that after each round the situation remains good. Proof. Assume that the situation $\left(x_{1}, \ldots, x_{k}\right)$ before a round is good, and that $A$ erases two numbers, $x_{p}$ and $x_{q}$.  Let $N$ be the number of all balanced collections, $N_{+}$be the number of those having $\varepsilon_{p}=\varepsilon_{q}$, and $N_{-}$be the number of other balanced collections. Then $N=N_{+}+N_{-}$. Now, if $B$ replaces $x_{p}$ and $x_{q}$ by $x_{p}+x_{q}$, then the number of balanced collections will become $N_{+}$. If $B$ replaces $x_{p}$ and $x_{q}$ by $\left|x_{p}-x_{q}\right|$, then this number will become $N_{-}$. Since $2^{s+1}$ does not divide $N$, it does not divide one of the summands $N_{+}$and $N_{-}$, hence $B$ can reach a good situation after the round. Lemma 3. Assume that the game terminates at a good situation. Then the board contains at most $s$ numbers. Proof. Suppose, one of the numbers is greater than the sum of the other numbers. Then the number of balanced collections is 0 and hence divisible by $2^{s+1}$. Therefore, the situation is not good.  Then we have only zeros on the blackboard at the moment when the game terminates. If there are $k$ of them, then the number of balanced collections is $2^{k}$. Since the situation is good, we have $k \leqslant s$.  By Lemmas 1 and 2, $B$ may act in such way that they keep the situation good. By Lemma 3, when the game terminates, the board contains at most $s$ numbers. This is what we aimed to prove.  Comment 1. If the initial situation had some odd number $n>1$ of ones on the blackboard, player $A$ would still get $S_{2}(n)$ cookies, provided that both players act optimally. The proof of this fact is similar to the solution above, after one makes some changes in the definitions. Such changes are listed below.  Say that a collection of $k$ signs $\varepsilon_{1}, \ldots, \varepsilon_{k} \in\{+1,-1\}$ is positive if  $$ \sum_{i=1}^{k} \varepsilon_{i} x_{i}>0 $$  For every index $i=1,2, \ldots, k$, we denote by $N_{i}$ the number of positive collections such that $\varepsilon_{i}=1$. Finally, say that a situation on the board is good if $2^{s-1}$ does not divide at least one of the numbers $N_{i}$. Now, a strategy for $B$ again consists in preserving the situation good, after each round.  Comment 2. There is an easier strategy for $B$, allowing, in the game starting with an even number $n$ of ones, to lose no more than $d=\left\lfloor\log _{2}(n+2)\right\rfloor-1$ cookies. If the binary representation of $n$ contains at most two zeros, then $d=S_{2}(n)$, and hence the strategy is optimal in that case. We outline this approach below.  First of all, we can assume that $A$ never erases zeros from the blackboard. Indeed, $A$ may skip such moves harmlessly, ignoring the zeros in the further process; this way, $A$ 's win will just increase.  We say that a situation on the blackboard is pretty if the numbers on the board can be partitioned into two groups with equal sums. Clearly, if the situation before some round is pretty, then $B$ may play so as to preserve this property after the round. The strategy for $B$ is as follows:  - $B$ always chooses a move that leads to a pretty situation. - If both possible moves of $B$ lead to pretty situations, then $B$ writes the sum of the two numbers erased by $A$. Since the situation always remains pretty, the game terminates when all numbers on the board are zeros.  Suppose that, at the end of the game, there are $m \geqslant d+1=\left\lfloor\log _{2}(n+2)\right\rfloor$ zeros on the board; then $2^{m}-1>n / 2$.  Now we analyze the whole process of the play. Let us number the zeros on the board in order of appearance. During the play, each zero had appeared after subtracting two equal numbers. Let $n_{1}, \ldots, n_{m}$ be positive integers such that the first zero appeared after subtracting $n_{1}$ from $n_{1}$, the second zero appeared after subtracting $n_{2}$ from $n_{2}$, and so on. Since the sum of the numbers on the blackboard never increases, we have $2 n_{1}+\ldots+2 n_{m} \leqslant n$, hence  $$ n_{1}+\ldots+n_{m} \leqslant n / 2<2^{m}-1 $$  There are $2^{m}$ subsets of the set $\{1,2, \ldots, m\}$. For $I \subseteq\{1,2, \ldots, m\}$, denote by $f(I)$ the sum $\sum_{i \in I} n_{i}$. There are less than $2^{m}$ possible values for $f(I)$, so there are two distinct subsets $I$ and $J$ with $f(I)=f(J)$. Replacing $I$ and $J$ with $I \backslash J$ and $J \backslash I$, we assume that $I$ and $J$ are disjoint.  Let $i_{0}$ be the smallest number in $I \cup J$; without loss of generality, $i_{0} \in I$. Consider the round when $A$ had erased two numbers equal to $n_{i_{0}}$, and $B$ had put the $i_{0}{ }^{\text {th }}$ zero instead, and the situation before that round.  For each nonzero number $z$ which is on the blackboard at this moment, we can keep track of it during the further play until it enters one of the numbers $n_{i}, i \geqslant i_{0}$, which then turn into zeros. For every $i=i_{0}, i_{0}+1, \ldots, m$, we denote by $X_{i}$ the collection of all numbers on the blackboard that finally enter the first copy of $n_{i}$, and by $Y_{i}$ the collection of those finally entering the second copy of $n_{i}$. Thus, each of $X_{i_{0}}$ and $Y_{i_{0}}$ consists of a single number. Since $A$ never erases zeros, the 2(m-iol $i_{0}$ ) defined sets are pairwise disjoint.  Clearly, for either of the collections $X_{i}$ and $Y_{i}$, a signed sum of its elements equals $n_{i}$, for a proper choice of the signs. Therefore, for every $i=i_{0}, i_{0}+1, \ldots, m$ one can endow numbers in $X_{i} \cup Y_{i}$ with signs so that their sum becomes any of the numbers $-2 n_{i}, 0$, or $2 n_{i}$. Perform such endowment so as to get $2 n_{i}$ from each collection $X_{i} \cup Y_{i}$ with $i \in I,-2 n_{j}$ from each collection $X_{j} \cup Y_{j}$ with $j \in J$, and 0 from each remaining collection. The obtained signed sum of all numbers on the blackboard equals  $$ \sum_{i \in I} 2 n_{i}-\sum_{i \in J} 2 n_{i}=0 $$  and the numbers in $X_{i_{0}}$ and $Y_{i_{0}}$ have the same (positive) sign. This means that, at this round, $B$ could add up the two numbers $n_{i_{0}}$ to get a pretty situation. According to the strategy, $B$ should have performed that, instead of subtracting the numbers. This contradiction shows that $m \leqslant d$, as desired.  This page is intentionally left blank


Let $A B C$ be an isosceles triangle with $B C=C A$, and let $D$ be a point inside side $A B$ such that $A D<D B$. Let $P$ and $Q$ be two points inside sides $B C$ and $C A$, respectively, such that $\angle D P B=\angle D Q A=90^{\circ}$. Let the perpendicular bisector of $P Q$ meet line segment $C Q$ at $E$, and let the circumcircles of triangles $A B C$ and $C P Q$ meet again at point $F$, different from $C$.  Suppose that $P, E, F$ are collinear. Prove that $\angle A C B=90^{\circ}$. (Luxembourg)

Solution: Let $\ell$ be the perpendicular bisector of $P Q$, and denote by $\omega$ the circle $C F P Q$. By $D P \perp B C$ and $D Q \perp A C$, the circle $\omega$ passes through $D$; moreover, $C D$ is a diameter of $\omega$.  The lines $Q E$ and $P E$ are symmetric about $\ell$, and $\ell$ is a symmetry axis of $\omega$ as well; it follows that the chords $C Q$ and $F P$ are symmetric about $\ell$, hence $C$ and $F$ are symmetric about $\ell$. Therefore, the perpendicular bisector of $C F$ coincides with $\ell$. Thus $\ell$ passes through the circumcenter $O$ of $A B C$.  Let $M$ be the midpoint of $A B$. Since $C M \perp D M, M$ also lies on $\omega$. By $\angle A C M=\angle B C M$, the chords $M P$ and $M Q$ of $\omega$ are equal. Then, from $M P=M Q$ it follows that $\ell$ passes through $M$. ![](https://cdn.mathpix.com/cropped/2024_11_18_bcdd154f2030efbe2fa4g-50.jpg?height=661&width=1206&top_left_y=1223&top_left_x=428)  Finally, both $O$ and $M$ lie on lines $\ell$ and $C M$, therefore $O=M$, and $\angle A C B=90^{\circ}$ follows.


Solution: Like in the first solution, we conclude that points $C, P, Q, D, F$ and the midpoint $M$ of $A B$ lie on one circle $\omega$ with diameter $C D$, and $M$ lies on $\ell$, the perpendicular bisector of $P Q$.  Let $B F$ and $C M$ meet at $G$ and let $\alpha=\angle A B F$. Then, since $E$ lies on $\ell$, and the quadrilaterals $F C B A$ and $F C P Q$ are cyclic, we have  $$ \angle C Q P=\angle F P Q=\angle F C Q=\angle F C A=\angle F B A=\alpha . $$  Since points $P, E, F$ are collinear, we have  $$ \angle F E M=\angle F E Q+\angle Q E M=2 \alpha+\left(90^{\circ}-\alpha\right)=90^{\circ}+\alpha $$  But $\angle F G M=90^{\circ}+\alpha$, so $F E G M$ is cyclic. Hence  $$ \angle E G C=\angle E F M=\angle P F M=\angle P C M $$  Thus $G E \| B C$. It follows that $\angle F A C=\angle C B F=\angle E G F$, so $F E G A$ is cyclic, too. Hence $\angle A C B=\angle A F B=\angle A F G=180^{\circ}-\angle A M G=90^{\circ}$, that completes the proof. ![](https://cdn.mathpix.com/cropped/2024_11_18_bcdd154f2030efbe2fa4g-51.jpg?height=658&width=1209&top_left_y=202&top_left_x=429)  Comment 1. The converse statement is true: if $\angle A C B=90^{\circ}$ then points $P, E$ and $F$ are collinear. This direction is easier to prove.  Comment 2. The statement of the problem remains true if the projection $P$ of $D$ onto $B C$ lies outside line segment $B C$. The restriction that $P$ lies inside line segment $B C$ is given to reduce case-sensitivity.


Let $A B C D$ be a convex quadrilateral. Suppose that $P$ is a point in the interior of $A B C D$ such that  $$ \angle P A D: \angle P B A: \angle D P A=1: 2: 3=\angle C B P: \angle B A P: \angle B P C . $$  The internal bisectors of angles $A D P$ and $P C B$ meet at a point $Q$ inside the triangle $A B P$. Prove that $A Q=B Q$. (Poland)

Solution: Let $\varphi=\angle P A D$ and $\psi=\angle C B P$; then we have $\angle P B A=2 \varphi, \angle D P A=3 \varphi$, $\angle B A P=2 \psi$ and $\angle B P C=3 \psi$. Let $X$ be the point on segment $A D$ with $\angle X P A=\varphi$. Then  $$ \angle P X D=\angle P A X+\angle X P A=2 \varphi=\angle D P A-\angle X P A=\angle D P X . $$  It follows that triangle $D P X$ is isosceles with $D X=D P$ and therefore the internal angle bisector of $\angle A D P$ coincides with the perpendicular bisector of $X P$. Similarly, if $Y$ is a point on $B C$ such that $\angle B P Y=\psi$, then the internal angle bisector of $\angle P C B$ coincides with the perpendicular bisector of $P Y$. Hence, we have to prove that the perpendicular bisectors of $X P$, $P Y$, and $A B$ are concurrent. ![](https://cdn.mathpix.com/cropped/2024_11_18_bcdd154f2030efbe2fa4g-52.jpg?height=652&width=704&top_left_y=1162&top_left_x=679)  Notice that  $$ \angle A X P=180^{\circ}-\angle P X D=180^{\circ}-2 \varphi=180^{\circ}-\angle P B A . $$  Hence the quadrilateral $A X P B$ is cyclic; in other words, $X$ lies on the circumcircle of triangle $A P B$. Similarly, $Y$ lies on the circumcircle of triangle $A P B$. It follows that the perpendicular bisectors of $X P, P Y$, and $A B$ all pass through the center of circle $(A B Y P X)$. This finishes the proof.  Comment. Introduction of points $X$ and $Y$ seems to be the key step in the solution above. Note that the same point $X$ could be introduced in different ways, e.g., as the point on the ray $C P$ beyond $P$ such that $\angle P B X=\varphi$, or as a point where the circle $(A P B)$ meets again $A B$. Different definitions of $X$ could lead to different versions of the further solution.


Solution: We define the angles $\varphi=\angle P A D, \psi=\angle C B P$ and use $\angle P B A=2 \varphi, \angle D P A=$ $3 \varphi, \angle B A P=2 \psi$ and $\angle B P C=3 \psi$ again. Let $O$ be the circumcenter of $\triangle A P B$.  Notice that $\angle A D P=180^{\circ}-\angle P A D-\angle D P A=180^{\circ}-4 \varphi$, which, in particular, means that $4 \varphi<180^{\circ}$. Further, $\angle P O A=2 \angle P B A=4 \varphi=180^{\circ}-\angle A D P$, therefore the quadrilateral $A D P O$ is cyclic. By $A O=O P$, it follows that $\angle A D O=\angle O D P$. Thus $D O$ is the internal bisector of $\angle A D P$. Similarly, $C O$ is the internal bisector of $\angle P C B$. ![](https://cdn.mathpix.com/cropped/2024_11_18_bcdd154f2030efbe2fa4g-53.jpg?height=678&width=1026&top_left_y=192&top_left_x=515)  Finally, $O$ lies on the perpendicular bisector of $A B$ as it is the circumcenter of $\triangle A P B$. Therefore the three given lines in the problem statement concur at point $O$.


Let $A B C D$ be a convex quadrilateral with $\angle A B C>90^{\circ}, \angle C D A>90^{\circ}$, and $\angle D A B=\angle B C D$. Denote by $E$ and $F$ the reflections of $A$ in lines $B C$ and $C D$, respectively. Suppose that the segments $A E$ and $A F$ meet the line $B D$ at $K$ and $L$, respectively. Prove that the circumcircles of triangles $B E K$ and $D F L$ are tangent to each other. (Slovakia)

Solution: Denote by $A^{\prime}$ the reflection of $A$ in $B D$. We will show that that the quadrilaterals $A^{\prime} B K E$ and $A^{\prime} D L F$ are cyclic, and their circumcircles are tangent to each other at point $A^{\prime}$.  From the symmetry about line $B C$ we have $\angle B E K=\angle B A K$, while from the symmetry in $B D$ we have $\angle B A K=\angle B A^{\prime} K$. Hence $\angle B E K=\angle B A^{\prime} K$, which implies that the quadrilateral $A^{\prime} B K E$ is cyclic. Similarly, the quadrilateral $A^{\prime} D L F$ is also cyclic. ![](https://cdn.mathpix.com/cropped/2024_11_18_bcdd154f2030efbe2fa4g-54.jpg?height=632&width=1229&top_left_y=818&top_left_x=419)  For showing that circles $A^{\prime} B K E$ and $A^{\prime} D L F$ are tangent it suffices to prove that  $$ \angle A^{\prime} K B+\angle A^{\prime} L D=\angle B A^{\prime} D . $$  Indeed, by $A K \perp B C$, $A L \perp C D$, and again the symmetry in $B D$ we have  $$ \angle A^{\prime} K B+\angle A^{\prime} L D=180^{\circ}-\angle K A^{\prime} L=180^{\circ}-\angle K A L=\angle B C D=\angle B A D=\angle B A^{\prime} D, $$  as required. Comment 1. The key to the solution above is introducing the point $A^{\prime}$; then the angle calculations can be done in many different ways.


Solution: Note that $\angle K A L=180^{\circ}-\angle B C D$, since $A K$ and $A L$ are perpendicular to $B C$ and $C D$, respectively. Reflect both circles $(B E K)$ and $(D F L)$ in $B D$. Since $\angle K E B=\angle K A B$ and $\angle D F L=\angle D A L$, the images are the circles $(K A B)$ and $(L A D)$, respectively; so they meet at $A$. We need to prove that those two reflections are tangent at $A$.  For this purpose, we observe that  $$ \angle A K B+\angle A L D=180^{\circ}-\angle K A L=\angle B C D=\angle B A D . $$  Thus, there exists a ray $A P$ inside angle $\angle B A D$ such that $\angle B A P=\angle A K B$ and $\angle D A P=$ $\angle D L A$. Hence the line $A P$ is a common tangent to the circles $(K A B)$ and $(L A D)$, as desired.  Comment 2. The statement of the problem remains true for a more general configuration, e.g., if line $B D$ intersect the extension of segment $A E$ instead of the segment itself, etc. The corresponding restrictions in the statement are given to reduce case sensitivity.