ta6_question

ta6_question - d assigned to vertex b , as the algorithm...

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

View Full Document Right Arrow Icon
COMP 271H Design and Analysis of Algorithms 2006 Fall Semester Tutorial 6 1. Execute Dijkstra’s algorithm on the following digraph, where s is the source vertex. 6 1 2 1 3 4 s a c b You need to indicate only the following: (a) the order in which the vertices are removed from the priority queue. (b) the Fnal distance values d [] for each vertex. (c) the di±erent distance values
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: d assigned to vertex b , as the algorithm executes. 2. Give a simple example of a directed graph with negative-weight edges for which Dijk-stra’s algorithm produces incorrect answers. Why does the correctness proof of Dijkstra’s algorithm not go through when negative-weight edges are allowed? 1...
View Full Document

Ask a homework question - tutors are online