Page 1 of 1

Write a modified Dijkstra algorithm for: A problem is whether a vehicle is able to traverse from any location to any loc

Posted: Fri Jul 01, 2022 5:51 am
by answerhappygod
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).