The following problem:
An engine (such as a car) begins its journey along a straight road. Its consumption is directly proportional to the distance (for example, 480 km uses one unit of fuel and, therefore, 48 km uses a tenth of the fuel). This engine can transport no more than one unit of fuel.
At the starting point is the supply of fuel blocks n0. At different points of the route there are fuel depots (for example, n1 @ d1, n2 @ d2, etc.), and the driver can unload the fuel anywhere on the route. For example, with a value of 480 km for one device, the driver can move 160 km, create a depot with 1/3 units of fuel and return to the starting point for refueling its engine.
I am looking for an algorithm (or some ideas to find it) to find the maximum distance that can be reached depending on the source of fuel and the depots on the route.
source share