10.6. Ali-baba came to a cave where there was gold and diamonds. Ali-baba had one large bag with him. It is known that a full bag of gold weighs 200 kg, and if the entire bag is filled with diamonds, it will weigh 40 kg (the empty bag weighs nothing). A kilogram of gold costs 20 dinars, and a kilogram of diamonds costs 60 dinars. What is the maximum amount of money Ali-baba can get if he can carry no more than 100 kg in this bag? Justify your answer.
# Solution:

Method 1. Let Ali-Baba have placed a set of gold and diamonds that gives him the maximum possible revenue - we will call such a bag optimal. Then either the bag is filled to the brim, or it weighs exactly 100 kg: otherwise, more diamonds could be added to it and the revenue would increase. Consider the first situation, when the bag is full. It is clear that it contains diamonds, since the full weight of a bag of gold is more than 100 kg. Note that a bag filled with only gold is worth $200 \cdot 20=40000$ dinars, and one with only diamonds is $-40 \cdot 60=24000$ dinars, so an equal volume of gold yields more profit than the same volume of diamonds. If the weight of the optimal bag is less than 100 kg, we can replace some of the diamonds with an equal volume of gold (so that the weight of the bag increases but does not exceed 100 kg). In this case, the value of the bag will increase - a contradiction to the optimality of the bag. Therefore, the weight of the optimal bag is exactly 100 kg. Suppose the optimal bag is not full. Then it contains gold, and Ali-Baba can replace part of it with diamonds of the same weight (while ensuring that the volume of the bag does not become too large). Since a kilogram of diamonds is more expensive than a kilogram of gold, Ali-Baba's profit will increase - again a contradiction to the optimality.

Thus, the bag is full. Let there be $x$ kg of diamonds in the bag. Then there is $100-x$ kg of gold in it. The diamonds occupy $x / 40$ of the bag, and the gold - $(100-x) / 200$. Since the bag is full, we have the equation $\frac{x}{40}+\frac{100-x}{200}=1$, from which $x=25$. The value of the optimal bag is now trivial to find. It turns out to be 3000 dinars.

Method 2. Let Ali-Baba put $x$ kg of gold and $y$ kg of diamonds in the bag. Then he will earn $20 x+60 y$ dinars. Ali-Baba has two constraints: first, he cannot carry more than 100 kg, so $x+y \leqslant 100$. Second, such an amount of gold and diamonds must fit in the bag. Since one kilogram of gold occupies $1 / 200$ of the bag, and one kilogram of diamonds $-1 / 40$, another inequality arises: $\frac{x}{200}+\frac{y}{40} \leqslant 1$, or $x+5 y \leqslant 200$. In addition, it is clear that the variables $x$ and $y$ are non-negative. We have the problem: find the maximum value of the expression $20 x+60 y$ on the set of all pairs of non-negative numbers $(x ; y)$ that satisfy the system of inequalities $\left\{\begin{aligned} x+y & \leqslant 100 \\ x+5 y & \leqslant 200\end{aligned}\right.$. This is a classic problem in mathematics with many solution methods. We will solve it graphically. The set of points on the plane, the coordinates of which satisfy our conditions, is the shaded quadrilateral shown in the figure.

![](https://cdn.mathpix.com/cropped/2024_05_06_1501881448231e919664g-8.jpg?height=694&width=1213&top_left_y=1292&top_left_x=427)

The equation $20 x+60 y=C$ for different $C$ defines a family of parallel lines; the higher the line on the plane - the greater the value of $C$. (One such line is shown in the figure for $C=1200$.) The highest line parallel to it passes through the vertex $A$ of the quadrilateral shown. The coordinates of the vertex are found from the system $\left\{\begin{aligned} x+y & =100 \\ x+5 y & =200\end{aligned}\right.$; they are $x=75, y=25$. Thus, the maximum possible value of $C$ is 3000.

Answer: 3000 dinars.

Recommendations for checking:

| is in the work | points |
| :--- | :--- |
| Correct and fully justified answer | 7 points |
| The correct solution path leads to an incorrect answer due to  arithmetic errors | 6 points |
| Both facts (see criteria for 2 points) are proven | 4 points |
| The problem is correctly reduced to the analysis of a system or  there is a correct graphical interpretation of the problem, but  the solution is not completed | 3 points |
| One of the two facts is proven: 1) the optimal bag weighs  exactly 100 kg; 2) the optimal bag is full; | 2 points |
| The correct answer is obtained under the assumption that the optimal  bag is full and weighs 100 kg, but neither point  of the assumption is proven | 1 point |
| Correct answer without justification |  |