minimum spanning tree is optimized