Suppose we implement the tree-based union-find data structure using the unionby-size heuristic and a partial path-compression heuristic.

Question:

Suppose we implement the tree-based union-find data structure using the unionby-size heuristic and a partial path-compression heuristic. The partial path compression in this case means that, after performing a sequence of pointer hops for a find operation, we update the parent pointer for each node u along this path to point to its grandparent. Show that the total running time for performing m union and find operations, starting with n singleton sets, is still O((n+m)α(n)) in this case.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Algorithm Design And Applications

ISBN: 9781118335918

1st Edition

Authors: Michael T. Goodrich, Roberto Tamassia

Question Posted: