| Algorithm 4 A fast algorithm for LBTC. |
|
Input: A set of sensors with original positions and an identical sensing radii r, a set of POIs with positions on the line segment, where is the position for ; |
| Output: A minimum movement D under which the sensors can be relocated to covered all POIs in P. |
| 1: Set and compute the collection of combinations by Algorithm 3; |
| 2: For each sensor i do |
| 3: For each combination do |
| 4: Compute , the minimum movement needed when using sensor i to cover ; |
| 5: Set ; |
| 6: EndFor |
| 7: EndFor |
| 8: Sort in a non-decreasing order and set and , to prepare for binary search. |
| 9: Use as the movement bound (i.e., D) and call Algorithm 1; |
| /*Note that is the smallest element in . */ |
| 10: If there exists a feasible coverage under movement bound then |
| 11: Return as the optimum movement bound; |
| 12: End if |
| 13: While do |
| 14: Set ; |
| 15: Use as the movement bound (i.e., D) and call Algorithm 1; /* is the th smallest element in . */ |
| 16: If there exists a feasible coverage under movement bound then |
| 17: Set ; |
| 18: Else |
| 19: Set ; |
| 20: End if |
| 21: Endwhile |
| 22: Return as the optimum movement bound. |