Optimizing the Sensor Movement for Barrier Coverage in a Sink-Based Deployed Mobile Sensor Network

Barrier coverage is an important coverage model for intrusion detection. Clearly energy consumption of sensors is a critical issue to the design of a sensor deployment scheme. In mobile sensor network, it costs the sensors much energy to move. In this paper, we study how to optimize the sensor movement while scheduling the mobile sensors to achieve barrier coverage. Given a line barrier and $n$ sink stations that can supply a required number of mobile sensors, we study how to find the mobile sensors’ final positions on the line barrier so that the barrier is covered and the total sensor movement is minimized. We first propose a fast algorithm for determining the nearest sink for the given point on the barrier. We then propose a greedy algorithm and an optimal polynomial-time algorithm for calculating the optimal sensor movement. To obtain an optimal algorithm, we first introduce a notion of the virtual-cluster which represents a subset of sensors covering a specified line segment of the barrier and their sensor movements are minimized. Then we construct a weighted barrier graph with the virtual-clusters modeled as vertexes and the weight of each vertex as the total sensor movements of the virtual-cluster. We also prove that the minimum total sensor movements for achieving barrier coverage is the minimum total weights of the path between the two endpoints of the line barrier in this graph. We also solve this barrier coverage problem for the case when the barrier is a cycle by extending the techniques used for the line barrier. Finally, we demonstrate the effectiveness and efficiency of our algorithms by simulations.


I. INTRODUCTION
Wireless sensor network has received a great interest in applications such as border surveillance, battlefield surveillance and critical infrastructure security.Barrier coverage is an important coverage model in wireless sensor network, which can provide a sensor-chain barrier for detecting the intruders crossing the boundaries of the surveillance area.Sensors are often randomly dispersed from the airplane.However, it is difficult to achieve barrier coverage only using stationary sensors.Recently, with the development of mobile sensors (e.g., Robomote [1], Packbot [2] and Khepera [3]), it is possible to deploy mobile sensors in practical applications.
The associate editor coordinating the review of this manuscript and approving it for publication was Zhenliang Zhang.
Mobile sensors can move to the desired positions for constructing a sensor-chain barrier, which can save a lot of stationary sensors.However, the movement of mobile sensors consumes much more energy than sensor's sensing and communication.Most of sensors are equipped with batteries, thus it is a critical problem how to minimize the sensor movement for saving the energy, thus prolonging the network's lifetime.
A widely-used random sensor deployment model assumes that sensors, dispersed from an airplane, are randomly distributed in a deployed area [4].This deployment model requires that sensors are dispersed by a airplane flying at a low altitude because of sensors' small measurement and light weight; otherwise, sensors may have a very large offset from their target landing points, and some sensors cannot communicate with other sensors.In some applications such as the battlefield surveillance and nuclear leakage monitoring, it is impossible that the airplane is flying at a low altitude and thus a new deployment model should be explored.We assume that a sink station and some mobile sensors are packed up as a package.These packages are dispersed by a airplane, which are distributed randomly in a deployed area.After these packages are deployed, the sink stations communicate with their neighbor sink stations, then compute the final positions of mobile sensors and schedule the sensors to move to the desired positions for achieving barrier coverage.Since the mobile sensors may have quite different moving distances, the mobile sensors in a package are equipped with different initial energies.The sensor with more initial energy is sent to a farther final position.This kind of deployment model is called as the sink-based deployment model, which has some advantages.First, sinks can communicate with neighbor sinks easily for their large communication range.Second, sinks can compute the final positions of sensors for their powerful computing ability and storage capacity.Third, fewer mobile sensors are used than the random deployment model.
This model was first studied in the target coverage problem in the work [5].It assumed that initially all the sensors are located at k sink stations and proposed a polynomial-time approximation scheme to minimize the moving distance of sensors to cover all targets in the surveillance region.However, little work has been studied in the barrier coverage problem based on this deployment model and we are the first to study this problem.Given a line barrier and n sink stations that can supply a required number of sensors, we study the barrier coverage problem which aims to find the mobile sensors' final positions on the line barrier so that the barrier is covered and the total sensor movement is minimized.We find that the barrier coverage problem under the sink-based deployment model can be solved by a polynomial-time algorithm.The challenge of this problem is that the sensors can move to arbitrary point of the line barrier.
The main contributions of this paper are summarized as follows: 1) To the best of our knowledge, we are the first to study the barrier coverage problem under the sink-deployment model.This model is suitable for the scenario that sensors can only be dispersed from a airplane flying at a high altitude.
2) We present a fast algorithm for determining the nearest sink for a given point on the barrier and a greedy algorithm for finding the final positions of sensors to cover the line barrier energy-efficiently.
3) We propose an optimal algorithm for finding the final positions of sensors to cover the line barrier while minimizing the total sensor movements.First, we define a concept of virtual-cluster which represents a subset of sensors covering a specified line segment of the barrier and their sensor movements are minimized.Then we construct a weighted barrier graph with the virtual-clusters modeled as vertexes and the weight of each vertex as the total sensor movements of the virtual-cluster.Two vertexes have an edge if these two corresponding sensor-clusters overlap.We prove that the minimum total sensor movements for achieving barrier coverage is the minimum total weights of the path between the two endpoints of the line barrier in this graph.
4) By extending the techniques used for the line barrier coverage, we also propose a polynomial-time algorithm for the barrier coverage problem when the barrier is a cycle.
5) We conduct simulations to evaluate the performance of our algorithms.
The remainder of this paper is organized as follows.We present the previous work in Section 2. The network model and the problem definition are given in Section 3. We present a fast algorithm for determining the nearest sink for a given point and then propose a greedy algorithm for the line barrier coverage problem in Section 4.An optimal polynomial-time algorithm is also proposed for the line barrier coverage problem in Section 5. We propose an optimal algorithm for the cycle barrier coverage problem in Section 6. Extensive performance evaluations of our algorithms are presented in Section 7. Finally, we conclude this paper in Section 8.

