This is a classic "jeep problem" (desert crossing) variant. The tanker starts with 3000 gallons at Port A, must travel 1000 miles to Port B, loses 1 gallon per mile, and has capacity 1000 gallons. The goal is to maximize delivered oil.
Key insight: The optimal strategy uses intermediate depots and shuttles oil forward in stages, each stage moving a certain amount of oil a certain distance while consuming fuel for round trips. The number of trips decreases by one each stage.
Let D=1000 miles, capacity C=1000 gallons, initial fuel F=3000 gallons. Consumption is 1 gallon per mile.
General principle: To move n full loads (i.e., n×1000 gallons) a distance d, you make n forward trips and n−1 return trips, consuming (2n−1)d gallons. The amount delivered forward is nC−(2n−1)d.
Stage 1: Start with 3000 gallons at A, i.e., n1=3 loads. Move forward distance d1 such that after shuttling we have exactly n2=2 loads (2000 gallons) at the next depot. Fuel consumed: (2⋅3−1)d1=5d1. Remaining: 3000−5d1=2000⇒d1=200 miles.
Stage 2: At mile 200, we have 2000 gallons (n2=2 loads). Move forward distance d2 to reduce to 1 load (1000 gallons). Fuel consumed: (2⋅2−1)d2=3d2. Remaining: 2000−3d2=1000⇒d2=33331 miles.
Stage 3: At mile 200+33331=53331, we have 1000 gallons (n3=1 load). Drive directly to B, which is 1000−53331=46632 miles away. Fuel consumed: 46632 gallons. Delivered: 1000−46632=53331 gallons.
Thus the maximum deliverable is 53331 gallons, which rounds to 533 gallons.
Verification: Total fuel consumed = 5×200+3×33331+1×46632=1000+1000+46632=246632 gallons, matching 3000−53331. Total distance traveled = same sum, confirming consumption rate.