cos423: Theory of Algorithms | handout #7 |
Michael Goldwasser | |
Princeton University | Tuesday, February 17, 1998 |
Homework #4: | Binomial and Fibonacci Heaps, Disjoint Set Operations |
Due Date: | Tuesday, March 3, 1998 (9:00am) |
This week's homework will ask you to simulate, by hand, many of the data structure operations which we have been covering in class. You must work entirely on your own this week . Due to the nature of the problems, we will not be giving any practice exercises this week, however the textbook works through several examples of operations during the chapters, and you should consider understanding those examples as perfect practice for this homework.
(Exercise 22.3-4 of CLR.)
Show that any sequence of m Make-Set, Find-Set, and Union operation, where all the Union operations appear before any of the Find-Set operations, takes only O(m) time if both path compression and union by rank are used. What happens in the same situation if only the path-compression heuristic is used?
Copyright © 1993, 1994, 1995, 1996, 1997, Nikos Drakos, Computer Based Learning Unit, University of Leeds.