7.3. In the train, there are 18 identical cars. In some cars, exactly half of the seats are free, in some others - exactly one third of the seats are free, and in the rest, all seats are occupied. At the same time, in the entire train, exactly one ninth of all seats are free. In how many cars are all seats occupied?
Answer: in 13 carriages.

Solution. Let the number of passengers in each carriage be taken as a unit. We can reason in different ways.

First method. Since exactly one ninth of all seats in the train are free, this is equivalent to two carriages being completely free. The number 2 can be uniquely decomposed into the sum of thirds and halves: $2=3 \cdot \frac{1}{3}+2 \cdot \frac{1}{2}$. This means that there are free seats in five carriages, so in 13 carriages all seats are occupied.

Second method. Let $x$ be the number of carriages where half of the seats are free, and $y$ be the number of carriages where a third of the seats are free. Then $x \cdot \frac{1}{2}+y \cdot \frac{1}{3}=18 \cdot \frac{1}{9}$. Eliminating the denominators of the fractions, we get: $3 x+2 y=12$. Since $x$ and $y$ are natural numbers, by trial and error, we find that $x=2, y=3$. Therefore, the required number of carriages is: $18-2-3=13$.

Natural solutions to the equation $3 x+2 y=12$ can also be found from considerations of divisibility if one variable is expressed in terms of the other.

Evaluation criteria.

“+” A complete and justified solution is provided

“士” A correct reasoning is provided, but a computational error is made

“さ” A generally correct reasoning and the correct answer are provided, but the uniqueness of the solution to the equation or the uniqueness of the decomposition of 2 into a linear combination of fractions $1 / 2$ and $1 / 3$ is not explained.

“Ғ” The equation is correctly set up, but further reasoning is incorrect or absent

“干” Only the correct answer is provided

“-” The problem is not solved or is solved incorrectly