HW1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Solution for CS 529 Homework 1 Jihui Zhao Question 1.

10 First of all, given an extremal point p on the convex hull of circles, p is on some circle s because its an extremal point. And it has a unique supporting tangent line of s which is also the tangent line of the convex hull. So ConvexHull(S ) must be smooth in the sense that each point has unique supporting tangent line. (a) Consider all possible lines (rays) l such that no part of ConvexHull(S ) is on its left side and l ConvexHull(S ) = . There are two cases: (i) l ConvexHull(S ) is a single point p, then l is the tangent line at p on the boundary of some circle s S since p is an extremal point. In this case, every points in circles of S \{s} has a positive distance away from l. Its easy to check that the arc around p of s is on the convex hull. (ii) l ConvexHull(S ) contains many points. In this case, l must be the common tangent line of two circles. And the line segment between 2 tangent points is on the convex hull. This case does not occur only if all the unit circles are the same. (b) (Prove by contradiction) Suppose that some circle s appears at least twice. So there are at least 2 dierent arcs of s on ConvexHull(S ). Removing 2 arcs, we consider the remaining one a with length less than , let a1 and a2 be its end points. Then a1 and a2 are both extremal points. And l1 , the tangent line at a1 is on the convex hull. So there exists a circle t which is tangent to l1 also, but this is impossible because such a circle t will make a2 be in the interior of ConvexHull(S ). (c) If s is on ConvexHull(S ), there exists a line l separates s from other centers. Shifting l by unit distance towards s , we get l . Then all points on circles in S \{s} is on the one sides of l and some point p in circle s is on the other sides of l . So s is on ConvexHull(S ). On the other hand, if s is an interior point of ConvexHull(S ), let G be the set of extremal points of ConvexHull(S ). Then for any point p s, p is an interior point of ConvexHull(G + p s ) which consists a point g + p s from circle g for each g G . So p is within ConvexHull(G), and circle s doesnt occur on ConvexHull(S ). (d) Given (c) we can describe an O(n log n) running time algorithm as: 1. Find the convex hull of centers, and save them in linked list: O(n log n) 2. For each center in the linked list, nd the tangent line segment of the circle to its neighbor circle, we save these endpoints in order. The number of operations is O(n) since there are at most n unit circles on the convex hull. The output will be endpoints: If two neighbors are on the same circle, it represent an arc, otherwise its a line segment. (e) Here we follow the paper of David Rappaport [1]. The algorithm is in divide-and-conquer way: we recursively separate set S with 2 equal size subsets arbitrarily, then calculate the convex hulls for each subsets and combine two sub convex hulls into one hull. To show the algorithm is O(n log n), we only need to show that: (1) The total number of arcs and line segments on the convex hull is O(n). Notice that one particular circle can occur O(n) times, but the pattern u..., v, ..., u, ...v, ... cannot occur since we are dealing circles. This is a Davenport-Schinzel sequence with parameter 2, its maximal length is 2n 1. See for example [2] . (2) We can merge two sub-convex hulls in O(n) time. We will use the following algorithm: (i) INIT: We start from a norm vector n, i.e., the norm vector of the vertical line. Using this norm 1

vector, we can nd two lines l1 , l2 tangent to each sub convex hull respectively. And nd the arcs/line segment where li s are the supporting tangent line. (ii) Find the next segment until we proceeded all arcs on sub convex hulls. For each step, we deal with at most 4 circles, 2 from each sub convex hull. We can nd next segment on the convex hull and update n in constant time. Since the total number of segments is O(n), the number of updates is also O(n). Note: We may keep the endpoints of sub convex hulls in 2 queues and using an algorithm similar to line sweeping. But we change the slope of the sweeping lines for each step.

References
[1] David Rappaport. A convex hull algorithm for discs, and applications, Computational Geometry: Theory and Applications, vol 1(3), 1992. [2] M. Sharir, P.K. Agarwal. Davenport-Schinzel Sequences and their Geometric Applications. Cambridge University Press, 1995.

You might also like