hw09Section1 - slide set lecture11graphs2.pdf and also on...

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

View Full Document Right Arrow Icon
CSE331 Section 1 Homework 9 Due: Friday April 4, 2008 at 11:59am Submit your answers via Handin or on paper under the door of EB 3134. Problems are from the Weiss text. 1. Problem 9.7, part (a), on page 397. Show how your solution results in the wrong an- swer. Try to keep your graph as small as possible. 2. Problem 9.10 part (a). List only the statements in Dijkstra’s algorithm that need to be changed. Let count[u] to be the number of different minimum paths from the starting vertex v to vertex u. Assume that all the edge weights are positive. The definition of path cab be used to define what “different paths” are. 3. Find the all pairs shortest paths on the following graph. The algorithm is given in the
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: slide set lecture11graphs2.pdf and also on page 453 of your text. A E D C B 2 6 3 8 4 1 7 2 Show the operational table that lists steps, array D, and array P. 4. (a) Apply the all-pairs shortest path algorithm to the graph you gave for the answer of Problem 1. (b) Does this algorithm terminate properly and does it give correct results for all paths? (c) What is the running time of all-pairs? (d) What is the memory use? 5. Problem 9.15 on page 398. In your solutions, to break ties, use alphabetical ordering (if you have to select between an edge A-D and B-C, choose A-D). Do not use this ordering for part (b). Be sure to show the all important steps as the data structures change....
View Full Document

Ask a homework question - tutors are online