II. PREVIOUS WORK
Barrier coverage in wireless sensor network has been studied for over ten years.Most of the work focuses on stationary sensor network [6]- [11].Since the mobile sensors can move to the desired positions, fewer sensors are used to achieve barrier coverage.Recently, the researchers turn to study how to deploy the mobile sensor to achieve barrier coverage in mobile sensor network, especially minimizing the sensor movement.
Some work studied the barrier coverage problem in onedimensional setting.Suppose the barrier is a line segment and all sensors are initially located on the line containing the barrier.Some work studied the minimum maximum sensor movement problem (MinMax).The work [12] first proposed an O(n 2 ) time algorithm for solving this problem when the sensing range of sensors are uniform.The work [13] improved the time complexity to O(n log n) for the uniform case, and also proposed an O(n 2 log n) time algorithm when the sensing ranges of sensors are arbitrary.The work [14] studied the minimum total sensor problem (MinSum).It proposed an O(n 2 ) time algorithm when the sensing ranges of sensors are uniform and proved the problem is NP-complete by reduction to the 3-partition problem for the general case.The work [15] studied the minimum sensor number problem (MinNum).It proved the problem is NP-hard for the general case and proposed efficient algorithms for the uniform case.
Some work studied the barrier coverage problem in twodimensional setting.Suppose the barrier is a line segment and all sensors are initially located in a plane containing the barrier.The minimum total sensor problem (MinSum) was studied in [16] and was proved to be NP-hard when the sensing range of sensors are arbitrary and can be solved in O(n 2 ) time when the sensors can only move vertically to the barrier.The minimum maximum sensor movement problem (MinMax) was studied in [16] and was proved be NP-hard when the sensing range of sensors are arbitrary.This problem can be solved in O(n log n) time when the sensors can only move vertically to the barrier.The work [17] first studied the MinMax problem when the sensing ranges of sensors are uniform and presented an optimal algorithm.The work [18] studied how to form the maximum number of barriers and also minimize the maximum sensor movement when the number of sensors is given and the positions of the barriers are not known a priori.It proposed a two-phase sensor mobility scheme, which was proved order optimal.
Some work studied the case when the barrier is a circle or simple polygon.The work [19] studied the MinMax problem and proposed an O(n 3.5 log n) time algorithm for cycle barriers and proposed an O(mn 3.5 log n) time for polygon barriers, where m is the number of edges of the polygon.The work [19] studied the MinSum problem and proposed a PTAS.The MinMax result for polygon barriers was improved by [20], which proposed an O(n 2.5 log n) algorithm.It also proposed an O(n 4 ) time algorithm for the MinSum problem when the sensors are moved from the circle perimeter to a regular n-gon.The work [21] studied how to cover the targets on the line by mobile sensors while minimizing the maximum sensor movement and it was proved that this problem is NP-hard when the sensors are initially on this line and the sensing ranges of sensors are non-uniform.
The work [22] studied the hybrid sensor network composed by stationary sensors and mobile sensors.The problem is how to move mobile sensors to fill the gaps while balancing the energy consumption when the stationary sensors are deployed under the line-based deployment.The work [23] studied how many mobile sensors are needed to form k barriers when the stationary sensors are deployed and proposed an optimal algorithm.The work [24] studied the problem when there are not enough sensors to form a barrier and proposed a dynamic sensor patrolling algorithm.It proved that the total sensor movement during one time slot is minimized.The work [25] studied the dynamic barrier coverage problem by combining an inspection robot and stationary sensors and proposed a heuristic algorithm based on game theory.

III. PRELIMINARIES AND PROBLEM STATEMENT
In this section, we present the network model and the problem formulation.

A. NETWORK MODEL
We assume that the deployed area is a two-dimensional rectangular area with the length L and the width W .A barrier is a line segment starting from [0, 0] to [L, 0] in the deployed area.Suppose n sink stations SK = {sk 1 , sk 2 , . . ., sk n } are randomly deployed along the barrier, whose positions are {(x i , y i )|i = 1, 2, . . ., n}.The sink stations can supply a required number of sensors and send the sensors to locate at one point on the barrier for achieving barrier coverage.Sensors can move in any direction.The movement of sensor s i , denoted by d i , is the Euclidean distance of the sensor's initial position p i and its final position p i , that is d i = dist(p i , p i ).The sensing range of the sensors are denoted as r.
We also study the case when the barrier is a cycle.The cycle barrier is located in the deployed area with the center at [x 0 , y 0 ] and the radius R. Let p denote the point on the circle barrier, then it can be represented by a 4-tuple < R, θ, x i , y i >, where (R, θ) is polar coordinate of p and the (x i , y i ) is the rectangular coordinate of p.We choose the point with its polar coordinate [R, 0] as the origin of B denoted as p 0 .Suppose n sink stations SK = {sk 1 , sk 2 , . . ., sk n } are randomly deployed along the cycle.The sink stations can supply a required number of sensors and send the sensors to locate at one point on the cycle for achieving barrier coverage.

