A certain rectangle had its dimensions expressed in decimeters as whole numbers. Then it changed its dimensions three times. First, it doubled one of its dimensions and changed the other so that it had the same area as at the beginning. Then it increased one dimension by $1 \mathrm{dm}$ and decreased the other by $4 \mathrm{dm}$, while still having the same area as at the beginning. Finally, it decreased its shorter dimension by $1 \mathrm{dm}$ and left the longer one unchanged.

Determine the ratio of the lengths of the sides of the final rectangle.

(E. Novotná)
Let the lengths of the sides of the rectangle be $x$ and $y$ in decimeters; the area of the rectangle is thus $x \cdot y$. Suppose that during the first change, the side with length $x$ was increased. After the first change, the rectangle had the same area, so it must have had dimensions $2 x$ and $\frac{y}{2}$. After the second change, the rectangle could have had either a) dimensions $2 x+1$ and $\frac{y}{2}-4$, or b) dimensions $2 x-4$ and $\frac{y}{2}+1$. In either case, the rectangle had the same area as originally, i.e., $x \cdot y$. Let's analyze both possibilities:

a) In this case, we have

$$
x \cdot y=(2 x+1)\left(\frac{y}{2}-4\right) \text {. }
$$

After simplification, we get $0=-8 x+\frac{y}{2}-4$, thus $\frac{y}{2}-4=8 x$. After the second change, the rectangle had dimensions $2 x+1$ and $8 x$. Since $x$ is a natural number, $\frac{y}{2}-4=8 x$ implies $8 x > 2 x + 1$, and during the third change, the rectangle must have shortened its side $2 x+1$ to $2 x$. The ratio of the sides of the resulting rectangle is $8 x: 2 x = 4: 1$.

b) In this case, we have

$$
x \cdot y=(2 x-4)\left(\frac{y}{2}+1\right) \text {. }
$$

After simplification, we get $0=2 x-2 y-4$, thus $2 x-4=2 y$. After the second change, the rectangle had dimensions $2 y$ and $\frac{y}{2}+1$. Since $y$ is a natural number, $2 y > \frac{y}{2}+1$, and during the third change, the rectangle must have shortened its side $\frac{y}{2}+1$ to $\frac{y}{2}$. The ratio of the sides of the resulting rectangle is $2 y: \frac{y}{2} = 4: 1$.

Scoring suggestion. Award 3 points for the analysis of each possibility: 1 point for expressing the relationship between $x$ and $y$ (e.g., $\frac{y}{2}-4=8 x$); 1 point for expressing the dimensions of the rectangle after the second change (e.g., $2 x+1$ and $8 x$); 1 point for identifying the shorter side and expressing the final ratio.

If the solver incorrectly identifies the shorter side without any reasoning, deduct 1 point from the scoring for that possibility.