Question: 6. Consider the union-find data structure using disjoint-set forests with union by rank. Prove that for each node its rank value is equal to the

6. Consider the union-find data structure using disjoint-set forests with union by rank. Prove that for each node its rank value is equal to the depth of its subtree. (Providing that the rank is computed as described in class.) 7. Consider the union-find data structure using disjoint-set forests with union by rank. Explain why the rank values cannot exceed logn. 8. Consider the union-find data structure using disjoint-set forests, with union by rank and path compression. (a) Explain why path compression does not affect the ranks of the roots. (b) Show an example where the rank value is not equal to the depth of a tree
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
