NLP Formulation for Polygon Optimization Problems

: In this paper, we generalize the problems of ﬁnding simple polygons with minimum area, maximum perimeter, and maximum number of vertices, so that they contain a given set of points and their angles are bounded by α + π where α (0 ≤ α ≤ π ) is a parameter. We also consider the maximum angle of each possible simple polygon crossing a given set of points, and derive an upper bound for the minimum of these angles. The correspondence between the problems of ﬁnding simple polygons with minimum area and maximum number of vertices is investigated from a theoretical perspective. We formulate these three generalized problems as nonlinear programming models, and then present a genetic algorithm to solve them. Finally, the computed solutions are evaluated on several datasets and the results are compared with those from the optimal approach.


Introduction
Polygons are one of the fundamental objects in the field of computational geometry. Simple polygonization is a way to construct all possible simple polygons on a set of points in the plane. Global optimization problems, such as optimal area and perimeter polygonization [1,2], are of major interest to researchers and arise in various application areas, such as image processing [3,4], pattern recognition [3,5,6], geographic information systems (GIS) [7], sensor networks [8,9], and so on.
Minimum-and maximum-perimeter polygonization problems are known as the traveling salesman problem (TSP) and the maximum traveling salesman problem (Max-TSP), respectively, which are NP-complete problems [1,10]. Fekete considered a set of points on the grid and showed that the problems of minimum area polygonization (MAP) and maximum area polygonization (MAXP) on that set of points are NP-complete [2]. Recently, it has been shown that computing an α-concave hull (as a generalization of MAP) is still NP-hard [11].
To the best of our knowledge, little attention has been paid to the constraint on the internal angles of polygons in previous studies [12][13][14]. In this paper, we explore the optimum polygonization such that the internal angles of the polygons are bounded. Here, we define α-MAP, α-MPP, and α-MNP as the problems of computing simple polygons containing a set of points in the plane with minimum area, maximum perimeter, and maximum number of vertex points, respectively, such that all internal angles of the polygons are less than or equal to π + α. We consider α-MAP, α-MPP and α-MNP as generalizations of computing the convex hull, and formulate them as nonlinear programming models.
For a set S of points in the plane and for k ≥ 2, an algorithm for finding k convex polygons that covers S is presented in [15], such that the total area of the convex polygons is minimized. Also, for k = 2, another algorithm is presented, to minimize the total perimeter of the convex polygons.
There are many NP-complete problems such as TSP [16], packing problems [17], convex shape decomposition [18], and the path planning problem [19] that can be formulated as integer programming Figure 1 shows that the polygon P assigns the points {b 1,1 , b 2,1 , b 3,1 } to the edge e 1 , the point {b 1,2 } to the edge e 2 , and so on. The inner points of P are unassigned. We assume that c j is assigned to e j .

Notation Description
S A set of points in the plane n cardinality of S s i ith point of S (1 ≤ i ≤ n) CH convex hull of S m number of vertices of CH IP inner points of CH P a simple polygon containing S V P vertices of P E P edges of P r cardinality of IP c j jth vertex of CH (1 ≤ j ≤ m) e j jth edge of CH (1 ≤ j ≤ m) P a simple Polygon containing S s i s j an edge of P with s i and s j as its end points (1 ≤ i, j ≤ n, i = j) ℘(S) set of all simple polygons containing S Area(P) area of polygon P Perimeter(P) perimeter of polygon P Boundary(P) number of vertices of P α an angle between 0 and π MAP problem of computing a simple polygon containing S with minimum area MPP problem of computing a simple polygon containing S with maximum perimeter MNP problem of computing a simple polygon containing S with maximum number of vertices CHP problem of computing convex hull of S SPP problem of computing a simple polygon crossing S AB the measure of arc AB

Modeling
In this section we present nonlinear programming models for α-MAP, α-MPP, and α-MNP. We first introduce the indices, input data, and variables that are used in our models, and then formulate the required functions.

