[Math] Finding maximum area k-gon given a set of points

algorithmsgeometry

I posted this question on stackoverflow and was redirected here, as this was a mathematical problem.

I was trying to solve a practice problem in the topcoder arena: http://topcoder.bgcoder.com/print.php?id=417

According to my understanding the aim of the problem is to find a $k$-gon of maximum area, given a set of Points $D$ and $k\leq n$, $n$ is a fixed value.

Let the Convex Hull of $D$ = $C(D)$

If $n=3$, i have proved that such a triangle can be constructed by assuming that it's vertices are a subset of $C(D)$.
So it was quite easy to come up with a solution for $k=3$ : https://stackoverflow.com/a/1621913/4126652

However, for n>3, i have no idea how to do this.
Can anyone help solving the problem?

Here is how i tried:

Let $|C(D)| = l$ i.e the convex hull is an $l$-gon,

If $n > l$ the $k$-gon with maximum area will be the convex hull itself, i.e $C(D)$

if $n < l$ i am pretty sure that the vertices of the maximal k-gon will be a subset of C(D), i couldn't prove it for $k>3$, and i am unable to come up with an algorithm to solve even if this is a correct assumption.

Best Answer

After breaking my head for a few hours, i figured out the solution.

It is a dynamic programming problem:

Let $dp(m,o,r)$ denote the maximum area $r$-gon such that the starting vertex is $m$ and the ending vertex is $o$.

Then recurrence relation will be:

$dp(m,o,r) = \max\limits_{\forall n: \lbrace m<n<o \rbrace} (dp(m,n,r-1) + area(m,n,o))$

where $area(m,n,o)$ is the area of the triangle formed by vertices $m$,$n$ and $o$

Related Question