B. PROBLEM DEFINITION
Our barrier coverage problem focuses on how to schedule the sensors to cover the barrier so that the total sensor movement is minimized.
Suppose the barrier is a line segment, we define n-Sink Minimum Sum of Movement for Line Barrier Coverage (L-MSBC) problem as follows: Definition 1 (n-Sink Minimum Sum of Movement for Line Barrier Coverage Problem, Short for L-MSBC Problem): There are n sink stations SK = {sk 1 , sk 2 , . . ., sk n } which send mobile sensors to cover the line barrier.The L-MSBC problem is to schedule the sinks to send the mobile sensors S = {s 1 , s 2 , . . ., s m } to locate on the line barrier so that this line barrier is covered by the sensing ranges of the mobile sensors and the total sensor movement m i=1 {dist(p i , p i )} is minimized.
Suppose the barrier is a cycle, we define n-Sink Minimum Sum of Movement for Cycle Barrier Coverage (C-MSBC) problem as follows: Definition

(n-Sink Minimum Sum of Movement for Cycle Barrier Coverage Problem, Short for C-MSBC Problem):
There are n sink stations SK = {sk 1 , sk 2 , . . ., sk n } which send mobile sensors to cover the cycle barrier.The C-MSBC problem is to schedule the sinks to send the mobile sensors S = {s 1 , s 2 , . . ., s m } to locate on the cycle barrier so that this barrier is covered by the sensing ranges of the mobile sensors and the total sensor movement m i=1 {dist(p i , p i )} is minimized.

IV. THE FAST ALGORITHM FOR THE L-MSBC PROBLEM
In this section, we first present a fast algorithm for determining the nearest sink for a given point on the barrier and then propose a greedy and fast algorithm for the L-MSBC problem.

A. THE ALGORITHM FOR DETERMINING THE NEAREST SINK
Given a point on the barrier, how to find the nearest sink to send a sensor to locate at this point?
A trivial way is to compute all the distances between this target point and each sink, and then find the nearest sink for this point.Obviously, at least L/2r sensors are needed to cover the barrier.Thus, it costs O(nL/2r) time to find the nearest sinks for all the sensors covering the barrier.If L is a big number, this method is time consuming.We'll show a fast method to find the nearest sinks.
The main idea of our algorithm is to compute the set of equaldistant points on the line barrier for every pair of sinks, then find a subset of equaldistant points, called boundary-points, such that any point between two consecutive boundary-points in this subset has a same nearest sink, and compute the nearest sink for the subsegment between such two consecutive points.Given a target point, we first identify the subsegment which include it and then return the nearest sink for this subsegment as the nearest sink for this target point.
Before showing the detail of this algorithm, we first introduce some definitions.

Definition 3 (balance-Point): A point on the line barrier is called balance-point, denoted as bp k , if the distance from sink s i to it is equal to that from sink s j to it.
A balance-point is an equaldistant point on the line barrier for a pair of sinks.Let BP denote the set of balance-points.For a pair of sinks s i and s j , we compute the balance-point bp k by drawing the vertical bisector of the line segment s i s j , and bp k is the intersection point between this vertical bisector and the line barrier.For every pair of sinks, we can compute all the balance-points and sort them increasingly.As shown in Fig. 1, bp 1 , bp 2 , bp 3 are balance-points.

Definition 4 (boundary-Point): A balance-point is called boundary-point, denoted as dp i , if the two points dp i -ε and dp i + ε have a different nearest sink, where ε is a very small positive number.
Let DP denote the set of boundary-points.We can compute all the boundary-points by binary searching all the balance-points and computing their nearest sink.
Lemma 5: Any point on the subsegment bounded by two consecutive boundary-points has the same nearest sink.
Proof: Suppose there exist two points p i 1 , p i 2 on the subsegment bounded by two consecutive boundary-points It is easy to know that there is a balance-point bp k between p i 1 and p i 2 which has the same distance to sk t 1 and sk t 2 .It implies that bp k is also a boundary-point.It is a contradiction, since dp j 1 , dp j 2 are two consecutive boundary-points.
Therefore, the lemma is proved.

Definition 6 (b_Segment):
A line segment is called a b_segment if its endpoints are two consecutive boundarypoints.
Let bs i denote the ith b_segment and BS = {bs 1 , bs 2 , . . ., bs τ } denote the set of b_segments.Let BE = {be i |1 ≤ i ≤ τ } = {b 0 , b 1 } ∪ DP denote the set of the endpoints of b_segments, which consists of the endpoints of the line barrier and the set DP.That is bs i = dp i−1 dp i .
Definition 7 (Assigned Sink): Sink s k is said to be assigned sink of b_segment bs i if s k is the nearest sink of one point on bs i .
Let as i denote the assigned sink of b_segment bs i and AS = {as 1 , as 2 , . . ., as τ } be the set of these assigned sinks.As shown in Fig. 1, {bp 1 , bp 2 , bp 3 } is a set of balancepoints.Since bp 2 is not a boundary-point, {bp 1 , bp 3 } is the set of boundary-points.Thus, {bs 1 , bs 2 , bs 3 } is the set of b_segments and BE = {b 0 , bp 1 , bp 3 , b 1 }, where b 0 and b 1 are the endpoints of the barrier and {sk 1 , sk 2 , sk 3 } is the set of assigned sinks.
These b_segments have the following property: Lemma 8: Any two b_segments have different assigned sinks.
Proof: We'll prove it by contradiction.Suppose there are two b_segments which have the same assigned sink.
Suppose b_segment bs i and bs (i+1) have a common endpoint be i .Sink sk i is the assigned sink of bs i while sink sk (i+1) is the assigned sink of bs (i+1) .We claim that the line segment sk i+1 be i is on the right of sk i be i .If not, the distance from sink sk i+1 to be i+1 is larger than that from sink sk i to be i+1 , which is contradiction.
Suppose there is one b_segment bs i+1 between these two b_segments bs i and bs i+2 .Suppose bs i and bs i+2 have the same assigned sink sk i while sk i+1 is the assigned sink of bs i+1 .As shown in Fig. 2(a), we draw a circle c i with be i as its center and be i sk i as its radius.We also draw another circle c i+1 with be i+1 as its centre and be i+1 sk i as its radius.By the claim, sk i+1 be i is on the right of sk i be i .Thus, sk i+1 is in the circle c i+2 , which implies that be i+1 sk i+1 is shorter than be i+1 sk i .However, be i+1 sk i+1 is equal to be i+1 sk i since be i+1 is the common point of bs i+1 and bs i+2 , which is a contradiction.Thus, if there is one b_segment between two b_segment, these three b_segments have different assigned sinks.
Suppose there are two b_segments bs i+1 and bs i+2 between these two b_segments bs i and bs i+3 .As shown in Fig. 2(b), bs i and bs i+3 have the same assigned sink sk i , while sk i+1 and sk i+2 are the assigned sinks of bs i+1 and bs i+2 respectively.We draw a circle c i with be i as its centre and be i sk i as its radius.We also draw another circle c i+1 with be i+2 as its centre and be i+2 sk i as its radius.By the claim, sk i be i+2 is on the right of sk i+2 be i+2 .Thus, sk i+2 is in the circle c i , which implies be i sk i+2 is shorter than be i sk i .Since sk i is the assigned sink of bs i , be i sk i+2 is not shorter than be i sk i , which is a contradiction.Thus, if there are two b_segments between two b_segments, these four b_segments have different assigned sinks.Suppose there are m(m > 2) b_segments between these two b_segments.Similarly, we can prove that these two b_segments have different assigned sinks using the above method.
Therefore, the lemma is proved.Next, we propose an algorithm to find all the b_segments and their assigned sinks by computing the boundary-points.
First, compute all the balance-points and sort them increasingly, denoted as bp 1 , bp 2 . . .bp m ; Let bp 0 , bp m+1 denote the endpoints of the line barrier; Second, let i = 0, j = 0 and be i = bp j , compute the nearest sink of the point bp j + ε as sk, where ε is a small positive number; Third, use binary search technique to find the largest balance-point bp l whose nearest sink is also sk.Let i = i + 1 and be i = bp l .Next, if l is m + 1, the algorithm stops; Otherwise, compute the nearest sink of the point be i +ε as sk.Go to the third step.The pseudocode of the algorithm is presented in Algorithm 1.It costs O(n 2 logn) time.
Given one point of the line barrier (x p , 0), we propose a method to find its nearest sink by binary searching the set BE and finding the index i such that be i−1 < x ≤ be i .The nearest sink of this point is as i .The detail of this algorithm is in Algorithm 2. It costs O(logn) time.

B. GREEDY ALGORITHM FOR THE L-MSBC PROBLEM
Given the locations of sinks and a line barrier, the L-MSBC problem is how to calculate the final locations of sensors sent by sinks such that the line barrier is covered and the total sensor movements are minimized.We propose a greedy and fast algorithm for the L-MSBC problem.In the greedy algorithm, we send sensors to cover the grid points on the line barrier G = {r, 3r, 5r, . . ., }.We always choose the closest sink to send the sensor to locate at each grid points until all the grid points are covered.This algorithm runs in max{O(Llogn/2r), O(n 2 logn)} time.

V. THE OPTIMAL ALGORITHM FOR THE L-MSBC PROBLEM
In this section, we propose an optimal algorithm for the L-MSBC problem by introducing a weighted barrier graph model.

A. WEIGHTED BARRIER GRAPH
We first give some definitions as follows.
Definition 9 (Projective-Point): A point on the line barrier, denoted as pp i , is called the projective-point of sink s i if sink s i 's x-coordinate equals to pp i 's x-coordinate.The line segment between two projective-points is called a projective-subsegment.
Definition 10 (Projective-Subsegment): A line segment on the line barrier, denoted as ps i = pp i pp j , is called a projective-subsegment if both endpoints are also the projective-points.
Lemma 11: For a projective-subsegments ps k = pp i pp j , the minimum number of sensors needed for covering it, denoted as n 1  k , is ((pp j − pp i ) − 2r)/2r , while the maximum number of sensors needed, denoted as n 2 k , is ((pp j − pp i ) + 2r)/2r .Proof: The line segment starting from pp i to pp i + r, denoted as pp i (pp i + r), can be covered by the sensor located within its left neighbor projective-subsegment.Similarly, pp j − r pp j can be covered by the sensor located within the right neighbor projective-subsegment.Thus, the minimum number of sensors needed for covering ps k is the maximum number of sensors needed to cover the line segment (pp i + r) pp j − r .Since these sensors are in attaching positions, ((pp j − pp i ) − 2r)/2r sensors are needed.Thus, the minimum number of sensors needed is ((pp j − pp i ) − 2r)/2r .Suppose the line segment (pp i − r) pp i is covered by a sensor located at ps k and pp j pp j + r is covered by a sensor located at ps k .Thus, the maximum number of sensors needed is ((pp j − pp i ) + 2r)/2r .Definition 12: Sensors s i 1 , s i 2 , . . ., s i q are said to be in attaching positions if any pair of neighbor sensors overlap at only one point, that is ∀1 ≤ j < q, x i j+1 = x i j + 2r holds.
Lemma 13: In a sensor deployment of minimizing the total sensor movements, the sensors are in attaching positions if their positions are within, not including, two consecutive projective-points.
Proof: Suppose there is a sensor in these sensors which overlaps with its left neighbor sensor at more than one point.If the x-coordinate of this sensor's final position is smaller than that of this sensor's initial position, the sensor's final position can be shifted to the right a bit, which can reduce its movement; otherwise, the final position of its left neighbor sensor can be shifted to the left a bit, which can reduce its movement.It is a contradiction of the optimality.
Suppose there is a sensor in these sensors which overlaps with its right neighbor sensor at more than one point.We can also prove that it is a contradiction of the optimality.
Thus, the lemma is proved.Now we define a notion of sensor-cluster.Definition 14 (Sensor-Cluster): A set of sensors {s i 1 , . . ., s i τ } with final positions p i 1 , . . ., p i τ is called a sensor-cluster within pp i pp j if pp i ≤ p i 1 < . . .< p i τ ≤ pp j holds and for any k (1 ≤ k < τ ) which satisfies that p i k+1 − p i k = 2r holds, where n 1 k ≤ τ ≤ n 2 k .As shown in Fig. 4, there are three sensor-clusters, which are the set of sensors s 1 , s 2 , s 3 , the set of sensors s 4 , s 5 , s 6 , s 7 and the set of sensor s 8 , s 9 , s 10 .
Suppose the sensors' initial positions are fixed and their final positions should be within pp i pp j , we can calculate a sensor-cluster such that the sensors' total movements are minimized.
Definition 15 (Virtual-Cluster): A sensor-cluster, consisting of sensors s i 1 , . . ., s i τ with final positions p i 1 , . . ., p i τ , is called a virtual-cluster, denoted as vc ijl , within pp i pp j if initial positions of sensors p i 1 , . . ., p i τ are fixed and τ j=1 p i j − p i j is minimized, where 1 ≤ l ≤ γ .We'll define the notion of a weighted barrier graph as follows.
Definition 16 (A Weighted Barrier Graph): G = (V , E, W ) of a mobile sensor network is constructed as follows: The set V consists of vertices corresponding to the left endpoint of line barrier (s), the virtual-clusters The set E = e(v i , v j ) consists of edges which are between two vertices if their corresponding sensor-clusters overlap.A vertex has an edge with s or t if the corresponding sensor-cluster covers the left or right endpoint of line barrier.W : V → R is the set of the weights of each vertices, where the weight w(v i ) of vertex v i is the total movement of sensors in the corresponding sensor-cluster.
Then we have the following lemma.

Lemma 17: Any path from s to t on the weighted barrier graph G means that the barrier can be covered by the corresponding sensor-clusters of the vertices on the path.
Proof: By the definition of a weighted barrier graph, two vertices have an edge if their corresponding sensor-clusters overlap.A vertex has an edge with s or t if the corresponding sensor-cluster covers the left or right endpoint of line barrier.Thus, if there is a path from s to t on the weighted barrier graph G, there are sensor-clusters which cover the barrier from left to right.
Theorem 18: The minimum total sensor movement needed to form a barrier under the sink-deployment model is exactly the minimum total weight of s−t path on the weighted barrier graph G.
Proof: Suppose the minimum total weight of s − t path on the weighted barrier graph G is larger than the minimum total sensor movement needed to form a barrier.Recall that the path with the minimum total weight is composed of virtual-clusters which cover the whole line barrier.
By lemma 13 and the definition of the sensor-cluster, it implies that the sensor deployment of minimizing the total sensor movements, called the optimal sensor deployment, is composed of sensor-clusters.Now we can produce a sensor deployment whose total sensor movement is smaller than this optimal sensor deployment.We check the sensor-clusters in the optimal sensor deployment from the left to the right.
If the ith sensor-cluster is not a virtual-cluster, we can replace this sensor-cluster by the corresponding virtualcluster.If there is a gap between it and its left neighbor virtual-cluster, then these two virtual-clusters can be replaced by the corresponding virtual-cluster; If there is still a gap between this new virtual-cluster and its left neighbor, continue replacing these two virtual-clusters by the corresponding virtual-cluster until there is no gap between it and its left neighbor.Since the virtual-cluster is a sensor-cluster with the minimum total sensor movement, thus the total sensor movement can be decreased by the replacement of virtual-clusters.Thus, a sensor deployment consisting of virtual-clusters is produced, whose total sensor movement is smaller than the optimal sensor deployment, which is a contradiction.
Thus, the Theroem is proved.

B. ALGORITHM DESCRIPTION
In this subsection, we'll present an optimal algorithm of the L-MSBC problem.
The main idea of this algorithm is to compute all possible projective-subsegments, then compute the virtual-clusters for each projective-subsegment, and construct a weighted barrier graph with the virtual-clusters as the vertices.The optimal sensor deployment is the vertices on the path of the minimum total weights.

1) COMPUTING THE VIRTUAL-CLUSTERS
In this subsection, we'll show how to compute the virtualclusters after the projective-subsegments are calculated.
Recall that the virtual-clusters are the optimal deployments of sensors located within the projective-subsegment.The difficulty to compute the virtual-clusters is that the initial positions of sensors deployed are unfixed.We solve this problem by dividing the range of the sensors' final positions into some subranges such that the initial-positions of sensors are fixed.
In each subrange, we can compute the optimal sensor deployment by using optimization technique as a virtual-cluster.
First, we calculate the range of sensors' final positions.For a projective-subsegments ps k = pp i pp j , the final positions of the sensors within it should satisfy the two conditions: 1) Their final positions should be within the projectivesubsegment; 2) These sensors should cover the line segment starting from pp i + r to pp j − r; By lemma 11, the minimum number of sensors needed for covering the projective-subsegment ps k = pp i pp j is n 1 k .We calculate the range of the sensors' final position as follows: 1) Suppose these sensors are in attaching positions.We consider the final position of first sensor, which is called archor-sensor.We can calculate the range of the archorsensor's final position, called as sensor-range, as follows: Case 1: Suppose the number of sensors in the virtual-cluster is n 1 k .If pp j − pp i %2r = 0, then the sensor-range is [2r + pp i , 2r + pp i ]; Otherwise, the sensorrange is pp j − pp i %2r + pp i , 2r + pp i .
Case 2: Suppose the number of sensors in the virtual-cluster is 4: Run djikstra algorithm on this graph and find a path with the minimum total weights from s to t in G. 5: return the minimum total weights of the path as M ;

VI. THE OPTIMAL ALGORITHM FOR THE C-MSBC PROBLEM
In this section, we study the C-MSBC problem for achieving barrier coverage when the barrier is a cycle by extending the technique used for line barrier coverage.

A. OVERVIEW
Although the cycle barrier coverage problem is as similar as the line barrier coverage problem, the solution for line barrier coverage cannot be directly applied to solve the cycle barrier coverage case.There are some challenging issues.First, how to determine the starting point and ending point of the cycle barrier as the line barrier?Second, even though these two points are determined, there exists a sensor in the sensor deployment which may cover both the starting point and ending point.How to solve this special case?Third, we cannot sort the points on the circle barrier by their x-coordinates like the line barrier.
We'll study these issues and try to extend the technique used for line barrier coverage to solve the circle barrier coverage problem.The basic idea is to introduce weighted barrier graph and find the minimum weight cycle on the weighted barrier graph to obtain the minimum total sensor movement needed to form a cycle barrier.

B. DETERMINING THE NEAREST SINK
In this subsection, we propose a method to determine the nearest sink for one point of the cycle barrier.
We adopt the algorithm from the line barrier coverage, which is to first compute the boundary-points and then find all the b_segments and the assigned sinks.However, there are two differences between the line barrier coverage and cycle barrier coverage.First, there may be two boundary-points for each pair of sinks, thus the algorithm for the line barrier can not be directedly applied to the cycle barrier coverage.It implies that two b_segments may have the same assigned sinks.Second, there may exist a b_segment which crosses the starting point and ending point of the cycle barrier.
To handle these two challenges, we propose an algorithm.We choose the point with its polar coordinate [R, 0] as the origin of B denoted as bp 0 and bp µ+1 .Then calculate all the boundary-points, and then sort these boundary-points by their polar angles, denoted by bp 1 , . . .bp µ .Our algorithm considers the set of boundary-points BP = {bp 0 , bp 1 , . . .bp µ , bp µ+1 }.For simplicity, bp i = θ i , where θ i is the polar angle of the point bp i .The basic idea is to compute all b_segments satisfying that the neighbor b_segments share different assigned sinks.Let bs i denote the ith b_segment and BS = {bs 1 , bs 2 , . . ., bs τ } denote the set of b_segments.Let BE = {be 0 , be 1 , . . .be τ } denote the set of the b_segments' endpoints.That is bs i = be i−1 be i .The procedures of the algorithm are described as follows: 1) Initialize BE as an empty set.Let i = 0, j = 0 and be 0 = bp 0 .
2) Calculate the assigned sink sk which is the nearest sink of the point be i + 0.001.
3) Let j = j + 1. Check the boundary-point bp j + 0.001 whether its nearest sink is also sk.If yes, go to 3); Otherwise, let i = i + 1 and be i = bp j .
4) If j is η + 1, stop; otherwise, go to 2).The pseudocode of the algorithm is presented in Algorithm 5.It costs O(n 3 ) time.

C. CALCULATING PROJECTIVE-SUBSEGMENTS
In this subsection, we present a method to divide the cycle barrier into segments called projective-subsegments.
We first calculate the projective-points.Note that for each sink, there are two projective-points and we only choose Then we enumerate all possible projective-subsegments and there are four types of projective-subsegments.Let pp i denote the starting endpoint of one projective-subsegment and pp j be the ending endpoint.
For the first type of projective-subsegment, pp i < 2π and pp j < 2π hold.
For the second type of projective-subsegment, pp i ≥ 2π and pp j ≥ 2π hold.
For the third type of projective-subsegment, pp i < 2π , pp j > 2π and pp j − pp i ≤ 2π hold.
For the fourth type of projective-subsegment, pp i < 2π , pp j > 2π and pp j − pp i > 2π hold.
It is easy to know that the second type and the fourth of projective-subsegment can be transformed into the first type of projective-subsegment.Thus, we only choose the first type and the third type of projective-subsegments and put them into the set PS, which has O(n 2 ) projective-subsegments.
The procedures of the algorithm are described as follows: 1) Initialize PS and PP as an empty set.
2) For each sink, compute its projective-points.Choose the nearer projective-point and add it to PP.We also add a duplication of this projective-point to PP, with the polar angle added by 2π .
3) Sort these projective-points by their polar angles.
4) For each pair of pp i and pp j (i < j), if pp i < 2π and pp j − pp i ≤ 2π hold, then add the p_segment pp j pp k into PS.

