CSCI 3104: Algorithms Homework 4 Due at 1:00pm on Wednesday October 17 2012. Sub

    CSCI 3104: Algorithms Homework 4 Due at 1:00pm on Wednesday October 17 2012. Submit your solution electronically at http://moodle.cs.colorado.edu or turn in the paper version before class. Make sure to include your name student id email address and the Honor Code Pledge. 1. Answer the following questions for the graph G given above. You can either compute the results manually or write a program using a language of your choice and print out the results.
    CSCI 3104: Algorithms Homework 4 Due at 1:00pm on Wednesday October 17 2012. Submit your solution electronically at http://moodle.cs.colorado.edu or turn in the paper version before class. Make sure to include your name student id email address and the Honor Code Pledge. 1. Answer the following questions for the graph G given above. You can either compute the results manually or write a program using a language of your choice and print out the results. (a) If using the Bellman-Ford algorithm to find the shortest paths from S to other vertices: (i) draw a table showing the intermediate distance values of all vertices at each iteration of the algorithm; (ii) show the final shortest-path tree. (b) Add 5 to each edge weight such that all edges in the graph have positive weights. Suppose Dijkstras algorithm is run on the new graph G0 with starting node S: (i) draw a table showing the intermediate distance values of all vertices at each iteration of the algorithm; (ii) show the final shortest-path tree. (c) Are the shortest paths found in (a) and (b) the same for each vertex? 2. You are given a strongly connected directed graph G = (VE) with positive edge weights along with a particular node v0 2 V. Give an ecient algorithm for finding shortest paths between all pairs of nodes with the one restriction that these paths must all pass through v0. Describe your algorithm in words or write down the pseudo code. And analyze its time complexity.
    Attachments:

                                                                                                                                      Order Now