SP735 MDST - Minimum Diameter Spanning Tree
Description
Solve the minimum diameter spanning tree problem for the simple graphs.
For a given list of adjacent vertices of a graph G find the minimum diameter spanning tree T and write down the diameter of this tree diam(T).
Each graph has only one connected component, so there is at least one spanning tree, which connects all the vertices.
Input Format
t \[the number of test graphs\]
Graph:
_n_ \[1
Output Format
For each test case output:
_d_ \[diameter of the minimum diameter spanning tree\]