## 3 Manipulation of Swarms Positions and Space Solution Using Multi-Threaded Techniques
### Proposition II  
In the previously proposition, we proposed a technique for putting individuals in a given population on the solution space and assigning them a thread for calculation. Another way to increase the efficiency is to manipulating the solution space in such a way as to limit the possibility of movements in the least favorable areas. Imagine that in the early iterations of the algorithm, the population begins to move in the best areas, i.e., an area where the extreme may potentially occur. Suppose that we have \(pc\) processor cores, so \(pc\) threads can be created. Our solution space for fitness function \(f\) can be presented as  
\[a\times b=\langle a_{1},a_{2}\rangle\times\langle b_{1},b_{2}\rangle, \tag{26}\]where \(a_{1},a_{2},b_{1},b_{2}\) are values that divide the set \(\langle a,b\rangle\) into such two subsets \(\langle a_{1},a_{2}\rangle\), \(\langle b_{1},b_{2}\rangle\) that Equation (26) is satisfied and \(\times\) means Cartesian product (note that the limit values \(a_{2}\) and \(b_{2}\) correspond to \(a\) and \(b\)). Using that information, we can divide this space into \(pc\) smallest intervals as  
\[a=\langle a_{1},a_{2}\rangle=\left\langle a_{1},\frac{a_{2}}{pc}\right\rangle \cup\bigcup_{k=1}^{pc-1}\left\langle\frac{ka_{2}}{pc},\frac{a_{2}}{pc}(k+1) \right\rangle. \tag{27}\]  
Taking these small intervals and use them to describe the solution space for function \(f\) would be  
\[a\times b=\langle a_{1},a_{2}\rangle\times\langle b_{1},b_{2}\rangle=\left\langle \left\langle a_{1},\frac{a_{2}}{pc}\right\rangle\cup\bigcup_{k=1}^{pc-1} \left\langle\frac{ka_{2}}{pc},\frac{a_{2}}{pc}(k+1)\right\rangle\times\left \langle\frac{kb_{2}}{pc},\frac{b_{2}}{pc}(k+1)\right\rangle\right\rangle \tag{28}\]  
Unfortunately, these formulations give us \(pc^{2}\) parts of solution space. The reason for that is dividing each side of the interval on \(pc\) parts. Having only \(pc\) cores, it is necessary to merge some areas to obtain exactly number of \(pc\). To do that, we can describe formula for vertical merge of areas for specific cores--for first one as  
\[\left\langle a_{1},\frac{a_{2}}{pc}\right\rangle\times\left\{\left\langle b_{ 1},\frac{b_{2}}{pc}\right\rangle,\left\langle\frac{kb_{2}}{pc},\frac{b_{2}}{pc }(k+1)\right\rangle\right\}\qquad\text{for}\;k\in\{1,pc-1\}, \tag{29}\]  
and for each subsequent \(m\) core as  
\[\left\langle\frac{ma_{2}}{pc},\frac{a_{2}}{pc}(m+1)\right\rangle\times\left\{ \left\langle b_{1},\frac{b_{2}}{pc}\right\rangle,\left\langle\frac{kb_{2}}{pc },\frac{b_{2}}{pc}(k+1)\right\rangle\right\}\qquad\text{for}\;k\in\{1,pc-1\}. \tag{30}\]  
Let us prove, that sum of all these parts are equal to the initial solution space. Proof. : Taking all areas dedicated for first core described in Equation (29), we have  
\[\left\langle a_{1},\frac{a_{2}}{pc}\right\rangle\times\bigcup_{k=1}^{pc-1} \left\langle\left\langle b_{1},\frac{b_{2}}{pc}\right\rangle,\left\langle \frac{kb_{2}}{pc},\frac{b_{2}}{pc}(k+1)\right\rangle\right\rangle, \tag{31}\]  
the same is done with the rest areas in Equation (30) as  
\[\bigcup_{k=1}^{pc-1}\left\langle\frac{ka_{2}}{pc},\frac{a_{2}}{pc}(k+1)\right \rangle\times\bigcup_{k=1}^{pc-1}\left\{\left\langle b_{1},\frac{b_{2}}{pc} \right\rangle,\left\langle\frac{kb_{2}}{pc},\frac{b_{2}}{pc}(k+1)\right\rangle \right\}. \tag{32}\]  
By adding sets obtained above, we have  
\[\left\langle a_{1},\frac{a_{2}}{pc}\right\rangle\cup\bigcup_{k=1}^{pc-1} \left\langle\frac{ka_{2}}{pc},\frac{a_{2}}{pc}(k+1)\right\rangle\times\bigcup _{k=1}^{pc-1}\left\langle\left\langle b_{1},\frac{b_{2}}{pc}\right\rangle, \left\langle\frac{kb_{2}}{pc},\frac{b_{2}}{pc}(k+1)\right\rangle\right\rangle, \tag{33}\] \[=\langle a_{1},a_{2}\rangle\times\langle b_{1},b_{2}\rangle=a \times b.\]  
This gives the \(pc\) areas (making the whole solutions space). Now, for each core, \(\lambda\%n\) of the entire size of the population \(n\) is created (\(\chi\in\langle 0,100\rangle\))--but the individuals are made in the selected area, not in the whole space.