Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

( 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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases

Authors: Ian Robinson, Jim Webber, Emil Eifrem

1st Edition

1449356265, 978-1449356262

More Books

Students also viewed these Databases questions