Algorithms for updating minimal spanning trees