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
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 Prims and Kruskals 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 find different MSTs. Describe a method that forces Prims algorithm to find the same MST of G that Kruskals algorithm finds.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
