Question: To implement Kruskal's algorithm, we need a disjoint-set data structure that can perform the operations MAKE-SET, FIND-SET and UNION. To get Kruskal's algorithm to run

To implement Kruskal's algorithm, we need a disjoint-set data structure that can perform the operations MAKE-SET, FIND-SET and UNION. To get Kruskal's algorithm to run in time O(E log V), we need this disjoint-set implementation to have the following property: any sequence of m operations runs in O(m logn) time, where n is the number of MAKE-SET operations. Describe an implement of the disjoint-set data structure with the required running time, and prove its correctness and running time. Hint: if you take two trees such that each tree has at least 2h nodes (where h is the height of the tree) and connect the root of the shallower tree to that of the deeper tree, then the resulting tree also has at least 2h nodes (where h is the height of the resulting tree). To implement Kruskal's algorithm, we need a disjoint-set data structure that can perform the operations MAKE-SET, FIND-SET and UNION. To get Kruskal's algorithm to run in time O(E log V), we need this disjoint-set implementation to have the following property: any sequence of m operations runs in O(m logn) time, where n is the number of MAKE-SET operations. Describe an implement of the disjoint-set data structure with the required running time, and prove its correctness and running time. Hint: if you take two trees such that each tree has at least 2h nodes (where h is the height of the tree) and connect the root of the shallower tree to that of the deeper tree, then the resulting tree also has at least 2h nodes (where h is the height of the resulting tree)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
