5. Is it possible to measure out exactly 4 liters of water from a river using two empty buckets with capacities of 12 liters and 9 liters?
$\triangle$ Since the initial capacities of the buckets are divisible by 3, any pouring from one bucket to another or filling from the river will result in each bucket containing a volume of water that is divisible by 3. However, since 4 is not divisible by 3, it is impossible to obtain 4 liters of water.

Answer: It is impossible.

Let's consider a generalization of this problem. Suppose we have two empty containers with capacities of $a$ liters and $b$ liters, and we need to collect exactly $c$ liters of water from the river (where $a$, $b$, and $c$ are natural numbers, and $c$ does not exceed the larger of the numbers $a$ and $b$). If the number $c$ is not divisible by the greatest common divisor of the numbers $a$ and $b$, then, similarly to the previous case, it is impossible to achieve this.

But what if $c$ is divisible by the greatest common divisor of the numbers $a$ and $b$? It can be proven that in such a case, the problem always has a solution. In particular, this is always possible if the numbers $a$ and $b$ are coprime.