25.5 MST Exercises
Last updated
Last updated
Select all valid MSTs in the diagram below.
True/False: It is possible that the only Shortest Path Tree is the only Minimum Spanning Tree.
Run Prim's from A
in the graph below. In what order are vertices visited? Break ties alphabetically.
Run Kruskal's in the graph below. In what order are edges added to the tree? Break ties alphabetically.
Design an algorithm to find the min-product spanning tree; ie the spanning tree with the minimum product of its edges. You may assume all edge weights are > 1.
If we add 1 to the weight of each edge in an arbitrary graph, will the MST created by Kruskal’s change?
True/False: Prim’s Algorithm and Kruskal’s algorithm will always return the same result. If this is true, explain why. If this is false, provide a counterexample, breaking ties alphabetically.
Prove the following, known as the cycle property: Given any cycle in an edge weighted graph (all edge weights distinct), the edge of maximum weight in the cycle does not belong to the MST of the graph.
Simply take the logarithm of each edge weight, then run any MST algorithm on it. This is guaranteed to work since , and minimizing the logarithm of the product is the same as minimizing the product for positive weight edges.