Consider the following problem: Input: G = (V, E), a graph withn = #V and m = #E. Output: a set of Union-Find data structures, forevery connected component of G there is exactly one Union-Find datastructure.
1 Define an algorithm to solve the above problem. Write theelementary steps in the algorithm with the operations on aUnion-Find data structure.
2 Prove the correctness of your algorithm.
3 Express the running time of your algorithm in n and m. Justifythe formula for the running time.
Expert Answer
An answer will be send to you shortly. . . . .