結果 : construct the minimum spanning tree for the given graph using prim's algorithm