Optim Lett (2010) 4:393–403 DOI 10.1007/s11590-010-0175-0 ORIGINAL PAPER
On approximation of dominating tree in wireless sensor networks Incheol Shin · Yilin Shen · My T. Thai
Received: 6 November 2009 / Accepted: 18 January 2010 / Published online: 5 February 2010 © Springer-Verlag 2010
Abstract We study the following problem: Given a weighted graph G = (V, E, w) with w : E → Z+ , the dominating tree (DT) problem asks us to find a minimum total edge weight tree T such that for every v ∈ V , v is either in T or adjacent to a vertex in T . To the best of our knowledge, this problem has not been addressed in the literature. Solving the DT problem can yield a routing backbone for broadcast protocols since (1) each node does not have to construct their own broadcast tree, (2) utilize the virtual backbone to reduce the message overhead, and (3) the weight of backbone representing the energy consumption is minimized. We prove the hardness of this problem, including the inapproximability result and present an approximation algorithm together with an efficient heuristic. Finally, we verify the effectiveness of our proposal through simulation. Keywords Dominating tree · Approximation algorithm · Routing backbone · Wireless sensor network
1 Introduction In this paper, we study the following new problem, called Dominating Tree (DT), defined as follows. Given an undirected weighted graph G = (V, E, w) representing a wireless sensor networks (WSN), where V is the set of the nodes in the network, E I. Shin (B) · Y. Shen · M. T. Thai Department of Computer and Information Science and Engineering, University of Florida, Gainesville, FL 32611, USA e-mail:
[email protected] Y. Shen e-mail:
[email protected] M. T. Thai e-mail:
[email protected]
123
394
I. Shin et al.
is the set of all communication links in the network, and w is a non-negative weight assigned on each edge e = (u, v). We wish to find a Dominating Tree T of G with the minimum weight such that each node in V is either in T or has at least one neighbor in T . The weight of T is defined as the sum of all edge weights in T . The DT problem has several applications in network design and network routing. For example, multicasting involves the distribution of same data from a central sever to several nodes in the network. Under this setting, we can consider the edge weight as the energy consumption to send a message along that edge. Thus the problem becomes to choose a set of edges (or communication links) of minimum weight for the sever to route the data, which is exactly the DT problem. Since all nodes are at most one hop away from the tree, a message can be first forwarded to the closest node in tree. Then the message can be routed within the DT until it reaches to its destination. In addition, using DT as the routing backbone can help reduce the message overhead complexity. However, no non-trivial approximation algorithm and its hardness were known for the DT problem. From a practical view of energy in WSNs, since the sensor nodes usually have no plug-in power, we have to conserve power so that each sensor node can operate for a longer period of time. Many solutions for constructing a routing backbone with minimum energy consumption have been proposed, including the connected dominating set [1–5]. However, this problem only considers the size of the set obtained, not the weight of edges. In other words, the weight is only associated with each node in these approaches, not with edges where the energy consumption at each link in the communication directly effects the energy consumption of routing. In the theory community, there are some work [6–8] studying the tree cover problem which is defined as a connected edge dominating set with total minimum edge weights. Arkin et al. first solved this problem in [6]. Later, in [7], this problem can be approximated within a factor of 3 + . In [8], the author presented a fast combinatorial 2-approximation algorithm for the tree cover problem. In contrast to the above work, DT is defined as node dominating sets, not edge dominating sets. Usually, DT always produces a smaller number of links and weight than tree cover, and it is more difficult than tree cover problem. In this paper, we first prove the NP-hardness of this problem together with the inapproximability and an approximation algorithm in Sect. 2. We next present a heuristic algorithm with low time complexity in Sect. 3. The simulations are discussed in Sect. 4. Finally, Sect. 5 concludes this paper. 2 Hardness and approximation In this section, we will show that DT is NP-complete and it is inapproximated within (1 − ) ln |V |. Due to the reduction on the proof of NP-completeness preserving the approximation gap, we only show the reduction in the proof of inapproximability. We then present an approximation framework for the DT problem. 2.1 Inapproximability Theorem 1 The DT problem is inapproximable within (1 − ) ln |V | for any ≥ 0, unless N P ⊆ DT I M E(|V |log log |V | ) in general graphs.
123
On approximation of dominating tree in wireless sensor networks
(a)
395
(b)
Fig. 1 Reduction from WDS G to DT G
Proof We will show an approximation ratio preserving reduction from weighted dominating set (WDS) problem to DT. WDS asks for the subset of vertices with the minimum weight such that all nodes are dominated. In [9], WDS is shown to be inapproximable within (1 − ) ln |V | for any ≥ 0, unless N P ⊆ DT I M E(|V |log log |V | ). Given an instance of WDS, that is, a graph G = (V, E, w) and a weight function w : V → Z+ , the problem is to find a minimum weight subset of nodes that dominates all other nodes. We will construct a DT instance G = (V , E , w ) as follows. For each node vi ∈ V , we introduce two new nodes xi and yi shown as grey nodes and black nodes in Fig. 1b. Let X = {xi } and Y = {yi }. Let V = V ∪ X ∪ Y . The set E and w are constructed as follows. For all nodes in V , the edges are kept the same. For each edge (vi , v j ), letw (vi , v j ) = M, where M is a very large number, for instance, we can set M ≥ |V | e∈E w(e). For all nodes in Y , we introduce a spanning tree on all nodes in Y = {y1 , . . . , yn } with the weight 0 of all spanning edges between yi . For each pair (vi , yi ), we create a new edge with weight w (vi , yi ) = w(vi ). And finally, to connect the layer V to X , for each node vi ∈ V , we create a new edge (vi , xi ) with weight M and edges (vi , x j ) with weight M if (vi , v j ) ∈ E. Consider a minimum dominating set D ∈ V on G with the minimum weight m, we will show that G has a dominating tree T with the minimum weight of m. Consider the DT T = D ∪ D y ∪ Ty , where D y consists of the set of yi if vi ∈ D, Ty ∈ Y is the nodes spanning all D y . Since the set D dominates all nodes in X as well, the edges between X and V will not be selected. Notice that M is much larger than w(vi ) and 0, the edges between vi ∈ V will not be selected in the DT. In addition, the edges between yi ∈ Y can be arbitrarily selected to form a spanning tree on D y with no increasing of the minimum weight. Notice that (vi , yi ) has to be selected in T to induce the tree, thus the weight of T is m. On the other hand, given DT T of G with the minimum weight m, we will show that G has a minimum dominating set D of weight m as well. According to the construction, if there exists a node xi ∈ X is selected in T , in order to span this node into a tree, at least one edge with weight n M has to be selected. Since we know M is w(i) will lead to be solution not optimal large enough, w.l.o.g, we know M > i=1 any more. By construction, there exists an edge (vi , x j ) if (vi , v j ) ∈ E such that the
123
396
I. Shin et al. A*
(a)
B*
(b)
Fig. 2 An example of reduction from G to G
dominating set D ∈ V can not only dominate all nodes in V but also in X as well. However, in order to dominate the nodes in Y , the edges between vi and yi have to be selected if vi ∈ D. Thus, there is a WDS D with weight m as well, which is optimal. Therefore, DT problem is inapproximable within (1 − ) ln |V | for any ≥ 0 unless N P ⊆ DT I M E(|V |log log |V | ) for general graph. The proof is complete. 2.2 Approximating dominating tree Before presenting our solution, we first give some basic definitions and lemmas concerning the partial solutions for the DT problem. Then an approximation framework is analyzed with the performance ratio of i(i − 1)n 1/i in time O(n 3i ) for any fixed i ≥ 1, where n is the number of nodes in a given graph. Definition 1 (Directed Steiner Tree (DST)) In a directed graph G = (V, E) with weight associated with each edge, given a root r ∈ V and a set D ⊆ V , the Directed Steiner tree asks us to construct a tree with the minimum weight rooted at r , ensuring that there is at least a path from the root to each node in the set D. We will show that the DT problem can be reduced to the DST problem in polynomial time. And the algorithm for DST can be applied to the DT problem preserving the same performance ratio. For the DT problem, in the graph G = (V, E, w), we introduce a dummy vertex v ∗ for each real vertex v ∈ V , then we add the directional edges from all the neighbors of v (including v itself) to dummy node v ∗ , and we set the weight zero for all these newly added edges. Also for the original edges, we make the edge bidirectional and keep the weight the same as the edge in the original graph. In the new directed graph G = (V , E , w ), if we pick an arbitrary v ∈ V as a root r , and let all dummy vertices as terminals, we can obtain a DST rooted at r through existing DST algorithm [10] and thus we can obtain an DT of G. It is clear that the reduction is completed in linear time. This reduction is shown as an example in Fig. 2. Lemma 1 If r is in the optimal DT, then the DT introduced by DST will get the same optimal weight. Also, using the approximation algorithm for DST problem will get the same approximation ratio for the DT problem.
123
On approximation of dominating tree in wireless sensor networks
397
Proof Suppose there is an optimal dominating tree DT ∗ , we can make all the nodes in DT ∗ appear in the DST. Since r is in DT ∗ , for each node in DT, at least one of its neighbors must be in DT, and for any terminal, we can add a directed edge from that neighbor to it. And we know that these edges are zero weighted, so the weight of that DST is w(DT ∗ ). Suppose there is an optimal DST ST ∗ , then we have w(DT ∗ ) ≥ w(ST ∗ ). Also, for the optimal DST, we can eliminate all these zero weighted edges. Since all the terminal nodes have a path from r to them, each node will have at least one of its neighbor appearing in that tree, which means it is a DT. So we have w(ST ∗ ) ≥ w(DT ∗ ). In conclusion, we have w(DT ∗ ) = w(ST ∗ ). This in turn implies that we can get the same performance ratio for the DT problem as we have for the DST. In [10], the authors provided a polylogarithmic approximation for the DST problem in quasi-polynomial time. Then we have an algorithm to obtain this ratio for the DT problem as well: Algorithm 1 Approximation Algorithm for DT 1: INPUT: An undirected weighted general graph G = (V, E, w) 2: OUTPUT: A DT of G 3: Initialize a list to save the DT and its weight 4: Find a vertex u in G with minimum degree 5: Transform G into G = (V , E , w ) by using the transformation technique 6: for each node v that (u, v) ∈ E do 7: Run the DST algorithm [10] in G and make v as the root r to get a DT 8: Save the DT and its weight in the list 9: end for 10: Return the DT with minimum weight in the list
Algorithm 1 is based on the idea of transforming the DT problem to the DST problem, and then use the algorithm in [10] to solve DST problem, thus obtaining the solution for DT. Note that after the transformation, we need to find the right root for applying that algorithm, since the ratio for DST is maintained if and only if r is in the optimal DT. This can be done by enumerate the neighbors of the node with the minimum degree, since at least one of the neighbors should be in optimal DT. Therefore, from Lemma 1, we can obtain the same approximation ratio for DT. Finally, since the terminal nodes in G are those dummy vertices which have no outgoing edges, we can simply remove these dummy vertices and those edges incident to them to obtain a DT. By setting i = lg n, the algorithm will obtain an O(lg2 n) approximation in quasi-polynomial time which is n O(lg n) . 3 Heuristic algorithm and analysis In the previous section, we introduced the approximation framework. However, the time complexity is quite high, due to that fact that constructing a DST usually results in a long running time. From this point of view, a heuristic with low time complexity is highly expected.
123
398
I. Shin et al.
3.1 Algorithm description We begin this section by defining the terminologies used in our proposed solution as follows. – Leaf edge: An edge is called a leaf edge if it directly connects to a leaf node. – Active edge: An active edge is a leaf edge which links a leaf node from a single-node subtree to an internal node without considering its weight. – Inactive edge: This is an edge connecting two subtrees during the construction of DT. In contrast with active edges, we do consider the weight for this inactive edge. All inactive edges will be edges of the DT. The heuristic algorithm (HeurDT) is depicted in Algorithm 2. From the high level, the algorithm consists of the following main steps: 1. 2. 3.
4.
Initialize a tree, where each vertex in a given graph is a separate subtree. Create a sorted list of all edges in G by weights. While all the subtrees are not merged into a tree DT (a) Remove an edge with minimum weight from the sorted as an inactive edge. (b) When the edge from the list connects two different subtrees without any circles. i. Merge them into a subtree by adding the inactive edge to DT . ii. If new internal nodes converted from leaf nodes during merging subtrees have some single-node subtree neighbors, then link these internal nodes with them by active edges so as to maximize the size of leaf nodes in DT . iii. If the new inactive edge connecting to a node which already has an active edge incident to it, remove this active edge. Prune all the leaf edges of the resultant DT .
The details of merging two subtrees are shown in Algorithm 3. The only purpose of active edges is to maximize the number of leaf nodes without considering their weights due to the fact that the total weight of DT does not include the Algorithm 2 Heuristic Algorithm for DT (HeurDT) Input: Given an undirected weighted general graph G = (V, E, w) Output: A DT of G DT ← ∅ for each vertex v in a given G do Initialize a subtree Tsub (v) ← {v} /* Tsub (v) is the subtree which contains v */ end for Sort all edges in G by weights while the number of subtree Tsub > 1 do e = (u, v) ← minimum weight edges from list of sorted edges if u and v are connected by an active edge then convert the active edge into inactive edge else if Tsub (v) == Tsub (u) then continue /* e creates a circle in DT */ else MergeT woSubtr ees (e, DT ) end if end while Prune all the leaf edges in resultant DT Return the DT
123
On approximation of dominating tree in wireless sensor networks
399
Algorithm 3 MergeTwoSubtrees(e = (u, v), DT ) Input: (e = (u, v), DT ) Output: DT if u has only one active link in DT then Remove the active links from u in DT Initialize a subtree Tsub (u) ← {u} end if if v has only one active link in DT then Remove the active links from v in DT Initialize a subtree Tsub (v) ← {v} end if Add e = (u, v) to DT as an inactive link /* Merge two different subtrees */ if u == internal and u has at least one inactive link then for each neighbor node w of N (u) in G do if |Tsub (w)| == 1 then Add e = (u, w) to DT as an active link Tsub (u) ← Tsub (u) ∪ Tsub (w) end if end for end if if v == internal and v has at least one inactive link then for each neighbor node w of N (v) in G do if |Tsub (w)| == 1 then Add e = (v, w) to DT as an active link Tsub (v) ← Tsub (v) ∪ Tsub (w) end if end for end if Return DT
weights from leaf edges. Those edges are active since they might need to be removed when the leaf nodes in active edges have been connected by other inactive edges while merging subtrees. Note that since we do not consider the weights for these active edges, we only keep these active edges as the leaf edges in order to prune them later. All other internal edges must be inactive edges where we do consider the weight during the merging in their increasing order, thus minimizing the weight of DT. An example of removing an active edge during the merging is shown in Fig. 3 which depicts the execution of heuristic algorithm. In the Fig. 3b, c, since leaf node g is a new internal node with single-node subtree i after merging, g links i together by active edge. However, active edge (i, g) has to be removed when new inactive connection (c, i) occurs connecting subtree c to i. Because all internal nodes have to be connected by inactive edges, and if we do not remove active edge (i, g), i will be internal node with an existing active edge (i, g) and thus increasing the weight of DT. 3.2 Runtime complexity Let n be the number of nodes, m be the number of edges, and be the maximum degree of G, the runtime of each step is listed as follows: 1. O(n) time to initialize all the nodes. 2. The complexity of Merge Sort algorithm to sort edges by weight in Step 2 is O(m log m) [11].
123
400
I. Shin et al.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)
Fig. 3 The execution of HeurDT algorithm
3. In Step 3, for each new internal node u from merging subtrees, all its neighbors need to be checked to see if there are any subtrees with only one node, which is O() for each edge to process. However, only merging subtrees would be able to convert leaf nodes into internal nodes, and the total number of merging process takes place at most O(n). As a result, the overall complexity for Step 3 is O(n). 4. Pruning all leaf nodes only takes linear time. From the above analysis, the total running time complexity is dominated by Step 2. That is, the runtime of this heuristic algorithm is at most O(n 2 log n), where the graph is dense enough ( ≈ O(n) and m ≈ n 2 ).
4 Performance evaluation In this section, the simulation experiments were conducted to verify the performance of the heuristic algorithm against the optimal solution. In addition, it is easy to see that a minimum spanning tree without leaf (MST-L) of G is also a DT of G, we would like to compare our proposed heuristic to this simple MST-L solution. To evaluate how good the DT is in the WSNs setting, instead of randomly assigning a weight w for each edge, we will consider the energy consumption of each edge during the communication. That is, we consider a disk graph G = (V, E) where each disk represents a transmission range of each node. The weight of each edge (u, v) is defined γ as w(u, v) = Cv · duv where duv is the Euclidean distance between two nodes, u and v, γ is predefined value to 2 because it is a typical value for an unobstructed environment, and Cv is a random constant. n nodes with transmission range r = 25 m are randomly deployed in a predefined area size of 100 m × 100 m. n varies from 10 to 17 with increment of 1, and 20 network instances were investigated for each value of n, and the results were averaged.
123
On approximation of dominating tree in wireless sensor networks
401
First of all, let us present the Integer Programming (IP) formulation of the DT problem. We will use CPLEX to solve this IP and the optimal result will be compared with that of our heuristic.
min
wuv xuv
(u,v)∈E
subject to yu + yv ≥ 2xuv (u, v) ∈ E xuv ≤ |S| − 1 S ⊂ V u,v∈S,(u,v)∈E
xuv =
(u,v)∈E
yu − 1
(1)
u∈V
yu ≥ 1 v ∈ V
u∈N + (v)
yv ∈ {0, 1} v ∈ V xuv ∈ {0, 1} (u, v) ∈ E where yv = xuv =
1 if vertex v is selected in the optimal solution 0 otherwise 1 0
if edge (u, v) is selected in the optimal solution otherwise
(2) (3)
In the above IP Formulation, the first constraint shows the relation between vertices and edges in optimal solution, that is, for each edge selected in optimal solution, the end vertices has to be selected; The second and third constraints are similar to the formulation in Minimum Spanning Tree problem to guarantee that the solution is a tree; The fourth constraint shows the constraint of the dominating set. Basically, for each vertex v, at least one of its neighbors or itself has to be selected. Comparing the weight Figure 4a illustrates the performance of those three approaches in terms of the weight of DT . As shown in Fig. 4a, the DT weights from HeurDT are very close to the optimal solution, which shows HeurDT performs extremely well. In particular, the DT weight from HeurDT has at most 8% of additional weights than the optimal results when n = 15 according to the Fig. 4a. In addition, the gap in DT weights between the optimal solution and that of HeurDT does not show growing trends even with increasing number of nodes in G. For example, DT from HeurDT has 8% more weights than optimal DT when n = 15. However, only 7% more weights than optimal weight when n = 17. As expected, the weight from MST-L is much larger than that of HeurDT. This is due to that fact that HeurDT converts all the unnecessary edges into lea f edges except the inactive edges connecting subtrees whereas the typically MST does not consider this.
123
402
I. Shin et al. 12 IP Optimal Heur Algo MST-L Algo
10
100 50 0
100000
IP Optimal Heur Algo MST-L Algo
Runtime (ms)
150
DT size
DT weight
200
8 6 4 2 0
IP Optimal Heur Algo MST-L Algo
10000 1000 100 10
9 10 11 12 13 14 15 16 17 18
9 10 11 12 13 14 15 16 17 18
# of nodes
# of nodes
# of nodes
(a)
(b)
(c)
9 10 11 12 13 14 15 16 17 18
Fig. 4 Simulation results for HeurDT, MST-L and optimal results. a DT weight; b DT size; c running time
Comparing the size As the number of nodes in DT may also affects the performance of any routing protocol based on this virtual backbone, we also would like to compare the performance of these three approaches in term of the DT size. As shown in Fig. 4b, the difference in size between optimal size and the DT obtained by H eur DT is very small. According to the Fig. 4b, the DT built from HeurDT has at most 1.2 nodes more than the DT from OptDT in the case of the network instance with 15 nodes. Significantly, Fig. 4b indicates that the difference in DT size is not affected by network size. However, the size of MST-L is much larger than that of HeurDT. It is very clear to prove that HeurDT maximizing the number of leaves during the merging can drastically reduce the DT size. As n increases, the difference in size of DT between MST-L and the HeurDT significantly increases up, such as 33% additional nodes when n = 4 and 42% more nodes in MST-L when n = 17 than the DT generated by HeurDT. This reveals substantial difference of DT size between them when we take the total number of nodes in G into consideration. Comparing the running time Figure 4c presents the running time of all three approaches. As expected, the running time for finding the optimal solution is extremely high. One more time, it confirms that it is too expensive to find the optimal solution, leading to the study of approximation solution. Interestingly, the running time of HeurDT and MST-L is very close to each other. For example, HeurDT takes around 37ms more in average than the MST-L approach. This is due to the time spent on identifying active edges and removing them if they are placed between internal nodes Additionally, converting leaf nodes to internal nodes during merging subtrees necessitates a procedure to check all their neighbors in order to maximize the number of leaf nodes. However, the difference between them is very subtle where as the size and weight of DT obtained from HeurDT is much smaller than that of MST-L. In summary, HeurDT obtains a very good DT with very low time complexity.
5 Conclusion In this paper, we investigate a new NP-hard problem of how to construct a DT with minimum weight in WSN. We prove the inapproximability result and provide the approximation framework to solve the DT problem. In addition, due to the high runtime complexity of this approximation algorithm, a much more efficient heuristic algorithm is also proposed.
123
On approximation of dominating tree in wireless sensor networks
403
Acknowledgments My T. Thai has been supported in part by NSF grant number CNS-0847869 and DTRA, Young Investigator Award, grant number HDTRA1-09-1-0061.
References 1. Thai, M.T., Wang, F., Liu, D., Zhu, S., Du, D.Z.: Connected dominating sets in wireless networks with different transmission ranges. IEEE Trans. Mobile Comput. 6(7), 721–730 (2007) 2. Wan, P.-J., Alzoubi, K.M., Frieder, O.: Distributed construction on connected dominating set in wireless ad hoc networks. In: Proceedings of the Conference of the IEEE Communications Society (INFOCOM) (2002) 3. Guha, S., Khuller, S.: Approximation algorithms for connected dominating sets. Algorithmica 20, 374–387 (1998) 4. Park, M., Wang, C., Willson, J., Thai, M.T., Wu, W., Farago, A.: A dominating and absorbent set in wireless ad-hoc networks with different transmission range. In: Proceedings of the 8th ACM International Symposium on Mobile Ad Hoc Networking and Computing (MOBIHOC) (2007) 5. Thai, M.T., Tiwari, R., Du, D.-Z.: On construction of virtual backbone in wireless ad hoc networks with unidirectional links. IEEE Trans. Mobile Comput. 7(8), 1–12 (2008) 6. Arkin, E.M., Halldorssom, M.M., Hassin, R.: Approximating the tree and tour covers of a graph. Inform. Process. Lett. 47, 275–282 (1993) 7. Fujito, T.: On approximability of the independent/connected edge dominating set problems. Inform. Process. Lett. 79(6), 261–266 (2001) 8. Fujito, T.: How to trim an MST: a 2-approximation algorithm for minimum cost tree cover. ICALP (1), 431–442 (2006) 9. Feige, U.: A threshold of ln n for approximating set cover. J. ACM 45(4), 634–653 (1988) 10. Charikar, M., Chekuri, C., Cheung, T., Dai, Z., Goel, A., Guha, S., Li, M.: Approximation algorithms for directed steiner tree problems. J. Algorithms 33, 73–91 (1999) 11. Leiserson, C.E., Rivest, R.L., Cormen, T.H., Stein, C.: Introduction to Algorithms. MIT Press, Cambridge (1976)
123