Indices
The following indices are utilized to formulate the problems α-MAP, α-MPP, and α-MNP as binary nonlinear programming models: • i ∈ {1, 2, ..., n} is an index counting the points of S. The point s n+1 is identified by s 1 , and the point s n+2 is identified by s 2 . • j ∈ {1, 2, ..., m} is an index counting the edges in E CH and the vertices in V CH . The edge e m+1 is identified by e 1 , and the vertex c m+1 is identified by c 1 . • k ∈ {0, 1, ..., r} specifies the order of assigned points for an edge of convex hull. b k,j is the kth point which is assigned to e j . Assume that c i is assigned to e i at the position 0.

Input Data
The input data is as follows: • n is the number of points in S.
is the constraint for angles.

Variables
In this model, we have n × m × r variables, denoted by z, which is defined as follows: Z i,j,k is a binary variable such that Z i,j,k = 1 iff the point s i is assigned to e j at the position of k. In Figure 1, Assume that b 3,1 is the tenth point of S. Since b 3,1 is assigned to e 1 at the position of 3, we have Z 10,1,3 = 1.

Functions
The functions used in this model are listed below.
• Area(P) is the area of the polygon P. • Perimeter(P) is the perimeter of the polygon P. • Boundary(P) is the number of vertices of the polygon P. • X(a) is the x-coordinate of the point a in the plane. • Y(a) is the y-coordinate of the point a in the plane. • X(j, k) is the x-coordinate of the kth points that is assigned to e j .
• Y(j, k) is the y-coordinate of the kth points that is assigned to e j .

Models
Here, we present the nonlinear programming formulations for α-MAP, α-MPP, and α-MNP. We first formulate the functions Adjust, Con f lict and Angle as follows: The Adjust function is used to determine if two points are adjacent to each other in the polygon, the Con f lict function is used to check if the polygon is simple and the Angle function is used to compute the angle between two edges to verify the angular constraint.

Conflict function
To compute the conflict function, consider the following expression: So, the function Con f lict(i 1 , i 2 , i 3 , i 4 ) is computed as follows: Based on the mentioned notation, P is simple if ∀i 1 ,

Angle function
The polygon P is an α-polygon iff ∀i 1 , i 2 , i 3 ∈ {1, 2, ..., n} such that The angle between two line segments A and B can be computed as follows: Based on the mentioned notation, let If 3.6.1. Modeling α-MAP α-MAP is the problem of computing the α-polygon with the minimum area on a set of points. Since ℘(S) is the set of all simple polygons containing S, α-MAP can be formulated as follows: min P∈℘(S) Area(P) such that All internal angles of P are less than or equal to π + α As seen in Figure 1, each polygon P ∈ ℘(S) assigns the points of S to the edges of CH. Therefore, each simple polygon containing S is equivalent to an assignments of the points of S to the edges of CH, and each assignment is determined by an evaluation of Z i,j,k for all i, j, k. In the following, the area function is formulated as an objective function of the model. Theorem 1. Let P ∈ ℘(S) be a simple polygon and Z be the corresponding assignment for P. The area of P is computed as follows: Proof. Based on the Shoelace formula (also known as the surveyor's formula [50]), the area of a polygon P = (p 1 , p 2 , ..., p l , p 1 ) is: As an example, assume that P is the polygon of Figure 2. So, p 1 = s 1 , p 2 = s 5 , p 3 = s 6 , p 4 = s 10 , and , thus we have: Since the points s 5 and s 1 are assigned to e 1 at positions 1 and 0, respectively, we have: In the same way, Based on the above equations, we employ the below formula for T 1 ,T 2 , and T 3 so that: Equation (15) cannot be used for T 4 : In other words, Equation (15) can be used while the points are assigned to the same edge. In Equation (14), for T 4 , the point p 5 = s 11 is assigned to e 2 while the point p 4 is assigned to e 1 . Based on Equation (1), since ∀i ∈ {1, 2, ..., n}, Z i,1, (2) can be used to compute X(p 5 ).
Based on Equation (16): Since, based on Equation (1), X(1,k) is equal to 0 for all k ≥ 4, we have: Hence, in order to avoid extra summation, we employ the following equation: From Equation (19), for all k ≥ 5 we have: Considering the points that are assigned to e j , Equation (19) can be extended as follows: Based on Equation (11), the area of the polygon P is computed as follows: From Equations (1), (2) and (22), we have: Based on Theorem 1, Equation (9) is formulated as follows: In Equation (24), constraint (a) considers all assignments of the points while constraint (b) prevents assigning a point to more than one edge. The point s i is unassigned if Σ m j=1 Σ r k=1 Z i,j,k = 0, and assigned to one edge if Σ m j=1 Σ r k=1 Z i,j,k = 1. Also, constraint (b) prevents assigning a point to more than one position on an edge. In addition, constraint (c) guarantees that the constructed polygon is simple, while constraint (d) ensures that it is an α-polygon.
When α = 0, the solution of Equation (24) is an assignment that constructs the convex hull of the points, and when α = π the solution of Equation (24) is an assignment that constructs M as the solution of MAP on the points. There is an algorithm to compute CH in O(n log n) time [51], while MAP is NP-complete. Figure 3 illustrates the solution of α-MAP on a set of points for different values of α. Perimeter(P) such that All internal angles of P are less than or equal to π + α Let P = (p 1 , p 2 , ..., p l , p 1 ) be a polygon containing S. The perimeter of P is the total length of its edges: By using Z as the corresponding assignment for P, similar to Theorem 1, the perimeter of P is computed as follows: Based on Equations (25) and (27), we have the following formula for α-MPP: When α = 0, the solution of Equation (28) is an assignment that constructs the convex hull of the points, and when α = π it is an assignment that constructs E as the solution of MPP, which is known as Max-TSP, on the points. There is an algorithm to compute CH in O(n log n) time, while Max-TSP is a well-known NP-complete problem. Figure 4 illustrates the solution of α-MPP on a set of points for different values of α. All internal angles of P are less than or equal to π + α As stated before, Z i,j,k is equal to 1 iff the point s i is assigned to the edge e j at the position k. Hence, the following equation specifies the number of vertex points for the constructed polygon P: Similar to α-MAP and α-MPP, α-MNP is formulated as follows: When α = 0, the solution of Equation (31) is an assignment that constructs the convex hull of the points, and when α = π the solution of Equation (31) is an assignment that constructs C as the solution of MNP on the points. C is a simple polygon that crosses all points. There are optimal algorithms to compute CH and C in O(n log n) time. Figure 5 illustrates the solution of α-MNP on a set of points, for different values of α.

Theoretical Results
In this section, we present our theoretical results. As stated before, α-MNP will be converted into CHP and SPP when α = 0 and α = π, respectively, which are solvable in polynomial time. When α = π, the constructed polygon crosses all points. For each set S of points, the smallest value of α such that α-MNP crosses S is computed in the next subsection.

Upper Bound for α in α-MNP
For each polygon P ∈ ℘(S), assume that γ P is the maximum angle of the polygon P. Let θ be the minimum value of γ P over all P ∈ ℘(S) that crosses S. For all α ≥ θ − π, there always exists an α-polygon that crosses S. In other words, the polygon P such that γ P = θ, satisfies α-MNP for all α ≥ θ − π. Here, we present an upper bound for θ, on any set of points.
In Theorem 2, it is shown that 2π − 2π 2 r−1 m can be interpreted as an upper bound for θ, and in Theorem 3 this bound is improved. In the following, we design an algorithm to construct a simple polygon containing S which satisfies these bounds. Let us first define the concept of a "sweep arc", and then prove some lemmas.   Let e j be an edge of the polygon P. We denote the major segment with length of β that corresponds to e j by M Proof. Let β j be the angle subtended by e j at the point x and β M be the maximum angle. Let e be the edge that corresponds to β M . Since Σ m j=1 β j = 2π, we have β M ≥ 2π m and the corresponding arc of β M is more than 4π m . Hence, the measure of the sweep arc on the edge e at x is less than 2π − 4π m , (see Figure 7). Lemma 2. Let P be a convex polygon, {e 1 , e 2 , ..., e m } be the edges of P and β max = 2π − 4π m . The entirety of P is covered by all major segments with length of β max that correspond to the edges of P, i.e., P ⊂ ∪ m j=1 M β max j (see Figure 8). Proof. To prove the lemma by reductio ad absurdum, suppose that there exists a point x inside the polygon P and outside of all the major segments. Since the measures of all major segments are equal to 2π − 4π m , there is no edge e such that the sweep arc on e touches x at the measure β ≤ 2π − 4π m , i.e., ∀j ∈ {1, 2, ..., m}, x / ∈ M β max j . This contradicts Lemma 1.

Remark 1.
Suppose that the convex hull of S has n − 1 edges; that is, one point is inside the convex hull. Based on Lemma 2, 2π − 2π n−1 is an upper bound for θ over all simple polygons containing S. It is noteworthy that this bound is tight. The tightness is achieved when the inner point is at the center of a regular n-gons, as illustrated in Figure 9. In the following, we generalize the upper bound for any set S of points, and then present an algorithm to generate a polygon containing S that satisfies the generalized upper bound. However, let us first consider a sweep arc on an edge to measure β max that includes a set of n points.

Lemma 3.
Let e = c 1 c 2 be a line segment and S be a set of n points inside the major segment corresponding to e, such that the measure of major arc is β max = 2π − 4π m for an integer number m (see Figure 10a). There exists a chain (s 1 , s 2 , ..., s n ) on S such that all internal angles ofŝ i in the polygon (c 1 , s 1 , s 2 , ..., s n , c 2 , c 1 ) are greater than or equal to 2π 2 n−1 ·m (see Figure 10b). Proof. Here, we employ the sweep arc algorithm to construct the polygon.

Algorithm 1 (Sweep Arc Algorithm)
Let us sweep the arc from measure 0 to β max on e = c 1 c 2 . By so doing, the polygon is constructed, while the arc hits the points. In the following, we show how to construct the polygon step by step.
On the first hit: Let x 1 be the first point that the sweeping arc meets. We construct the polygon by connecting x 1 to c 1 and c 2 . Since the maximum measure of the arc is β max , the internal angle ofx 1 in the triangle (c 1 x 1 c 2 ) is greater than or equal to 2π m (see Figure 11). Figure 11. Angle ofx 1 is greater than or equal to 2π m .
On the second hit: Let x 1 be the first point that the sweeping arc meets and x 2 be the second one. Also, let e 1 = c 1 x 1 and e 2 = c 2 x 1 be two constructed edges in the previous step. The edges e 1 and e 2 divide the sweeping arc into 3 parts; the arc B 1 where e 1 is visible but e 2 is not visible from all the points on it; the arc B 2 where e 2 is visible but e 1 is not visible from all the points on it; and finally the arc B 3 where e 1 and e 2 are visible from all points on it (see Figure 12).

Case 1.
If x 2 is placed on B 1 : The angle c 1 x 2 x 1 is greater than c 1 x 2 c 2 , and the angle c 1 x 2 c 2 is greater than or equal to 2π m . Hence, the angle c 1 x 2 x 1 is greater than 2π m . Since the internal anglesx 2 andx 1 are greater than 2π 2m , we consider the polygon (c 1 x 2 x 1 c 2 c 1 ) as the constructed polygon.

Case 2.
If x 2 is placed on B 2 : Based on the same reason mentioned above, the angle c 2 x 2 x 1 is greater than 2π m . Since the internal anglesx 2 andx 1 are greater than 2π m , we consider the polygon (c 1 x 1 x 2 c 2 c 1 ) as the constructed polygon.

Case 3.
If x 2 is placed on B 3 : In contrast to the previous cases, the angles c 1 x 2 x 1 and c 2 x 2 x 1 are less than c 1 x 2 c 2 , but the maximum of c 1 x 2 x 1 and c 2 x 2 x 1 is greater than c 1 x 2 c 2 2 . Since c 1 x 2 c 2 is greater than 2π m , the maximum of c 1 x 2 x 1 and c 2 x 2 x 1 is greater than 2π 2m . Hence, if c 1 x 2 x 1 > c 2 x 2 x 1 , the constructed polygon is (c 1 x 2 x 1 c 2 c 1 ); otherwise, it is (c 1 x 1 x 2 c 2 c 1 ).
In other words, the angular bisector of c 1 x 1 c 2 divides the sweeping arc into 2 parts, A 1 and A 2 (see Figure 13). Any point x 2 on A 1 constructs the angle c 1 x 2 x 1 greater than 2π 2m , and on A 2 constructs the angle x 1 x 2 c 2 greater than 2π 2m . Hence, in the case where point x 2 is placed on A 1 , we consider the polygon (c 1 x 2 x 1 c 2 c 1 ) as the constructed polygon and, if placed on A 2 , we consider the polygon (c 1 x 1 x 2 c 2 c 1 ) as the constructed polygon. On the third hit: Without loss of generality, assume that (c 1 x 2 x 1 c 2 c 1 ) is the polygon obtained at the end of the previous step. The angular bisector of c 1 x 2 x 1 divides A 1 into 2 parts A 11 and A 12 . Hence, the sweeping arc is divided into 3 parts A 2 , A 11 and A 12 (see Figure 14). Based on the previous step, any point x 3 on A 2 leads to the construction of the angle x 1 x 3 c 2 which is greater than 2π 2m . Similarly, any point x 3 on A 11 and A 12 leads to the construction of the angles c 1 x 3 x 2 and x 2 x 3 x 1 , respectively, which are greater than c 1 x 3 x 1 2 . Since any angle c 1 x 3 x 1 on A 1 is greater than 2π 2m , either the angle c 1 x 3 x 2 or x 2 x 3 x 1 is greater than 2π 4m . Let x 3 be the third point that the sweeping arc meets. If x 3 is placed on A 2 , or on A 11 or on A 12 , we consider (c 1 x 2 x 1 x 3 c 2 c 1 ) or (c 1 x 3 x 2 x 1 c 2 c 1 ) or (c 1 x 2 x 3 x 1 c 2 c 1 ) as the constructed polygon, respectively (see Figure 15). Generalization: Assume that (c 1 x 1 x 2 ...x n−1 c 2 c 1 ) is the obtained polygon at the end of the previous step. Let x n be the next point touched by the sweeping arc which is divided into n parts A 1 , A 2 , ..., A n . Considering the worst case, x n is placed on A i or on A i+1 such that the angular bisector ofx i divides the corresponding part into A i and A i+1 . Any point x n on A i , or on A i+1 , leads to the construction of the anglex n which is greater thanx i 2 . Based on the previous step and considering the worst case, the anglex i is greater than 2π 2 n−2 m . Hence, the anglex n is greater than 2π 2 n−1 m . If x n is placed on A 1 , or on A 2 , ... or on A n , we consider the polygon (c 1 x n x 1 ...x n−1 c 2 c 1 ), or (c 1 x 1 x n x 2 ...x n−1 c 2 c 1 ), ... or (c 1 x 1 ...x n−1 x n c 2 c 1 ) as the constructed polygon, respectively.
We refer to the polygon constructed by Algorithm 1 as a polygon corresponding to the line segment e. In the following, based on the Lemma 3, we present an algorithm to generate a polygon containing a given set of points, such that all internal angles are less than 2π − 2π 2 r−1 m .

Theorem 2.
There exists a polygon P ∈ ℘(S) that crosses S, in which all internal angles of P are less than 2π − 2π 2 r−1 m .

Proof.
Here, by presenting Algorithm 2, we construct the polygon.

Algorithm 2
1. Compute CH as the convex hull of S, and let IP be the set of inner points of CH.
2. For each edge e j of CH: (a) Compute the polygon P j corresponding to the edge e j using Algorithm 1 to meet the points of IP. (b) Remove the vertices of P j from IP.
3. For all j ∈ {1, 2, ..., m}, the edges of P j minus all edges of CH (except those that have no corresponding polygon), construct the desired polygon.
Based on Lemma 2, the entire CH is covered by all major segments that correspond to the edges of CH with length of β max = 2π − 4π m . Since the number of points inside the major segments is less than r and also, based on Lemma 3, all internal angles of the corresponding polygons are greater than or equal to 2π 2 r−1 m . Hence, all internal angles of the polygon computed by Algorithm 2 are less than 2π − 2π 2 r−1 m .
In step 2(a) of Algorithm 2, for each edge of CH, the measure of sweeping arc expands from 0 to β max , and the sweeping arc contains the inner points as much as possible. In Algorithm 3 (presented below), the sweeping arcs that correspond to all edges of CH expand concurrently to contain all inner points. In this way, the upper bound is improved to 2π − 2π 2 d−1 m , such that d is the depth of angular onion peeling on S which is defined as follows: Let us increase the measure of all sweeping arcs concurrently from 0 to the first hit (or β max , if a sweeping arc does not hit any point). All inner points that are hit by sweeping arcs form layer 1 of the points. The next layers are formed by deleting the points of the computed layer from inner points and keep increasing the measure of all sweeping arcs to the next hit. The process continues until all inner points are hit. The process of peeling away the layers, described above, is defined as "angular onion peeling" and the number of layers is called "depth of angular onion peeling" on these points.

Theorem 3.
There exists a polygon P ∈ ℘(S) such that crosses S, and all internal angles of P are less than 2π − 2π 2 d−1 m where d denotes the depth of angular onion peeling on S.

Proof.
Here, by presenting Algorithm 3, we construct such a polygon.

Algorithm 3
1. Compute CH as the convex hull of S, and let IP be the set of inner points. 2. While IP is not empty: (a) Increase the measure of all sweeping arcs to the next hit or β max . (b) Based on Algorithm 1, reconstruct the polygons corresponding to each edge of CH.
(c) Remove the visited points from IP.
All edges of corresponding polygons computed in step 2, minus all of the edges of CH (except those that have no corresponding polygon), construct the desired polygon.
Since, the number of points inside the major segments are less than d, all internal angles of corresponding polygons are greater than or equal to 2π 2 d−1 m . Hence, all internal angles of the polygon computed by Algorithm 3 are less than 2π − 2π 2 d−1 m .

α-MAP vice versa α-MNP
Let S be a set of points on the grid G and P ∈ ℘(S) be a simple polygon. Based on Pick's theorem [52], the area of P is equal to b 2 + i − 1 where b is the number of grid points on the boundary of P and i is the number of grid points which are inside the polygon P.
The polygon P crosses both b 1 points of S, which we call vertex points, and b 2 non-vertex points on G, which we call grid points. Hence, Area(P) = b 1 +b 2 2 + i − 1. Assume that two polygons A and B with the same number of inner grid points cross no grid points (i.e., b 2 = 0). Hence, based on Pick's theorem, the area of polygon A is more than that of B iff the number of vertex points in A is more than that in B. In this case, α-MAP is equivalent to α-MNP.
In the following, we show that for each polygon P ∈ ℘(S) on the grid and all > 0, there exists a polygon P with the same vertices points such that |Area(P) − Area(P )| < , and P does not cross any grid point.
Let e = ab be an edge of P on the grid G. If a = (x a , y a ) and b = (x b , y b ), W e = |x b − x a | is the width of e and H e = |y b − y a | is the height of e. (see Figure 16)  Proof. Assume e crosses n > 0 grid points. As shown in Figure 17, W e is divided into n + 1 parts, similar to H e . Hence, n + 1 is common divisor of W e and H e . Lemma 5. Let a and b be two non-coprime integers. There exist infinitely many positive integers x > 1, such that ax and bx − 1 are coprime integers.
Proof. Each common denominator of a and b satisfies x. Definition 5. The polygon P ∈ ℘(S) is a grid-avoiding polygon if P does not cross any grid points.
The following theorem shows that if P crosses some grid points, for all > 0 there exists a grid-avoiding polygon P such that |Area(P) − Area(P )| < .  Let u be the length of each side of grid cells in G and u be the length of each side of grid cells in G . Based on Figure 18, Area(abb ) = 1 2 u H e . Since u = u x and there exist infinitely many integers x such that xW e and xH e are coprime integers, for each > 0 there exists an integer x such that |Area(abb )| < .
The following algorithm converts the grid G into the grid G , and the polygon P into the grid-avoiding polygon P on G .

Algorithm 4
Let P = (a 1 , a 2 , a 3 , ..., a n , a 1 ) be the polygon on the grid G. Corollary 1. Let P 1 and P 2 be two simple polygons containing S with the same number of inner grid points. Boundary(P 1 ) > Boundary(P 2 ) iff Area(P 1 ) < Area(P 2 ). In other words, under these conditions we have the same solution for α-MAP and α-MNP. Corollary 2. Let P 1 and P 2 be two simple polygons containing S. If Boundary(P 1 ) ⊂ Boundary(P 2 ), then Area(P 2 ) < Area(P 1 ).

Numerical Experiments and Results
Considering Equations (24), (28) and (31), the time complexity of the brute-force algorithm is O(2 n·m·r ) such that n is the number of points, m is the number of vertices of CH, and r is the number of inner points. In this section, we present a genetic algorithm as a fast and accurate method to solve these models. The genetic algorithm is a powerful stochastic search technique, which is applicable to a variety of nonconvex optimization problems [53].
In order to evaluate the results, we implemented both the GA and the brute-force algorithm for α-MAP, α-MPP, and α-MNP. We ran both algorithms on the same datasets of points. Each dataset contained 100 sets of points with the same cardinality. We obtained the results for datasets of 5, 7, 10, and 12 points which are tabulated in Table 2.
A polygon-match occurs if the result of the GA on a set of points is the same as that of the brute-force algorithm. The quantity column in Table 2 shows the percentage of polygon-matches in each dataset, and the quality column displays the average difference between the two areas; that is, Area(P) − Area(P ) where P and P are the constructed polygons using the genetic and the brute force algorithms, respectively. The pseudocode for the GA is presented as follows:
Also, set itt = 1. 2. Coding: Compute the vector C for each randomly generated polygon as a code such that C[i × j × k] = 1 iff Z i,j,k =1. The length of C is n × m × r. 3. Packing: Construct a chromosome chr for each code using C such that chr[k] = j iff the kth inner point is assigned to the jth edge of CH, i.e., ∃t ∈ {1, 2, ..., r} : C[k × j × t] = 1. The length of chr is r. 4. Elitist selection: Select e percent of the best chromosomes, and move them to the next generation. 5. Crossover: The single-point crossover is used. Select a random position ind (1 ≤ ind ≤ r) and two random chromosomes as the parents. 6. Mutation: Each child that is constructed in step 5 is mutated with a probability of mu. Select a random position ind (1≤ind≤r) and randomly change the value of chr[ind]. The mutation leads an inner point to be assigned to another edge. 7. Unpacking: Convert each chromosome of the new generation into an individual code. Each chr in the new generation is unpacking to a code C. In this step, the order of assigned points for each edge is specified. 8. Re-evaluate: Based on the objective function (Area, Perimeter, and Boundary), re-evaluate the new polygons and keep the best chromosome as the solution. Replace the old generation with the new one and set itt = itt + 1. If itt < itt count go to step 3, otherwise finish.
Because of the exponential time complexity of the brute-force algorithm, the exact result could not be obtained on large datasets in a reasonable computational time. Thus, we ran the GA on datasets of 15, 20, 25, and 30 points and displayed the resulting polygons in Figure 19 which are the solutions for α-MAP for α = π. Figure 19. Solutions for α-MAP for α = π and n =15, 20, 25 and 30. As stated in Section 1, the concave hull is a generalization of the convex hull, that identifies the area occupied by a set of points. Moreira and Santos presented an algorithm to compute the concave hull [49], and in [54] an algorithm was presented to compute the concave hull in d dimensions. We implemented the said algorithm in [49], and compared the quality of the obtained result with that of the GA. Figure 20 illustrates this comparison with the x-axis exhibiting the cardinality of datasets and the y-axis exhibiting the approximation average quality of the results.

Conclusions
In this paper, we considered the problem of finding optimal simple polygons containing a set of points in the plane. We generalized the problems of finding the minimum area, maximum perimeter, and maximum number of vertices containing a set of points by adding constraint to the angles of polygons. We formulated the generalized problems as nonlinear programming models.
Given that all simple polygons contain a set of points, we derived an upper bound for the minimum of the maximum angles of each polygon. As a further theoretical achievement, we demonstrated that the problem of computing a polygon with minimum area is almost equivalent to that of computing a polygon with a maximum number of vertices.
We presented a genetic algorithm to solve these models, and conducted experiments on several datasets. Finally, in comparison to the brute-force method and other previous studies, better results were obtained.