# Baltic Way 2008 GdaƄsk, November 8, 2008 ## Problems and solutions Problem 1. Determine all polynomials $p(x)$ with real coefficients such that $$ p\left((x+1)^{3}\right)=(p(x)+1)^{3} $$ and $$ p(0)=0 $$ Answer: $p(x)=x$. Solution: Consider the sequence defined by $$ \left\{\begin{array}{l} a_{0}=0 \\ a_{n+1}=\left(a_{n}+1\right)^{3} \end{array}\right. $$ It follows inductively that $p\left(a_{n}\right)=a_{n}$. Since the polynomials $p$ and $x$ agree on infinitely many points, they must be equal, so $p(x)=x$. Problem 2. Prove that if the real numbers $a, b$ and $c$ satisfy $a^{2}+b^{2}+c^{2}=3$ then $$ \frac{a^{2}}{2+b+c^{2}}+\frac{b^{2}}{2+c+a^{2}}+\frac{c^{2}}{2+a+b^{2}} \geq \frac{(a+b+c)^{2}}{12} . $$ When does equality hold? Solution: Let $2+b+c^{2}=u, 2+c+a^{2}=v, 2+a+b^{2}=w$. We note that it follows from $a^{2}+b^{2}+c^{2}=3$ that $a, b, c \geq-\sqrt{3}>-2$. Therefore, $u, v$ and $w$ are positive. From the Cauchy-Schwartz inequality we get then $$ \begin{aligned} (a+b+c)^{2} & =\left(\frac{a}{\sqrt{u}} \sqrt{u}+\frac{b}{\sqrt{v}} \sqrt{v}+\frac{c}{\sqrt{w}} \sqrt{w}\right)^{2} \\ & \leq\left(\frac{a^{2}}{u}+\frac{b^{2}}{v}+\frac{c^{2}}{w}\right)(u+v+w) . \end{aligned} $$ Here, $$ u+v+w=6+a+b+c+a^{2}+b^{2}+c^{2}=9+a+b+c . $$ Invoking once more the Cauchy-Schwartz inequality, we get $$ (a+b+c)^{2}=(a \cdot 1+b \cdot 1+c \cdot 1)^{2} \leq\left(a^{2}+b^{2}+c^{2}\right)(1+1+1)=9, $$ whence $a+b+c \leq 3$ and $u+v+w \leq 12$. The proposed inequality follows. In the second application above of the Cauchy-Schwartz inequality, equality requires $a=b=c$. If this is satified, $u+v+w=12$, which is equivalent to $a+b+c=3$, requires $a=b=c=1$. It is seen by a direct check that equality holds in the proposed inequality in this case. Problem 3. Does there exist an angle $\alpha \in(0, \pi / 2)$ such that $\sin \alpha, \cos \alpha, \tan \alpha$ and $\cot \alpha$, taken in some order, are consecutive terms of an arithmetic progression? Answer: No. Solution: Suppose that there is an $x$ such that $0\sin x$, we can reduce by $\cos x-\sin x$ and get $$ 1=\frac{\cos x+\sin x}{\cos x \sin x}=\frac{1}{\sin x}+\frac{1}{\cos x} . $$ But $0<\sin x<1$ and $0<\cos x<1$, hence $\frac{1}{\sin x}$ and $\frac{1}{\cos x}$ are greater than 1 and their sum cannot equal 1 , a contradiction. If $x>\frac{\pi}{4}$ then $0<\frac{\pi}{2}-x<\frac{\pi}{4}$. As the sine, cosine, tangent and cotangent of $\frac{\pi}{2}-x$ are equal to the sine, cosine, tangent and cotangent of $x$ in some order, the contradiction carries over to this case, too. Solution 2: The case $x \leq \frac{\pi}{4}$ can also be handled as follows. Consider two cases according to the order of the intermediate two terms. If the order is $\sin x<\tan x<\cos x<\cot x$ then using AM-GM gives $$ \cos x=\frac{\tan x+\cot x}{2}>\sqrt{\tan x \cdot \cot x}=\sqrt{1}=1 $$ which is impossible. Suppose the other case, $\sin x<\cos x<\tan x<\cot x$. From equalities $$ \frac{\sin x+\tan x}{2}=\cos x \quad \text { and } \quad \frac{\cos x+\cot x}{2}=\tan x $$ one gets $$ \begin{aligned} & \tan x(\cos x+1)=2 \cos x \\ & \cot x(\sin x+1)=2 \tan x, \end{aligned} $$ respectively. By multiplying the corresponding sides, one obtains $(\cos x+1)(\sin x+1)=4 \sin x$, leading to $\cos x \sin x+\cos x+1=3 \sin x$. On the other hand, using $\cos x>\sin x$ and AM-GM gives $$ \cos x \sin x+\cos x+1>\sin ^{2} x+\sin x+1 \geq 2 \sin x+\sin x=3 \sin x $$ a contradiction. Problem 4. The polynomial $P$ has integer coefficients and $P(x)=5$ for five different integers $x$. Show that there is no integer $x$ such that $-6 \leq P(x) \leq 4$ or $6 \leq P(x) \leq 16$. Solution: Assume $P\left(x_{k}\right)=5$ for different integers $x_{1}, x_{2}, \ldots, x_{5}$. Then $$ P(x)-5=\prod_{k=1}^{5}\left(x-x_{k}\right) Q(x) $$ where $Q$ is a polynomial with integral coefficients. Assume $n$ satisfies the condition in the problem. Then $|n-5| \leq 11$. If $P\left(x_{0}\right)=n$ for some integer $x_{0}$, then $n-5$ is a product of six non-zero integers, five of which are different. The smallest possible absolute value of a product of five different non-zero integers is $1^{2} \cdot 2^{2} \cdot 3=12$. Problem 5. Suppose that Romeo and Juliet each have a regular tetrahedron to the vertices of which some positive real numbers are assigned. They associate each edge of their tetrahedra with the product of the two numbers assigned to its end points. Then they write on each face of their tetrahedra the sum of the three numbers associated to its three edges. The four numbers written on the faces of Romeo's tetrahedron turn out to coincide with the four numbers written on Juliet's tetrahedron. Does it follow that the four numbers assigned to the vertices of Romeo's tetrahedron are identical to the four numbers assigned to the vertices of Juliet's tetrahedron? Answer: Yes. Solution: Let us prove that this conclusion can in fact be drawn. For this purpose we denote the numbers assigned to the vertices of Romeo's tetrahedron by $r_{1}, r_{2}, r_{3}, r_{4}$ and the numbers assigned to the vertices of Juliette's tetrahedron by $j_{1}, j_{2}, j_{3}, j_{4}$ in such a way that $$ \begin{aligned} & r_{2} r_{3}+r_{3} r_{4}+r_{4} r_{2}=j_{2} j_{3}+j_{3} j_{4}+j_{4} j_{2} \\ & r_{1} r_{3}+r_{3} r_{4}+r_{4} r_{1}=j_{1} j_{3}+j_{3} j_{4}+j_{4} j_{1} \\ & r_{1} r_{2}+r_{2} r_{4}+r_{4} r_{1}=j_{1} j_{2}+j_{2} j_{4}+j_{4} j_{1} \\ & r_{1} r_{2}+r_{2} r_{3}+r_{3} r_{1}=j_{1} j_{2}+j_{2} j_{3}+j_{3} j_{1} \end{aligned} $$ We intend to show that $r_{1}=j_{1}, r_{2}=j_{2}, r_{3}=j_{3}$ and $r_{4}=j_{4}$, which clearly suffices to establish our claim. Now let $$ R=\left\{i \mid r_{i}>j_{i}\right\} $$ denote the set indices where Romeo's corresponding number is larger and define similarly $$ J=\left\{i \mid r_{i}2$, then w.l.o.g. $\{1,2,3\} \subseteq R$, which easily contradicted (4). Therefore $|R| \leq 2$, so let us suppose for the moment that $|R|=2$. Then w.l.o.g. $R=\{1,2\}$, i.e. $r_{1}>j_{1}, r_{2}>j_{2}, r_{3} \leq j_{3}, r_{4} \leq j_{4}$. It follows that $r_{1} r_{2}-r_{3} r_{4}>j_{1} j_{2}-j_{3} j_{4}$, but (1) + (2) - (3) - (4) actually tells us that both sides of this strict inequality are equal. This contradiction yields $|R| \leq 1$ and replacing the roles Romeo and Juliet played in the argument just performed we similarly infer $|J| \leq 1$. For these reasons at least two of the four desired equalities hold, say $r_{1}=1_{1}$ and $r_{2}=j_{2}$. Now using (3) and (4) we easily get $r_{3}=j_{3}$ and $r_{4}=j_{4}$ as well. Problem 6. Find all finite sets of positive integers with at least two elements such that for any two numbers $a, b(a>b)$ belonging to the set, the number $\frac{b^{2}}{a-b}$ belongs to the set, too. Answer: $X=\{a, 2 a\}$, where $a$ is an arbitrary nonnegative integer. Solution: Let $X$ be a set we seek for, and $a$ be its minimal element. For each other element $b$ we have $\frac{a^{2}}{b-a} \geq a$, hence $b \leq 2 a$. Therefore all the elements of $X$ belong to the interval $[a, 2 a]$. So the quotient of any two elements of $X$ is at most 2 . Now consider two biggest elements $d$ and $c, c1040$ and $12 \cdot 79<1001$. - $13 \cdot k \in A$ for $k \geq 80$. As $13 \cdot k \geq 13 \cdot 80=1040$, we are done. Now take $A=\{1001,1008,1012,1035,1040\}$. The prime factorizations are $1001=7 \cdot 11 \cdot 13,1008=7 \cdot 2^{4} \cdot 3^{2}$, $1012=2^{2} \cdot 11 \cdot 23,1035=5 \cdot 3^{2} \cdot 23,1040=2^{4} \cdot 5 \cdot 13$. The sum of exponents of each prime occurring in these representations is even. Thus the product of elements of $A$ is a perfect square. Problem 9. Suppose that the positive integers $a$ and $b$ satisfy the equation $$ a^{b}-b^{a}=1008 . $$ Prove that $a$ and $b$ are congruent modulo 1008. Solution: Observe that $1008=2^{4} \cdot 3^{2} \cdot 7$. First we show that $a$ and $b$ cannot both be even. For suppose the largest of them were equal to $2 x$ and the smallest of them equal to $2 y$, where $x \geq y \geq 1$. Then $$ \pm 1008=(2 x)^{2 y}-(2 y)^{2 x} $$ so that $2^{2 y}$ divides 1008 . It follows that $y \leq 2$. If $y=2$, then $\pm 1008=(2 x)^{4}-4^{2 x}$, and $$ \pm 63=x^{4}-4^{2 x-2}=\left(x^{2}+4^{x-1}\right)\left(x^{2}-4^{x-1}\right) \text {. } $$ But $x^{2}-4^{x-1}$ is easily seen never to divide 63; already at $x=4$ it is too large. Suppose that $y=1$. Then $\pm 1008=(2 x)^{2}-2^{2 x}$, and $$ \pm 252=x^{2}-2^{2 x-2}=\left(x+2^{x-1}\right)\left(x-2^{x-1}\right) . $$ This equation has no solutions. Clearly $x$ must be even. $x=2,4,6,8$ do not work, and when $x \geq 10$, then $x+2^{x-1}>252$. We see that $a$ and $b$ cannot both be even, so they must both be odd. They cannot both be divisible by 3 , for then $1008=a^{b}-b^{a}$ would be divisible by 27 ; therefore neither of them is. Likewise, none of them is divisible by 7 . Everything will now follow from repeated use of the following fact, where $\varphi$ denotes Euler's totient function: If $n \mid 1008, a$ and $b$ are relatively prime to both $n$ and $\varphi(n)$, and $a \equiv b \bmod \varphi(n)$, then also $a \equiv b \bmod n$. To prove the fact, use Euler's Totient Theorem: $a^{\varphi(n)} \equiv b^{\varphi(n)} \equiv 1 \bmod n$. From $a \equiv b \equiv d \bmod \varphi(n)$, we get $$ 0 \equiv 1008=a^{b}-b^{a} \equiv a^{d}-b^{d} \bmod n, $$ and since $d$ is invertible modulo $\varphi(n)$, we may deduce that $a \equiv b \bmod n$. Now begin with $a \equiv b \equiv 1 \bmod 2$. From $\varphi(4)=2, \varphi(8)=4$ and $\varphi(16)=8$, we get congruence of $a$ and $b$ modulo 4, 8 and 16 in turn. We established that $a$ and $b$ are not divisible by 3 . Since $\varphi(3)=2$, we get $a \equiv b$ $\bmod 3$, then from $\varphi(9)=6$, deduce $a \equiv b \bmod 9$. Finally, since $a$ and $b$ are not divisible by 7 , and $\varphi(7)=6$, infer $a \equiv b \bmod 7$. Consequently, $a \equiv b \bmod 1008$. We remark that the equation possesses at least one solution, namely $1009^{1}-1^{1009}=1008$. It is unknown whether there exist others. Problem 10. For a positive integer $n$, let $S(n)$ denote the sum of its digits. Find the largest possible value of the expression $\frac{S(n)}{S(16 n)}$. ## Answer: 13 Solution: It is obvious that $S(a b) \leq S(a) S(b)$ for all positive integers $a$ and $b$. From here we get $$ S(n)=S(n \cdot 10000)=S(16 n \cdot 625) \leq S(16 n) \cdot 13 \text {; } $$ so we get $\frac{S(n)}{S(16 n)} \leq 13$. For $n=625$ we have an equality. So the largest value is 13 . Problem 11. Consider a subset $A$ of 84 elements of the set $\{1,2, \ldots, 169\}$ such that no two elements in the set add up to 169 . Show that $A$ contains a perfect square. Solution: If $169 \in A$, we are done. If not, then $$ A \subset \bigcup_{k=1}^{84}\{k, 169-k\} $$ Since the sum of the numbers in each of the sets in the union is 169, each set contains at most one element of $A$; on the other hand, as $A$ has 84 elements, each set in the union contains exactly one element of $A$. So there is an $a \in A$ such that $a \in\{25,144\}$. $a$ is a perfect square. Problem 12. In a school class with $3 n$ children, any two children make a common present to exactly one other child. Prove that for all odd $n$ it is possible that the following holds: For any three children $A, B$ and $C$ in the class, if $A$ and $B$ make a present to $C$ then $A$ and $C$ make a present to $B$. Solution: Assume there exists a set $\mathscr{S}$ of sets of three children such that any set of two children is a subset of exactly one member of $\mathscr{S}$, and assume that the children $A$ and $B$ make a common present to $C$ if and only if $\{A, B, C\} \in \mathscr{S}$. Then it is true that any two children $A$ and $B$ make a common present to exactly one other child $C$, namely the unique child such that $\{A, B, C\} \in \mathscr{S}$. Because $\{A, B, C\}=\{A, C, B\}$ it is also true that if $A$ and $B$ make a present to $C$ then $A$ and $C$ make a present to $B$. We shall construct such a set $\mathscr{S}$. Let $A_{1}, \ldots, A_{n}, B_{1}, \ldots B_{n}, C_{1}, \ldots, C_{n}$ be the children, and let the following sets belong to $\mathscr{S}$. (1) $\left\{A_{i}, B_{i}, C_{i}\right\}$ for $1 \leq i \leq n$. (2) $\left\{A_{i}, A_{j}, B_{k}\right\},\left\{B_{i}, B_{j}, C_{k}\right\}$ and $\left\{C_{i}, C_{j}, A_{k}\right\}$ for $1 \leq i2008$. ![](https://cdn.mathpix.com/cropped/2024_04_17_64f81c74a8132dd111d8g-07.jpg?height=559&width=569&top_left_y=2059&top_left_x=755) The square $76 \times 76$ is not enough. If it was, consider the "circumferences" of the 1004 dominoes of size $2 \times 3$, see figure; they should fit inside $77 \times 77$ square without overlapping. But $6 \cdot 1004=6024>5929=77 \cdot 77$. ![](https://cdn.mathpix.com/cropped/2024_04_17_64f81c74a8132dd111d8g-08.jpg?height=185&width=263&top_left_y=393&top_left_x=905) Problem 16. Let $A B C D$ be a parallelogram. The circle with diameter $A C$ intersects the line $B D$ at points $P$ and $Q$. The perpendicular to the line $A C$ passing through the point $C$ intersects the lines $A B$ and $A D$ at points $X$ and $Y$, respectively. Prove that the points $P, Q, X$ and $Y$ lie on the same circle. Solution: If the lines $B D$ and $X Y$ are parallel the statement is trivial. Let $M$ be the intersection point of $B D$ and $X Y$. By Intercept Theorem $M B / M D=M C / M Y$ and $M B / M D=M X / M C$, hence $M C^{2}=M X \cdot M Y$. By the circle property $M C^{2}=M P \cdot M Q$ (line $M C$ is tangent and line $M P$ is secant to the circle). Therefore we have $M X \cdot M Y=M P \cdot M Q$ and the quadrilateral $P Q Y X$ is inscribed. Problem 17. Assume that $a, b, c$ and $d$ are the sides of a quadrilateral inscribed in a given circle. Prove that the product $(a b+c d)(a c+b d)(a d+b c)$ acquires its maximum when the quadrilateral is a square. Solution: Let $A B C D$ be the quadrilateral, and let $A B=a, B C=b, C D=c, A D=d, A C=e, B D=f$. Ptolemy's Theorem gives $a c+b d=e f$. Since the area of triangle $A B C$ is $a b e / 4 R$, where $R$ is the circumradius, and similarly the area of triangle $A C D$, the product $(a b+c d) e$ equals $4 R$ times the area of quadrilateral $A B C D$. Similarly, this is also the value of the product $f(a d+b c)$, so $(a b+c d)(a c+b d)(a d+b c)$ is maximal when the quadrilateral has maximal area. Since the area of the quadrilateral is equal to $\frac{1}{2} e f \sin u$, where $u$ is one of the angles between the diagonals $A C$ and $B D$, it is maximal when all the factors of the product $d e \sin u$ are maximal. The diagonals $d$ and $e$ are maximal when they are diagonals of the circle, and $\sin u$ is maximal when $u=90^{\circ}$. Thus, $(a b+c d)(a c+b d)(a d+b c)$ is maximal when $A B C D$ is a square. Problem 18. Let $A B$ be a diameter of a circle $S$, and let $L$ be the tangent at $A$. Furthermore, let $c$ be a fixed, positive real, and consider all pairs of points $X$ and $Y$ lying on $L$, on opposite sides of $A$, such that $|A X| \cdot|A Y|=c$. The lines $B X$ and $B Y$ intersect $S$ at points $P$ and $Q$, respectively. Show that all the lines $P Q$ pass through a common point. Solution: Let $S$ be the unit circle in the $x y$-plane with origin $O$, put $A=(1,0), B=(-1,0)$, take $L$ as the line $x=1$, and suppose $X=(1,2 p)$ and $Y=(1,-2 q)$, where $p$ and $q$ are positive real numbers with $p q=\frac{c}{4}$. If $\alpha=\angle A B P$ and $\beta=\angle A B Q$, then $\tan \alpha=p$ and $\tan \beta=q$. Let $P Q$ intersect the $x$-axis in the point $R$. By the Inscribed Angle Theorem, $\angle R O P=2 \alpha$ and $\angle R O Q=2 \beta$. The triangle $O P Q$ is isosceles, from which $\angle O P Q=\angle O Q P=90^{\circ}-\alpha-\beta$, and $\angle O R P=90^{\circ}-\alpha+\beta$. The Law of Sines gives $$ \frac{O R}{\sin \angle O P R}=\frac{O P}{\sin \angle O R P} $$ which implies $$ \begin{aligned} O R & =\frac{\sin \angle O P R}{\sin \angle O R P}=\frac{\sin \left(90^{\circ}-\alpha-\beta\right)}{\sin \left(90^{\circ}-\alpha+\beta\right)}=\frac{\cos (\alpha+\beta)}{\cos (\alpha-\beta)} \\ & =\frac{\cos \alpha \cos \beta-\sin \alpha \sin \beta}{\cos \alpha \cos \beta+\sin \alpha \sin \beta}=\frac{1-\tan \alpha \tan \beta}{1+\tan \alpha \tan \beta} \\ & =\frac{1-p q}{1+p q}=\frac{1-\frac{c}{4}}{1+\frac{c}{4}}=\frac{4-c}{4+c} . \end{aligned} $$ Hence the point $R$ lies on all lines $P Q$. Solution 2: Perform an inversion in the point $B$. Since angles are preserved under inversion, the problem transforms into the following: Let $S$ be a line, let the circle $L$ be tangent to it at point $A$, with $\infty$ as the diametrically opposite point. Consider all points $X$ and $Y$ lying on $L$, on opposite sides of $A$, such that if $\alpha=\angle A B X$ and $\beta=\angle A B Y$, then $\tan \alpha \tan \beta=\frac{c}{4}$. The lines $X \infty$ and $Y \infty$ will intersect $S$ in points $P$ and $Q$, respectively. Show that all the circles $P Q \infty$ will pass through a common point. To prove this, draw the line through $A$ and $\infty$, and define $R$ as the point lying on this line, opposite to $\infty$, and at distance $\frac{c r}{2}$ from $A$, where $r$ is the radius of $L$. Since $$ \tan \alpha=\frac{|A P|}{2 r}, \quad \tan \beta=\frac{|A Q|}{2 r}, $$ we have $$ \frac{c}{4}=\tan \alpha \tan \beta=\frac{|A P||A Q|}{4 r^{2}} $$ so that $|A P|=\frac{c r^{2}}{|A Q|}$, whence $$ \tan \angle \infty R P=\frac{|A P|}{|A R|}=\frac{\frac{c r^{2}}{|A Q|}}{\frac{c r}{2}}=\frac{2 r}{|A Q|}=\tan \angle \infty Q P $$ Consequently, $\infty, P, Q$, and $R$ are concyclic. Problem 19. In a circle of diameter 1, some chords are drawn. The sum of their lengths is greater than 19. Prove that there is a diameter intersecting at least 7 chords. Solution: For each hord consider the smallest arc subtended by it and the symmetric image of this arc accordingly to the center. The sum of lengths of all these arcs is more than $19 \cdot 2=38$. As $\frac{38}{\pi \cdot 1}>12$, there is a point on the circumference belonging to $>\frac{12}{2}$ original arcs, so it belongs to $\geq 7$ original arcs. We can take a diameter containing this point. Problem 20. Let $M$ be a point on $B C$ and $N$ be a point on $A B$ such that $A M$ and $C N$ are angle bisectors of the triangle $A B C$. Given that $$ \frac{\angle B N M}{\angle M N C}=\frac{\angle B M N}{\angle N M A} $$ prove that the triangle $A B C$ is isosceles. ![](https://cdn.mathpix.com/cropped/2024_04_17_64f81c74a8132dd111d8g-09.jpg?height=471&width=645&top_left_y=2146&top_left_x=708) Solution: Let $O$ and $I$ be the incentres of $A B C$ and $N B M$, respectively; denote angles as in the figure. We get $$ \alpha+\beta=\varepsilon+\varphi, \quad \gamma+\delta=2 \alpha+2 \beta, \quad \gamma=k \cdot \varepsilon, \quad \delta=k \cdot \varphi $$ From here we get $k=2$. Therefore $\triangle N I M=\triangle N O M$, so $I O \perp N M$. In the triangle $N B M$ the bisector coincides with the altitude, so $B N=B M$. So we get $$ \frac{A B \cdot B C}{A C+B C}=\frac{B C \cdot A B}{A B+A C} $$ and $A B=B C$.