Question: Consider the Generic SSSP algorithm on Page 4 of Lecture 21 (from Prof. Jeff Erickson's notes). (In class, I have been calling this the Danzig-Ford

Consider the Generic SSSP algorithm on Page 4 of Lecture 21 (from Prof. Jeff Erickson's notes). (In class, I have been calling this the Danzig-Ford algorithm (version 2)). As you know, when all edge weights are non-negative, if we use a min-heap priority queue implementation of the bag data structure, we get Dijkstra's algorithm and this runs in O (m log n) time on graphs with n vertices and m edges. So we have a pretty efficient algorithm, when edge weights are all non-negative. What about when some edge weights can be negative, but there are no negative cycles? Section 21.6 in Prof. Erickson's notes describes an algorithm that he calls Shamble's algorithm that rims in O (m middot n) time, solving the SSSP problem even when there are negative edge weights, provided there are no negative cycles. This algorithm is more commonly known as the Bellman-Ford algorithm. Execute Shimbel's algorithm on the graph given above. As in the figure at the top of Page 7, after each phase (i) show all the dist (middot) values, (ii) all the vertices that were in the queue during the phase that just ended, and (iii) all the edges that were relaxed in the phase that just ended. Use induction to prove the following claim that appears in the box on Page 6: After i phases of the algorithm, dist (upsilon) is at most the length of the shortest walk from s to upsilon consisting of at most i edges. Consider the Generic SSSP algorithm on Page 4 of Lecture 21 (from Prof. Jeff Erickson's notes). (In class, I have been calling this the Danzig-Ford algorithm (version 2)). As you know, when all edge weights are non-negative, if we use a min-heap priority queue implementation of the bag data structure, we get Dijkstra's algorithm and this runs in O (m log n) time on graphs with n vertices and m edges. So we have a pretty efficient algorithm, when edge weights are all non-negative. What about when some edge weights can be negative, but there are no negative cycles? Section 21.6 in Prof. Erickson's notes describes an algorithm that he calls Shamble's algorithm that rims in O (m middot n) time, solving the SSSP problem even when there are negative edge weights, provided there are no negative cycles. This algorithm is more commonly known as the Bellman-Ford algorithm. Execute Shimbel's algorithm on the graph given above. As in the figure at the top of Page 7, after each phase (i) show all the dist (middot) values, (ii) all the vertices that were in the queue during the phase that just ended, and (iii) all the edges that were relaxed in the phase that just ended. Use induction to prove the following claim that appears in the box on Page 6: After i phases of the algorithm, dist (upsilon) is at most the length of the shortest walk from s to upsilon consisting of at most i edges
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
