# Turning wine into water

Niccolò Tartaglia was an Italian mathematician, engineer and bookkeeper, living in the 16th century in the Republic of Venice. Tartaglia published many books, including his "General Trattato di Numeri", an acclaimed compilation of the mathematics known at his time. Among many other problems, the Trattato contained the following mathematical puzzle:

A dishonest servant takes out three pints of wine from a barrel and replaces them with the same amount of water. He repeats this theft another two times, removing altogether nine pints and replacing them with water. As a result of this swindle, the diluted wine remaining in the barrel lost half of its former strength.

How much wine was in the barrel before the thievery began?

(Note: Tartaglia is also famous for his solution of the cubic equation. The cubic equation that is implicit in this puzzle, however, is of a simple form that could be solved already before Tartaglia's work.)

• does he replace wine with water immediately every time he takes 1 pint of wine or after taking out 3 pints of wine? – Oray Mar 11 '16 at 9:54
• @Oray: He first takes out 3 pints from the barrel, and then puts in 3 pints of water. (And this is done altogether three times.) – Gamow Mar 11 '16 at 10:15
• I think I've actually seen this done in Cambodia. Bought a bottle of wine at the border once, and I could swear it was at least 60% water... – Adam Hayes Mar 11 '16 at 15:28
• @Daniel: It is a "historical" puzzle, like puzzling.stackexchange.com/questions/1814/…, and hence should fit well with the puzzling site. – Gamow Mar 11 '16 at 17:24
• Ah, OK. That makes sense. – Daniel Mar 11 '16 at 17:25

(I'm assuming throughout that the concentration of wine at the end needs to be 50%.)
Unless I'm missing something:

There are $n$ pints of wine to begin with. After the first 3 pints are taken, you have an $(n-3)/n$ fraction of wine after the water is put back. After the second 3 pints are taken and replaced, you just multiply by the same fraction again, so you have $(n-3)^2/n^2$, and after the last 3 pints you end up with an $(n-3)^3/n^3$ fraction. This leads to $(n-3)^3/n^3=0.5$.

This equation can be rewritten into the linear equation $(n-3)/n=1/\sqrt[3]{2}$, which then implies $n=3\sqrt[3]{2}/(\sqrt[3]{2}-1) \approx 14.54$ pints.

Another way is to rewrite the equation into the cubic equation $~~n^3/2 -9n^2 +27n -27=0$, which can be solved by numerical methods to give $n\approx14.54$ pints.

• How did you arrive at the solution to the cubic equation? The solution can actually be written down in closed form (using integers, addition, subtraction, multiplication, division, n-th powers and n-th roots). – Gamow Mar 11 '16 at 10:19
• same as ivo beckers, plugged the numbers into a solver. – astralfenix Mar 11 '16 at 10:44
• I think what Gamow is angling at is that you can go from $(n-3)^3/n^3=0.5$ to $2(n-3)^3=n^3$ then cube root both sides to get a simple solution to n. The only thing you have to calculate (or look up) that isn't simple arithmetic is cube root 2. Probably an important factor in Tartaglia's day. – Hugh Meyers Mar 11 '16 at 10:45
• @HughMeyers ah good point, that makes it simpler – astralfenix Mar 11 '16 at 11:01

Let $x$ be the starting amount of pints of wine.

Now just focus on the amount of water in the barrel.

After the first step there is 3 pints of water in the barrel. Because the content of the barrel is still $x$ pints the amount of water per pint is therefore $3/x$

So in the second step we take $3$ times $3/x$ water so we take away $9/x$ water and we add $3$ pints of water so we end up with $6 - 9/x$ water in the barrel. This means there is $\frac{6 - 9/x}{x}$ water per pint in the barrel.

So in the final step we take $3$ times $\frac{6 - 9/x}{x}$ water so we take away $3 \cdot \frac{6 - 9/x}{x}$ water and we add $3$ pints of water so we end up with $9 - 9/x - 3 \cdot \frac{6 - 9/x}{x}$ water in the barrel.

We know this is half the amount of the total barrel, so half of $x$, so we just need to solve the following equation:

$$9 - 9/x - 3 \cdot \frac{6 - 9/x}{x} = \frac x 2$$

Solving this gives $x = 3 (2+ \sqrt[3]{2} +\sqrt[3]{4})$

• How did you arrive at the solution to the cubic equation? The solution can actually be written down in closed form (using integers, addition, subtraction, multiplication, division, n-th powers and n-th roots). – Gamow Mar 11 '16 at 10:19
• @Gamow I was being lazy and plugged the equation in Wolfram Alpha – Ivo Beckers Mar 11 '16 at 10:21
• @Gamow I have a more precise answer now – Ivo Beckers Mar 11 '16 at 10:42

$14.542$ pints if he replaces wine with water after taking 3 pints of wine.

Let say you have 300 units of wine and you take off 3 pints of wine and add 3 pints of wine 3 times.

I. Theft

After you take off 3 pints of wine (3p) and add 3 pints of wine and add water the new concentration of wine would be;

$\frac{300-3p}{300}$ or $\frac{100-p}{100}$ or $(100-p) \%$

As a result, you would have taken off;

$3p$ of wine.

II. Theft

You know that the concentration of wine is $\frac{100-p}{100}$. So If you take off 3 pints of wine (3p) again, you would actually take off $(100-p)\%$ wine and $p\%$ water.

As a result, you would take off

$3p \frac{(100-p)}{100}=3p-\frac{3p^2}{100}$ of wine from the barrel as a wine! So previously it was $3p$ of wine and now the difference between I. Theft and II. Theft is $\frac{3p^2}{100}$ less than first.

$\frac{p}{100}$.

As a result, you would have taken off;

$3p-\frac{3p^2}{100}$ of wine

III. Theft

You know that the new concentration of wine is $\frac{100-p-(p-\frac{p^2}{100})}{100}$. So If you take off 3 pints of wine (3p) again, you would actually take off $(100-p-(p-\frac{p^2}{100}))\%$ wine.

As a result you would taken off;

$3p \frac{(100-p-(p-\frac{p^2}{100})}{100}=3p-\frac{6p^2}{100}+\frac{3p^3}{100^2}$ of wine!

RESULT

So the sum of wine taken from the barrel would be equal to 50% of wine, or 150 units;

$50\% \ of \ barrel=3p+(3p-\frac{3p^2}{100})+(3p-\frac{6p^2}{100}+\frac{3p^3}{100^2})=150$

As a result;

$p(3-\frac{3p}{100}+\frac{p^2}{100^2})=50$

so $p=20.630$ and since total amount of barrel is assumed to be 300;

The capacity of barrel in terms of pints is $\frac{300}{20.630}=14.542$

Each time wine is replaced the wine remaining is $\frac{n-3}{n}$.

$\frac{(n-3)^3}{n^3} = \frac{1}{2}$

$\frac{2(n-3)^3}{n^3} = 1$

$2(n-3)^3 = n^3$

$\sqrt[3]{2(n-3)^3} = \sqrt[3]{n^3}$

$(n-3)\sqrt[3]{2} = n$

$n\sqrt[3]{2} - n - 3\sqrt[3]{2} = 0$

$n\sqrt[3]{2} - n = 3\sqrt[3]{2}$

$n(\sqrt[3]{2} - 1) = 3\sqrt[3]{2}$

$n = \frac{3\sqrt[3]{2}}{\sqrt[3]{2} - 1}$

Here is an alternate line of reasoning based on astralfenix's very helpful answer to solving the puzzle:

p = Capacity of barrel in pints
((p - 3) / p) ** 3 = 0.5
(p - 3) / p = 0.5 ** (1 / 3)
C = 0.5 ** (1 / 3)
(p - 3) / p = C
p - 3 = C * p
p - 3 - C * p = 0
p - C * p = 3
1 * p - C * p = 3
(1 - C) * p = 3
p = 3 / (1 - C)
p = 3 / (1 - 0.5 ** (1 / 3))
p = 14.541966305589222