Graph Reweighting with Vertex Potentials

Show why adding a vertex-potential difference preserves path comparisons and how feasible potentials support repeated shortest-path searches.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. Path costs telescope
  2. Shortest distances can supply feasible potentials

Path costs telescope

Choose a potential \(h(v)\) at each vertex and set \(w'(u,v)=w(u,v)+h(u)-h(v)\). For a path from \(s\) to \(t\), all intermediate terms cancel. The resulting cost is the old cost plus \(h(s)-h(t)\). Comparing paths between fixed endpoints therefore gives the same decisions, even though different individual edges have changed.

Shortest distances can supply feasible potentials

Attach a fresh source with a zero edge to every vertex. Run Bellman–Ford to find its distances \(h\), assuming no negative cycle. The inequalities \(h(v)\le h(u)+w(u,v)\) imply all \(w'\ge0\). For edge weight \(-3\), potentials \(h(u)=0,h(v)=-3\) give new weight zero. Now Dijkstra’s algorithm can run from chosen sources. Convert distances back by removing the endpoint offset. Minimum-cost flow uses the same transformation on residual edges, where every round can change which edges are available.[1][2]

References

  1. Jeff Erickson, Algorithms ↩
  2. MIT OpenCourseWare, Design and Analysis of Algorithms: Lecture Notes ↩