Question

You are given an undirected graph G = (V, E) with positive weights on the edges....

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 find different MSTs. Describe a method that forces Prim’s algorithm to find the same MST of G that Kruskal’s algorithm finds.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Let us Consider the following undirected Graph G

4 2 2 8 3 2

a) Prim’s algorithm :

b) Kruskal’s algorithm :

If we observe the MST's of both Prim’s and Kruskal’s algorithms for given undirected graph G

both are finds the same MST's.

Add a comment
Know the answer?
Add Answer to:
You are given an undirected graph G = (V, E) with positive weights on the edges....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT