Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started