exam: BalticWay

problem: Determine all functions $f$ from the real numbers to the real numbers, different from the zero function, such that $f(x) f(y)=f(x-y)$ for all real numbers $x$ and $y$.

solution:
Answer: $f(x) \equiv 1$ is the only such function.

Since $f$ is not the zero function, there is an $x_{0}$ such that $f\left(x_{0}\right) \neq 0$. From $f\left(x_{0}\right) f(0)=f\left(x_{0}-0\right)=f\left(x_{0}\right)$ we then get $f(0)=1$. Then by $f(x)^{2}=f(x) f(x)=f(x-x)=f(0)$ we have $f(x) \neq 0$ for any real $x$. Finally from $f(x) f\left(\frac{x}{2}\right)=f\left(x-\frac{x}{2}\right)=f\left(\frac{x}{2}\right)$ we get $f(x)=1$ for any real $x$. It is readily verified that this function satisfies the equation.


problem: Given a sequence $a_{1}, a_{2}, a_{3}, \ldots$ of positive integers in which every positive integer occurs exactly once. Prove that there exist integers $\ell$ and $m$, $1<\ell<m$, such that $a_{1}+a_{m}=2 a_{\ell}$.

solution:
Let $\ell$ be the least index such that $a_{\ell}>a_{1}$. Since $2 a_{\ell}-a_{1}$ is a positive integer larger than $a_{1}$, it occurs in the given sequence beyond $a_{\ell}$. In other words, there exists an index $m>\ell$ such that $a_{m}=2 a_{\ell}-a_{1}$. This completes the proof.

Remarks. The problem was proposed in the slightly more general form where the first term of the arithmetic progression has an arbitary index. The remarks below refer to this version. The problem committee felt that no essential new aspects would arise from the generalization.


solution:
A generalization of this problem is to ask about an existence of an $s$-term arithmetic subsequence of the sequence $\left(a_{n}\right)$ (such a subsequence
always exists for $s=3$, as shown above). It turns out that for $s=5$ such a subsequence may not exist. The proof can be found in [1]. The same problem for $s=4$ is still open!


solution:
The present problem $(s=3)$ and the above solution is also taken from [1].

Reference. [1] J. A. Davis, R. C. Entringer, R. L. Graham and G. J. Simmons, On permutations containing no long arithmetic progressions, Acta Arithmetica 1(1977), pp. 81-90.


problem: Let $x_{1}=1$ and $x_{n+1}=x_{n}+\left\lfloor\frac{x_{n}}{n}\right\rfloor+2$ for $n=1,2,3, \ldots$, where $\lfloor x\rfloor$ denotes the largest integer not greater than $x$. Determine $x_{1997}$.

solution:
Answer: $x_{1997}=23913$.

Note that if $x_{n}=a n+b$ with $0 \leqslant b<n$, then

$$
x_{n+1}=x_{n}+a+2=a(n+1)+b+2 \text {. }
$$

Hence if $x_{N}=A N$ for some positive integers $A$ and $N$, then for $i=0,1, \ldots, N$ we have $x_{N+i}=A(N+i)+2 i$, and $x_{2 N}=(A+1) \cdot 2 N$. Since for $N=1$ the condition $x_{N}=A N$ holds with $A=1$, then for $N=2^{k}$ (where $k$ is any non-negative integer) it also holds with $A=k+1$. Now for $N=2^{10}=1024$ we have $A=11$ and $x_{N+i}=A(N+i)+2 i$, which for $i=973$ makes $x_{1997}=11 \cdot 1997+2 \cdot 973=23913$.


problem:
Prove that the arithmetic mean $a$ of $x_{1}, \ldots, x_{n}$ satisfies

$$
\left(x_{1}-a\right)^{2}+\cdots+\left(x_{n}-a\right)^{2} \leqslant \frac{1}{2}\left(\left|x_{1}-a\right|+\cdots+\left|x_{n}-a\right|\right)^{2} .
$$

solution:
Denote $y_{i}=x_{i}-a$. Then $y_{1}+y_{2}+\cdots+y_{n}=0$. We can assume $y_{1} \leqslant y_{2} \leqslant \cdots \leqslant y_{k} \leqslant 0 \leqslant y_{k+1} \leqslant \cdots \leqslant y_{n}$. Let $y_{1}+y_{2}+\cdots+y_{k}=-z$, then $y_{k+1}+\cdots+y_{n}=z$ and

$$
\begin{aligned}
y_{1}^{2}+y_{2}^{2}+\cdots+y_{n}^{2} & =y_{1}^{2}+y_{2}^{2}+\cdots+y_{k}^{2}+y_{k+1}^{2}+\cdots+y_{n}^{2} \leqslant \\
& \leqslant\left(y_{1}+y_{2}+\cdots+y_{k}\right)^{2}+\left(y_{k+1}+\cdots+y_{n}\right)^{2}=2 z^{2}= \\
& =\frac{1}{2}(2 z)^{2}=\frac{1}{2}\left(\left|y_{1}\right|+\left|y_{2}\right|+\cdots+\left|y_{n}\right|\right)^{2} .
\end{aligned}
$$

