Problem 34 (points): For the graph G = (V, E) with weight w: E → R > 0 in Figure 1:
1. Use Dijkstra's algorithm to compute the shortest paths from vertex a to all other vertices.
2. Use Prim's algorithm to find the minimum spanning tree, with vertex a being the root.
Figure 1: G = (V, E)
You can use Table 1 and Table 2 to describe the execution of the two algorithms respectively.
Vertices Iterations Considered
1 a
2 b
3
4
5
9
7
b
d
e
P
T
d
T
P
8
T
d
8
a
8
8
9
a
12
Table 1: Running Dijkstra's algorithm on the graph in Figure 1.