hw6-1 - of a negative-weight cycle? A negative-cycle is a...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE331 homework 6 (Due by the class on Nov. 8th Tuesday) All the textbook problems are in the 3 rd edition. If you don’t have the 3 rd edition, please borrow your classmates’ or mine. 1. Do textbook problem 9.5. Please list each shortest path using the edges in the path. If you choose to draw the paths in the graph, you need to use different colors to differentiate each path. (a. 10 pts, b. 5 pts) 2. Do textbook problem 9.7.a. (only part a). Please draw the graph and explicitly show the wrong path. Since you only need to provide one negative example, feel free to draw this path in the figure. (5 pts) 3. Do textbook problem 9.10.b. (only part b). (10 pts) 4. How can the output of the Floyd-Warshall algorithm be used to detect the presence
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

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.

Ask a homework question - tutors are online