Write a modified Dijkstra algorithm for:
A problem is whether a vehicle is able to traverse from anylocation to any location in the graph with a constrain - a vehiclecan only fill up its tank 'x' times.
Notes:
- Vehicle starts empty
- The graph is an undirected graph with weight as how much thefuel is being consumed.
- Every vertex has a gas station.
- How much the fuel tank can hold is 'y'
Hints:
- The shortest path is not always possible (with the limitedtimes we can fill up the fuel tank).
Write a modified Dijkstra algorithm for: A problem is whether a vehicle is able to traverse from any location to any loc
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am