## 3 Theoretical Framework
### Bee Colony Optimization Algorithm
#### 3.1.1 Forward Pass  
At this stage, every honeybee finds a solution by exploring the search space around its colony. The quality of the solution found by a honeybee affects the probability of that honeybee's continuous independent search or following another honeybee [5]. The forward pass can be expressed in Equation (7) as:  
1. Probability of Selecting a Neighbor Solution: \[P_{ij}=\frac{f\left(S_{ij}\right)}{\sum_{k=1}^{n}f(S_{ik})}\] (7) where, \(P_{ij}\) is the probability that a honeybee '\(i\)' selects a neighbor solution \(S_{ij}\) during the exploration phase. \(f()\) evaluates the quality of a solution. Thus, a lower fitness value shows a better solution to minimize a problem. \(f(S_{ij})\) calculates the fitness of the neighbor solution under consideration. \(\sum_{k=1}^{n}f(S_{ik})\) is the sum of fitness values of all neighbor solutions available to honeybee \(i\). Dividing the fitness of the current neighbor solution by the sum of the fitness values of all neighbors determines the probability of a honeybee \(i\) choosing a solution \(S_{ij}\) for further exploration. From Equation (4), each honeybee examines the quality of neighbor solutions based on a fitness function \(f\). \(S_{ij}\) is the probability of selecting a neighbor solution, which is computed as the ratio of the fitness of the neighbor solution to the sum of the fitness values of all neighbor solutions. This probability determines the likelihood of a honeybee choosing a particular neighbor solution during a search [15]. 2. Local Search Equation  
After selecting a neighbor solution, the honeybee performs a local search around that solution, which can be expressed in Equation (8) as follows:  
\[S_{ij}=S_{ij}+\varnothing_{ij}\times\left(S_{ij}-S_{kj}\right) \tag{8}\]  
where \(S_{ij}\) is the new solution, updated by moving toward the neighbor solution \(S_{kj}\) which is based on a random factor \(\varnothing_{ij}\). This local search method allows honeybees to scout the search environment more effectively and potentially discover better solutions [15]. This study introduces the Wolves Search Algorithm (WSA) into the local search operation of honeybees as the coefficient vector. The coefficient vector represents a set of parameters that influences the movement and decision-making processes of the wolves during the search for optimal solutions [16]. Again, it allows each wolf to balance their search in new solution space and then refine the search around known good solutions. This ensures the adaptability of search in non-explored areas. The coefficient vector \(A\) is calculated based on factor \(\mathbf{a}\), which decreases linearly from 2 to 0 throughout iterations [17]. This implies that \(A\) changes its values at each time step, influencing the wolves' movement towards the prey. Hence, given Equation (9):  
\[A=2\cdot a\cdot r_{1}-a \tag{9}\]where **a** is a linearly decreasing parameter from 2 to 0 over the iterations, \(r_{1}\) is a random vector in the range [0, 1]. Therefore, the honeybees' local search formula is now computed in Equation (10) as:  
\[S_{ij(new)}=S_{ij(current)}+A_{ij}\times\left(S_{ij(best)}-S_{kj(current)}\right) \tag{10}\]  
where, \(S_{ij(current)}\) is the current value of \(j\) in the solution \(S_{i}\). \(S_{ij(best)}\) is the corresponding \(j\) value from the best solution \(S_{k}\) in the population. \(A_{ij}\) is the coefficient vector derived from the WSA, which replaces the random factor \(\varnothing_{ij}\). The ability of WSA to evaluate positions based on the quality of solutions found by peers makes it suitable for optimizing routing paths and clustering in WSNs, where finding optimal solutions is crucial for performance and energy efficiency. The combination of the Bee Colony Optimization (BCO) algorithm with the Wave Search Algorithm (WSA) can enhance the performance of optimization tasks in Wireless Sensor Networks (WSNs) as follows:  
1. The BCO algorithm is known for its effective exploration capabilities due to its nature-inspired approach based on the foraging behavior of honeybees.