Generalized shortest-paths problem. In Internet routing, there are delays on lines but also, more significantly, delays at routers. This motivates a generalized shortest-paths problem.
Suppose that in addition to having edge lengths {le : e ∈ E}, a graph also has vertex costs {cv : v ∈ V}. Now define the cost of a path to be the sum of its edge lengths, plus the costs of all vertices on the path (including the endpoints). Give an efficient algorithm for the following problem.
Input: A directed graph G = (V, E); positive edge lengths le and positive vertex costs cv; a starting vertex s ∈ V.
Output: An array c o s t [.] such that for every vertex u, cost[u] is the least cost of any path from s to u (i.e., the cost of the cheapest path), under the definition above.
Notice that c o s t [s] = cs.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.