Question: Given the following edge - weighted graph: 6 , 1 5 0 - 1 , 1 . 3 0 - 2 , 5 . 2
Given the following edgeweighted graph:
a Show a trace of the execution of Kruskal's Algorithm on this graph.
Your trace should be in the style of the trace shown on page of
the text.
b How many elements are inserted into the priority queue used by Kruskal's
algorithm when computing the MST for this graph?
c How many elements of the priority queue do you consume before the algorithm
completes computing the MST
d Show a trace of the execution of the eager version of Prim's Algorithm on
this graph. Your trace should be in the style of the trace shown on page
of the text.
e As Prim's algorithm executes, how many elements of each of the edgeTo and
distTo arrays must be updated each time an edge is added to the MST
f Which of the two algorithms is a better choice for computing the MST for
this graph? Why?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
