simple MST

random graph generation, need to optimize the algorithm