1

this is an example problem from an old midterm:

Let G = (V, E) be a connected undirected graph where the edges have positive integer edge weights associated with them, and a vertex s ∈ V is the source. Provide an algorithm that for each vertex t ∈ V reports the minimum last edge weight on a non-decreasing path from s to t (∞ if there is no such path). A path v1, v2, . . . vr is non-decreasing if w(v_i, v_i+1) ≤ w(v_i+1, v_i+2) for i = 1, 2, ...r−2.

Am I correct in thinking that the problem wants me to come up with an algorithm that given a graph with a starting vertex, can find the length of the shortest path, that also has edge weights increasing as you go down the path, to every other vertex it can reach?

Wyatt Grant
  • 87
  • 1
  • 9

1 Answers1

0

The question asks to write an algorithm that provides a path from the source vertex s to a (can be any) vertex t where the weights of the path between s and t increase (or stay the same). It then asks to get the minimum weight of the last edge of all these possible paths.

In other words, you need to see which path from s to t (which should be non-decreasing in weights) gives the lowest weight in the last edge.

Niki van Stein
  • 10,564
  • 3
  • 29
  • 62
  • so if I was to find all possible paths from s to t that increase, then report the path out of those that has the lowest weight in the last edge. that would give a correct (and slow) result, right? – Wyatt Grant Nov 04 '15 at 08:11