using 3 as a source illustrate Dijkstra algorithm to determi

using 3 as a source, illustrate Dijkstra algorithm to determines the shortest path from vertex 3 to any other vertices. Find out the shortest path weights foe vertex 3 to any destination vertex.


Solution

To find the shortest path ,first we have to check,

weather it is a directed graph or undirected graph.

All the edges should have nonnegative weights.

here our graph is directed and connected.

As it is mentioned that our source is 3, first we have to check our destination.

now how to find destination is, see the edge which is pionted to it by other edges with particular weights and see that no weight is established to other edges, from this edge. here in our graph we have edge 6 pointed by all other edges with corresponding weights.

the shortest path to travel from edge 3 to 6 is 5. as it is directly connected and weight is less when compared to other weights.

for example lets take path 3-->1-->4-->6, add the weights of path the weight 3--->1 is 4,1--->4 is 1, 4-->6 is 8, total sum is 4+1+8=13, simillarly remaining when compared with all, the shortest path is3---->6 with weight 5.

using 3 as a source, illustrate Dijkstra algorithm to determines the shortest path from vertex 3 to any other vertices. Find out the shortest path weights foe v

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site