Sometimes we want light spanning trees with certain special properties. Here’s an example.
Input: Undirected graph G = (V, E); edge weights we; subset of vertices U ⊂ V
Output: The lightest spanning tree in which the nodes of U are leaves (there might be other leaves in this tree as well).
(The answer isn’t necessarily a minimum spanning tree.)
Give an algorithm for this problem which runs in O(|E | log |V|) time. (Hint: When you remove nodes U from the optimal solution, what is left?)
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.