English (unofficial) translations of posts at kexue.fm
Source

Friends, Have a Bottle of Soda! The Interesting Soda Exchange Problem

Translated by DeepSeek V4 Pro. Translations can be inaccurate, please refer to the original post for important stuff.

— In memory of the primary school math competitions I once participated in.

Starting from a Primary School Competition Problem

I participated in my first math competition, called the "Yu Miao Cup," when I was in the fifth grade. I don’t remember most of the questions, but the only one I remember clearly is the following (not exactly the same, but similar in meaning):

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?

Have a bottle of soda

Of course, the situation above might be too ideal, but it must be admitted that similar cases exist in abundance in real life. For example, when buying turtles to eat, the shells can be used in medicine, so some people recycle them, which means a certain number of shells can be exchanged for a new turtle, and so on. Can the reader calculate it quickly?

Naturally, 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 bottles of soda, with 1 empty bottle left over. After drinking those, you have 3 empty bottles left. Let’s count: at this point, we have drunk 30 + 7 + 2 = 39 bottles of soda. (Don’t worry about getting too full; you can share them with others ^_^) The entire process is shown in the table below:

\begin{array}{c|cccc} \hline \text{Number of empty bottles} & 30 & 2+7 & 1+2 & ? \\ \hline \text{Number of sodas drunk} & 30 & 7 & 2 & ? \\ \hline \end{array}

Is this the final answer? It seems so, as we have 3 empty bottles left and cannot exchange them for more soda. However, there is a magical trick: first "borrow" a bottle of soda; after drinking it, you will have 4 empty bottles, which you can then use to pay off the debt! Therefore, the correct answer is 40 bottles! Clever, isn’t it? Please do not worry about whether borrowing is allowed; the question asks for the "maximum," so theoretically, it is possible. What is being tested here, besides calculation, is creativity! (Why do I remember this so clearly? Because back then, I lacked creativity and got it wrong~~)

After drinking the soda, we can analyze the problem from another perspective. First, consider this: 4 empty bottles are exchanged for 1 bottle of soda, and after drinking it, 1 empty bottle is left. This means that 3 empty bottles are effectively exchanged for 1 "pure soda" (the liquid without the bottle). In this case, our 30 empty bottles can be exchanged for 10 "pure sodas," so we immediately get the answer 30 + 10 = 40 bottles of soda: 30 + 30 \div (4 - 1) = 40

From yet another perspective, we can consider the value of the empty bottle. This approach is easier to generalize. Since empty bottles can be exchanged for soda, they have value. That is to say, the 1-dollar price of a bottle of soda actually consists of the price of the "pure soda" (x) and the price of the empty bottle (y), i.e., x + y = 1. Secondly, since 4 empty bottles can be exchanged for one bottle of soda, it means the value of 4 empty bottles is 1 dollar, i.e., 4y = 1. From this, we can calculate x = 3/4, meaning the actual price of a "pure soda" is 3/4 dollars! We have 30 dollars and want to exchange it all for "pure soda" (meaning we only care about drinking the soda and don’t keep the bottles), so we can drink 30 \div (3/4) = 40 bottles!

Enhanced Version of the Soda Exchange

The above problem can be further generalized:

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 of soda. 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, seemingly without end. Let’s first calculate using the most primitive method: exchange bottles first, then caps, until finished. When exchanging one item at a time, we can use the result of our simplified problem, i.e., dividing by (4-1=3) and (8-1=7) respectively:

\begin{array}{c|cccc} \hline \text{Number of caps} & 30 & 30+10 & 5 & 5+1 \\ \hline \text{Number of empty bottles} & 30 & 0 & 0+5 & 2 \\ \hline \text{Number of sodas drunk} & 30 & 10 & 5 & 1 \\ \hline \end{array}

Now we have 46 bottles, with 2 empty bottles and 6 caps remaining. It seems we can’t get any more, because borrowing 1 bottle won’t allow for another exchange. Wait! If borrowing 1 bottle isn’t enough, what about borrowing 2? By borrowing 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, we borrowed two bottles at the end and then used the empty bottles and caps to pay back the debt! Exactly—do not limit yourself to not borrowing, and do not limit yourself to borrowing only 1 bottle; as long as you have enough bottles and caps to settle the debt, you can borrow several!

Is there a direct way to get the above result? Yes! Our "value" logic from before 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 system: \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 be able to see the pattern now. The answer is: 30 \div \left(1 - \frac{1}{4} - \frac{1}{8}\right) = 48 If it is not an integer, simply take the floor. Clearly, the expression in the parentheses represents a unified rule. Is there a more direct way to explain it?

In Reverse: From Result to Process

In fact, one can think backward to find an even more direct approach. Suppose the final result is W bottles. We naturally expect that to drink these W bottles, we have "exhausted everything"—using up all bottles and caps. This means the number of sodas exchanged using empty bottles is \frac{W}{4}, and the number of sodas exchanged using caps is \frac{W}{8}. The remainder is the initial cost of 30 bottles, so we have: W = \frac{W}{4} + \frac{W}{8} + 30 Which gives: W = 30 \div \left(1 - \frac{1}{4} - \frac{1}{8}\right) = 48

A Further Comparison

We have provided several approaches to this problem: direct and indirect, forward and backward. Which method is the best? It’s hard to say, as everyone has different preferences. However, if you ask which method is the most practical (with the widest range of application), it seems the "value" approach is the easiest for analysis—that is, analyzing 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 of soda, OR "2 empty bottles + 4 caps" can also be exchanged for one bottle of soda. Individual empty bottles or caps cannot be exchanged. If I have 30 dollars, what is the maximum number of bottles of soda I can drink?

For this kind of mixed exchange, there seems to be no better method than the value approach. The backward-thinking approach also works, but the resulting equations are essentially the same as the value method and do not reduce the complexity. (If readers have better ideas, feel free to leave a comment.)

When reposting, please include the original address of this article: https://kexue.fm/archives/3495

For more detailed reposting guidelines, please refer to: Scientific Space FAQ