1 / 10

Convex hulls Preliminaries and definitions

Convex hulls Preliminaries and definitions. Transformation of problems We would like to establish lower bounds for performance measures (time and space) for problems (not algorithms!). One reason: to avoid a futile search for an algorithm faster than

ohio
Download Presentation

Convex hulls Preliminaries and definitions

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Convex hullsPreliminaries and definitions Transformation of problems We would like to establish lower bounds for performance measures (time and space) for problems (not algorithms!). One reason: to avoid a futile search for an algorithm faster than the theoretical lower bound for the problem. Generally, proving a lower (or upper) bound is difficult, because it is a proof about all algorithms to solve the problem. There is a technique to do so, useful in some cases: transformation of problems. Suppose there are two problems A and B, which are related so that every instance of A can be solved as follows: 1. Convert the instance of A to a suitable instance of B. 2. Solve problem B. 3. Convert the answer to B to a correct answer to the original instance of A. We say: A has been transformed to B. If the transformation steps 1 and 3 can be performed in a total of O((N)) time, we say that A is (N)-transformable to B, written A(N)B Transformability is not necessarily symmetric. If problems A and B are mutually transformable, they are equivalent.

  2. Lower bound (f(N))- (N) for B (N)-transformable Problem A Problem B Upper bound O(f(N))+ (N) for A Convex hullsPreliminaries and definitions Lower and upper bounds via transformation Under the assumption that the transformation preserves the order of the instance size, the transformation has two properties: Property 1 (Lower bound via transformation). If problem A is known to require at least T(N) time and A is (N)-transformable to B, then B requires at least T(N) - O((N)) time. Otherwise, you could use the transformation to solve A too fast. Property 2 (Upper bound via transformation). If problem B can be solved in T(N) time and A is (N)-transformable to B, then A requires at most T(N) + O((N)) time. You can always solve A via the transformation.

  3. Convex hullsPreliminaries and definitions A known problem Note that the technique assumes that there is a problem with a known lower bound (to use property 1). We have such a problem: SORTING requires (N log N). Lower bound for CONVEX HULL Can we get a lower bound for time for CONVEX HULL? Recall that that the constructed hull H(S) must be given in order. This suggest a connection to SORTING.

  4. y x Convex hullsPreliminaries and definitions Theorem. SORTING is linear-time transformable to CONVEX HULL; SORTING O(N) CONVEX HULL. Therefore, CONVEX HULL requires at least (N log N) time. Proof. We show the transformation. Suppose the instance of SORTING is the set of N real numbers {x1, x2, …, xN}. Transform that set to an instance of CONVEX HULL by converting each real number xi to the point (xi,xi2). O(N) All of these points lie on the parabola y = x2.

  5. y x Convex hullsPreliminaries and definitions Lower bound for CONVEX HULL The convex hull of the converted instance will consist of a list of points, sorted by abscissa. At most one pass through the list will find the smallest and the answer to SORTING can be read off from there in one pass. Takes O(N) time.

  6. Lower bound (N log N) O(N)-transformable SORTING CONVEX HULL Upper bound O(N log N) Convex hullsPreliminaries and definitions Lower bound for CONVEX HULL Note that the O(N) transformation is dominated by the O(N log N) complexity of the problem. As a consequence of this transformation, we know that CONVEX HULL requires at least (N log N) time. Can we find an algorithm for CONVEX HULL that requires O(N log N) time, which will be the best we can do? We have already shown that such an algorithm exists. Thus, the Graham Scan Algorithm .

  7. Convex hullsExtreme points algorithm Extreme points A point p of a convex set S is an extreme point if no two points a, bS exist such that p lines on the open segment ab. Extreme points and the convex hull The set E of extreme points of S (ES) is the smallest subset of S such that H(E) = H(S). E is the set of vertices of H(S). This suggests an algorithm for CONVEX HULL: 1. Find the extreme points E of S. 2. Order the points E so that they form a convex polygon.

  8. Convex hullsExtreme points algorithm Determining if a point is an extreme point If we could determine whether a given point pS was an extreme point in S, then we could find E by testing each point in S. Theorem. A point p fails to be an extreme point of a plane convex set S iff it lies in some triangle whose vertices are in S but is not itself one of the vertices of the triangle. pE pE

  9. Convex hullsExtreme points algorithm Determining if a point is an extreme point There are O(N3) triangles determined by the N points of S. Point enclosure in a triangle can be performed in O(1) time. To determine if p is an extreme point, test it for inclusion in each of the O(N3) triangles. If all fail, pE. Doing so for each point pS requires O(N4) time. (Determining extreme edges has O(N3 ) algorithm…see O’Rourke p.67) pE pE for each i do for each j not equal to i do for each k not equal to i or j do for each l not equal to i, j or k do if pl is in triangle (pi,pj,pk) then pl is non-extreme

  10. Extreme Edge Algorithm for each i do for each j not equal to i do for each k not equal to i or j do if pk is not left or on (pi,pj) then is (pi,pj) non-extreme edge The algorithm runs in O(n**3) time. Actually, the best way to find the extreme points and extreme edges will be to first find the convex Hull and then by a linear scan find the extreme points and edges. This takes O(nlogn) time and it can be shown that this is also the lower bound. However, there is no direct constructive way to find the extreme points taking this amount of time.

More Related