Question: ( a ) Consider the following weighted undirected graph with 7 vertices and 1 1 edges. Apply Dijkstra's Algorithm on the graph above, to determine

(a) Consider the following weighted undirected graph with 7 vertices and 11 edges. Apply Dijkstra's Algorithm on the graph above, to determine the shortest distance from vertex G to each of the other six vertices (A, B, C, D, E, F). Clearly show all of your steps.
(b) Now suppose we change the weight of edge EF from +8 to -8. What happens?
Using this example, explain why Dijkstras Algorithm can produce incorrect outputs when one or more edges are negative.
(c ) Lets convert the above graph to a directed graph, where each edge is pointed in one direction i.e., xy means the edge goes from x to y. We will also make some of our edge weights negative.
Suppose our edges (and weights) are listed in this order: GE=+9, FG=+11, EF=+8, ED=15,EC=+5, DF=+6, DB=+9, CB=8, BE=+7, BA=7, AD=+5.
Using the above order, apply the Bellman-Ford Algorithm to determine the shortest distance from the source vertex A to each of the other six vertices in the graph. Clearly show your steps.
 (a) Consider the following weighted undirected graph with 7 vertices and

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!