Maths Olympiad Prep

Library / /260 of 299

Combinatorics Difficulty 7.4 National Olympiad, round 2 Prove it Iran

Initially, there are nn glasses numbered 1,2,,n1, 2, \ldots, n, and the capacity of glass number ii is ii liters. A total of nn liters of water is distributed among these glasses such that the volume of water in each glass is an integer. In each step, we can pour water from one glass into another until the source glass is empty or the target glass is full.

a. Prove that from any configuration (where the volume of water in each glass is an integer), it is possible to reach a configuration in which each glass contains exactly 11 liter of water, in at most 4n3\frac{4n}{3} steps.

b. Prove that from any configuration (where the volume of water in each glass is an integer), it is possible to reach any other configuration with the same property in at most 5n3\frac{5n}{3} steps.

Solution

We call a glass that is not empty "non-empty" and a glass that has been emptied "empty". Each glass holds one liter of water, and all the water is in nn containers (glasses), each of which can be either non-empty or empty.

Suppose in the initial state we have f1f_1 non-empty glasses, and we want to reach a state with f2f_2 non-empty glasses.

Algorithm 1: Reaching the balanced state from any state
We consider a container that is initially empty. Then, in each step, we pour a one-liter glass into an empty container. Thus, with each step, 22 liters are transferred from one container to another.
Consequently, at most 2(nf1)2(n - f_1) steps are needed to reach the balanced state.

Algorithm 2: Reaching the target state from the balanced state
In each step, we can pour a non-empty glass into an empty container. Consequently, at most nf2n - f_2 steps are required to reach the target state.

Algorithm 3: Reaching the objective from the balanced state using containers with the highest capacity
Initially, we consider the non-empty containers with the highest capacity. If there is a container with nin - i liters of water, we pour it into a container with a capacity of ii to fill it up. We continue this process until we reach the target state. This can be done in nf2+1n - f_2 + 1 steps.

Algorithm 4: Reaching the balanced state from any state using glasses with more water
Starting from an arbitrary state, we select the container with the least volume of water. We empty this container and transfer its water to the container that has the most water. We continue this method until we reach the balanced state, which requires at most nf1n - f_1 steps.

Algorithm 5: Reaching the goal state from any state
Suppose the final state consists of containers with liters a1,a2,,af2a_1, a_2, \dots, a_{f_2}, and we sort them into b1,b2,,bf2b_1, b_2, \dots, b_{f_2}. If we have a glass with capacity nn, we can eventually reach the target state through steps in which we transfer glasses with different liters to the aia_i glasses. At most, 2f22f_2 steps are needed.

Part (a):
We assume by contradiction that:
2(nf1)>4n3f1<n3 2(n - f_1) > \frac{4n}{3} \Rightarrow f_1 < \frac{n}{3}
and also:
f1+(n1)>4n3f1>n3+1 f_1 + (n - 1) > \frac{4n}{3} \Rightarrow f_1 > \frac{n}{3} + 1
which are contradictory, so the assumption is false.

Part (b):
Again, we assume by contradiction:
By running algorithms 1 and 4, we have:
2(nf1)+(nf2)>5n32f1+f2<4n3(1) 2(n - f_1) + (n - f_2) > \frac{5n}{3} \Rightarrow 2f_1 + f_2 < \frac{4n}{3} \quad (1)
By running algorithms 2 and 3, we have:
f1+(n1)+(nf2)>5n3f1+n31>f2(2) f_1 + (n - 1) + (n - f_2) > \frac{5n}{3} \Rightarrow f_1 + \frac{n}{3} - 1 > f_2 \quad (2)
By running algorithms 2 and 5, we have:
f1+2f2>5n3(3) f_1 + 2f_2 > \frac{5n}{3} \quad (3)
From relations (1) and (3):
5n3+f1<2(f1+f2)<4n3+f2f1+n3<f2(4) \frac{5n}{3} + f_1 < 2(f_1 + f_2) < \frac{4n}{3} + f_2 \Rightarrow f_1 + \frac{n}{3} < f_2 \quad (4)
which shows that (2) and (4) are in contradiction. Thus, the proposition is proven. ■

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.