Question: a. Does Prim's algorithm always work correctly on graphs with negative edge weights? b. Apply Prim s algorithm on the following graph. Show the construction
a. Does Prim's algorithm always work correctly on graphs with negative edge weights? b. Apply Prim s algorithm on the following graph. Show the construction of the minimum spanning tree at each step. Start at vertex a. What is the total weight of the spanning tree? c. Let T be a minimum spanning tree of graph G obtained by Prim's algorithm. Let G_new be a graph obtained by adding to G a new vertex and some edges with weights, connecting the new vertex to some vertices in G. Can we construct a minimum spanning tree of G_new by adding one of the new edges to T? If you answer yes, explain how; if you answer no, explain why not. d. Prove that any weighted connected graph with distinct weights has exactly one minimum spanning tree
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
