## 2 Methods
### Phase 1
#### 2.1.2 Procedure for the Construction of the Girding Polygon  
Before we describe the procedure, let us define function \(\theta(i,j)\), returning the angle formed between the edge \((i,j)\) and the positive direction of the \(x\)-axis (Equation (8) and Figure 2):  
\[\theta(i,j)=\left\{ \begin{array}{rcl}\arccos\frac{x_{j}-x_{i}}{w(i,j)}&if& \arcsin\frac{y_{j}-y_{i}}{w(i,j)}\geq 0,\\ -\arccos\frac{x_{j}-x_{i}}{w(i,j)}&if&\arcsin\frac{y_{j}-y_{i}}{w(i,j)}<0. \end{array} \right. \tag{8}\] \begin{table}
\begin{tabular}{c l} \hline \hline
**PROCEDURE**_extreme_points(\(V=\{i_{1},i_{2},\cdots,i_{n}\}\)) \\ \hline
1 & \(y_{max}:=y_{i_{1}}\) & //Initializing variables \\
2 & \(x_{min}:=x_{i_{1}}\) \\
3 & \(y_{min}:=x_{i_{1}}\) \\
4 & \(x_{max}:=y_{i_{1}}\) \\
5 & **FOR**\(j:=2\) **TO**\(n\) **DO** \\
6 & **IF**\(y_{i_{j}}>y_{max}\) **THEN**\(y_{max}:=y_{i_{j}}\) \\
7 & **IF**\(x_{i_{j}}<x_{min}\) **THEN**\(x_{min}:=x_{i_{j}}\) \\
8 & **IF**\(y_{i_{j}}<y_{min}\) **THEN**\(y_{min}:=y_{i_{j}}\) \\
9 & **IF**\(x_{i_{j}}>x_{max}\) **THEN**\(x_{max}:=x_{i_{j}}\) \\
10 & \(T^{\prime}=L^{\prime}=B^{\prime}=R^{\prime}:=\emptyset\) \\
11 & **FOR**\(j:=1\) **TO**\(n\) **DO** \\
12 & **IF**\(y_{i_{j}}=y_{max}\) **THEN**\(T^{\prime}:=T^{\prime}\cup\{i_{j}\}\) \\
13 & **IF**\(x_{i_{j}}=x_{min}\) **THEN**\(L^{\prime}:=L^{\prime}\cup\{i_{j}\}\) \\
14 & **IF**\(y_{i_{j}}=y_{min}\) **THEN**\(B^{\prime}:=B^{\prime}\cup\{i_{j}\}\) \\
15 & **IF**\(x_{i_{j}}=x_{max}\) **THEN**\(R^{\prime}:=R^{\prime}\cup\{i_{j}\}\) \\
16 & \(v^{1}:=t^{\prime}_{1}\) & // \(T^{\prime}=\{t^{\prime}_{1},t^{\prime}_{2},\cdots,t^{\prime}_{|T^{\prime}|}\},\ \ |T^{\prime}|\leq n\) \\
17 & \(v^{2}:=l^{\prime}_{1}\) & // \(L^{\prime}=\{l^{\prime}_{1},l^{\prime}_{2},\cdots,l^{\prime}_{|L^{\prime}|}\}, \ \ |L^{\prime}|\leq n\) \\
18 & \(v^{3}:=b^{\prime}_{1}\) & // \(B^{\prime}=\{b^{\prime}_{1},b^{\prime}_{2},\cdots,b^{\prime}_{|B^{\prime}|}\}, \ |B^{\prime}|\leq n\) \\
19 & \(v^{4}:=r^{\prime}_{1}\) & // \(R^{\prime}=\{r^{\prime}_{1},r^{\prime}_{2},\cdots,r^{\prime}_{|R^{\prime}|}\}, \ |R^{\prime}|\leq n\) \\
20 & **FOR**\(j:=2\) **TO**\(|T^{\prime}|\) **DO** \\
21 & **IF**\(x_{t^{\prime}_{j}}>x_{v^{1}}\) **THEN**\(v^{1}:=t^{\prime}_{j}\) \\
22 & **FOR**\(j:=2\) **TO**\(|L^{\prime}|\) **DO** \\
23 & **IF**\(x_{t^{\prime}_{j}}>x_{v^{2}}\) **THEN**\(v^{2}:=l^{\prime}_{j}\) \\
24 & **FOR**\(j:=2\) **TO**\(|B^{\prime}|\) **DO** \\
25 & **IF**\(x_{b^{\prime}_{j}}>x_{v^{3}}\) **THEN**\(v^{3}:=b^{\prime}_{j}\) \\
26 & **FOR**\(j:=2\) **TO**\(|R^{\prime}|\) **DO** \\
27 & **IF**\(x_{t^{\prime}_{j}}>x_{v^{4}}\) **THEN**\(v^{4}:=r^{\prime}_{j}\) \\
28 & **RETURN**\(v^{1}\)_,_ \(v^{2}\)_,_ \(v^{3}\)_,_ \(v^{4}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Procedure _extreme_points_. The girding Polygon \(P=P(V)\) is a convex geometric figure in a two-dimensional plane, such that any point in \(V\) either belongs to that polygon or to the area of that polygon [PERSON] et al. [14]. The input of our procedure for the construction of polygon \(P\) (see Table 2), consists of (_i_) the set of vertices \(V\) and (_ii_) the distinguished extreme points \(v^{1}\), \(v^{2}\), \(v^{3}\) and \(v^{4}\). Abusing slightly the notation, in the description below, we use: (_i_) \(P\), for the array of the points that form the girding polygon, and (_ii_) \(k\) for the last vertex included so far into the array \(P\). Initially, \(P:=(v^{1})\) and \(k:=v^{1}\). **Lemma 2**: _The time complexity of Procedure polygon is \(O(n^{2})\)._  
Proof of Lemma 2.: There are four independent _while_ statements with similar structure, each of which can be repeated at most \(n\) times. In the first line of each of these _while_ statements, in lines 4, 11, 18, and 25, the set of points \(V^{*}\) is formed that yields \(\{f(n)=2n\}\) operations. In lines 5, 12, 19, and 26, the