# XOR Binary Gravitational Search Algorithm with Repository: Industry 4.0 Applications
## 4 Theoretical Analysis of the Proposed XOR Binary Gravitational Algorithm with Repository
### Full Statistical Analysis of the Proposed Method
**Remark 1**. : _Lemma 2 implies that in the case when the position in one dimensional optimization problem is the same as that of best particle, the velocity vector corresponding to that dimension grows in negative direction resulting in the probability of change to vanish to zero. This in turn results in no change in that dimension._  
**Lemma 3**. : _If \(p_{i}=1\) and \(x(t)\
eq x_{rb}\), then \(\forall t>0\), we have \(a(t)\geq 0\) and \(v(t+1)\geq v(t)\)._  
Considering (17), we have the following equation for the acceleration term \(a(t)\):  
\[v\left(t+1\right)=p_{i}v\left(t\right)+a\left(t\right) \tag{19}\]3  
Consequently considering (30), one obtains the following inequality:  
\[v\left(t+1\right)=p_{i}v\left(t\right)+a\left(t\right) \tag{19}\]4  
This implies that \(v_{t}\) is monotonically non-decreasing function of time. **Lemma 4**. : _If \(p_{i}=1\) and \(x(t)\
eq x_{rb}\) then \(\forall\overline{v}\), \(\exists T>0\;s.t.\;\forall t>\)T, we have \(\overline{v}<E\left[v(t)\right]\)._  
**Proof. ** In the case when \(\overline{v}<v(t_{0}-1)\) since according to Lemma 3, \(v(t)\) is monotonically non-decreasing function of time we have:  
\[v\left(t+1\right)=p_{i}v\left(t\right)+a\left(t\right) \tag{19}\]5  
which agrees with the Lemma 4. However, in the case when \(v(t_{0}-1)\leq\overline{v}\), we have:  
\[v\left(t+1\right)=p_{i}v\left(t\right)+a\left(t\right) \tag{19}\]6Considering the fact that \(x(t)\
eq x_{rb}\), the following equation is obtained. \[v\left(t+1\right)=p_{i}v\left(t\right)+a\left(t\right) \tag{19}\]7  
Considering the fact that \(\min G\left(t\right)=\alpha_{1}\), the following equation is obtained. \[v\left(t+1\right)=p_{i}v\left(t\right)+a\left(t\right) \tag{19}\]8  
Hence, to find \(T\) which satisfies Lemma 4, the following inequality needs to be hold. \[v\left(t+1\right)=p_{i}v\left(t\right)+a\left(t\right) \tag{19}\]9  
Considering the fact that \(r\left(t\right)\) is a random variable with uniform probability distribution function, the following equation holds. \[P\left(v\left(t\right)\right)=0.5+0.5\text{tan}h\left(0.5v\left(t\right)\right) \tag{20}\]0  
By using the property of \(r\left(t\right)\) as in (36), the following is obtained. \[P\left(v\left(t\right)\right)=0.5+0.5\text{tan}h\left(0.5v\left(t\right)\right) \tag{20}\]1  
Hence, the value of T to satisfy Lemma 3 is obtained as follows:  
\[P\left(v\left(t\right)\right)=0.5+0.5\text{tan}h\left(0.5v\left(t\right)\right) \tag{20}\]2  
Since \(v(t_{0}-1)<\overline{v}\), \(\forall\text{t}>1\) from (38), we have \(0\leq\text{T s.t. }\forall\text{t}>\text{T}\) and one has \(E\left[v(t)\right]<\overline{v}\). This concludes the proof. **Remark 2**. : _It immediately follows from Lemma 4 that in the case when the position in one dimensional optimization problem is different than that of the best particle, the velocity vector corresponding to that dimension grows resulting in the probability of change to increase to one which would result in increase in the probability of change._  
**Theorem 1**. : _If \(p_{i}=1\)._  
1. In the case when \(x(t)=x_{rb}\), the acceleration term is non-positive and the velocity term is a non-increasing function of time and the probability of change converges to zero. 2. In the case when \(x(t)\
eq x_{rb}\), the acceleration term is non-negative and the velocity vector is a non-decreasing function of time and the probability of change converges to zero. Proof. : Using Lemmas 1-4, this theorem is concluded. Case II: \(0<p_{i}<1\):  
**Lemma 5**.