ta6_question

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

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

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 final distance values d [] for each vertex. (c) the different distance values
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

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern