How much red sand and how much blue sand?

This is a puzzle I remember arguing with my sister about when we were little...
(Not quite as loud (or as public!) as the Monty Hall argument we had.)

You have two large beakers of the same size.
Beaker A is half filled with blue sand.
Beaker B is half filled with red sand.

• You take a cup of blue sand from Beaker A and pour it into Beaker B.
• You mix up the contents of Beaker B until the colour is consistent.
• You take a cup of the contents of Beaker B and pour it into A.
• You mix up the contents of Beaker A until the colour is consistent.

Which is there now more of:

• Blue sand in Beaker B or
• Red sand in Beaker A?
-
It is more interesting when you do not mix... –  klm123 Jul 1 at 21:29
Would like to see this posted on Mathematics StackExchange for a mathematical proof/answer to the question. –  Michael Lai Jul 2 at 0:11
@klm123 If I didn't say whether they are mixed or not, I think someone would have asked. When someone realises the solution, they will also see the difference between mixing and not mixing. (I think?) –  Ali Jul 2 at 11:29
Now repeat the problem, but with beakers of Red and Blue pills that Morpheus gave you :-) –  Carl Witthoft Jul 2 at 15:06

They are the same.

The solution is general:
1. Beakers can have different size.
2. You can either mix or not mix.
3. You can repeat the procedure N times.

You have the same amount of sand in each beaker at the beginning and at the end.
Therefore if Beaker A lacks X litres of blue sand then it has X litres of red sand instead. This means Beaker B lacks this X litres of red sand, they are replaced by X litres of blue sand, which we started our thinking from.

-

Here's a mathematical proof, as requested by Michael Lai above.

There is $x$ amount of blue sand in beaker A and $x$ amount of red sand in beaker B. You take $y$ amount of blue sand from beaker A ($y \leq x$) and pour it into beaker B and mix it up. Now beaker A has $x-y$ blue sand in it and beaker B has $x$ red sand in it and $y$ blue sand in it, all mixed up.

Therefore, beaker B is $\frac x{x+y}$% red sand and $\frac y{x+y}$% blue sand.

You now take $y$ sand from beaker B. Because of the percentages above, this sand will contain: $$y*\frac x{x+y}$$ red sand and: $$y*\frac y{x+y}$$ blue sand.

When we add that to beaker A, it now has: $$y*\frac x{x+y}$$ red sand while beaker B has: $$y-y*\frac y{x+y}$$ blue sand. This second formula simplifies to: $$y*(1-\frac y{x+y})$$ $$y*(\frac {x+y}{x+y}-\frac y{x+y})$$ $$y*(\frac {x+y-y}{x+y}$$ $$y*(\frac x{x+y})$$

This is the same as the amount above for the amount of red sand in beaker A.

No Mixing

For the general, no mixing proof, let's take what klm123 says above and apply formal mathematical language to it.

We have a total of $x$ blue sand and $x$ red sand. After an unlimited amount of exchanges (with or without mixing), if the two beakers have the same amount of sand in them they have both returned to $x$ sand.

Beaker A has $a_R$ red sand and $a_B$ blue sand. $a_R + a_B = x$. Similarly, Beaker B has $b_R$ red sand and $b_B$ blue sand. $b_R + b_B = x$

From the first equation above we can get $a_R = x-a_B$

Since the total amount of each color sand has not changed, we also know that $a_R + b_R = x$ and $a_B + b_B = x$. From the first of these two we get $a_R = x-b_R$.

Since $a_R = x-a_B = x-b_R$ then $a_B$ must equal $b_R$

Of course there's the philosophical question that if we mix the two sands together we no longer have red and blue sand but rather some type of purple sand, but that's silly.

-
I don't understand why you need first part if second part (No mixing) completely includes it. –  klm123 Jul 2 at 6:16
You don't for this particular scenario, but it's sometimes informative to work out the specific scenarios as they can provide insight into other specific scenarios. For instance, if you decided to only put some of the sand back from Beaker B into beaker A and wanted to generate a conclusion comparing the amounts of sand, you would need to use the first approach. –  Duncan Jul 2 at 7:40
@Duncan The original substance was water and squash, but I thought I should go for sand because the grains would stay their original colour! Maybe blue and red marbles would have been even better? :) –  Ali Jul 2 at 11:20

A simple scenario to show that you can have equal parts of blue and red sand in both beaker:

• If the cup size is the same the the beaker size then you are essentially combining equal parts of blue and red sand (by taking everything from one beaker and putting it into the other) and then splitting them apart equally (by taking half of the evenly mixed sand in one beaker and putting it back in the other beaker).

To show that this holds regardless of the beaker and cup size (unless the cup volume is bigger than a beaker):

Example: Beaker A and B can hold 18 units of volume, and cup C holds 1 unit of volume, so a half full beaker will hold 9 units of volume.

• Beaker A (9 units of blue sand), Beaker B (9 units of red sand)
• Beaker A (9 units of blue sand + 1 unit of red sand), Beaker B (8 units of red sand)
• Beaker A ((9 units of blue sand - 0.9 units of blue sand) + (1 unit of red sand - 0.1 unit of red sand), Beaker B (8 units of red sand + 0.1 units of red sand + 0.9 units of blue sand)
• Beaker A (8.1 units of blue sand, 0.9 units of red sand), Beaker B (8.1 units of red sand, 0.9 units of blue sand)
-
As long as the quantity ending in each beaker is the same as the starting quantity, you wind up with the same amount of red sand in the blue beaker as blue sand in the red beaker. The argument doesn't depend on the beaker size, just the equality of start and end volumes. –  Ross Millikan Jul 2 at 0:51
Sorry, you are correct. When you write it down on paper instead of working in your head it is a little bit more clear. –  Michael Lai Jul 2 at 1:07