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
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]