Minimum spanning tree algorithm ---