Unformatted text preview: of a negative-weight cycle? A negative-cycle is a cycle with total weight being less than zero. For example, A B C A is a cycle. If the total weight of A B, B C, and C A is negative, this is a negative-weight cycle. (5 pts) 5. Using Warshall’s algorithm to find all-pairs shortest path in the following graph (on page 2). a) Show the matrix D and P for each k. (see the pseudo-code in the lecture notes). For k from 0 to 5, you only need to show matrix cells with changes. (10 pts) b) Show the final all-pairs shortest paths. Describe each path using edges in them. For example, you could describe a path from V1 to V2 as V1 V3 V2 (5 pts) 3 V 5 V 4 -1 6 8 -3 10 -2 V 3 V 2 V 1 -4...
View Full Document
- Spring '08
- Graph Theory, pts, Shortest path problem, textbook problem