Question: Problem 2 . MSTs In Lecture 2 1 , we saw two different greedy algorithms for building MST - growing a cloud ( Prim '

Problem 2. MSTs
In Lecture 21, we saw two different greedy algorithms for building MST - "growing a cloud" (Prim's algorithm), and "combining clusters" (Kruskal's algorithm). Consider the following graph G, for which we want to build an MST.
a) Show the order in which Prim's algorithm will add edges to the MST, starting at node A. For each edge (u,v) added, show the value for v in the priority queue at the time it was added. What is the total weight of the MST?
b) Repeat (a) but starting at node H. Hint: the total weight of the MST should be the same.
c) Show the order in which Krusgal's algorithm will add edges to the MST. Any time you skip an edge (i.e. it is the next smallest, but not added), note this and explain why.
Problem 2 . MSTs In Lecture 2 1 , we saw two

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 Programming Questions!