Question: help Question3 Question 4 (20 marks) Consider the following graph G. The label of an edge is the cost of the edge. 9 a b

help Question3
help Question3 Question 4 (20 marks) Consider the following graph G. The

Question 4 (20 marks) Consider the following graph G. The label of an edge is the cost of the edge. 9 a b d 6 1 10 e 2 f 5 g 1. Using Prim's algorithm, draw a minimum spanning tree (MST) of the graph Also write down the change of the priority queue step by step and the order in which the vertices are selected. Is the MST drawn unique? (i.e., is it the one and only MST for the graph?) [5 marks) 2. Using Kruskal's algorithm, draw a minimum spanning tree (MST) of the graph G. Write down the order in which the edges are selected. Is the MST drawn unique? (i.e., is it the one and only MST for the graph?) (5 marks) 3. Referring to the same graph above, find the shortest paths from the vertex a to all other vertices in the graph G using Dijkstra's algorithm. Show the changes of the priority queue step by step and give the order in which vertices are selected. (10 marks) N.B. There may be more than one solution. You only need to give one of the solutions

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!