Question & Answer: Given the following weighted undirected graph, show the order the edges would be a…..

7. Given the following weighted undirected graph, show the order the edges would be added for building a spanning tree using Kruskals and Prims algorithm. Take the following figure as an example, order edges added using two algorithms. In addition, how many edges will be picked up to build the tree? Why? Show your process. [15 points] v3 yw! 10 v6 v7

Given the following weighted undirected graph, show the order the edges would be added for building a spanning tree using Kruskal’s and Prim’s algorithm. Take the following figure as an example, order edges added using two algorithms. In addition, how many edges will be picked up to build the tree? Why? Show your process.

Expert Answer

 

The kruskals and prim’s algorithms both are used to find the spanning tree from the given graph that to with the minimum edges.

These both algorithms are same to find the minimum spanning tree but the only difference is the procedure it follows.

The below is the spanning tree using Kruskals Algorithm:-

In kruskals algorithm it first starts with the minimum cost edge of vertexes and then it keeps on going by selecting all the remaining cheapest cost vertex in the tree until all the vertices is visited or no cycle is formed.

Question & Answer: Given the following weighted undirected graph, show the order the edges would be a..... 1

Question & Answer: Given the following weighted undirected graph, show the order the edges would be a..... 2

The below is the spanning tree with Prims Algorithm:-

In prims algorithm it first starts at the source vertex and then it selects the cheapest possible edge from current vertex to another vertex by selecting arbitrarily untill all the vertices in the graph is selected once. There must be no cycle in the newly creating spanning tree.

Question & Answer: Given the following weighted undirected graph, show the order the edges would be a..... 3

Question & Answer: Given the following weighted undirected graph, show the order the edges would be a..... 4

Still stressed from student homework?
Get quality assistance from academic writers!