In this section, we propose solution for sweep coverage problem on a weighted undirected graph. The vertices of the graph are considered as PoIs. The mobile sensors can move along the edges of the graph with a uniform speed v. Let G = (U, E, w) be a weighted graph, where weight of an edge (ui, uj) for ui, uj ∈U is denoted by w(ui, uj). Let n be the total number of vertices in G. For any subgraph H of G, we denote w(H) for the sum of the edge weights of H. We define sweep coverage for the vertices of a graph as follows.
Definition 3.3.1 (t-sweep coverage). Let U = {u1, u2, · · ·, un} be the vertices of a weighted graph G= (U, E, w), andM ={m1, m2,· · · , mn}be the set of mobile sensors.
The mobile sensors move with a uniform speed v along edges of the graph. A vertex ui is said to be t-sweep covered if and only if at least one mobile sensor mj visits ui in every t time period.
Problem 1 (Sweep coverage problem on graph). Let U = {u1, u2, · · ·, un} be the vertices of a weighted graph G = (U, E, w) and M = {m1, m2,· · · , mn} be the set of mobile sensors. The mobile sensors move with a uniform speed v along the edges of the graph. For a given t > 0, find the minimum number of mobile sensors such that each vertex of G is t-sweep covered.
We propose Algorithm 2 (GraphSweepCoverage) to find minimum number of mobile sensors for the sweep coverage problem on graph. From step 1 to step 11 of the algorithm execute in n iterations for finding the best possible solution i.e., number of mobile sensors. In kth iteration (1 ≤ k ≤ n), the minimum spanning forest Fk
with k connected components C1, C2,· · · , Ck is computed. After that k disjoint tours T1, T2,· · · , Tk are found by doubling all edges of each component. Partition eachTi into lw(Ti)
vt
mparts of weight at mostvt. IfTi contains only one vertex, number of partition on Ti is one. Total number of partitions forkth iteration denoted by Nk and which is equal to the number of mobile sensors required for the iteration. Minimum over the number of mobile sensors of all iterations is chosen as the output of Algorithm 2. Initial positions and the movement schedule of the mobile sensors are calculated within step 13 to step 21 of the algorithm.
3.3.1 Analysis
Theorem 3.3.2. Algorithm 2 guarantees t-sweep coverage for each vertex of G.
Proof. For any vertex ui we want to show that it is t-sweep covered. According to Algorithm 2, there are two following cases.
Case 1: (ui is in a component with more than one vertex) Let ui is visited by a mobile sensor mj at time t0. According to the algorithm, mobile sensors are
Algorithm 2 GraphSweepCoverage
1: for k = 1 to n do
2: Find the minimum spanning forest Fk onG with n−k edges. Let C1, C2,· · · , Ck
be the connected components ofFk.
3: Nk= 0.
4: for j = 1 to k do
5: if Cj is a component having more than one vertexthen
6: Nk=Nk+l
2w(Ci) vt
m .
7: else
8: Nk=Nk+ 1.
9: end if
10: end for
11: end for
12: Let J be the index ∈ {1,2,· · ·, n}such that NJ = min{N1, N2,· · · , Nn}.
13: Let C1, C2,· · ·, CJ be the connected components ofFJ.
14: for i= 1 to J do
15: if Cj is a component having more than one vertex then
16: Find a Eulerian tour Ti on Ci by doubling each edge of Cj. Partition the tour into l
w(Ti) vt
m parts and deploy one mobile sensor at each of the partitioning points.
17: else
18: Deploy one mobile sensor at the vertex of Ci.
19: end if
20: end for
21: All mobile sensors start moving at the same time along the respective tours having more than one vertex in same direction. If a mobile sensor is deployed on a tour containing only one vertex then it periodically monitors the vertex.
initially deployed within vt distance apart. Then the mobile sensors start moving with same speed v in the same direction. So ui will be again visited by the next mobile sensor of mj within time t+t0.
Case 2: (ui is in a component with no other vertices) In this case the statement of the theorem is trivially true as one mobile sensor is deployed at ui and which periodically covers it.
Lemma 3.3.3. Let optbe the number of mobile sensors needed in the optimal solution.
Let opt0 be the minimum number of paths of weight ≤ vt which span U on G. Then
opt≥opt0.
Proof. We want to prove it by the method of contradiction. Let us assume opt < opt0. Consider the paths of movements by the mobile sensors in the optimal solution during any time period [t0, t0+t]. Let P1, P2,· · · , Popt be the movement paths of the mobile sensors with w(Pi) ≤ vt. Since each vertex is visited by a mobile sensor at least once in time period t therefore Sopt
i=1Pi spans all the vertices of U. Hence, {P1, P2,· · · , Popt} is a collection of paths with w(Pi) ≤ vt that spans U, which contradicts the fact that opt < opt0. Therefore opt≥opt0.
Theorem 3.3.4. The Algorithm 2 is a 3-approximation algorithm.
Proof. Let optbe the minimum number of mobile sensors required in the optimal solu- tion. Let opt0 be the minimum number of paths of weight ≤vt, which span U onG and M in path be the sum of the weights of all such paths. Then by Lemma 3.3.3,
opt0 ≤opt (3.3.1)
and
M in path ≤opt0×vt (3.3.2)
Again, these opt0 number of paths of weights ≤ vt forms a spanning forest with opt0 disjoint connected components. As Fopt0 is the minimum spanning forest with opt0 con- nected components, therefore,
w(Fopt0)≤M in path. (3.3.3) Algorithm 2 chooses the minimum over all Nk for k = 1 to n. Let us consider the iteration of the algorithm when k = opt0. Consider a connected component Ci of Fk. If Ci is a component with more than one vertex, then number of partitions on Ci is l2w(Ci)
vt
m
which is≤
2w(Ci)
vt + 1
. If Ci is a component with one vertex, then w(Ci) = 0 and number of partition on Ci is 1 which is equal to
2w(Ci)
vt + 1
. Therefore, total
number of partitions in this iteration is given by,
Nk ≤
k
X
i=1
2w(Ci) vt + 1
= 2w(Fk) vt +k
≤ 2M in path
vt +k from Equation (3.3.3)
≤ 2k+k from Equation (3.3.2)
= 3k
≤ 3opt from Equation (3.3.1)
Since N ≤ Nk, therefore, N ≤ 3opt. Therefore the approximation factor of the Algo- rithm 2 is 3.
Theorem 3.3.5. The time complexity of Algorithm 2 is O(n2logn).
Proof. Selection of first k edges of a graph in Kruskal’s algorithm gives the minimum spanning forest withn−k components. For eachk, depth first search can be applied to identify the connected components. Hence time complexity for computing the step 1-13 is O(n2logn+n2). In step 16, O(n) time is required to find partitioning points of the Eulerian tours after doubling each of the components. Therefore overall time complexity of the Algorithm 2 is O(n2logn).