Unformatted text preview: in a set of real numbers. (See the text for the deFniton of an inversion.) The target time bound is O ( n log n ) for n reals. 5. Let G be a connected, undirected, edgeweighted graph. Prove that G has a unique MST if all the edge weights are distinct. Note: One way to prove this is to observe how Kruskal’s algorithm would operate on this graph. A more instructive way is to prove this result “nonalgorithmically”, by using the notion of a cut. 6. Assume that you are given a set P = { p 1 < p 2 < · · · < p n } of points on the real line; the distance between consecutive points can be arbitrary. We would like to determine the smallest number of closed intervals, each of length 1, to place on the real line so that each point of P is contained in some interval. Describe brie²y a greedy algorithm for this problem and prove it correct via the twostep method. A clear, wellarticulated proof is expected....
View
Full
Document
 Fall '08
 Sturtivant,C
 Algorithms, Graph Theory, Data Structures, Redblack tree

Click to edit the document details