Question

Assume that we have an algorithm A for computing a minimum spanning tree of a graph...

Assume that we have an algorithm A for computing a minimum spanning tree of a graph G that takes as an input the cost matrix C whose entries are positive numbers. We want to compute a maximum spanning tree of G using A, but are not allowed to modify A; instead we can modify the cost matrix C. Outline an algorithm for computing the maximum spanning tree of G.

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

If we are not allowed to modify algorithm, we can modify the cost matrix. Each value of cost matrix can be multiplied by -1 so that maximum cost edges become the minimum cost edges and then we can apply the above algorithm to the new cost matrix. After the creation of minimum spanning tree, multiply all weight by -1 again to get maximum spanning tree. This method can be used to create maximum spanning tree.

Add a comment
Know the answer?
Add Answer to:
Assume that we have an algorithm A for computing a minimum spanning tree of a graph...
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