# Modifying Kruskal's algorithm for Maximum Spanning Tree

So in our class, we did a proof on Kruskal's algorithm for finding Minimum Spanning Tree. Now, based on that, I have to modify it to find me a Maximum Spanning Tree. I know the idea, taking maximum-cost edges. I also have an idea why this works, because taking maximum edge from the remaining set is just like taking minimum edge from the same graph but with negative weights. My trouble is, I have no idea how to formally write down the proof knowing that Kruskal's algorithm is correct for finding Minimum spanning tree. Can someone help me and say whether I am right, and how I should write this formally, by not having to repeat the whole proof for MST and change a few things? Thanks!

• Kruskal's algorithm does work directly for negative weights. Why can't you just apply it, as it is, but on the graph obtained by negating the edges? – Clement C. Mar 26 '15 at 19:28
• That was my point. The assumption was that weights are positive. So what should I write down? – Luka Bulatovic Mar 26 '15 at 19:29
• Well, exactly this. Since Kruskal's algorithm (Minimum Spanning Tree) works for negative weights as well, use is to compute a Minimum Spanning Tree of the negated-weight graph. This will be a maximum spanning tree of the original graph. – Clement C. Mar 26 '15 at 19:30
• Okay, I get that. I am just confused because it says: describe the algorithm and prove it. Notice: modify some of the known algorithms for MSTs. So is this an actual proof? :S – Luka Bulatovic Mar 26 '15 at 19:32
• It is, as long as you explain why "MinST of negated tree $\Leftrightarrow$ MaxST of original", and state clearly that/why Kruskal's algorithm also works for negative weights. – Clement C. Mar 26 '15 at 19:43