MDST : Minimum Diameter Spanning Tree for Positively Weighted Undirected Graph

Revision en1, by 0xA28, 2016-05-19 05:06:14

Given positively weighted undirected graph G find a Spanning tree T which has the smallest possible diameter. (Tree diameter :is the maximum path over all the Shortest paths in the tree) Example Problems : http://www.spoj.com/problems/PT07C/ http://www.spoj.com/problems/MDST/

I couldn't find any proper explanation for a solution to this problem, However i observed some cool stuff; if the graph we are dealing with was unweighted graph then we can solve this problem by bruteforcing every possible node and edge(cutting it with dummy node) and assume it as the center of our MDST then get SPT(shortest path tree) from this node and calculate it's diameter, The true MDST will be the one SPT which has the smallest diameter.

But in the Weighted Graph, things will be a little bit different when we try to cut an edge to place our dummy node, Where we should place it to get our MDST ? and is there more than a MDST or just a unique one ?

Note : i found this code by chance, but i couldn't manage to understand it https://github.com/Malatawy15/Algorithms-Library/blob/master/Libraries/Minimum%20Diameter%20Spanning%20Tree.cpp

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English 0xA28 2016-05-20 21:50:14 41
en2 English 0xA28 2016-05-19 05:11:21 30 Tiny change: 's/PT07C/\nhttp://w' -
en1 English 0xA28 2016-05-19 05:06:14 1217 Initial revision (published)