| « Dark Life | Jobs & Pain » |
Circular Functions, Iterative Endpoints... gah!
I've spent all day here trying to figure out how I'm going to do this. You see I've got this little quandary. Let me lay it down for you.
Follow up:
You have these tonnages of stuff right? Let's call the different types of stuff X, Y & Z. So you have a specific tonnage for each of them, let's say X has A Tonnes, Y has B Tonnes, and Z has C Tonnes. With me so far?
Ok so now what you want to do is divide up each of those piles and split them up into two new bunches of stuff. So you're gonna have the stuff you want to keep (retain) and the stuff you want to throw away. To figure out what you want to throw away you have a percentage that you know.
So you know you want to keep 50% of X, and 25% of Y. So to figure out how much you have left you would do:
A * (50/100) = Amount of X to keep (Xk)
And likewise for Y it would be:
B * (25/100) = Amount of Y to keep (Yk)
Everything we didn't keep has been thrown away. Still with me? Good.
But what about Z I hear you ask? Well the thing is, instead of knowing how much of the original pile of Z you want to keep, you actually only know what percentage of the whole pile you are keeping that needs to be Z (Zp).
So now you have Xk, Yk and Zp.
No you need to get Zk so you know how much you have right? Well that seems pretty straightforward at first. Since Zp is a percentage of the whole, everything else must be 100-Zp.
So to get Xp we do:
((Xk + Yk) / (100-Zp)) * Xk = Xp
And likewise for Yp we do:
((Xk + Yk) / (100-Zp)) * Yk = Yp
And we then also know that Zk has to be:
((Xk + Yk) / (100-Zp)) * Zp = Zk.
Still with me? You're doing well. But this is all well and good until we introduce a little something extra. Here's the deal... X, Y, and Z are not the only piles of stuff we start off with. The total tonnage of stuff we have is actually much larger (there could be another 20 different piles of stuff). And here's the thing; we do not know how much of that we are keeping and how much we are throwing away.
So Zp is not just referring to:
(Zk / (Xk + Yk + Zk))/100
It's actually referring to:
(Zk / (Xk + Yk + Zk + Uk))/100!!!
Where Uk is a completely unknown quantity. How do you solve an equation with two unknowns? This is year 11 maths and I can't do it. Answer it for eternal respect. Comments welcome.