Prove that if path halving is performed on the finds and


1. The disjoint set analysis in Section 8.6 can be re?ned to provide tight bounds for small N.

a. Show that C(MN, 0) and C(MN, 1) are both 0.

b. Show that C(MN, 2) is at most M.

c. Let ≤ 8. Choose = 2 and show that C(MNr) is at most N.

2. Suppose we implement partial path compression on find(i) by making every other node on the path from to the root link to its grandparent (where this makes sense). This is known as path halving.

a. Write a procedure to do this.

b. Prove that if path halving is performed on the finds and either union-by-height or union-by-size is used, the worst-case running time is O(Mα(MN)).

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Prove that if path halving is performed on the finds and
Reference No:- TGS01274720

Expected delivery within 24 Hours