Minimum spanning tree problem