Math/CS Question

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

DrPizza

Administrator Elite Member Goat Whisperer
Mar 5, 2001
49,601
167
111
www.slatebrookfarm.com
Also, I've come up with a solution - or at least a damn good approximation, using pre-calculus & a bit of chemistry. We'll pretend we're pouring out less than an atom at a time.

Let's start with Avogadro's number. About 6 x 10^23 molecules per mole. A gram of water is about 18 grams. So that we over-estimate the number of atoms in paint, let's say that a gallon of paint is 5 kilograms (about 11 pounds). That's 277ish, call it 300 moles of water. 3 atoms per mole & we have 3 * 300 * 6 x 10^23 atoms. =5.4 x 10^26 atoms. Let's call it 10^27 atoms. So, if we mix it atom by atom, we need to figure out what [(10^27-1)/(10^27)]^(10^27) is. Set it equal to x. take the log of both sides & apply the rules of logs & you have (10^27)[log(10^27-1) - log (10^27)]=log x

After a few fun steps, log x = -0.43429448
So, x = 10^-0.43429448
x = .3678794412


Awwww, mjrpes, you're not supposed to give the OP the answer in that form. :p
 

Matthiasa

Diamond Member
May 4, 2009
5,755
23
81
now what if you had 3 buckets. Red, yellow, and blue. Yellow drips into blue, blue into red. Same assumptions as before. When yellow bucket runs out, what is the concentration of the different pigments in the other 2 buckets. When blue runs out, what is the concentration in the red bucket? Differential equations are fun.

just no!

:p

Besides the real fun starts when you add in real mixing and the fall distance and stopping the instant the top can of those 3 are empty so that there is still paint in the air...

Differential equations get really ugly really quick. :(
Even simple systems become nonlinear and high order...
 
Last edited:

DrPizza

Administrator Elite Member Goat Whisperer
Mar 5, 2001
49,601
167
111
www.slatebrookfarm.com
How's this?

The amount of green left in the can is 1/(1/0! + 1/1! + 1/2! + 1/3! + 1/4! + 1/5! + 1/6! + 1/7! + 1/8!+ 1/9! + 1/10!+...)
 

DrPizza

Administrator Elite Member Goat Whisperer
Mar 5, 2001
49,601
167
111
www.slatebrookfarm.com
Or, how about this - the hat check problem. There are n guests who attend a party. At the door, each guest gives his hat to a butler who then puts the hat into labeled boxes. But, the butler doesn't know the names of the guests, so he just puts the hats into boxes selected at random. The probability that none of the hats are put into the correct box as the number of guests approaches positive infinity is equal to the fractional portion of green paint remaining in your paint can.

:>D
 

DrPizza

Administrator Elite Member Goat Whisperer
Mar 5, 2001
49,601
167
111
www.slatebrookfarm.com
You'll do some of the easier ones in Calc BC. When you take a full on Differential Equations class you'll be exposed to many different types of differential equations.

They're sort of like integrals in that you have to figure out what form your problem is in, then use that specialized solution.

Depends on the differential equations course. I've taken one at two different universities. The first one concentrated on different methods of solving them, depending on whether they were first order linear, 2nd order linear, etc. The 2nd university taught the course more from an applied mathematics perspective. Stationary points, attractors, repellers, discriminants, tons of vector fields, etc.

The two approaches were so different that I had to take the 2nd course when I went back to get a degree in applied mathematics. I'm probably going to be taking 3 or 4 grad level math courses in the next couple years to sharpen my skills - maybe I'll run into some other differential equations course. :p
 
Last edited:

Matthiasa

Diamond Member
May 4, 2009
5,755
23
81
Or, how about this - the hat check problem. There are n guests who attend a party. At the door, each guest gives his hat to a butler who then puts the hat into labeled boxes. But, the butler doesn't know the names of the guests, so he just puts the hats into boxes selected at random. The probability that none of the hats are put into the correct box as the number of guests approaches positive infinity is equal to the fractional portion of green paint remaining in your paint can.

:>D

Thats mean.
If you want to do math so bad ummm solve something from my notes today of a simple system without linearizing or using math software.

[2/3*(m+M)L-mL/2*cos^2(c)](d^2c)/(dt^2)+mL/2*[sin(c)*cos(c)](dc/dt)^2 - (m+M)gsinC+rcos(c)= 0

Or somethign like that... How do we get get decent looking equations here?
 

chuckywang

Lifer
Jan 12, 2004
20,133
1
0
This was a puzzle question I heard but I'm not what the answer is or how to approach it using differential equations.

Say you have two paint buckets, both of the same size, one with red paint and one with green paint (containing the same amount of paint). Now one bucket is above the other bucket, and both buckets have a hole at the bottom that leak at the same rate. So as red paint leaks out of the top bucket, green paint is leaking out of the bottom bucket at the same rate. Finally, assume mixing occurs instantly. What is the ratio of red paint to green paint when the top bucket is empty?

Let R(t) be the volume of red paint in the bottom bucket at time t.
Let G(t) be the volume of green paint in the bottom bucket at time t.
Let F(t) be the volume of the red paint in the top bucket at time t.

Obviously R(t) + G(t) = V is a constant volume at all times t. You know that R(0) = 0 and G(0) = V.
Also F(t) = V - r*t where r is the rate of leakage.

Now, think about the rate of change of the green paint in the bottom bucket. It is coming out at a rate of
-r*G(t)/V

So we know that G'(t) = -r*G(t)/V

This is a differential equation and it has an initial point of G(0) = V.
The solution is G(t) = V*e^(-r/V*t) (I'm guessing if you're taking Diff. Eq. then you know how to solve this simple differential equation).
So R(t) = V*(1 - e^(-r/V*t))

The time when the top bucket is empty is t = V/r.
So R(t)/G(t) = (1-1/e)/(1/e) = e - 1 when the top bucket is empty.
 
Last edited: