Embed
Email

PS3

Document Sample

Shared by: ajizai
Categories
Tags
Stats
views:
1
posted:
12/1/2011
language:
English
pages:
1
COS 423 Problem Set No. 3 Due Wed. March 26th

Spring 2003



No Collaboration







1. Consider the disjoint set union algorithm using path compression but naïve union.

Prove that, for arbitrary n, this algorithm can spend (nlogn) time to complete a

sequence of O(n) intermixed unite and find operations on n initial singleton sets.

Hint: Consider the effects of a path compression on a tree consisting of a root with

one child, itself the root of a binomial tree.





2. In light of Problem 1, the O(m (n)) amortized bound for union by rank with path

compression does not hold for naïve union with path compression. Explain where the

proof of the O(m (n)) bound given in class (class notes, class lecture, CLRS pp. 509-

517) breaks down when applied to naïve union with path compression.



3. Prove an upper bound of O(m log n) for the time to complete a sequence of

m  n intermixed unite and find operations on n initial singleton sets using naïve

union and path compression, thereby proving that the lower bound in Problem 1 is

tight to within a constant factor for m  O(n). Hint: consider as a potential function

the one used to analyze splay trees for the unit weight case; namely, the potential of a

nodex is the log of its number of descendants, and the total potential is the sum of the

node potentials.



Related docs
Other docs by ajizai
Fall 2010
Views: 0  |  Downloads: 0
Math 111
Views: 0  |  Downloads: 0
Training_listing_275360_7
Views: 1  |  Downloads: 0
C4-051739
Views: 0  |  Downloads: 0
DEFINITIONS
Views: 0  |  Downloads: 0
Unit POPULATIONS
Views: 0  |  Downloads: 0
albhed
Views: 0  |  Downloads: 0
price_list
Views: 9  |  Downloads: 0
By registering with docstoc.com you agree to our
privacy policy

You are almost ready to download!

You are almost ready to download!