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 vertices and edges. Apply Dijkstra's Algorithm on the graph above, to determine the shortest distance from vertex 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 to 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 ie 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 FG EF EDEC DF DB CB BE BA AD
Using the above order, apply the BellmanFord 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.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
