Question: An undirected weighted graph G is given below: 2 6 5 5 Figure 16: An undirected weighted graph has 6 vertices, a through f, and

 An undirected weighted graph G is given below: 2 6 5

An undirected weighted graph G is given below: 2 6 5 5 Figure 16: An undirected weighted graph has 6 vertices, a through f, and 9 edges. Verter d is on the left. Vertex f is above and to the right of vertex d. Verter e is below and to the right of vertex f, but above verter d. Vertex c is below and to the right of vertex e. Vertex a is above verter e and to the right of verter c. Verter b is below and to the right of vertex a, but above vertex c. The edges between the vertices and their weight are as follows: d and f, 1; d and e, 4; f and e, 2; e and a, 2; f and a, 3; e and c, 5; c and a, 7; c and b, 5; and a and b, 6. (a) Use Prim's algorithm to compute the minimum spanning tree for the weighted graph. Start the algorithm at vertex a. Show the order in which the edges are added to the tree. (b) What is the minimum weight spanning tree for the weighted graph in the previous question subject to the condition that edge {d, e} is in the span- ning tree? (c) How would you generalize this idea? Suppose you are given a graph G and a particular edge fu, v} in the graph. How would you alter Prim's algorithm to find the minimum spanning tree subject to the condition that {u, v} is in the tree

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