3. The lengths of the sides of a rectangle are integers $x$ and $y$ greater than 1. In the rectangle, we mark a division into $x \cdot y$ unit squares and then form the lateral surface of a cylinder by rolling and gluing two opposite sides. Each pair of vertices of the unit squares on the lateral surface is connected by a line segment. How many of these line segments pass through the interior points of the cylinder? In the case $x>y$, determine when this number will be greater - when the circumference of the base of the cylinder is equal to $x$, or $y$?

The written part of the school round of category A will take place

on Tuesday, December 10, 2013

so that it starts in the morning and the contestants have 4 hours of pure time to solve the problems. For each problem, a contestant can earn 6 points, and a successful solver is a student who scores 10 points or more. Allowed aids are writing and drawing tools and school MF tables. Calculators, laptops, and any other electronic aids are not allowed. These details will be communicated to the students before the start of the competition.

## 63rd Mathematical Olympiad

Solutions to the problems of the written part of the school round of category $A$
3. The sought number of segments passing through the internal points of the cylinder is determined by subtracting from the total number of constructed segments, on the one hand, the number of those segments lying on the mantle of the cylinder, and on the other hand, the number of those segments lying in one of the two bases of the cylinder.

We will perform the calculation for the case of a cylinder with a base circumference of $x$ and height $y$. The points to be connected are thus distributed on the cylinder over $x$ segments with $y+1$ instances each, so their number is $x(y+1)$. Therefore, the number $P_{0}$ of all constructed segments is given by the formula

$$
P_{0}=\left(\begin{array}{c}
x(y+1) \\
2
\end{array}\right)=\frac{x(y+1)(x y+x-1)}{2},
$$

the number $P_{1}$ of segments lying on the mantle is expressed as

$$
P_{1}=x \cdot\left(\begin{array}{c}
y+1 \\
2
\end{array}\right)=\frac{x(y+1) y}{2}
$$

and finally, the number $P_{2}$ of segments in both bases is given by the formula

$$
P_{2}=2 \cdot\left(\begin{array}{l}
x \\
2
\end{array}\right)=x(x-1)
$$

From this, we obtain the sought formula for the number $P$ of segments passing through the internal points of the cylinder:

$$
\begin{aligned}
P & =P_{0}-P_{1}-P_{2}=\frac{x(y+1)(x y+x-1)}{2}-\frac{x(y+1) y}{2}-x(x-1)= \\
& =\frac{x(x-1)\left(y^{2}+2 y-1\right)}{2} .
\end{aligned}
$$

For the corresponding number $Q$ of segments passing through the internal points of a second cylinder with a base circumference of $y$ and height $x$, the analogous formula clearly holds:

$$
Q=\frac{y(y-1)\left(x^{2}+2 x-1\right)}{2} .
$$

To compare both numbers $P$ and $Q$, we will simplify their difference $P-Q$ (knowing that it will be a multiple of the binomial $x-y$, since for $x=y$ it is evident that $P=Q$):

$$
\begin{aligned}
2(P-Q)= & \left(x^{2}-x\right)\left(y^{2}+2 y-1\right)-\left(y^{2}-y\right)\left(x^{2}+2 x-1\right)= \\
= & \left(x^{2} y^{2}-x y^{2}+2 x^{2} y-2 x y-x^{2}+x\right)- \\
& -\left(x^{2} y^{2}-x^{2} y+2 x y^{2}-2 x y-y^{2}+y\right)= \\
= & 3 x y(x-y)-(x-y)(x+y)+(x-y)= \\
= & (x-y)(3 x y-x-y+1) .
\end{aligned}
$$

In the case $x>y$, the number $P$ will be greater, as we will show that the expression $3 x y-x-y+1$ is positive: from $y \geqq 2$ we have $3 x y \geqq 6 x$, and therefore

$$
3 x y-x-y-1 \geqq 5 x-y+1>4 x+1>0 \text {. }
$$

Note. Let us describe a shorter method for determining the sought number of segments, again for a cylinder with a base circumference of $x$ and height $y$.

The orthogonal projection of each counted segment onto the base is one of the $\frac{1}{2} x(x-1)$ segments connecting $x$ points on the boundary circle. Into each of these segments, $(y+1)^{2}-2=y^{2}+2 y-1$ counted segments will project, since $y+1$ is the number of points to be connected with the same projection, and from the product $(y+1)(y+1)$ we need to subtract the number 2 for the two connections lying in the bases. The sought number $P$ is thus equal to

$$
P=\frac{x(x-1)\left(y^{2}+2 y-1\right)}{2} .
$$

For a complete solution, award 6 points, of which 4 points for determining the number of segments with points inside the cylinder and another 2 points for justifying which of the two numbers is greater. The first 4 points can be partially awarded as follows: 1 point each for determining the numbers $P_{0}, P_{1}, P_{2}$ and 1 point for the correct final calculation of $P$.