exam: BalticWay

problem: Integers $1,2, \ldots, n$ are written (in some order) on the circumference of a circle. What is the smallest possible sum of moduli of the differences of neighbouring numbers?

solution:
Let $a_{1}=1, a_{2}, \ldots, a_{k}=n, a_{k+1}, \ldots, a_{n}$ be the order in which the numbers $1,2, \ldots, n$ are written around the circle. Then the sum of moduli of the differences of neighbouring numbers is

$$
\begin{aligned}
& \left|1-a_{2}\right|+\left|a_{2}-a_{3}\right|+\cdots+\left|a_{k}-n\right|+\left|n-a_{k+1}\right|+\cdots+\left|a_{n}-1\right| \\
& \geq\left|1-a_{2}+a_{2}-a_{3}+\cdots+a_{k}-n\right|+\left|n-a_{k+1}+\cdots+a_{n}-1\right| \\
& =|1-n|+|n-1|=2 n-2 .
\end{aligned}
$$

This minimum is achieved if the numbers are written around the circle in increasing order.

solution_match: Solution.


problem:
The squares of a squared paper are enumerated as follows:

![](https://cdn.mathpix.com/cropped/2024_04_17_a668d2eee50487b1b875g-1.jpg?height=406&width=459&top_left_y=999&top_left_x=316)

Devise a polynomial $p(m, n)$ of two variables $m, n$ such that for any positive integers $m$ and $n$ the number written in the square with coordinates $(m, n)$ will be equal to $p(m, n)$.

solution:
Since the square with the coordinates $(m, n)$ is $n$th on the $(n+m-1)$-th diagonal, it contains the number

$$
P(m, n)=\sum_{i=1}^{n+m-2} i+n=\frac{(n+m-1)(n+m-2)}{2}+n
$$


problem:
Let $a_{0}>0, c>0$ and

$$
a_{n+1}=\frac{a_{n}+c}{1-a_{n} c}, \quad n=0,1, \ldots
$$

Is it possible that the first 1990 terms $a_{0}, a_{1}, \ldots, a_{1989}$ are all positive but $a_{1990}<0$ ?

solution: Obviously we can find angles $0<\alpha, \beta<90^{\circ}$ such that $\tan \alpha>0, \tan (\alpha+\beta)>0, \ldots$, $\tan (\alpha+1989 \beta)>0$ but $\tan (\alpha+1990 \beta)<0$. Now it suffices to note that if we take $a_{0}=\tan \alpha$ and $c=\tan \beta$ then $a_{n}=\tan (\alpha+n \beta)$.


solution: Consider the polynomial $P(x)=a_{1}+a_{2} x+\cdots+a_{n} x^{n-1}$. Then $P^{2}(x)=\sum_{k, l=1}^{n} a_{k} a_{l} x^{k+l-2}$ and $\int_{0}^{1} P^{2}(x) d x=\sum_{k, l=1}^{n} \frac{a_{k} a_{l}}{k+l-1}$.


problem: Let $*$ denote an operation, assigning a real number $a * b$ to each pair of real numbers ( $a, b)$ (e.g., $a * b=$ $a+b^{2}-17$ ). Devise an equation which is true (for all possible values of variables) provided the operation $*$ is commutative or associative and which can be false otherwise.

solution: A suitable equation is $x *(x * x)=(x * x) * x$ which is obviously true if $*$ is any commutative or associative operation but does not hold in general, e.g., $1-(1-1) \neq(1-1)-1$.


problem: Let $A B C D$ be a quadrangle, $|A D|=|B C|, \angle A+\angle B=120^{\circ}$ and let $P$ be a point exterior to the quadrangle such that $P$ and $A$ lie at opposite sides of the line $D C$ and the triangle $D P C$ is equilateral. Prove that the triangle $A P B$ is also equilateral.

solution: Note that $\angle A D C+\angle C D P+\angle B C D+\angle D C P=360^{\circ}$ (see Figure 1). Thus $\angle A D P=360^{\circ}-$ $\angle B C D-\angle D C P=\angle B C P$. As we have $|D P|=|C P|$ and $|A D|=|B C|$, the triangles $A D P$ and $B C P$ are congruent and $|A P|=|B P|$. Moreover, $\angle A P B=60^{\circ}$ since $\angle D P C=60^{\circ}$ and $\angle D P A=\angle C P B$.


problem: The midpoint of each side of a convex pentagon is connected by a segment with the intersection point of the medians of the triangle formed by the remaining three vertices of the pentagon. Prove that all five such segments intersect at one point.

solution:
Let $A, B, C, D$ and $E$ be the vertices of the pentagon (in order), and take any point $O$ as origin. Let $M$ be the intersection point of the medians of the triangle $C D E$, and let $N$ be the midpoint of the segment $A B$. We have

$$
\overline{O M}=\frac{1}{3}(\overline{O C}+\overline{O D}+\overline{O E})
$$

and

$$
\overline{O N}=\frac{1}{2}(\overline{O A}+\overline{O B})
$$

The segment $N M$ may be written as

$$
\overline{O N}+t(\overline{O M}-\overline{O N}), \quad 0 \leq t \leq 1
$$

Taking $t=\frac{3}{5}$ we get the point

$$
P=\frac{1}{5}(\overline{O A}+\overline{O B}+\overline{O C}+\overline{O D}+\overline{O E}),
$$

the centre of gravity of the pentagon. Choosing a different side of the pentagon, we clearly get the same point $P$, which thus lies on all such line segments.

Remark. The problem expresses the idea of subdividing a system of five equal masses placed at the vertices of the pentagon into two subsystems, one of which consists of the two masses at the endpoints of the side under consideration, and one consisting of the three remaining masses. The segment mentioned in the problem connects the centres of gravity of these two subsystems, and hence it contains the centre of gravity of the whole system.


problem: Let $P$ be a point on the circumcircle of a triangle $A B C$. It is known that the base points of the perpendiculars drawn from $P$ onto the lines $A B, B C$ and $C A$ lie on one straight line (called a Simson line). Prove that the Simson lines of two diametrically opposite points $P_{1}$ and $P_{2}$ are perpendicular.

solution:
Let $O$ be the circumcentre of the triangle $A B C$ and $\angle B$ be its maximal angle (so that $\angle A$ and $\angle C$ are necessarily acute). Further, let $B_{1}$ and $C_{1}$ be the base points of the perpendiculars drawn from the point $P$ to the sides $A C$ and $A B$ respectively and let $\alpha$ be the angle between the Simson line $l$ of point $P$ and the height $h$ of the triangle drawn to the side $A C$. It is sufficient to prove that $\alpha=\frac{1}{2} \angle P O B$. To show this, first note that the points $P, C_{1}, B_{1}, A$ all belong to a certain circle. Now we have to consider several sub-cases depending on the order of these points on that circle and the location of point $P$ on the circumcircle of triangle $A B C$. Figure 2 shows one of these cases - here we have $\alpha=\angle P B_{1} C_{1}=\angle P B_{1} C_{1}=$ $\angle P A B=\frac{1}{2} \angle P O B$. The other cases can be treated in a similar manner.

![](https://cdn.mathpix.com/cropped/2024_04_17_a668d2eee50487b1b875g-2.jpg?height=277&width=297&top_left_y=2163&top_left_x=548)

Figure 1

![](https://cdn.mathpix.com/cropped/2024_04_17_a668d2eee50487b1b875g-2.jpg?height=303&width=302&top_left_y=2144&top_left_x=934)

Figure 2

![](https://cdn.mathpix.com/cropped/2024_04_17_a668d2eee50487b1b875g-2.jpg?height=277&width=265&top_left_y=2157&top_left_x=1324)

Figure 3


problem: Two equal triangles are inscribed into an ellipse. Are they necessarily symmetrical with respect either to the axes or to the centre of the ellipse?

solution: No, not necessarily (see Figure 3 where the two ellipses are equal).


problem: A segment $A B$ of unit length is marked on the straight line $t$. The segment is then moved on the plane so that it remains parallel to $t$ at all times, the traces of the points $A$ and $B$ do not intersect and finally the segment returns onto $t$. How far can the point $A$ now be from its initial position?

solution:
The point $A$ can move any distance from its initial position - see Figure 4 and note that we can make the height $h$ arbitrarily small.

![](https://cdn.mathpix.com/cropped/2024_04_17_a668d2eee50487b1b875g-3.jpg?height=175&width=869&top_left_y=484&top_left_x=639)

Figure 4


problem: Prove that the modulus of an integer root of a polynomial with integer coefficients cannot exceed the maximum of the moduli of the coefficients.

solution: For a non-zero polynomial $P(x)=a_{n} x^{n}+\cdots+a_{1} x+a_{0}$ with integer coefficients, let $k$ be the smallest index such that $a_{k} \neq 0$. Let $c$ be an integer root of $P(x)$. If $c=0$, the statement is obvious. If $c \neq 0$, then using $P(c)=0$ we get $a_{k}=-x\left(a_{k+1}+a_{k+2} x+\cdots+a_{n} x^{n-k-1}\right)$. Hence $c$ divides $a_{k}$, and since $a_{k} \neq 0$ we must have $|c| \leq\left|a_{k}\right|$.


problem: Let $m$ and $n$ be positive integers. Prove that $25 m+3 n$ is divisible by 83 if and only if $3 m+7 n$ is divisible by 83 .

solution: Use the equality $2 \cdot(25 x+3 y)+11 \cdot(3 x+7 y)=83 x+83 y$.


problem: Prove that the equation $x^{2}-7 y^{2}=1$ has infinitely many solutions in natural numbers.

solution:
For any solution $(m, n)$ of the equation we have $m^{2}-7 n^{2}=1$ and

$$
1=\left(m^{2}-7 n^{2}\right)^{2}=\left(m^{2}+7 n^{2}\right)^{2}-7 \cdot(2 m n)^{2} .
$$

Thus $\left(m^{2}+7 n^{2}, 2 m n\right)$ is also a solution. Therefore it is sufficient to note that the equation $x^{2}-7 y^{2}=1$ has at least one solution, for example $x=8, y=3$.


problem: Do there exist 1990 relatively prime numbers such that all possible sums of two or more of these numbers are composite numbers?

solution: Such numbers do exist. Let $M=1990$ ! and consider the sequence of numbers $1+M, 1+2 M$, $1+3 M, \ldots$ For any natural number $2 \leq k \leq 1990$, any sum of exactly $k$ of these numbers (not necessarily different) is divisible by $k$, and hence is composite. number. It remains to show that we can choose 1990 numbers $a_{1}, \ldots, a_{1990}$ from this sequence which are relatively prime. Indeed, let $a_{1}=1+M$, $a_{2}=1+2 M$ and for $a_{1}, \ldots, a_{n}$ already chosen take $a_{n+1}=1+a_{1} \cdots a_{n} \cdot M$.


problem:
Prove that none of the numbers

$$
F_{n}=2^{2^{n}}+1, \quad n=0,1,2, \ldots,
$$

is a cube of an integer.

solution: Assume there exist such natural numbers $k$ and $n$ that $2^{2^{n}}+1=k^{3}$. Then $k$ must be an odd number and we have $2^{2^{n}}=k^{3}-1=(k-1)\left(k^{2}+k+1\right)$. Hence $k-1=2^{s}$ and $k^{2}+k+1=2^{t}$ where $s$ and $t$ are some positive integers. Now $2^{2 s}=(k-1)^{2}=k^{2}-2 k+1$ and $2^{t}-2^{2 s}=3 k$. But $2^{t}-2^{2 s}$ is even while $3 k$ is odd, a contradiction.


problem: A closed polygonal line is drawn on squared paper so that its links lie on the lines of the paper (the sides of the squares are equal to 1). The lengths of all links are odd numbers. Prove that the number of links is divisible by 4 .

solution: There must be an equal number of horizontal and vertical links, and hence it suffices to show that the number of vertical links is even. Let's pass the whole polygonal line in a chosen direction and mark each vertical link as "up" or "down" according to the direction we pass it. As the sum of lengths of the "up" links is equal to that of the "down" ones and each link is of odd length, we have an even or odd number of links of both kinds depending on the parity of the sum of their lengths.


problem: In two piles there are 72 and 30 sweets respectively. Two students take, one after another, some sweets from one of the piles. Each time the number of sweets taken from a pile must be an integer multiple of the number of sweets in the other pile. Is it the beginner of the game or his adversary who can always assure taking the last sweet from one of the piles?

solution: Note that one of the players must have a winning strategy. Assume that it is the player making the second move who has it. Then his strategy will assure taking the last sweet also in the case when the beginner takes $2 \cdot 30$ sweets as his first move. But now, if the beginner takes $1 \cdot 30$ sweets then the second player has no choice but to take another 30 sweets from the same pile, and hence the beginner can use the same strategy to assure taking the last sweet himself. This contradiction shows that it must be the beginner who has the winning strategy.


problem: Positive integers $1,2, \ldots, 100,101$ are written in the cells of a $101 \times 101$ square grid so that each number is repeated 101 times. Prove that there exists either a column or a row containing at least 11 different numbers.

solution: Let $a_{k}$ denote the total number of rows and columns containing the number $k$ at least once. As $i \cdot(20-i)<101$ for any natural number $i$, we have $a_{k} \geq 21$ for all $k=1,2, \ldots, 101$. Hence $a_{1}+\cdots+a_{101} \geq 21 \cdot 101=2121$. On the other hand, assuming any row and any column contains no more than 10 different numbers we have $a_{1}+\cdots+a_{101} \leq 202 \cdot 10=2020$, a contradiction.


problem: What is the largest possible number of subsets of the set $\{1,2, \ldots, 2 n+1\}$ such that the intersection of any two subsets consists of one or several consecutive integers?

solution: Consider any subsets $A_{1}, \ldots, A_{s}$ satisfying the condition of the problem and let $A_{i}=$ $\left\{a_{i 1}, \ldots, a_{i, k_{i}}\right\}$ where $a_{i 1}<\cdots<a_{i, k_{i}}$. Replacing each $A_{i}$ by $A_{i}^{\prime}=\left\{a_{i 1}, a_{i 1}+1, \ldots, a_{i, k_{i}}-1, a_{i, k_{i}}\right\}$ (i.e., adding to it all "missing" numbers) yields a collection of different subsets $A_{1}^{\prime}, \ldots, A_{s}^{\prime}$ which also satisfies the required condition. Now, let $b_{i}$ and $c_{i}$ be the smallest and largest elements of the subset $A_{i}^{\prime}$, respectively. Then $\min _{1 \leq i \leq s} c_{i} \geq \max _{1 \leq i \leq s} b_{i}$, as otherwise some subsets $A_{k}^{\prime}$ and $A_{l}^{\prime}$ would not intersect. Hence there exists an element $a \in \bigcap_{1<i<s} A_{i}^{\prime}$. As the number of subsets of the set $\{1,2, \ldots, 2 n+1\}$ containing $a$ and consisting of $k$ consecutive integers does not exceed $\min (k, 2 n+2-k)$ we have $s \leq(n+1)+2 \cdot(1+2+\cdots+n)=(n+1)^{2}$. This maximum will be reached if we take $a=n+1$.