By 苏剑林 | October 28, 2015
By 苏剑林 | Oct 28, 2015 | 37034 readers
———— Reminiscing about the elementary school math competitions I once participated in.
Starting from an Elementary School Competition Problem
When I was in the fifth grade of elementary school, I participated in my first math competition called the "Yu Miao Cup." I don't remember most of the questions, but the only one I remember clearly is the following (not exactly the same, but the meaning is similar):
Suppose a bottle of soda costs one dollar, and 4 empty bottles can be exchanged for one new bottle of soda. If I have 30 dollars, what is the maximum number of bottles of soda I can drink?
Of course, the above situation might be too ideal, but it must be admitted that similar cases exist extensively in real life. For example, when buying turtles for food, because turtle shells can be used in medicine, some people recycle them, which means a certain number of turtle shells can be exchanged for a turtle, and so on. Can the readers calculate this quickly?
Of course, this problem is not difficult. With 30 dollars, you can buy 30 bottles of soda, leaving 30 empty bottles. These 30 empty bottles can be exchanged for 7 bottles of soda, with 2 empty bottles left over. After drinking those, you have 9 empty bottles, which can be exchanged for 2 more bottles, leaving 1 empty bottle. After drinking those, you are left with 3 empty bottles. Let's count: at this point, we have drunk $30 + 7 + 2 = 39$ bottles of soda. (Assuming we don't burst; you could also share them with others ^_^) The entire process is shown in the table below:
$$\begin{array}{c|cccc}
\hline
\text{Empty Bottle Count} & 30 & 2+7 & 1+2 & ? \\
\hline
\text{Sodas Drunk} & 30 & 7 & 2 & ? \\
\hline \end{array}$$
Is this the final answer? It seems to be, as we have 3 empty bottles left, which isn't enough to exchange for another. However, a clever trick is — "borrow" one bottle of soda first. After drinking it, you will have 4 empty bottles, which you then use to pay back the debt! So the correct answer is 40 bottles! Ingenious, right? Please don't worry about whether borrowing is allowed; the question asks for the "maximum," so theoretically, it is possible. This tests our creativity in addition to our calculation skills! (Why do I remember this so clearly? Because I wasn't creative enough and got it wrong back then...)
After finishing the soda, we can analyze the problem from another perspective. First, consider this: 4 empty bottles are exchanged for 1 bottle of soda. After drinking it, 1 empty bottle remains. This means that 3 empty bottles are essentially equivalent to 1 bottle of "pure soda" (soda without the bottle). In this case, our 30 empty bottles can be exchanged for 10 bottles of "pure soda," immediately giving us the answer $30 + 10 = 40$ bottles:
$$30+30\div (4-1)=40$$
From yet another angle, we can consider the value of the empty bottle. This perspective is easier to generalize. Since empty bottles can be exchanged for soda, they have value. That is to say, the unit price of 1 dollar for a bottle of soda actually consists of the unit price of the "pure soda" ($x$) and the unit price of the empty bottle ($y$), i.e., $x+y=1$. Secondly, 4 empty bottles can be exchanged for one bottle of soda, which means the value of 4 empty bottles is 1 dollar, i.e., $4y=1$. From this, we can calculate $x=3/4$, meaning the price of a "pure soda" is actually $3/4$ dollars! We have 30 dollars and want to convert it all into "pure soda" (meaning we just want the liquid and don't care about keeping the bottles), so we can drink $30\div (3/4)=40$ bottles!
Enhanced Version of the Soda Exchange
The above problem can be generalized further:
Suppose a bottle of soda costs one dollar, and 4 empty bottles can be exchanged for one bottle of soda, or 8 caps can also be exchanged for one bottle. If I have 30 dollars, what is the maximum number of bottles of soda I can drink?
Now a bottle of soda is divided into three parts: pure soda, the empty bottle, and the cap. The problem has become more complex. Note that both empty bottles and caps can be exchanged for soda, and each exchange brings new empty bottles and caps, continuing indefinitely. Let's first calculate according to the most primitive method: exchange the bottles first, then the caps, until everything is exhausted. When exchanging one item at a time, we can use the results from our simplified problem, dividing by $(4-1=3)$ and $(8-1=7)$ respectively:
$$\begin{array}{c|cccc}
\hline
\text{Cap Count} & 30 & 30+10 & 5 & 5+1\\
\hline
\text{Bottle Count} & 30 & 0 & 0+5 & 2 \\
\hline
\text{Sodas Drunk} & 30 & 10 & 5 & 1\\
\hline \end{array}$$
Now we have 46 bottles, with 2 bottles and 6 caps left. It seems we can't get any more, because borrowing 1 bottle won't be enough to pay back. — Wait, borrowing 1 bottle won't work, but what about 2 bottles? If we borrow 2 bottles, we get 4 empty bottles and 8 caps, which is exactly enough to settle the debt! So the final result is 48 bottles. Here, at the very end, we borrowed two bottles and paid them back using the bottles and caps respectively! Yes, don’t limit yourself to not borrowing, and don’t limit yourself to borrowing only 1 bottle; as long as you have enough bottles and caps to cover the debt, you can borrow more!
Is there a direct logical path to this result? Yes! The "value" logic used above can be applied. Let the unit prices of "pure soda," empty bottles, and caps be $x, y, z$ respectively. We can set up the following equations:
$$\left\{\begin{aligned}&x+y+z=1\\
&4y=1\\
&8z=1\end{aligned}\right.$$
Solving this gives $x=5/8$, which is the price of the pure soda. Therefore, we can ultimately drink $30 \div (5/8) = 48$ bottles of pure soda.
Readers should see the pattern now. The answer is:
$$30\div\left(1-\frac{1}{4}-\frac{1}{8}\right)=48$$
If it cannot be divided evenly, simply take the integer part. Obviously, the expression in the parentheses follows a unified rule. Is there a more direct way to explain it?
Reversing it: From Result to Process
In fact, one can think backwards to obtain a more direct approach. Suppose the final result is $W$ bottles. We naturally expect that to drink these $W$ bottles, we have "exhausted all resources" — used up all bottles and caps. This means the number of bottles exchanged from empty bottles is $\frac{W}{4}$, the number of bottles exchanged from caps is $\frac{W}{8}$, and the remainder is our initial cost of 30 bottles. Thus:
$$W=\frac{W}{4}+\frac{W}{8}+30$$
Which gives:
$$W=30\div\left(1-\frac{1}{4}-\frac{1}{8}\right)=48$$
One More Comparison
We have provided several approaches to this problem: direct, indirect, forward, and backward. Which method is the best? It’s hard to say; everyone has their own preference. However, if asked which method is the most practical (the widest range of applications), the "value" approach seems the easiest for analysis, specifically looking at what the unit price of each part should be. For example, consider the following generalization:
Suppose a bottle of soda costs one dollar, and "3 empty bottles + 2 caps" can be exchanged for one bottle, or "2 empty bottles + 4 caps" can also be exchanged for one bottle. Neither empty bottles nor caps can be exchanged individually. If I have 30 dollars, what is the maximum number of bottles I can drink?
For such mixed exchange rules, apart from the value method, there seems to be no better way. Thinking backwards also works, but the equations generated are essentially the same as the value method and do not reduce complexity. (If readers have better ideas, feel free to leave a comment.)