View the step-by-step solution to:

# (All pairs shortest path distances) (1) Given directed network G=(N,A) with arc lengths c_ij. Let d_ij be the shortest path distances between the...

(All pairs shortest path distances)

(1) Given directed network G=(N,A) with arc lengths c_ij. Let d_ij be the shortest path distances between the pair (i,j). If length of one arc (x,y) changes to c_xy ' < c_xy. Show algorithm finds modified all pairs shortest path distances.
1: if d_xy+c_xy ' <0 then network has a negative cycle
2: else
3: for each pair (i,j) do
4: d_ij=min[d_ij,d_ix+c_xy ' +d_yj]

(2) Given G=(N,A), suppose after solving all-pairs shortest path problem, you remember that you forgot 5 arcs from network. Show how by reducing the problem to (1) reoptimize network (with addition of arcs) in O(n^2) time.

### Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

### -

Educational Resources
• ### -

Study Documents

Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

Browse Documents