Let's Grab a Soda, Friends! The Fun "Bottle Exchange" Problem

—— In memory of the elementary school math competitions I once took part in.

Starting from an Elementary School Competition Problem

In fifth grade, I took part in my first math competition, called the "Seedling Cup." I've forgotten most of the problems, but there's one I remember very clearly (not exactly the same wording, but the same idea):

Suppose a bottle of soda costs one yuan, and 4 empty bottles can be exchanged for one bottle of soda. If I have 30 yuan, what's the maximum number of bottles of soda I can drink?

Let's grab a sodaLet's grab a soda] Of course, the scenario above might be a bit too idealized, but we have to admit that similar situations abound in real life. For instance, when people buy and eat turtles, since turtle shells can be used in traditional medicine, some people collect them for recycling—meaning that a certain number of shells can be exchanged for a turtle, and so on. Can readers work out the answer quickly?

Of course, this problem isn't hard. With 30 yuan you can buy 30 bottles of soda, leaving you with 30 empty bottles. Those 30 empty bottles can be exchanged for 7 more bottles of soda, leaving 2 empty bottles; after drinking those, you have 9 empty bottles in total, which can be exchanged for 2 more bottles, leaving 1 empty bottle; after drinking those, you have 3 empty bottles left. Let's tally it up: at this point we've already drunk 30+7+2=39 bottles of soda. (Let's not worry about getting too full—you can always share with others ^_^.) The whole process looks like this:

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

Is this the final answer? It seems so—we're left with 3 empty bottles, which isn't enough to exchange for another. more However, here's the clever trick: go and "borrow" one more bottle of soda first. After drinking it, you'll have 4 empty bottles, and you can use those 4 bottles to pay off the debt! So the correct answer is 40 bottles! Clever, isn't it? Let's not worry about whether "borrowing on credit" is actually allowed—the question asks for the maximum, so at least in theory it should be permitted. What's really being tested here isn't just computation, but creativity! (Why do I remember this so clearly? Because I lacked creativity at the time and got it wrong~~)

Having finished our soda, let's analyze the problem from another angle. First, consider this: 4 empty bottles can be exchanged for 1 bottle of soda, and after drinking it you're left with 1 empty bottle. This is equivalent to saying that 3 empty bottles get you 1 bottle of "pure soda" (without the bottle). In that case, our 30 empty bottles can be exchanged for 10 bottles of "pure soda," so we immediately get the answer: 30+10=40 bottles of soda.

$$30+30\div (4-1)=40$$

Let's try yet another angle—one that generalizes more easily—by considering the value of the empty bottle. Since an empty bottle can be exchanged for soda, it must have some value. In other words, the unit price of one bottle of soda, 1 yuan, actually consists of the unit price of the "pure soda" ($x$) plus the unit price of the empty bottle ($y$), i.e., $x+y=1$. Moreover, since 4 empty bottles can be exchanged for one bottle of soda, this means the value of 4 empty bottles is 1 yuan, i.e., $4y=1$. From this we can compute $x=3/4$, meaning the actual price of one bottle of "pure soda" is $3/4$ yuan! With our 30 yuan, if we want to convert it entirely into "pure soda" (that is, we only care about drinking soda, not owning bottles), we can drink $30\div (3/4)=40$ bottles!

An Enhanced Version of the Bottle Exchange Problem

The problem above can be generalized further:

Suppose a bottle of soda costs one yuan, and 4 empty bottles can be exchanged for one bottle of soda, or alternatively, 8 caps can also be exchanged for one bottle of soda. If I have 30 yuan, what's the maximum number of bottles of soda I can drink?

Now a bottle of soda is split into three parts: the pure soda, the empty bottle, and the cap. The problem has become more complicated—note that both empty bottles and caps can be exchanged for soda, and each exchange produces yet more empty bottles and caps, seemingly without end. Let's first try the most naive approach: exchange bottles first, then caps, and repeat until we run out. For exchanging one type alone, we can use the result from our simplified version above, i.e., divide by (4-1=3) and by (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{sodas drunk} & 30 & 10 & 5 & 1\\ \hline \end{array}$$

Now we have 46 bottles, with 2 empty bottles and 6 caps left, and it seems we can't get any more, since borrowing 1 more bottle wouldn't help. —Wait a moment: borrowing 1 bottle doesn't work, but what about borrowing 2? If we borrow 2 bottles, we get 4 empty bottles and 8 caps, which is exactly enough to pay off the debt! So the final result is 48 bottles. Here, at the end, we borrowed two bottles and then paid off the debt using the bottles and caps separately. Right—don't limit yourself to "no borrowing," and don't limit yourself to "borrowing only 1 bottle"; as long as you have enough bottles and caps to pay it off, you can borrow as many as you need!

Is there a more direct way of thinking that leads to this result? Yes! We can use the "value" approach mentioned above. Let the unit prices of "pure soda," empty bottle, and cap be $x,y,z$ respectively. Then we can set up:

$$\left\{\begin{aligned}&x+y+z=1\\ &4y=1\\ &8z=1\end{aligned}\right.$$

Solving gives $x=5/8$, which is the price of pure soda. So in the end we can drink $30\div(5/8)=48$ bottles of pure soda.

Readers should be able to spot the pattern by now—the answer is:

$$30\div\left(1-\frac{1}{4}-\frac{1}{8}\right)=48$$

If the division doesn't come out even, just take the floor. Clearly, the expression in parentheses follows a consistent pattern. Is there an even more direct way to explain it?

Working Backwards, from Result to Process

Actually, we can think about this in reverse and arrive at an even more direct line of reasoning. Suppose the final result is $W$ bottles. Naturally, we'd expect that in order to drink these $W$ bottles, we've "used up everything"—all the bottles and caps have been exhausted. This means the number of bottles of soda obtained by exchanging empty bottles is $\frac{W}{4}$, and the number obtained by exchanging caps is $\frac{W}{8}$, with the remainder being the 30 bottles we paid for directly. So we have:

$$W=\frac{W}{4}+\frac{W}{8}+30$$

that is:

$$W=30\div\left(1-\frac{1}{4}-\frac{1}{8}\right)=48$$

Comparing the Approaches

We've given several lines of reasoning for this problem—direct ones, indirect ones, forward ones, backward ones. Which is best? Hard to say; it depends on personal taste. But if we ask which method is the most practically useful (i.e., has the widest range of applicability), then the "value" approach—analyzing what the unit price of each component should be—seems to be the most convenient. Consider, for example, the following generalization:

Suppose a bottle of soda costs one yuan, and "3 empty bottles + 2 caps" can be exchanged for one bottle of soda, or alternatively "2 empty bottles + 4 caps" can also be exchanged for one bottle of soda; empty bottles or caps alone cannot be exchanged. If I have 30 yuan, what's the maximum number of bottles of soda I can drink?

For this kind of mixed exchange problem, aside from the value-based method, there doesn't seem to be any other good approach. As for the "work backwards" method mentioned earlier—it can also be applied, but the equations it produces are essentially the same as those from the value method, and don't reduce the complexity at all. (If readers have a better approach, feel free to leave a comment.)

English translation of a post from 科学空间 | Scientific Spaces by 苏剑林. Original: https://kexue.fm/archives/3495
Translated automatically with claude-sonnet-5; all equations are reproduced verbatim from the source. Copyright remains with the original author.