next up previous
Next: Compressed Find Up: KRUSKAL'S ALGORITHM Previous: Proof Of Correctness

Weighted Union

Lemma: With W-UNION, any tree that has k nodes has depth at most tex2html_wrap_inline598 .

figure201

Let tex2html_wrap_inline600 , tex2html_wrap_inline602
d = tex2html_wrap_inline606 , if tex2html_wrap_inline608
= tex2html_wrap_inline610 , if tex2html_wrap_inline612

BASIS: tex2html_wrap_inline614

HYPOTHESIS: for tex2html_wrap_inline616 , depth tex2html_wrap_inline618 tex2html_wrap_inline620

INDUCTION:

I) tex2html_wrap_inline622 tex2html_wrap_inline624
II) tex2html_wrap_inline626 tex2html_wrap_inline628

Lemma: A UNION-FIND PROGRAM of size n does tex2html_wrap_inline632 link operations in the worst case if the weighted union is used.



Sushil Prasad
Thu Nov 4 14:09:59 EST 1999