Skip to content

Instantly share code, notes, and snippets.

@Pistos
Created September 12, 2012 03:21
Show Gist options
  • Save Pistos/3704093 to your computer and use it in GitHub Desktop.
Save Pistos/3704093 to your computer and use it in GitHub Desktop.
Math Riddle
There are each a cup of milk and a cup of coffee (same amounts).
First you transfer one spoon of milk into the coffee.
After achieving an optimal mixture, transfer one spoon of the milky coffee into the milk.
Is there more coffee in the milk or more milk in the coffee?
Start with:
V amount of milk
V amount of coffee
Transfer a spoonful of milk, S
V-S milk
V coffee + S milk ; a V:S coffee:milk proportion
Cup 2 now contains V+S liquid. S amount of milk, V amount of coffee.
S/(V+S) is the fraction of milk in the mixture,
V/(V+S) the fraction of coffee.
(These fractions add up to one: S/(V+S) + V/(V+S) = (S+V)/(V+S) = 1)
So the fraction of coffee can also be expressed in terms of the fraction of milk:
1 - S/(V+S) coffee
A spoonful of cup 2 would contain:
S * (S/(V+S)) milk
S * (1 - S/(V+S)) coffee
S - (S*S)/(V+S) coffee
Transfer a spoonful from cup 2 back to cup 1:
Cup 1 therefore has (V-S) + S*(S/(V+S)) of milk, and S*(V/(V+S)) coffee
Cup 2 has V - S - (S*S)/(V+S) coffee, and S - S*(S/(V+S)) milk:
We see that each cup has the same amount of their original liquids:
V - S - S*S/(V+S)
Answer: Neither cup has a greater proportion of one substance than the other.
Start with:
100 ml milk
100 ml coffee
Transfer a spoonful of milk (5ml):
95 ml milk
100 ml coffee + 5ml milk ; a 20:1 coffee:milk proportion
Transfer a spoonful from cup 2 back to cup 1:
95 ml milk + 20:1 proportion of 5 ml of mixture
100 ml mixture of 20:1.
Cup 1 therefore has 95 + 0.24ml of milk + 4.76ml coffee
Cup 2 has 95.24 ml coffee, 4.76ml milk.
Answer: Neither cup has a greater proportion of one substance than the other.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment