Show that if all of the unions precede the finds then the


1. Suppose we want to add an extra operation, remove(x), which removes x from its current set and places it in its own. Show how to modify the union/?nd algorithm so that the running time of a sequence ofunion, find, and remove operations is O(Mα(MN)).

2. Show that if all of the unions precede the finds, then the disjoint sets algorithm with path compression requires linear time, even if the unions are done arbitrarily.

3. Prove that if unions are done arbitrarily, but path compression is performed on the finds, then the worst-case running time is 8(log N).

4. Prove that if unions are done by size and path compression is performed, the worst- case running time is O(Mα(MN)).

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Show that if all of the unions precede the finds then the
Reference No:- TGS01274719

Expected delivery within 24 Hours