# Random Exploration and Attraction of the Best in Swarm Intelligence Algorithms
## 2 Open Balls, Neighborhoods, and Regions  
In this document, algorithms are described using the concepts of balls, neighborhoods, regions, and random selection of points within these subsets. For clarity and easy reference, these concepts are defined in this section. Some of the notation used in the rest of the document is also summarized in this section. Let us introduce the set \(\bar{m}=\{1,2,\cdots,m\}\); hence, \(i\in\bar{m}\) means \(i=1,2,\cdots,m\). \(\mathbb{R}^{+}=[0,\infty)\) will be used. Let \(X\) be a _normed vector space_ with dimension \(dim(X)=n\). A vector, also called a point, \(x\in\ \mathbb{R}^{n}\), is represented as \(x=[x_{1},x_{2},\cdots,x_{n}]^{T}\); the _norm_ of a vector \(x\) is denoted by \(\|x\|\). Unless otherwise said, a _norm_\(-2\) is assumed [61]. Let \(x_{0}\in\ \mathbb{R}^{n}\). The set  
\[B(x_{0},\delta)=\{x\in R^{n}\ |\ \|x-x_{0}\|<\delta\} \tag{1}\]  
is called an _open ball_ of radius \(\delta\) centered in \(x_{0}\) (see Figure 1a). A _neighborhood_ of \(x_{0}\), denoted as \(N(x_{0})\), is an open set such that \(B(x_{0},\delta)\subset N(x_{0})\) for some \(\delta\). Note that an open ball centered in \(x_{0}\) is itself a neighborhood of \(x_{0}\). Below, some neighborhoods commonly used in swarm algorithms are defined. A _vector of absolute values_ of \(x\) is denoted by \(\llbracket x\rrbracket\) and defined as  
\[\llbracket x\rrbracket=[|x_{1}|,|x_{2}|,\cdots,|x_{n}|]^{T} \tag{2}\]Let \(d\) be a vector of positive numbers, that is  
\[d=[d_{1},d_{2},\cdots,d_{n}]^{T};\quad d_{i}>0 \tag{3}\]  
The set  
\[N_{rec}(x_{0},d)=\{x\in R^{n}\mid|x_{i}-x_{0i}|<d_{i},\ i\in n\} \tag{4}\]  
describes a rectangular neighborhood centered on \(x_{0}\) with a (possibly) different radio in each coordinate, as shown in Figure 1b. One special case of this neighborhood is when all components of \(d\) are equal. Defining  
\[f_{v}:\,\mathbb{R}^{+}\to\,\mathbb{R}^{n};\qquad f_{v}(a)=[a,a,\cdots,a]^{T} \tag{5}\]  
the special case of \(N_{rec}(x_{0},d)\) with the same radius \(a\) in all coordinates can be written as \(N_{rec}(x_{0},f_{v}(a))\). A neighborhood centered in \(x_{0}\) with a corner in \(y_{0}\) as it is shown in Figure 2 will be denoted by \(\lfloor x_{0},y_{0}\rceil\). Such a neighborhood can be built by  
\[\lfloor x_{0},y_{0}\rceil=N_{rec}(x_{0},\llbracket y_{0}-x_{0}\rrbracket) \tag{6}\]  
A vector operation is not standard in vector space analysis, but useful in some applications is the _Hadamard multiplication_, defined as  
\[\circ:X\times X\to X \tag{7a}\] \[x\circ y=[x_{1}y_{1},x_{2}y_{2},\cdots,x_{n}y_{n}]^{T} \tag{7b}\]  
Figure 1: Neighborhoods centered in \(x_{0}\): (**a**) open ball; (**b**) rectangular region with different radius on each coordinate. Figure 2: A neighborhood centered in \(x_{0}\) with a corner in \(y_{0}\). Some swarm algorithms are useful to define a set of vectors starting in \(x_{0}\) that lie in a region (connected subset of vector spaces) with a corner in \(x_{0}\) and another in \(y_{0}\), as shown in \[\llbracket x\rrbracket=[|x_{1}|,|x_{2}|,\cdots,|x_{n}|]^{T} \tag{2}\]0 Such a region is denoted as \(\ll x_{0},y_{0}\daldal\) and defined by  
\[\llbracket x\rrbracket=[|x_{1}|,|x_{2}|,\cdots,|x_{n}|]^{T} \tag{2}\]1  
It is very common in swarm algorithms to select a random point within a neighborhood or region. To describe such procedures, let us introduce random variables and a vector of random variables. Let \(U(a,b)\) be a random variable with a uniform distribution that returns a random number in the interval \((a,b)\). It is convenient to introduce a notation for two special cases  
\[\llbracket x\rrbracket=[|x_{1}|,|x_{2}|,\cdots,|x_{n}|]^{T} \tag{2}\]2 \[\llbracket x\rrbracket=[|x_{1}|,|x_{2}|,\cdots,|x_{n}|]^{T} \tag{2}\]3  
Similarly, the vector of random variables will be denoted by  
\[\llbracket x\rrbracket=[|x_{1}|,|x_{2}|,\cdots,|x_{n}|]^{T} \tag{2}\]4 \[\llbracket x\rrbracket=[|x_{1}|,|x_{2}|,\cdots,|x_{n}|]^{T} \tag{2}\]5  
Let \(u_{r}\) denote an unitary random vector, that is \(u_{r}\in\{x\in\mathbb{R}^{n}\mid\|x\|=1\}\).