Assignment 05 - Prim vs Dijkstra

Assignment 05 - Prim vs Dijkstra - 1 Show the tree(without...

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

View Full Document Right Arrow Icon
The Hong Kong University of Science & Technology COMP 271: Design and Analysis of Algorithms Fall 2007 Assignment 5 Assigned: 11/10/07 Due Date: 4pm, 18/10/07 No late submission will be accepted as the solution will be released at 4:30pm. Question 1 : Consider running Prim’s MST algorithm and Dijkstra’s single- source shortest path algorithm on the graph shown below. For Prim’s algorithm, ignore edge orientation and start from vertex s . For Dijkstra’s algorithm, use s as the source vertex. Then the two algorithm result in exactly the same tree.
Image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1. Show the tree (without showing the process of ±nding it). 2. Modify the edge weights so that the two algorithms produce two di²erent trees. The edge weights should be distinct after modiFcation. Show the trees produced. (Hint: You can do this by changing the weight of one edge.) s a b c d 7 2 3 8 9 6 5 1 Notes : You can discuss homework question with your classmates, but you must write up your answers independently. Acknowledge the people with whom you have discussed the assignment. 1...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern