[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 939 KB, 960x734, 1357784507684.png [View same] [iqdb] [saucenao] [google]
5443841 No.5443841 [Reply] [Original]

You have a truck and 300 gallons of gas. You have to transport the gas, using the truck, to sell at the market 100 miles away. Your truck can carry at most 100 gallons of gas at any time, and it consumes 1 gallon of gas for every mile it travels. What's the maximum amount of gas you can get to the market? You have spare containers so you can leave gas along the way and come back and pick it up if you like.

For example, you could load up your truck with 100 gallons of gas and drive to the market. But then when you got to the market, you'd have no gas to sell, and worse, you would be stranded and could not get back to the rest of your gas.

>> No.5443843

I go and get my grain truck and just use the purple to get there and back so it doesn't cost me a dime.

>> No.5443845
File: 223 KB, 600x460, 1353138362170.jpg [View same] [iqdb] [saucenao] [google]
5443845

"You have to transport the gas, using the truck"

>> No.5443862

easy.. horses pull the truck.. all 300 gallons transported

>> No.5443865

>1 mpg
You should seriously consider patching up that hole in the gas tank, OP.

>> No.5443867

When you say "gas" do you mean actual gas like LPG or do you mean gas like petrol (fuel for cars) as the merikans use it?

>> No.5443875

150 gallons.

>> No.5443886

>>5443865
you do know some trucks get as little as 100m per gallon?

>> No.5443889
File: 281 KB, 980x735, 1357596928019.jpg [View same] [iqdb] [saucenao] [google]
5443889

>>5443867
Fuel
>>5443875
No... not even remotely possible.

It's not that hard a puzzle /sci/ :(

>> No.5443890

>>5443875
Really? I only got 100. How did you get 150?

>> No.5443893

>>5443886
Tanks, maybe. What trucks do you know that get less than 5 mpg?

>> No.5443902
File: 393 KB, 493x342, 1353880407312.gif [View same] [iqdb] [saucenao] [google]
5443902

>>5443890
By doing it wrong, 100 isn't possible either, demonstrate how you got 100?

>> No.5443905

First, drive up from your home to the market with your car (or go walking) and drop two containers alongside the road every mile.

Fill your tank up with 100 gallons of gas and drive to the market. Stop every mile and take the container with you, the truck will be able to bear the weight.

Sell 100 gallons of gas at the market.

Use the containers alongside the road to get back home.

This is all assuming that you have enough containers, enough storage space in your truck for a half of them and a whole lot more.

>> No.5443906

>>5443893
a truck pulling heavy shit.

>> No.5443908

>>5443902
Alright, I can do that because I actually drew it out (but there has to be a more efficient solution...). Hold on a moment.

>> No.5443913

>>5443905
You don't have to return home, just get the maximum amount of gas to the market.


You're moving gas without using the truck..

You guys have quite the aversion to doing math..

>> No.5443914

Fuck you, I'm not an imaginary engineer. Go optimize the number of dicks in your asshole or something, faggot.

>> No.5443915

I got there with 25 gallons to sell (ran out of fuel at the market) and had 25 gallons left at home.

>> No.5443917
File: 51 KB, 803x1092, gas_problem.jpg [View same] [iqdb] [saucenao] [google]
5443917

>>5443908
>>5443902
This is how I drew it out. I'm no paint pro so ask me if you have a question about my solution.

>> No.5443919

>>5443913
You have quite the aversion to explaining a problem properly

>> No.5443920

>>5443917
Like I said, there has to be a more efficient/elegant solution, but this is what I got.

>> No.5443924

>>5443915
I got there with 50

drive out 25 m, drop 25g, drive back
fill up 75g (you now are full with 125g at home), drive out 25m, pick up that 25g, drive out 25 more miles, drop 50g and then drive back home

rest is obvious of course

>> No.5443928

>>5443917
I have no idea what's going there, could you explain it in words/math?

>>5443919
The problem is pretty clear, you're intentionally adding variables that aren't present

>> No.5443935

>>5443924

I think the only way to get that 50 gal drop would be to have 125 gal on the truck, which can only hold 100.

>> No.5443936

>>5443924
Close, but you can do better, consider the way to always be moving the most amount of gas

>> No.5443940

>>5443935
nope

the rest of the solution to selling 50g:

once you arrive back home from dropping off that 50g (tank is currently empty) you fill her up to 100g (leaving 25g at home)

you then drive 50 miles (leaving you with 50g) pick up that 50g you left off (you now have 100g) and then drive the last 50 miles

rest is obvious of course

>> No.5443942

>>5443928
Gladly.
Okay, so there are six lines in my picture so I'll break it into 6 six steps.
1) It's just an initial set-up of the problem. M is the market, H is home. The number on top (300) is the amount of gas you have initially at home. 100% is the percentage of fuel left in your inefficient truck.
2) Start by taking 100 gallons to the midway point between the market and home (hereby denoted M and H, respectively). When you drive back, you'll have no gas left in the truck, so you refill to 100% (in the truck) using 100 of the remaining 200 gallons of gas left at home.
3) You drive the remaining 100 gallons to the midway point. At this point, you only have 50% of your fuel left in the truck.
4) You refill your truck to 100%, effectively using 50 gallons of the gas. There are 150 gallons left.
5) You take 100 gallons over to M and drive back to the midpoint. You have 0% left because driving from the midpoint to M and back uses 100 gallons of fuel.
6) You use the remaining 50 gallons left at the midpoint to drive yourself to H where, being the grateful faggot that he is, OP makes me dinner for the night.

Any other questions?

>> No.5443943

Hire more trucks.

>> No.5443945

>>5443940
Sorry, more accurately I think you are driving back from dropping the 50 gal (at the 50 mi mark unless I've misread) and only using 25 gal to do so.

>> No.5443946

>>5443942
How are you accomplishing 2) ?

"Start by taking 100 gallons to the midway point"

If you left 200 at home, and loaded up the initial 100, when you got the midway point you would have only 50 gallons of gas left, which would mean you would not be able to leave any gas there and still make it home.

>> No.5443948

Is the truck able to carry 100g as cargo PLUS the fuel it's using up, or is it carrying 100g INCLUDING the fuel it's using?

>> No.5443949

>>5443942
>2) Start by taking 100 gallons to the midway point between the market and home (hereby denoted M and H, respectively). When you drive back, you'll have no gas left in the truck, so you refill to 100% (in the truck) using 100 of the remaining 200 gallons of gas left at home.

So you drive to the midpoint and back for no reason? You can't drop anything off at the midpoint because you won't have any gas to get back home.

I find myself wanting to drop off infinitely smaller amounts of gas along the way.

>> No.5443950

>>5443946
Wait, I think there may have been a slight misunderstanding. Does the truck start with a full tank (capable of traveling 100 miles)? I started with that assumption because it seemed valid but if we don't assume that, then my solution is incorrect.

>> No.5443955

>>5443948

"Your truck can carry at most 100 gallons of gas at any time, and it consumes 1 gallon of gas for every mile it travels."

There may only be 100 gallons of gas the that truck is carrying, whether it be in your lap, or in the gas tank.

>> No.5443960
File: 1023 KB, 372x242, 1354510305688.gif [View same] [iqdb] [saucenao] [google]
5443960

>>5443950
Ah, that explains your answer then. I should have been more explicit I suppose.

>> No.5443961

>>5443955
OP should have been clearer in the initial stating of the problem. I wasted a lot time because of a misunderstanding...

>> No.5443962

>>5443960
*grumble* *grumble* At least the problem was interesting and better than any other thread on the board at the moment...

>> No.5443968
File: 2.86 MB, 320x225, 1351740382836.gif [View same] [iqdb] [saucenao] [google]
5443968

>>5443962
Apologies, under your initial assumption 100 would indeed be correct. The problem is far more interesting (imo) as I intended it to be interpreted.

Have an amusing gif as compensation

>> No.5443986
File: 74 KB, 294x312, 31965911.jpg [View same] [iqdb] [saucenao] [google]
5443986

>>5443968
Amusing indeed. Compensation accepted. Thanks.

>> No.5443985

Fill up the tank, drive 33 miles, leave 33 gallons there. Go back to the start and fill up. After travelling 33 miles fill up again, go to market and sell leftover 33 gallons.
Or 100/3 or whatever.

>> No.5443990

I suppose I'll post the answer if no one is still working on it.

~53.33

Anyone interested in the proof?

>> No.5444069

>>5443990
yes

>> No.5444072

In order to use the least amount of gas, you must minimize the amount of time making multiple trips back and forth.

Since we start out with 300g, and we can only hold 100g, we must begin with three trips. The point at which we may begin making only two trips is when the total amount of gas we have is 200g.

To find out where this is I create the following equations:


gas left = x + y + z
200 = x + y + z

d = distance from start

Trip 1: 100 - 2d = x
Trip 2: 100 - 2d = y
Trip 3: 100 - d = z

We can substitute in for x, y, and z, to find d.

200 = 100 - 2d + 100 - 2d + 100 - d
-100 = -5d
d = 20

Thus the first point at which we may begin taking two trips is after traveling 20 miles.

We now have 200 gallons and have traveled 20 miles. Now we need to find the point at which we may make only one trip.

gas left = x' + y'
100 = x' + y'

d' = distance from prior stopping point

Trip 1: 100 - 2d' = x'
Trip 2: 100 - d' = y'

We can again substitute for x' and y' to find d'.

100 = 100 - 2d' + 100 - d'
-100 = -3d'
d' ~= 33.33

So we have 200 gallons left after traveling 20 miles, then 100 left after traveling another 33.33 miles. Thus we have 100 gallons after traveling 53.33 miles from the start. With 46.66 remaining to travel and 100 gallons, we will arrive at the market with ~53.33 gallons.

>> No.5444078

>>5443990
33.3333/....

How are you getting above 5o that makes no sense

You cant drive anymore than a third of the root without getting max dropoff

>> No.5444081

>>5444072
up to 40... here

>> No.5444083

>>5444078
because he doesn't have to go back the last time on his trip

regardless there is a more efficient way I found that utilizes staggered intervals and refueling on return trips with previous dropoffs

>> No.5444086

>>5444078
See above proof in which you are always carrying the maximum amount of gas.

>> No.5444093

>>5444078

I think I get it.

Drive 20 miles, drop off 60 gallons, drive back 20 miles and refill. Repeat twice. You now have 180 gallons at the 80 mile mark and 20 gallons in your truck.

Refuel, drive 33.3~ miles, drop off 33.3~, and return. Repeat You will wind up at the 46.6~ mile mark with 66.6~ gallons of fuel left in the truck. Refuel and you are now at a full tank at a distance of 46.6~ miles.

Drive to the market and you use up 46.6~ gallons leaving you with 100 - 46.6~ = 53.3~ gallons.

Repeat until you

>> No.5444097
File: 170 KB, 467x355, holy dooley.png [View same] [iqdb] [saucenao] [google]
5444097

>>5444093

Fuck that is badly formatted. I had to go over it a few times, obviously.

>> No.5444102

>>5444097
Yep, that's how it's done!

And you know that you can't do better since you are always carrying the maximum amount of gas possible towards the market.

>> No.5444196

>>5443968
It becomes trivial as you interpreted it.