Alternative solution. The case $n=1$ is trivial (then $x_{1}-a=0$ and we get the inequality $0 \leqslant 0$ ). Suppose now that $n \geqslant 2$. Consider a square of side length $\left|x_{1}-a\right|+\left|x_{2}-a\right|+\ldots+\left|x_{n}-a\right|$ and construct squares of side lengths $\left|x_{1}-a\right|,\left|x_{2}-a\right|, \ldots,\left|x_{n}-a\right|$ side by side inside it as shown on Figure 1. Since none of the side lengths of the small squares exceeds half of the side length of the large square, then all the small squares are contained within the upper half of the large square, i.e. the sum of their areas does not exceed half of the area of the large square, q.e.d.


problem:
In a sequence $u_{0}, u_{1}, \ldots$ of positive integers, $u_{0}$ is arbitrary, and for any non-negative integer $n$,

$$
u_{n+1}= \begin{cases}\frac{1}{2} u_{n} & \text { for even } u_{n} \\ a+u_{n} & \text { for odd } u_{n}\end{cases}
$$

where $a$ is a fixed odd positive integer. Prove that the sequence is periodic from a certain step.

solution:
Suppose $u_{n}>a$. Then, if $u_{n}$ is even we have $u_{n+1}=\frac{1}{2} u_{n}<u_{n}$, and if
$u_{n}$ is odd we have $u_{n+1}=a+u_{n}<2 u_{n}$ and $u_{n+2}=\frac{1}{2} u_{n+1}<u_{n}$. Hence the iteration results in $u_{n} \leqslant a$ in a finite number of steps. Thus for any non-negative integer $m$, some non-negative integer $n>m$ satisfies $u_{n} \leqslant a$, and there must be an infinite set of such integers $n$.

Since the set of natural numbers not exceeding $a$ is finite and such values arise in the sequence $\left(u_{n}\right)$ an infinite number of times, there exist nonnegative integers $m$ and $n$ with $n>m$ such that $u_{n}=u_{m}$. Starting from $u_{m}$ the sequence is then periodic with a period dividing $n-m$.

![](https://cdn.mathpix.com/cropped/2024_04_17_fa027955eeb5a8b983dbg-06.jpg?height=541&width=485&top_left_y=619&top_left_x=272)

Figure 1


problem: Find all triples $(a, b, c)$ of non-negative integers satisfying $a \geqslant b \geqslant c$ and $1 \cdot a^{3}+9 \cdot b^{2}+9 \cdot c+7=1997$.

solution:
Answer: $(10,10,10)$ is the only such triple.

The equality immediately implies $a^{3}+9 b^{2}+9 c=1990 \equiv 1(\bmod 9)$. Hence $a^{3} \equiv 1(\bmod 9)$ and $a \equiv 1(\bmod 3)$. Since $13^{3}=2197>1990$ then the possible values for $a$ are $1,4,7,10$.

On the other hand, if $a \leqslant 7$ then by $a \geqslant b \geqslant c$ we have

$$
a^{3}+9 b^{2}+9 c^{2} \leqslant 7^{3}+9 \cdot 7^{2}+9 \cdot 7=847<1990
$$

a contradiction. Hence $a=10$ and $9 b^{2}+9 c=990$, whence by $c \leqslant b \leqslant 10$ we have $c=b=10$.


problem: Let $P$ and $Q$ be polynomials with integer coefficients. Suppose that the integers $a$ and $a+1997$ are roots of $P$, and that $Q(1998)=2000$. Prove that the equation $Q(P(x))=1$ has no integer solutions.

solution:
Suppose $b$ is an integer such that $Q(P(b))=1$. Since $a$ and $a+1997$ are roots of $P$ we have $P(x)=(x-a)(x-a-1997) R(x)$ where $R$ is a polynomial with integer coefficients. For any integer $b$ the integers $b-a$ and
$b-a-1997$ are of different parity and hence $P(b)=(b-a)(b-a-1997) R(b)$ is even. Since $Q(1998)=2000$ then the constant term in the expansion of $Q(x)$ is even (otherwise $Q(x)$ would be odd for any even integer $x$ ), and $Q(c)$ is even for any even integer $c$. Hence $Q(P(b))$ is also even and cannot be equal to 1 .


problem:
If we add 1996 and 1997, we first add the unit digits 6 and 7. Obtaining 13, we write down 3 and "carry" 1 to the next column. Thus we make a carry. Continuing, we see that we are to make three carries in total:

$$
\begin{array}{r}
111 \\
1996 \\
+1997 \\
\hline 3993
\end{array}
$$

Does there exist a positive integer $k$ such that adding $1996 \cdot k$ to $1997 \cdot k$ no carry arises during the whole calculation?

solution:
Answer: yes.

The key to the proof is noting that if we add two positive integers and the result is an integer consisting only of digits 9 then the process of addition must have gone without any carries. Therefore it is enough to prove that there exists an integer $k$ such that $3993 k$ is of the form $999 \ldots 9$.

Consider the first 3994 positive integers consisting only of digits 9:

$$
9,99,999, \ldots, \underbrace{999 \ldots 9}_{3994} .
$$

By the pigeonhole principle some two of these give the same remainder upon division by 3993 , so their difference

$$
\underbrace{99 \ldots 9}_{n} \underbrace{00 \ldots 0}_{r}=\underbrace{99 \ldots 9}_{n} \cdot 10^{r}
$$

is divisible by 3993 . Since 10 and 3993 are coprime we get an integer consisting only of digits 9 and divisible by 3993 .

## Remarks.


solution:
The existence of an integer $10^{\ell}-1$ consisting only of digits 9 and divisible by 3993 may also be demonstrated quite elegantly by means of Euler's Theorem. The numbers 10 and 3993 are coprime, so $10^{\varphi(3993)}-1$ is divisible by 3993 . Thus we may take $\ell=\varphi(3993)$.

2 . By a computer search it can be found that the smallest integer $k$ satisfying the condition of the problem is $k=162$. Then $1996 \cdot 162=323352$; $1997 \cdot 162=323514$ and

$$
\begin{array}{r}
323352 \\
+323514 \\
\hline 646866
\end{array}
$$


problem: The worlds in the Worlds' Sphere are numbered $1,2,3, \ldots$ and connected so that for any integer $n \geqslant 1$, Gandalf the Wizard can move in both directions between any worlds with numbers $n, 2 n$ and $3 n+1$. Starting his travel from an arbitrary world, can Gandalf reach every other world?

solution:
Answer: yes.

For any two given worlds, Gandalf can move between them either in both
directions or none. Hence, it suffices to show that Gandalf can move to the world 1 from any given world $n$. For that, it is sufficient for him to be able to move from any world $n>1$ to some world $m$ such that $m<n$. We consider three possible cases:

a) If $n=3 k+1$, then Gandalf can move directly from the world $n$ to the world $k<n$.

