原书出处
Introduction to Algorithms, Fourth Edition
22 第22章 单源最短路径
If G contains a negative-weight cycle, then there is no feasible solution for the system.
Proof We first show that if the constraint graph contains no negative-weight cycles, then equation (22.10) gives a feasible solution. Consider any edge (vi, vj) ∈ E. The triangle inequality implies that δ(v0, vj) ≤ δ(v0, vi) + w(vi, vj), which is equivalent to δ(v0, vj)−δ(v0, vi) ≤ w(vi, vj). Thus, letting xi = δ(v0, vi) and xj = δ(v0, vj) satisfies the difference constraint xj − xi ≤ w(vi, vj) that corresponds to edge (vi, vj).
Now we show that if the constraint graph contains a negative-weight cycle, then the syste
原书定位详情
来源:a19c7933-4eda-4176-aebd-30fe7e1ad292
正文位置:extracted/Introduction to Algorithms, Fourth Edition/_epub-src/OEBPS/chapter022.xhtml
EPUB SHA-256:ec7ced04bb875b93983816aef7a667855a4b71c5cf53b63406b9439c74e27aea