Question: To implement operations like make set, union, and find set on disjoint sets, two data structures: linked lists and directed forests, have been introduced for
To implement operations like make set, union, and find set on disjoint sets, two data structures: linked lists and directed forests, have been introduced for representing the disjoint sets. (i) In the linked list representation, there is a heuristic for performing the union operation of two linked lists into one, what is the name of this heuristic? Explain the heuristic briefly. (ii) In the use of the directed forest data structure to represent the disjoint sets, the two heuristics path compression and union by rank are introduced. 1. Explain the two mentioned heuristics briefly.2. Show that a converted tree with the root rank k (k 0) in the directed forest contains at least 2 k nodes.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