b) If $n=3 k+2$, then Gandalf can move from the world $n$ to the world $2 n=6 k+4=3 \cdot(2 k+1)+1$ and further to the world $2 k+1<n$. c) If $n=3 k$ then Gandalf can move from the world $n$ to the world $3 n+1=9 k+1$, further from there to the worlds $2 \cdot(9 k+1)=18 k+2$, $2 \cdot(18 k+2)=36 k+4=3 \cdot(12 k+1)+1,12 k+1,4 k$ and finally to the world $2 k<n$.


problem: Prove that in every sequence of 79 consecutive positive integers written in the decimal system, there is a positive integer whose sum of digits is divisible by 13 .

solution:
Among the first 40 numbers in the sequence, four are divisible by 10 and at least one of these has its second digit from the right less than or equal to 6 . Let this number be $x$ and let $y$ be its sum of digits. Then the numbers $x, x+1, x+2, \ldots, x+39$ all belong to the sequence, and each of $y, y+1, \ldots, y+12$ appears at least once among their sums of decimal digits. One of these is divisible by 13 .

Remark: there exist 78 consecutive natural numbers, none of which has its sum of digits divisible by 13 - e.g. 859999999961 through 860000000038 .

![](https://cdn.mathpix.com/cropped/2024_04_17_fa027955eeb5a8b983dbg-08.jpg?height=331&width=573&top_left_y=1150&top_left_x=268)

Figure 2


problem:
On two parallel lines, the distinct points $A_{1}, A_{2}, A_{3}, \ldots$ respectively $B_{1}$, $B_{2}, B_{3}, \ldots$ are marked in such a way that $\left|A_{i} A_{i+1}\right|=1$ and $\left|B_{i} B_{i+1}\right|=2$ for $i=1,2, \ldots$ (see Figure). Provided that $\angle A_{1} A_{2} B_{1}=\alpha$, find the infinite sum $\angle A_{1} B_{1} A_{2}+\angle A_{2} B_{2} A_{3}+\angle A_{3} B_{3} A_{4}+\ldots$

![](https://cdn.mathpix.com/cropped/2024_04_17_fa027955eeb5a8b983dbg-02.jpg?height=220&width=391&top_left_y=1250&top_left_x=339)

solution:
Answer: $\pi-\alpha$.

Let $C_{1}, C_{2}, C_{3}, \ldots$ be points on the upper line such that $\left|C_{i} C_{i+1}\right|=1$ and $B_{i}=C_{2 i}$ for each $i=1,2, \ldots$ (see Figure 2 ). Then for any $i=1,2, \ldots$ we have

$$
\angle A_{i} B_{i} A_{i+1}=\angle A_{i} C_{2 i} A_{i+1}=\angle A_{1} C_{i+1} A_{2}=\angle C_{i+1} A_{2} C_{i+2}
$$

Hence

$$
\begin{aligned}
& \angle A_{1} B_{1} A_{2}+\angle A_{2} B_{2} A_{3}+\angle A_{3} B_{3} A_{4}+\ldots= \\
& \quad=\angle C_{2} A_{2} C_{3}+\angle C_{3} A_{2} C_{4}+\angle C_{4} A_{2} C_{5}+\ldots=\pi-\alpha .
\end{aligned}
$$


problem: Two circles $\mathcal{C}_{1}$ and $\mathcal{C}_{2}$ intersect in $P$ and $Q$. A line through $P$ intersects $\mathcal{C}_{1}$ and $\mathcal{C}_{2}$ again in $A$ and $B$, respectively, and $X$ is the midpoint of $A B$. The line through $Q$ and $X$ intersects $\mathcal{C}_{1}$ and $\mathcal{C}_{2}$ again in $Y$ and $Z$, respectively. Prove that $X$ is the midpoint of $Y Z$.

solution:
Depending on the radii of the circles, the distance between their centres and the choice of the line through $P$ we have several possible arrangements of the points $A, B, P$ and $Y, Z, Q$. We shall show that in each case the triangles $A X Y$ and $B X Z$ are congruent, whence $|Y X|=|X Z|$.

(a) Point $P$ lies within segment $A B$ and point $Q$ lies within segment $Y Z$ (see Figure 3). Then

$$
\angle A Y X=\angle A Y Q=\pi-\angle A P Q=\angle B P Q=\angle B Z Q=\angle B Z X .
$$

Since also $\angle A X Y=\angle B X Z$ and $|A X|=|X B|$, triangles $A X Y$ and $B X Z$ are congruent.

(b) Point $P$ lies outside of segment $A B$ and point $Q$ lies within segment $Y Z$ (see Figure 4). Then

$$
\angle A Y X=\angle A Y Q=\angle A P Q=\angle B P Q=\angle B Z Q=\angle B Z X .
$$

![](https://cdn.mathpix.com/cropped/2024_04_17_fa027955eeb5a8b983dbg-09.jpg?height=319&width=474&top_left_y=1035&top_left_x=251)

Figure 3

![](https://cdn.mathpix.com/cropped/2024_04_17_fa027955eeb5a8b983dbg-09.jpg?height=353&width=472&top_left_y=1050&top_left_x=819)

Figure 4

(c) Point $P$ lies outside of segment $A B$ and point $Q$ lies outside of segment $Y Z$ (see Figure 5). Then

$$
\angle A Y X=\pi-\angle A Y Q=\angle A P Q=\angle B P Q=\angle B Z Q=\angle B Z X .
$$

(d) Point $P$ lies within segment $A B$ and point $Q$ lies outside of segment $Y Z$. This case is similar to (b): exchange the roles of points $P$ and $Q, A$ and $Y, B$ and $Z$.

![](https://cdn.mathpix.com/cropped/2024_04_17_fa027955eeb5a8b983dbg-10.jpg?height=312&width=442&top_left_y=187&top_left_x=364)

Figure 5


problem:
Five distinct points $A, B, C, D$ and $E$ lie on a line with

$$
|A B|=|B C|=|C D|=|D E| \text {. }
$$

The point $F$ lies outside the line. Let $G$ be the circumcentre of triangle $A D F$ and $H$ be the circumcentre of triangle $B E F$. Show that lines $G H$ and $F C$ are perpendicular.

![](https://cdn.mathpix.com/cropped/2024_04_17_fa027955eeb5a8b983dbg-03.jpg?height=238&width=321&top_left_y=359&top_left_x=324)

solution:
Let $O, H^{\prime}$ and $G^{\prime}$ be the circumcentres of the triangles $B D F, B C F$ and $C D F$, respectively (see Figure 6). Then $O, G$ and $G^{\prime}$ lie on the perpendicular bisector of the segment $D F$, while $O, H$ and $H^{\prime}$ lie on the perpendicular bisector of the segment $B F$. Moreover, $G$ and $H^{\prime}$ lie on the perpendicular bisector of $B C, O$ lies on the perpendicular bisector of $B D$, $H$ and $G^{\prime}$ lie on the perpendicular bisector of $C D$ and $C$ is the midpoint of $B D$. Hence $H^{\prime}$ and $G^{\prime}$ are symmetric to $H$ and $G$, respectively, relative to point $O$. Hence triangles $O G H^{\prime}$ and $O G^{\prime} H$ are congruent, and $G H G^{\prime} H^{\prime}$ is a parallelogram.

Since $C F$ is the common side of triangles $B C F$ and $C D F$, the line $G^{\prime} H^{\prime}$ connecting their circumcentres is perpendicular to $C F$. Therefore $G H$ is also perpendicular to $C F$.

![](https://cdn.mathpix.com/cropped/2024_04_17_fa027955eeb5a8b983dbg-10.jpg?height=262&width=518&top_left_y=1144&top_left_x=288)

Figure 6

Alternative solution. Note that the diagonals of a quadrangle $X Y Z W$ are perpendicular to each other if and only if $|X Y|^{2}-|Z Y|^{2}=|X W|^{2}-|Z W|^{2}$. Applying this to the quadrangle $G F H C$ it is sufficient to prove that $|G F|^{2}-|H F|^{2}=|G C|^{2}-|H C|^{2}$. Denote $|A B|=|B C|=|C D|=|D E|=a$, $\angle G A C=\alpha$ and $\angle H E C=\beta$, and let $R_{1}, R_{2}$ be the circumradii of triangles $A D F$ and $B E F$, respectively (see Figure 7). Applying the cosine law to triangles $C G A$ and $C H E$, we have $|G C|^{2}=R_{1}^{2}+4 a^{2}-4 a R_{1} \cos \alpha$
and $|H C|^{2}=R_{2}^{2}+4 a^{2}-4 a R_{2} \cos \beta$. Together with $\cos \alpha=\frac{3 a}{2 R_{1}}$ and $\cos \beta=\frac{3 a}{2 R_{2}}$ this yields $|G C|^{2}-|H C|^{2}=R_{1}^{2}-R_{2}^{2}$. Since $|G F|=R_{1}$ and $|H F|=R_{2}$, we also have $|G F|^{2}-|H F|^{2}=R_{1}^{2}-R_{2}^{2}$.

![](https://cdn.mathpix.com/cropped/2024_04_17_fa027955eeb5a8b983dbg-11.jpg?height=448&width=522&top_left_y=468&top_left_x=191)

Figure 7

![](https://cdn.mathpix.com/cropped/2024_04_17_fa027955eeb5a8b983dbg-11.jpg?height=442&width=534&top_left_y=469&top_left_x=758)

Figure 8

Another solution. We shall use the following fact that can easily be derived from the properties of the power of a point: Let a line $s$ intersect two circles at points $K, L$ and $M, N$, respectively, and let these circles intersect each other at $P$ and $Q . A$ point $X$ on the line $s$ lies also on the line $P Q$ (i.e. is the intersection point of the lines $s$ and $P Q$ ) if and only if $|K X| \cdot|L X|=|M X| \cdot|N X|$.

The line $A E$ intersects the circumcircles of triangles $A D F$ and $B E F$ at $A, D$ and $B, E$, respectively. Since point $C$ lies on line $A E$ and $|A C| \cdot|D C|=|B C| \cdot|E C|$, then line $C F$ passes through the second intersection point of these circles (see Figure 8) and hence is perpendicular to the segment $G H$ connecting the centres of these circles.


problem: In the triangle $A B C,|A C|^{2}$ is the arithmetic mean of $|B C|^{2}$ and $|A B|^{2}$. Show that $\cot ^{2} B \geqslant \cot A \cot C$.

solution:
Denote $|B C|=a,|C A|=b$ and $|A B|=c$, then we have $2 b^{2}=a^{2}+c^{2}$. Applying the cosine and sine laws to triangle $A B C$ we have:

$$
\begin{aligned}
& \cot B=\frac{\cos B}{\sin B}=\frac{\left(a^{2}+c^{2}-b^{2}\right) \cdot 2 R}{2 a c \cdot b}=\frac{\left(a^{2}+c^{2}-b^{2}\right) \cdot R}{a b c}, \\
& \cot A=\frac{\cos A}{\sin A}=\frac{\left(b^{2}+c^{2}-a^{2}\right) \cdot R}{a b c},
\end{aligned}
$$

$$
\cot C=\frac{\cos C}{\sin C}=\frac{\left(a^{2}+b^{2}-c^{2}\right) \cdot R}{a b c}
$$

where $R$ is the circumradius of triangle $A B C$. To finish the proof it hence suffices to show that $\left(a^{2}+c^{2}-b^{2}\right)^{2} \geqslant\left(b^{2}+c^{2}-a^{2}\right)\left(a^{2}+b^{2}-c^{2}\right)$. Indeed, from the AM-GM inequality we get

$$
\begin{aligned}
\left(b^{2}+c^{2}-a^{2}\right)\left(a^{2}+b^{2}-c^{2}\right) & \leqslant \frac{\left(b^{2}+c^{2}-a^{2}+a^{2}+b^{2}-c^{2}\right)^{2}}{4}=b^{4}= \\
& =\left(2 b^{2}-b^{2}\right)^{2}=\left(a^{2}+c^{2}-b^{2}\right)^{2} .
\end{aligned}
$$

![](https://cdn.mathpix.com/cropped/2024_04_17_fa027955eeb5a8b983dbg-12.jpg?height=571&width=575&top_left_y=675&top_left_x=269)

Figure 9


problem: In the acute triangle $A B C$, the bisectors of $\angle A, \angle B$ and $\angle C$ intersect the circumcircle again in $A_{1}, B_{1}$ and $C_{1}$, respectively. Let $M$ be the point of intersection of $A B$ and $B_{1} C_{1}$, and let $N$ be the point of intersection of $B C$ and $A_{1} B_{1}$. Prove that $M N$ passes through the incentre of triangle $A B C$.

solution:
Let $I$ be the incenter of triangle $A B C$ (the intersection point of the angle bisectors $A A_{1}, B B_{1}$ and $C C_{1}$ ), and let $B_{1} C_{1}$ intersect the side $A C$ and the angle bisector $A A_{1}$ at $P$ and $Q$, respectively (see Figure 9 ). Then

$$
\angle A Q C_{1}=\frac{1}{2}\left(\overparen{A C}_{1}+\overparen{A_{1} B_{1}}\right)=\frac{1}{2} \cdot\left(\frac{1}{2} \overparen{A B}+\frac{1}{2} \overparen{B C}+\frac{1}{2} \overparen{C A}\right)=90^{\circ}
$$

Since $\angle A C_{1} B_{1}=\angle B_{1} C_{1} C$ (as their supporting arcs are of equal size), then $C_{1} B_{1}$ is the bisector of angle $A C_{1} I$. Moreover, since $A I$ and $C_{1} B_{1}$ are perpendicular, then $C_{1} B_{1}$ is also the bisector of angle $A M I$. Similarly we can show that $B_{1} C_{1}$ bisects the angles $A B_{1} I$ ja $A P I$. Hence the diagonals of the quadrangle $A M I P$ are perpendicular and bisect its angles, i.e.
$A M I P$ is a rhombus and $M I$ is parrallel to $A C$. Similarly we can prove that $N I$ is parallel to $A C$, i.e. points $M, I$ and $N$ are collinear, q.e.d.


problem: On a $5 \times 5$ chessboard, two players play the following game. The first player places a knight on some square. Then the players alternately move the knight according to the rules of chess, starting with the second player. It is not allowed to move the knight to a square that has been visited previously. The player who cannot move loses. Which of the two players has a winning strategy?

solution:
Answer: the first player has a winning strategy.

Divide all the squares of the board except one in pairs so that the squares of each pair are accessible from each other by one move of the knight (see Figure 10 where the squares of each pair are marked with the same number, and the remaining square is marked by $X$ ). The winning strategy for the first player will be to place the knight on the square $X$ in the beginning and further make each move from a square to the other square paired with it.

| $X$ | 12 | 8 | 3 | 11 |
| :---: | :---: | :---: | :---: | :---: |
| 5 | 3 | 11 | 1 | 7 |
| 12 | 8 | 6 | 10 | 4 |
| 2 | 5 | 9 | 7 | 1 |
| 9 | 6 | 2 | 4 | 10 |

Figure 10

| 7 |  |  |  | 1 |
| :--- | :--- | :--- | :--- | :--- |
|  |  | 8 |  |  |
|  | 6 |  | 2 |  |
|  |  | 4 | 9 |  |
| 5 |  |  |  | 3 |

Figure 11

| 7 | 12 | 23 | 18 | 1 |
| :---: | :---: | :---: | :---: | :---: |
| 22 | 17 | 8 | 13 | 24 |
| 11 | 6 | 25 | 2 | 19 |
| 16 | 21 | 4 | 9 | 14 |
| 5 | 10 | 15 | 20 | 3 |

Figure 12

Alternative solution. If the first player places the knight on the square marked by 1 on Figure 11, then the second player will have two possible moves which are symmetric to each other relative to a diagonal of the board. Suppose w.l.o.g. that he makes a move to the square marked by 2 , then the first player can make his move to the square marked by 3 . At this point, the second player can only make a move to the square marked by 4 , and the first player can make his next move to the square marked by 5 ; then the second player can only make a move to the square marked by 6 , etc., until the first player will make a move to the square marked by 9 . Now the second player will again have two possible moves, but since these two squares are symmetric relative to a diagonal of the board (and the set of squares already used is symmetric to that diagonal as well) we can assume w.l.o.g. that he makes a move to the square marked by 10 . Now the first player can make his moves until the end of the game so that the second player will have no choice for his subsequent moves (these moves will be to the squares marked by 11 through 25 , in this order). We see that the first
player will be the one to make the last move, and hence the winner.


problem: A rectangle can be divided into $n$ equal squares. The same rectangle can also be divided into $n+76$ equal squares. Find all possible values of $n$.

solution:
Answer: $n=324$.

Let $a b=n$ and $c d=n+76$, where $a, b$ and $c, d$ are the numbers of squares in each direction for the partitioning of the rectangle into $n$ and $n+76$ squares, respectively. Then $\frac{a}{c}=\frac{b}{d}$, or $a d=b c$. Denote $u=\operatorname{gcd}(a, c)$ ja $v=\operatorname{gcd}(b, d)$, then there exist positive integers $x$ and $y$ such that $\operatorname{gcd}(x, y)=1, a=u x, c=u y$ and $b=v x, d=v y$. Hence we have

$$
c d-a b=u v\left(y^{2}-x^{2}\right)=u v(y-x)(y+x)=76=2^{2} \cdot 19 .
$$

Since $y-x$ and $y+x$ are positive integers of the same parity and $\operatorname{gcd}(x, y)=1$, we have $y-x=1$ and $y+x=19$ as the only possibility, yielding $y=10, x=9$ and $u v=4$. Finally we have $n=a b=x^{2} u v=324$.


problem:
a) Prove the existence of two infinite sets $A$ and $B$, not necessarily disjoint, of non-negative integers such that each non-negative integer $n$ is uniquely representable in the form $n=a+b$ with $a \in A, b \in B$.

b) Prove that for each such pair $(A, B)$, either $A$ or $B$ contains only multiples of some integer $k>1$.

solution:
a) Let $A$ be the set of non-negative integers whose only non-zero decimal digits are in even positions counted from the right, and $B$ the set of nonnegative integers whose only non-zero decimal digits are in odd positions counted from the right. It is obvious that $A$ and $B$ have the required property.

b) Since the only possible representation of 0 is $0+0$, we have $0 \in A \cap B$. The only possible representations of 1 are $1+0$ and $0+1$. Hence 1 must belong to at least one of the sets $A$ and $B$. Let $1 \in A$, and let $k$ be the smallest positive integer such that $k \notin A$. Then $k>1$. If any number $b$ with $0<b<k$ belonged to $B$, it would have the two representations $b+0$ and $0+b$. Hence no such number belongs to $B$. Also, in $k=a+b$ with $a \in A$ and $b \in B$ the number $b$ cannot be 0 since then $a=k$, contradicting the assumption that $k \notin A$. Hence $b=k$, and $k \in B$.

Consider the decomposition of $A$ into the union $A_{1} \cup A_{2} \cup \cdots$ of its maximal subsets $A_{1}, A_{2}, \ldots$ of consecutive numbers, where each element of $A_{1}$ is less than each element of $A_{2}$ etc. In particular, $A_{1}=\{0,1, \ldots, k-1\}$. By our assumption the set of all non-negative integers is the union of nonintersecting sets $A_{n}+b=\left\{a+b \mid a \in A_{n}\right\}$ with $n \in \mathbb{N}$ and $b \in B$, each of these consisting of some number of consecutive integers. We will show that each subset $A_{n}$ has exactly $k$ elements. Indeed, suppose $m$ is the smallest index for which the number $l$ of elements in $A_{m}$ is different from $k$, then $l<k$ since $A_{m}+0$ and $A_{m}+k$ do not overlap. Denoting by $c$ the smallest element of $A_{m}$, we have $c+k-1 \notin A$, so $c+k-1=a+b$ with $a \in A$
and $0 \neq b \in B$. Hence, $b \geqslant k$ and $a<c$. Suppose $a \in A_{n}$, then $n<m$ and the subset $A_{n}$ has $k$ elements. But then $A_{n}+b$ overlaps with either $A_{m}+0$ or $A_{m}+k$, a contradiction.

Hence, the set of non-negative integers is the union of non-intersecting sets $A_{n}+b$ with $n \in \mathbb{N}$ and $b \in B$, each of which consists of $k$ consecutive integers. The smallest element of each of these subsets is a multiple of $k$. Since each integer $b \in B$ is the smallest element of $A_{1}+b$, it follows that each $b \in B$ is a multiple of $k$.


problem:
In a forest each of $n$ animals $(n \geqslant 3)$ lives in its own cave, and there is exactly one separate path between any two of these caves. Before the election for King of the Forest some of the animals make an election campaign. Each campaign-making animal visits each of the other caves exactly once,
uses only the paths for moving from cave to cave, never turns from one path to another between the caves and returns to its own cave in the end of its campaign. It is also known that no path between two caves is used by more than one campaign-making animal.

a) Prove that for any prime $n$, the maximum possible number of campaign-making animals is $\frac{n-1}{2}$;

b) Find the maximum number of campaign-making animals for $n=9$.

solution:
Answer: b) 4 .

a) As each campaign-making animal uses exactly $n$ paths and the total number of paths is $\frac{n(n-1)}{2}$, the number of campaign-making animals cannot exceed $\frac{n-1}{2}$. Labeling the caves by integers $0,1,2, \ldots, n-1$, we can construct $\frac{n-1}{2}$ non-intersecting campaign routes as follows:

$$
\begin{aligned}
& 0 \rightarrow 1 \rightarrow 2 \rightarrow 3 \rightarrow \ldots \rightarrow n \rightarrow 0 \\
& 0 \rightarrow 2 \rightarrow 4 \rightarrow 6 \rightarrow \ldots \rightarrow n-1 \rightarrow 0 \\
& 0 \rightarrow 3 \rightarrow 6 \rightarrow 9 \rightarrow \ldots \rightarrow n-2 \rightarrow 0 \\
& \ldots \ldots \ldots+\cdots \\
& 0 \rightarrow \frac{n-1}{2} \rightarrow n-1 \rightarrow \ldots \rightarrow \frac{n+1}{2} \rightarrow 0
\end{aligned}
$$

(As each of these cyclic routes passes through any cave, the $\frac{n-1}{2}$ campaign-making animals can be chosen arbitrarily).

b) As noted above, the number of campaign-making animals cannot exceed $\frac{9-1}{2}=4$. The 4 non-intersecting campaign routes can be constructed as follows:

$$
\begin{aligned}
& 0 \rightarrow 1 \rightarrow 2 \rightarrow 8 \rightarrow 3 \rightarrow 7 \rightarrow 4 \rightarrow 6 \rightarrow 5 \rightarrow 0 \\
& 0 \rightarrow 2 \rightarrow 3 \rightarrow 1 \rightarrow 4 \rightarrow 8 \rightarrow 5 \rightarrow 7 \rightarrow 6 \rightarrow 0 \\
& 0 \rightarrow 3 \rightarrow 4 \rightarrow 2 \rightarrow 5 \rightarrow 1 \rightarrow 6 \rightarrow 8 \rightarrow 7 \rightarrow 0 \\
& 0 \rightarrow 4 \rightarrow 5 \rightarrow 3 \rightarrow 6 \rightarrow 2 \rightarrow 7 \rightarrow 1 \rightarrow 8 \rightarrow 0
\end{aligned}
$$

Remark. In fact it can be proved that the maximal number of nonintersecting Hamiltonian cycles in a complete graph on $n$ vertices (that is what the problem actually asks for) is equal to $\left\lfloor\frac{n-1}{2}\right\rfloor$ for any integer $n$. The proof uses a construction similar to the one shown in part b) of the above solution.


