So I posed the more generalized question to Monday Math Madness 6, which read:
Start with 500 gallons of mayonaise.
1) Mix in 3 gallons of mayonaise and 7 gallons of ketchup. Stir until completely mixed.
2) Remove 10 gallons of the mixture.
3) Repeat steps 1 and 2 until the mixture is approximately 40% mayonaise and 60% ketchup (200 gallons mayo, 300 gallons ketchup).
How many iterations will it take to do this?
My solution below the fold.
We previously saw that
This is all we need. In this case, and .
Let’s find out how much mayo we’ll have after iterations. We want it to equal 200 gallons. This will be:
However, you’ll note that we have a geometric series for the bit. That actually is the same as . [If you know a formula for an infinite geometric series, think about how you could use that to get this formula.]
This gives us, multiplying everything by :
Keeping all “n”s to one side and getting everything over to the other side, we get:
That can then be solved with simple logarithms. Remember, . So our answer for n is about 98.265. You’ll need to do 98 iterations to get about 200 gallons of mayo in the vat. (It will be 200.26 gallons of mayo for 98 iterations, 199.28 gallons of mayo for 99 iterations.)
I was then interested in using this to find out how many iterations it would take to get to 250 gallons of mayo, or 421 gallons of mayo. So I just graphed it (x-axis is gallons of mayo, y-axis is iterations):
Interesting! There’s a limiting factor — as you do more and more iterations, you get closer and closer to 150. Hmmmmm. Markov Chains anyone?