import java.util.*; public class A5 { /** process an undirected graph by traversing it, applying Kruskal's algorithm and the related TSP approxmation algorithm, and printing the results of both algorithms. @param g the graph */ private static void processGraph(Graph g) { g.traverse(); Vector v=g.kruskal(); g.traverseEdgeVector(v); v=g.TSPApprox(); g.traverseEdgeVector(v); } public static void main(String[] args) { Random r=new Random(1); Graph g=new Graph(7,r,1); processGraph(g); g=new Graph(7,r,2); processGraph(g); g=new Graph(8,r,10); processGraph(g); g=new Graph(6,r,50); processGraph(g); } }