graphs the third operation that must be performed is the merging of the sets containing and this is where the partition comes in handy having found the root of the two treeswe simply make the root of one of the trees point to the root of the other tree we end up with this partition after merging these two sets , , , , , , , , , , , , , , , , , , , , , at this point in the algorithmthe tree rooted at has been altered to be rooted at instead that' all that was needed to merge the two sets containing vertex and the root of one tree can be made to point to the root of the other tree when two sets are merged into one the partition data structure combines the three required operations from sect into one method called samesetandunion this method is given two vertex numbers the method returns true if the two vertices are in the same set ( have the same rootif they do not have the same rootthen the root of one tree is made to point to the other and the method returns false the samesetandunion method first finds the roots of the two vertices given to it in the worst case this could take (| |time leading to an overall complexity of (| | howeverin practice these set trees are very flat for instancein the example presented in this the average depth of the set trees is meaning that on average it takes comparisons to find the root of set tree in graph with vertices and edges to consider adding to the minimum weighted spanning tree another example containing vertices and edges had an average set tree depth of the average complexity of this samesetandunion method is much better than the solution considered in sect the average case complexity of samesetandunion is much closer to (log| |this means that the second part of kruskal' algorithmusing this partition data structureexhibits (| |log| |complexity in the average case in connected graph the number of edges must be no less than one less than the total number of vertices sorting the edges takes (| |log| |time and the second part of kruskal' algorithm takes (| |log| |time since the number of edges is at least on the same order as the number of vertices in connected graph the complexity (| |log| |< (| |log| |so we can say that the overall average complexity of kruskal' algorithm is (| |log| |in practicekruskal' algorithm is very efficient and finds minimum weighted spanning tree quickly even for large graphs with many edges dijkstra' algorithm edsger dijkstra was dutch computer scientist who lived from to in he published short paper [ that commented on kruskal' solution to the minimum spanning tree problem and provided an alternative that might in some cases be more efficient more importantlyhe provided an algorithm for finding the this copy belongs to 'acha