## 3 Search Most and Remove Useless Algorithm
### The SMRU Algorithm
If not, then directly select this position and find the best charging angle of the position to save the waste of repeated calculation time caused by the first idea. The reason for choosing more than three sensors in the charging range as the comparison standard is that if there are only one or two sensors that can be covered in the charging range, regardless of the selected position, the number of chargers in the charging range will not be affected. However, if the number of sensors that can be covered in the charging range is more than three, the results may be affected. As shown in Figure 3, if the algorithm selects the middle position, all sensors require two chargers. However, if the algorithm selects the two surrounding positions, it only needs one charger, as shown in Figure 4.

Figure 3: Covers all sensors with two chargers. Figure 2: Covers all sensors with one charger. Finally, although the proposed algorithm minimizes the number of chargers required, experimental results show that extra chargers are required in some cases. The main reasons are the random selection of positions as a sequence of charger deployment, the comparison of the other candidate positions in the charging coverage area of the charger, and the selection of the best position from the candidate positions. As shown in Figure 5, if there are sensors that are arranged continuously, but the distance exceeds the chargeable radius, it cannot be applied to the proposed algorithm. Assume that there are four consecutive sensor positions arranged horizontally. If the order of the positions of the chargers is not appropriate, three chargers are required to fully cover all the sensors in this area. Therefore, this study improves the proposed algorithm again. After the initial selection of the charger position, it is necessary to check whether each charger and the sensors covered by each charger can be covered by other chargers. Assuming that the position of the charger fits this context, it means that the position of this charger is redundant. Therefore, after checking, remove the excess charger positions, as shown in Figure 6.

Figure 4: Covers all sensors with one charger. Figure 5: The position of this charger is redundant. ### Sensor Mobility

In this study, we consider how the SMRU algorithm can change the position of chargers when the position of the sensors is moved. After the sensor moves the SMRU algorithm first confirms whether the number of sensors covered by the charger has changed. If the number of covered sensors decreases, the charger is rotated \(360^{\circ}\) to find the charging angle that can cover most of the sensors. If the number of covered sensors is unchanged or increased, the sensor data will be updated. Next, the SMRU algorithm examines whether there are any sensors in the WRSNs that are not being charged by any charger. If it is found that there are uncharged sensors, increase the chargers at the position of this sensor, and then rotate \(360^{\circ}\) to find the best angle that covers the largest number of sensors. Finally, the SMRU algorithm performs an optimization operation. If it finds an excess charger, it cancels the deployment at that position. The sensor movement was not considered in the PBAD algorithm. As PBAD does not have a mechanism for sensor movement, it needs to be recalculated when the sensors are moved, which takes twice as much time. However, the SMRU algorithm only needs to modify the position of chargers that are affected by sensor movement. Therefore, the modified execution time is much shorter than the original SMRU execution time. The algorithm is shown in Algorithm 2. ``` Input: New locations of all sensors and original locations of chargers. Output: New locations of all chargers. 1:Step 1. Check the number of sensors covered by each charger position \(n\). 2:Step 2. If the number of covered sensors decreases, the charger is rotated \(360^{\circ}\) to find the charging angle that can cover most of the sensors.