0
4.6kviews
To find Dijkstra shortest path from vertex 1 to vertex 4 for following graph.
1 Answer
written 8.4 years ago by |
Source Vertex | Distance with other vertices | Path shown in graph |
---|---|---|
1 | 1– 2,path = 7 1 – 3,path = ∞ 1 – 4,path = ∞ 1 – 5,path = ∞ 1 – 6,path = 3 |
|
6 | 6 – 2,path = 3 + 2 = 5 6 – 3,path = 3 + 5 = 8 6 – 4,path = ∞ 6 – 5,path = 3 + 6 = 9 |
|
2 | 2 – 3,path = 5 + 4 = 9 2 – 4,path = ∞ 2 – 5,path = ∞ |
|
3 | 3 – 4,path = 9 + 8 = 17 3 – 5,path = 9 + 5 = 14 |
|
5 | 5 – 4,path = 14 + 3 = 17 |