problem:
Twelve cards lie in a row. The cards are of three kinds: with both sides white, both sides black, or with a white and a black side. Initially, nine of the twelve cards have a black side up. The cards 1-6 are turned, and subsequently four of the twelve cards have a black side up. Now cards $4-9$ are turned, and six cards have a black side up. Finally, the cards 1-3 and 10-12 are turned, after which five cards have a black side up. How many cards of each kind are there?

## Solutions

solution:
Answer: there are 9 cards with one black and one white side and 3 cards with both sides white.

Divide the cards into four types according to the table below.

| Type | Initially up | Initially down |
| :---: | :---: | :---: |
| $A$ | black | white |
| $B$ | white | black |
| $C$ | white | white |
| $D$ | black | black |

When the cards 1-6 were turned, the number of cards with a black side up decreased by 5 . Hence among the cards 1-6 there are five of type $A$ and one of type $C$ or $D$. The result of all three moves is that cards $7-12$ have been turned over, hence among these cards there must be four of type $A$, and the combination of the other two must be one of the following:

(a) one of type $A$ and one of type $B$;

(b) one of type $C$ and one of type $D$;

(c) both of type $C$;

(d) both of type $D$.

Hence the unknown card among the cards 1-6 cannot be of type $D$, since this would make too many cards having a black side up initially. For the same reason, the alternatives (a), (b) and (d) are impossible. Hence there were nine cards of type $A$ and three cards of type $C$.

