Optimal Enclosure Problems
We consider the following "fence enclosure" problem: Given a set $S$ of $n$ points in the plane with values $v_{i} \geq 0$, we wish to enclose a subset of the points with a fence (a simple closed curve) so as to maximize the "value" of the enclosure. The value of the enclosure is defined to be the sum of the values of the enclosed points minus the cost of the fence. We consider various versions of the problem, such as allowing $S$ to consist of points and/or simple polygons. Other versions of the problems are obtained by restricting the total amount of fence available and also allowing the enclosure to consist of up to $K$ connected components. We show that the problem for a bounded length fence is $NP$-complete . Additionally we provide polynomial-time algorithms for many versions of the fence problem when an unrestricted amount of fence is available. When the set $S$ consists of points and the fence is unrestricted in length we solve the problem via an $O(n^{3})$ time sweep-line algorithm; we give an alternative $O(n^{3})$ time algorithm based on finding shortest paths in directed graphs, and generalize it to handle various cases in which $S$ is a set of polygons. When $K greater than 1$ components are permitted we obtain a polynomial-time algorithm (for consistent $K$).