Let denote a simple, strongly connected digraph with a vertex set and an edge set , and let denote a network obtained from by assigning a real value ot each edge as its weight.
A directed edge from a vertex to a vertex is denoted by and its weight is writen as .
Define the distance from a vertex to a vertex to be the minimum summation of weights of edges in a simple path from to in .
A directed cycle is called a negative cycle if the sum of edge weights in the cycle is negative.
Answer the following questions.
(i) Prove that has no negative cycle if there is a set of real weights such that
(ii) Prove that has a negative cycle if there is a pair of a vertex and an edge such that
(iii) Assume that the weight of each edge is non-negative.
For a subset and a vertex , let be an edge that minimizes among all edges directed from to .
Prove that .
(Note: this question is actually asking a proof of correctness of Dijkstra's algorithm)
Since the weight of each edge is non-negative, there does not exist negative cycle.
By the contrapositive of Question (2), since there is no negative cycle, for every edge
Hence
Any path from to must go through an edge from to .
Hence, let denote a shortest simple path from to .
Let be the first edge on that crosses from to and let and denote the subpaths of .
Then,