graph/kruskalalgorithm