One of these days, as I was revisiting my early high school memories from notebooks, books, love-letters etc, I stumbled upon this simple but also tricky problem:
“One pump can fill up a tank with petrol in 25 minutes.
Another tank can fill up the same tank with petrol in 15 minutes.
If we combine both pumps together, how much time is needed for the tank to be filled?”
You can try solving it on your own, before scrolling to the answer. Don’t spoil it so quickly!
Probably you are bored though and you have better things to do, so you are already searching for the answer. Fair enough. If you think your life doesn’t have to deal with pumps, make your imagination work and consider the problem talking about employees and tasks. Or robots that make cars. Or … warriors killing zombies.
Or you just want to know what the answer is, now that you know the question.
OK, as a good friend who knows the movie, I’ll just post here the result as a hint, before you read the full answer. By having the correct result, you can try to explore the magic behind the numbers and find the answer on your own.
I shall now write that the answer is approximately 9 minutes and 23 seconds. (22.74 secs)
Now a simple step-by-step tutorial on how to get to the answer and avoid common pitfalls. We need to borrow or invent a measure that can make the comparison between the two pumps easier.
For me, the simplest way to achieve this, is to simply represent each pump’s efficiency rating that way:
Let be defined as:
where t is the time, preferably in seconds. The reason we use seconds instead of minutes is to avoid errors due to conversions.
If you know what you are doing, converting from decimal to seconds (1 minute consists of 60 and not 100 seconds) it is actually really easy. However, many people tend to forget the last step and some of them aren’t even aware of it, so use seconds, which after all is an SI unit.
Having all these in mind, we may proceed by finding the frequency for the two pumps separately, after we have converted minutes into seconds. So, 25 minutes is 1500 seconds and 15 minutes is 900 seconds. (Multiplying the minutes by 60)
OK, we’ve done all that, and now we found the frequency – efficiency – power – say-it-however-you-want-it of the super-combined-pump. The only thing to do to convert our findings into reasonable results that answer the initial question is to FLIP them.
And maybe facelift them a bit.
Taking into account that every minute consists of 60 seconds and dividing using Euclidean division, we have:
So, as everyone can see, total time will be 9 minutes and 22.74 seconds.
But perhaps we can improve and formalize the procedure of getting there. I am a software developer and I find the solution a little bit “hard-coded“, so I’ll try to develop a more formal solution to the problem.
Let’s start the abstractions.
First step: “Ratio-Normalization” or
“The power of a pump can be measured by the time a certain pump does to fill the tank divided by one.”
Which can be simply expressed as:
Extending this for 2 pumps:
It is really easy now to extend it for n pumps:
Or, more formally:
The final step in order to get the result in time and not frequency is the following:
Also now known as Sören – Dominic function because it was written on the train from Edinburgh to London King’s Cross,and he was the one with the fancy name on the train.
Memories from Monday 17/12/2012
So, that’s all for now, but I will probably explore more possibilities and usages and I will make another blog post when I will have the time to do so.