This preview shows page 1. Sign up to view the full content.
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
This note was uploaded on 11/26/2011 for the course ECE 366 taught by Professor Staff during the Spring '08 term at Michigan State University.
- Spring '08