D. DEFINING VIRTUAL-CLUSTER
Now we compute all the virtual-clusters after calculating the projective-subsegments.First, we compute the minimum number of sensors within each projective-subsegment.Similar as the line barrier, we divide the range of sensors' final positions into subranges such that the sensors' initial positions are fixed.We use the polar angle of the archor-sensor' final position instead of its x-coordinate and use arcsin(r/R) instead of r.The sensor-range and the sensor_subrange is calculated as the line barrier.
Suppose the archor-sensor is located in one sensorsubrange [a 1 , b 1 ] with final position (R, θ t 1 ).Let y p 1 , y p 2 be the polar radius of the initial position of the sensors which will be located at the left and right endpoints of the projectivesubsegment.Let rr = arcsin(r/R).We calculate the ith sensor's initial position and final position.The ith sensor's final position is calculated as (R, θ t 1 + (i − 1) * 2rr).That is, the x-coordinate of the ith sensor is x i = Rcos(θ t 1 + (i − 1) * 2rr) and the y-coordinate is y i = Rsin(θ t 1 + (i − 1) * 2rr).The ith sensor's initial position is the position of its assigned sink denoted by (x t i , y t i ).The virtual-cluster is calculated as the line barrier.There are O(n 3 ) virtual-clusters and it costs O(n 3 C) time to calculate all virtual-clusters, where C is the time consumed by the optimization method adopted to find the minimum total sensor movement.

E. CONSTRUCTING WEIGHTED BARRIER GRAPH
We construct a directed weighted barrier graph G = (V , E) and the C-MSBC problem can be converted into finding a cycle with the minimum total weights in G. Now we'll show how to construct the directed weighted barrier graph G = (V , E).Each node in V represents a virtual-cluster and its weight is the virtual-cluster's M value.The weight of the edge of two nodes is not infinity if the corresponding virtual-clusters belongs to different projective-subsegments and they are connected.The weight of the edges are set as follows: Initially, the weight of all the edges are set to be infinity.For two nodes vc i = {M i , l i , r i , indx i } and vc j = M j , l j , r j , indx j , the weight of the edges e(i, j) and e(j, i) are calculated as follows: 1) If indx i = indx j , r j ≥ r i , r i ≥ l j and l j > l i hold, e(i, j) is set to be M i ; 2) if indx i = indx j , r j < r i , r i ≤ l j and l j < l i hold, e(j, i) is set to be M j ; 3) if indx i = indx j , r i ≥ 2π, r j ≥ r i − 2π and r i − 2π > l j hold, e(i, j) is set to be M i ; 4) if indx i = indx j , r j ≥ 2π , r i ≥ r j − 2π and r j − 2π > l i hold, e(j, i) is set to be M j ; 5) if r i − l i ≥ 2π , e(i, i) is set to be M i ; Our optimization problem is converted into finding a cycle with the minimum total weights in G.We can use the algorithm in [26] to find the minimum weight cycle, which runs in O(VE) time.
Theorem 20: The minimum total sensor movement needed to form a cycle barrier is exactly the total weights of the minimum weight cycle on the weighted barrier graph G.
Proof: Suppose there is an optimal sensor deployment of minimum total sensor movement forming a cycle barrier, whose sensor movement is smaller than that of the minimum weight cycle on G.
It is easy to know that there is a sensor-cluster in the optimal sensor deployment, which is not a virtual-cluster.By using the similar method in Theorem 19, we can also produce a sensor deployment which has a smaller sensor movement than the optimal sensor deployment, which is a contradiction.
Thus, the Theorem is proved.

VII. EVALUATION
In this section we evaluate the performance of the proposed algorithms by simulation in two different cases.

A. THE LINE BARRIER CASE
We first evaluate the solution for the L-MSBC problem called SMC solution.The sinks are deployed randomly in a belt region with length L and width W .The barrier is a line segment in the belt region starting from [0, 0] to [L, 0].L is set to be 1057 and W is 30.The number of sinks is 5.Each sink can send sensors to cover the barrier.The sensing range of sensors is 22.We mainly focus on the minimum total sensor movement for barrier coverage.This metric is evaluated on the length of the line barrier, the width of the deployed area, the number of sinks and the sensor's sensing range.We compare the SMC algorithm with the greedy algorithm, which run 100 times.The data points are a average of 100 experiments.
Fig 6 shows the effect of the length of line barrier on the minimum total sensor movement.The length of the line barrier varies from 177 to 1200 with step 176.As the length of the line barrier increases, the minimum total sensor movement by two algorithms both increases.The reason is that more sensors are needed to cover the line barrier .We can see that the minimum total sensor movement by SMC is always smaller than the result by the Greedy algorithm, which implies that the SMC algorithm outperforms the Greedy algorithm.With the increasing of the width of the deployed area, the minimum total sensor movement by two algorithms both increases nearly linearly.We can see that the result obtained by SMC algorithm is about 90 percent of that by Greedy algorithm.
Fig 8 shows the effect of the number of sinks on the minimum total sensor movement.The number of sinks varies from 3 to 13 with the step 2. With the increasing of the number of sinks, the minimum total sensor movement by two algorithms both decreases sharply until the number of sinks approaches 7.After passing this value, the result decreases slowly.This demonstrates a tradeoff between the number of sinks and the minimum total sensor movement required to achieve barrier coverage.The result by SMC is always smaller than the result by the Greedy algorithm.When the sensing range is larger than 55, the effect on the result is not significant.