Alternative solution. Denote by $a_{1}, a_{2}, \ldots, a_{12}$ the sides of each card that are initially visible, and by $b_{1}, b_{2}, \ldots, b_{12}$ the initially invisible sides each of these is either white or black. The conditions of the problem imply the following:

(a) there are 9 black and 3 white sides among $a_{1}, a_{2}, a_{3}, a_{4}, a_{5}, a_{6}$, $a_{7}, a_{8}, a_{9}, a_{10}, a_{11}, a_{12}$

(b) there are 4 black and 8 white sides among $b_{1}, b_{2}, b_{3}, b_{4}, b_{5}, b_{6}, a_{7}$, $a_{8}, a_{9}, a_{10}, a_{11}, a_{12}$;
(c) there are 6 black and 6 white sides among $b_{1}, b_{2}, b_{3}, a_{4}, a_{5}, a_{6}, b_{7}$, $b_{8}, b_{9}, a_{10}, a_{11}, a_{12}$;

(d) there are 5 black and 7 white sides among $a_{1}, a_{2}, a_{3}, a_{4}, a_{5}, a_{6}, b_{7}$, $b_{8}, b_{9}, b_{10}, b_{11}, b_{12}$.

Cases (b) and (d) together enumerate each of the sides $a_{i}$ and $b_{i}$ exactly once - hence there are 9 black and 15 white sides altogether. Therefore, all existing black sides are enumerated in (a), implying that we have 9 cards with one black and one white side, and the remaining 3 cards have both sides white.