Algorithms for updating minimum spanning trees