B. THE CYCLE BARRIER CASE
We evaluate the solution for the C-MSBC problem called SCC solution.The barrier is a cycle with the radius R. The sinks are deployed randomly along the cycle barrier with the maximum offset W .Each sink can send sensors to cover the cycle barrier.R is set to be 190 and W is set to be 22.The sensing range of sensors, denoted as r, is set to be 22.The number of sinks is 3.We mainly focus on the minimum total sensor movement for barrier coverage.This metric is evaluated on the radius of the barrier cycle, the maximum offset of the sinks from the cycle barrier, the number of sinks and the sensor's sensing range.As similar as the line barrier case, we also choose the greedy algorithm for comparison.The greedy algorithm and the SCC algorithm are run 100 times.The data points are a average of 100 experiments.algorithm is smaller than that by the Greedy algorithm, thus SCC algorithm always outperforms the Greedy algorithm.As the radius of barrier cycle increases, the minimum total sensor movement also increases.We find that when the radius of the barrier cycle approaches 190, the gap of the two curves is the largest.Fig 11 shows the effect of the maximum offset of the sinks from the cycle barrier on the minimum total sensor movement.The maximum offset of the sinks from the cycle barrier varies from 10 to 110 with the step 20.The result by the two algorithms both increase as the maximum offset of the sinks from the cycle barrier increases.That's because the sensors need to move a larger distance to cover the barrier cycle.
Fig 12 shows the effect of the number of sinks on the minimum total sensor movement.The number of sinks varies from 2 to 6 with the step 1.The minimum total sensor movement by two algorithms both decreases as the number of sinks increases.The minimum total sensor movement decreases by 50 percent when the number of sinks increases from 2 to 6. Fig 13 shows the effect of the sensing range of sensors on the minimum total sensor movement.The sensing range of sensors varies from 20 to 28 with 2 as the step size.The minimum sensor movements by the two algorithms both decrease as the sensing range of sensors increases.The result decreases by 30 percent when the sensing range of sensors increases from 20 to 28.The gap between these two curves is the largest when the sensing range of sensors is 22.

VIII. CONCLUSION
In this paper, we study the minimum total sensor movement problem for barrier coverage under sink-based deployment and propose some algorithms both for the line barrier and the cycle barrier.To solve the line barrier case, we enumerate all the projective-subsegments and compute all possible optimal sensor deployments for each projective-subsegment as virtual-clusters.Then we construct a weighted barrier graph and find the path with the minimum weight, which is the minimum total sensor deployment for achieving barrier coverage.We also solve the cycle barrier case by extending the techniques used in the line barrier case.In the future, we will study an approximation algorithm for solving the minimum total sensor movement problem for barrier coverage under the assumption that sensors are randomly distributed in the surveillance area, which has been proved to be NP-hard.

FIGURE 5 .
FIGURE 5. Illustration of projective-points on the cycle barrier.
Theorem 21: The C-MSBC problem can be solved in O(n 6 ) time.Proof: By Theorem 20, the C-MSBC problem can be transformed to finding the minimum weight cycle on the weighted barrier graph G.We can use the algorithm in [26] to find the minimum weight cycle, which runs in O(VE) time.There are O(n 3 ) vertices and O(n 3 ) edges in G. Thus, the C-MSBC problem can be solved by O(n 6 ) time.

FIGURE 6 .
FIGURE 6.The length of the line barrier changes.

FIGURE 7 .
FIGURE 7. The width of the deployed area changes.

FIGURE 8 .
FIGURE 8.The number of sinks changes.

Fig 7
Fig 7  shows the effect of the width of the deployed area on the minimum total sensor movement.The width of the deployed area varies from 0 to 100 with the step 20.With the increasing of the width of the deployed area, the minimum total sensor movement by two algorithms both increases nearly linearly.We can see that the result obtained by SMC algorithm is about 90 percent of that by Greedy algorithm.Fig8shows the effect of the number of sinks on the minimum total sensor movement.The number of sinks varies from 3 to 13 with the step 2. With the increasing of the number of sinks, the minimum total sensor movement by two algorithms both decreases sharply until the number of sinks approaches 7.After passing this value, the result decreases slowly.This demonstrates a tradeoff between the number of sinks and the minimum total sensor movement required to achieve barrier coverage.The result by SMC is always smaller than the result by the Greedy algorithm.

FIGURE 9 .
FIGURE 9.The sensing range of sensors changes.

FIGURE 10 .
FIGURE 10.The radius of the barrier cycle changes.

Fig 9
Fig 9  shows the effect of the sensing range of sensors on the minimum total sensor movement.The sensing range of sensors varies from 11 to 66 with 11 as the step size.As the sensing range of sensors increases, the minimum total sensor movement decreases.That's because more sensors are needed to achieve barrier coverage when the sensing range increases.The result first decreases sharply, and then decreases slowly.When the sensing range is larger than 55, the effect on the result is not significant.
Fig 10 shows the effect of the radius of barrier cycle on the minimum total sensor movement.The radius of barrier cycle varies from 175 to 200 with step 5.The result by the SCC

FIGURE 11 .FIGURE 12 .
FIGURE 11.The maximum offset of the sinks from the cycle barrier changes.