a Consider the weighted directed graph shown in Figure 1,and consider computing the single source all shortest paths.
(i) Explain the main ideas behind Dijkstra's algorithm in brief. [5 marks] (ii) Show how Dijkstra's algorithm works step by step from the single source node A to all others for the graph shown in Figure 1. [20 marks] (iii) Show the shortest paths from the node A to all other nodes based on your answer of (ii). [5 marks]
10
23
22
24
Figure 2: A weighted undirected graph
(b) Show step-by-step how a minimum cost spanning tree is computed for the undirected graph as depicted in Figure 2 using the Kruskal's algorithm. [15 marks]