# A Direct Search Algorithm for Global Optimization
## 3 A Direct Search Algorithm for Global Optimization
### Function Transformation  
A key ingredient of our direct search global optimization algorithm is a transformation of the cost function that improves its exploratory features, providing the capability of jumping out of local minimizers, while preserving termination and convergence properties. Let \(\mathbf{x}\in\mathbb{R}^{n}\) be an \(n\)-dimensional vector; \(\lfloor\mathbf{x}\rfloor\) denotes the \(n\)-dimensional vector whose components are the greatest integers less than or equal to the components of \(\mathbf{x}\). The fractional part of \(\mathbf{x}\) is denoted as \(\text{frac}(\mathbf{x})\) and is defined as follows:  
\[\text{frac}(\mathbf{x})=\mathbf{x}-\lfloor\mathbf{x}\rfloor \tag{7}\]  
Let \(\boldsymbol{\xi}\) be an arbitrary \(n\)-dimensional vector of real numbers and \(P\) a positive integer. Let us introduce the following map:  
\[\mathbf{x}(\boldsymbol{\xi})=\text{frac}(P\boldsymbol{\xi}) \tag{8}\]This map is onto and transforms the \(n\)-dimensional Euclidean space \(\mathbb{R}^{n}\) in the \(n\)-dimensional unit interval \((0,1)^{n}\). Let \(f\) be the cost function of the minimization problem given in Equation (1) and introduce the following function transformation:  
\[\phi(\boldsymbol{\xi}):=f(\mathbf{x}(\boldsymbol{\xi}))=f(\text{ frac}(P\boldsymbol{\xi})) \tag{9}\]  
where \(P\) is a positive integer. Since the cost function \(f\) is not necessarily defined outside of the open unit \(n\)-box, the domain of the transformed cost function \(\phi\) is:  
\[\text{dom}\;\phi=\{\boldsymbol{\xi}\in\mathbb{R}^{n}:P\boldsymbol{\xi}\
ot\in \mathbb{Z}^{n}\} \tag{10}\]  
The reason is that if \(P\boldsymbol{\xi}\in\mathbb{Z}^{n}\), then \(\text{frac}(P\boldsymbol{\xi})=0\), and \(f\) is not necessarily defined for \(\boldsymbol{\xi}=0\). The transformed function \(\phi\) has certain interesting properties. The most important are the periodicity of period \(P^{-1}\) and piecewise continuity, both on each variable. **Lemma 3**. : _The transformed function \(\phi(\boldsymbol{\xi})=f(\text{frac}(P\boldsymbol{\xi}))\) satisfies the following properties:_  
1. _The function_ \(\phi\) _is continuous for any_ \(\boldsymbol{\xi}\in\mathbb{R}^{n}\)_, such that_ \(P\boldsymbol{\xi}\in(0,1)^{n}\)_._
2. _Let_ \(\boldsymbol{\xi},\boldsymbol{\eta}\in\mathbb{R}^{n}\) _be such that_ \(P\boldsymbol{\xi}\in(0,1)^{n}\) _and_ \(P\boldsymbol{\eta}\in\mathbb{Z}^{n}\)_, then_ \(\phi(\boldsymbol{\xi}+\boldsymbol{\eta})=\phi(\boldsymbol{\xi})\)_._  
**Proof. ** (i) If \(P\boldsymbol{\xi}\in(0,1)^{n}\), then \(\text{frac}(P\boldsymbol{\xi})=P\boldsymbol{\xi}\) and \(\phi(\boldsymbol{\xi})=f(P\boldsymbol{\xi})\). Since \(f\) is continuous for any \(\boldsymbol{x}\in(0,1)^{n}\), then \(\phi\) is continuous for any \(\boldsymbol{\xi}\in\mathbb{R}^{n}\), such that \(P\boldsymbol{\xi}\in(0,1)^{n}\); (ii) If \(\boldsymbol{\xi}\) and \(\boldsymbol{\eta}\) are \(n\)-dimensional vectors, such that \(P\boldsymbol{\xi}\in(0,1)^{n}\) and \(P\boldsymbol{\eta}\in\mathbb{Z}^{n}\), respectively, then \(\text{frac}(P\boldsymbol{\eta})=0\) and \(\text{frac}(P(\boldsymbol{\xi}+\boldsymbol{\eta}))=\text{frac}(P\boldsymbol{ \xi})=P\boldsymbol{\xi}\); consequently, \(\phi(\boldsymbol{\xi}+\boldsymbol{\eta})=f(\text{frac}(P\boldsymbol{\xi}))= \phi(\boldsymbol{\xi})\). Let \(\mathbf{x}\in\mathbb{R}^{n}\) and \(\mathcal{B}_{P}(\mathbf{x})\) denote the following \(n\)-box:  
\[\mathcal{B}_{P}(\mathbf{x})=\{\boldsymbol{\xi}\in\mathbb{R}^{n}:\lfloor P \boldsymbol{\xi}\rfloor=\lfloor P\mathbf{x}\rfloor,\;P\boldsymbol{\xi}\
ot\in \mathbb{Z}^{n}\} \tag{11}\]  
The transformed function \(\phi\) is continuous on \(\mathcal{B}_{P}(\mathbf{x})\), and there always exists \(\boldsymbol{\xi}^{*}\in\mathcal{B}_{P}(\mathbf{x})\), such that \(\phi(\boldsymbol{\xi}^{*})=\min\{\phi(\boldsymbol{\xi}):\boldsymbol{\xi}\in \text{dom}\;\phi\}\). Note that the \(n\)-box \(\mathcal{B}(\mathbf{x})\) is given by \(\mathcal{B}_{P}(\mathbf{x})=\{\boldsymbol{\xi}=P^{-1}(\mathbf{z}+\lfloor P \mathbf{x}\rfloor):\mathbf{z}\in(0,1)^{n}\}\).