Search code examples
algorithmcomputational-geometryconvex-hull

The minimum perimeter convex hull of a subset of a point set


Given n points on the plane. No 3 are collinear.

Given the number k.

Find the subset of k points, such that the convex hull of the k points has minimum perimeter out of any convex hull of a subset of k points.

I can think of a naive method runs in O(n^k k log k). (Find the convex hull of every subset of size k and output the minimum).

I think this is a NP problem, but I can't find anything suitable for reduction to.

Anyone have ideas on this problem?

An example,

the set of n=4 points {(0,0), (0,1), (1,0), (2,2)} and k=3

Result:

{(0,0),(0,1),(1,0)}

Since this set contains 3 points the convex hull of and the perimeter of the result is smaller than that of any other sets of 3 points.


Solution

  • This can be done in O(kn^3) time and O(kn^2) space (or maybe O(kn^3) if you want the actual points).

    This paper: http://www.win.tue.nl/~gwoegi/papers/area-k-gons.pdf

    by Eppstein et al, has algorithms to solve this problem for minimum perimeter and other weight functions like area, sum of internal angles etc which follow certain constraints, even though the title says minimum area (See Corollary 5.3 for perimeter).

    The basic idea is a dynamic programming approach as follows (read the first few paragraphs of Section 4):

    Suppose S is the given set of points and Q is the convex hull of k points with minimum perimeter.

    Let p1 be the bottom-most point of Q, p2 and p3 are the next points on the hull in counter-clockwise order.

    We can decompose Q into a triangle p1p2p3 and a convex hull of k-1 points Q' (which shares the side p1p3 with triangle p1p2p3).

    The main observation is that Q' is the optimal for k-1, in which the bottommost point is p1 and the next point is p3 and all the points of Q' lie on the same side of the line p2->p3.

    Thus maintaining a 4d array of optimum polygons for the each quadruple (pi, pj, pk, m) such that

    • the polygon is a convex hull of exactly m points of S.
    • pi is the bottom most point of the polygon.
    • pj is the next vertex in counter-clockwise order,
    • all points of the polygon lie to the left of the line pi -> pj.
    • all points lie on the same side of pj->pk as pi does.

    can help us find the optimum polygons for m=k, given the optimum polygons for m <= k-1.

    The paper describes exactly how to go about doing that in order to achieve the stated space and time bounds.

    Hope that helps.