Describe how to use a B-tree to implement the partition (union-find) ADT
(from Section 14.7.3) so that the union and find operations each use at
mostO(logn/logB) disk transfers.
Suppose we are given a sequenceSofnelements with integer keys such
that some elements inSare colored “blue” and some elements inSare
colored “red.” In addition, say that a red elementepairswith a blue
elementfif they have the same key value. Describe an efficient externalmemory
algorithm for finding all the red-blue pairs inS. Howmany disk
transfers does your algorithm perform?
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here