Question: You are given an undirected graph G = (V,E) with positive weights on the edges. If the edge weights are distinct, then there is only
You are given an undirected graph G = (V,E) with positive weights on the edges. If the edge weights are distinct, then there is only one MST, so both Prim's and Kruskal's algorithms will find the same MST. If some of the edge weights are the same, then there can be several MSTs and the two algorithms could nd di erent MSTs. Describe a method that forces Prim's algorithm to find the same MST of G that Kruskal's algorithm finds.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
