disjoint partitions and union-find structures in this sectionwe consider data structure for managing partition of elements into collection of disjoint sets our initial motivation is in support of kruskal' minimum spanning tree algorithmin which forest of disjoint trees is maintainedwith occasional merging of neighboring trees more generallythe disjoint partition problem can be applied to various models of discrete growth we formalize the problem with the following model partition data structure manages universe of elements that are organized into disjoint sets (that isan element belongs to one and only one of these setsunlike with the set adt or python' set classwe do not expect to be able to iterate through the contents of setnor to efficiently test whether given set includes given element to avoid confusion with such notions of setwe will refer to the clusters of our partition as groups howeverwe will not require an explicit structure for each groupinstead allowing the organization of groups to be implicit to differentiate between one group and anotherwe assume that at any point in timeeach group has designated entry that we refer to as the leader of the group formallywe define the methods of partition adt using position objectseach of which stores an element the partition adt supports the following methods make group( )create singleton group containing new element and return the position storing union(pq)merge the groups containing positions and find( )return the position of the leader of the group containing position sequence implementation simple implementation of partition with total of elements uses collection of sequencesone for each groupwhere the sequence for group stores element positions each position object stores variableelementwhich references its associated element and allows the execution of an element(method in ( time in additioneach position stores variablegroupthat references the sequence storing psince this sequence is representing the group containing ' element (see figure with this representationwe can easily perform the make group(xand find(poperations in ( timeallowing the first position in sequence to serve as the "leader operation union(pqrequires that we join two sequences into one and update the group references of the positions in one of the two we choose to implement this operation by removing all the positions from the sequence with smaller