4.2. The Auxiliary Graph
To clarify, is referred to as the original graph, and is referred to as the original node. The first step of our approach is to transform the original graph into a weighted auxiliary graph to assist in building the node-weighted Steiner tree. Before we introduce the definition of the auxiliary graph, we need to give two concepts used in the auxiliary graph.
Generation node: For any node , we use to denote u’s generation node in the auxiliary graph .
Schedule node: For any node , we use to denote u’s schedule node in the auxiliary graph . Each schedule node owns three properties, i.e., (, , ), which denote its corresponding generation node, transmitting power and transmitting time slot, respectively. For any node , we call the corresponding generation node of , and is derived from in this paper. Obviously, we can get .
Definition 3. (Auxiliary graph) Given a duty-cycled sensor network
, its auxiliary graph
denotes the graph containing the scheduling information, where
and
denote the set of nodes and edges.
and
are constructed as follows:
- (i)
Initially, , ;
- (ii)
For each node , we add a generation node in the auxiliary graph , i.e., ;
- (iii)
For each node , we then add schedule nodes in , i.e., , where the three properties of are set as , and , respectively. It is to be noticed that the transmitting time slot of is initialized as zero, and we will introduce the method to determine later. Let the set of all of the schedule nodes of u be denoted by . Then, we can have .
- (iv)
For each node , we create an edge between and each schedule node , which means node u can transmit with power on time slot . Let , then we can have ;
- (v)
Let v be a neighboring node of u in the original graph G, and is the generation node of v. For any schedule node , we add an edge in if only if v is under the transmission range of u with transmitting power , and we use to denote the set of such nodes v of . After then, can be updated as , where .
As the example in
Figure 1, there is an original graph in
Figure 1a, where the number in the braces denotes the working schedules. There are two power levels
for each node, and
. As for the forwarder
f, it can reach
a and
c with transmission power
and
a,
b,
c with transmission power
. As for the above original graph, we do as follows according to Definition 3, where the result is shown in
Figure 1b. Firstly, the generation nodes are created for each original node,
i.e., the blue nodes in
Figure 1b, which are
,
,
and
, respectively. Then, we create two schedule nodes
and
with transmitting power
and
, respectively, and their three properties are
and
. According to the above discussion, we connect
and
to
and connect
,
and
to
.
Figure 1.
An example of constructing the auxiliary graph. (a) The original graph; (b)The intermediate auxiliary graph; (c) The final auxiliary graph.
Figure 1.
An example of constructing the auxiliary graph. (a) The original graph; (b)The intermediate auxiliary graph; (c) The final auxiliary graph.
In the following, we will introduce the transmitting time slot-determining algorithm to determine the transmitting time slot for each schedule node in the constructed auxiliary graph . Before that, we need to give some notations.
Let and denote the first active time slot and the last active time slot of node u, respectively. Since the sensor nodes can only receive the data message when it is in the active state, the transmitting time slot must be assigned as the slot that all of its reaching nodes are active. For a schedule node and all of the reaching nodes in , it may require several slots to deliver the message to all of them. For this case, the schedule node may be split into multiple schedule nodes with the same generation node and transmitting power (e.g., and ), but different transmitting time slots (e.g., ). In addition, for any transmission schedule in the optimal schedule, we should find a corresponding schedule node in the auxiliary graph.
For any schedule node in Definition 3, the transmitting time slot-determining algorithm exploits a greedy strategy, which mainly works as follows:
Firstly, all of the nodes in are sorted by their ending time slots in ascending order.
Secondly, we greedily choose the last active time slot of the first node in to create a new schedule node. Let be such a node, and then, we create a new schedule node and set . For any node , we connect it to the new schedule node if . After that, we remove from . For the nodes left in , we repeat the same procedure, until all of the nodes in are handled.
Finally, since the original schedule node
will not be used afterwards, we delete it from
directly. The detailed procedure of the transmitting time slot-determining algorithm is shown in Algorithm 1.
Algorithm 1 Transmitting time slot-determining algorithm. |
Input: A schedule node , the set of its reaching nodes ; Output: The set of splitting schedule nodes and its transmitting time slot ;
- 1:
Sorting the nodes in according to their last active time slot; - 2:
; - 3:
while is not empty do - 4:
the first node in ; - 5:
Create a new schedule node identical to ; - 6:
; - 7:
Add edge and in ; - 8:
for to do - 9:
the i-th node in - 10:
if then - 11:
add edge ; - 12:
else - 13:
break; - 14:
end if - 15:
end for - 16:
; - 17:
Remove from ; - 18:
end while - 19:
Delete from ; - 20:
return the set of splitting schedule nodes of ;
|
As shown in the above example, since the working schedules of nodes
a and
c are not overlapped, we split the schedule node
into two schedule nodes
and
to connect to
and
, respectively. The transmitting time slot for
and
are set as 4 and 7 respectively, since
and
. As for the schedule node
, its reaching node
. We first choose the minimal last active time slot from
, e.g.,
, to create a new schedule node
with
. Then, we connect
to node
and
. After that, we remove
a from
. For the rest of nodes in
, we do similarly and choose Time Slot 6 to create a new schedule node to connect node
and node
. The complete auxiliary graph is shown in
Figure 1c, and the three properties for each schedule node are shown in the brackets above the node.
Through the above procedure, we can see that the original schedule node is “split” into several schedule nodes with different transmitting time slots. The above greedy strategy can guarantee that for any transmission schedule
in the optimal solution, we can find a corresponding schedule node in the auxiliary graph, which is shown in Theorem 2.
Theorem 2. Assuming and are the optimal multicast tree and its transmitting schedules. Then, for any , we can find a schedule node in the auxiliary graph .
Proof. Let denote the set of the children of u in the multicast tree where u can communicate with at time t by transmitting power p, and v is the node of the minimum last active time slot in . In the following, we will prove this from two aspects.
(1) We will firstly prove that all of the working schedules of nodes in contain the time slot . Assuming there is at least one node whose working schedule does not contain time slot , since the working schedules are consecutive, then there must exist a node that or . As v denotes the node with the minimum last active time slot in , so we have . In addition, according to the definition of the MEMAP problem, the working schedules of all of the nodes in are overlapped, and all contain time slot t. Then, we can have and , which result in . Combining the two reasons, we can get and , which contradicts that or . Therefore, all of the working schedules of nodes in contain the time slot .
(2) Now, we will prove that the schedule node
is the target node in two cases:
If , is the correspondent schedule node obviously.
If , since all of the working schedule of the nodes in contains the time slot , so is also a feasible schedule that u can communicate with all of the nodes in with transmitting power p at time slot . In this case, we can just map the transmitting schedule to the schedule node , as well.
Combing the above two reasons, the theorem is proven. ☐
So far, the auxiliary graph has been constructed. We can find that in the auxiliary graph can be partitioned into two subsets and , where is the set of all generation nodes and is the set of all of the schedule nodes. In order to exploit the node-weighted Steiner tree algorithm, we set the weight of each generation node as and set the weight of each schedule node as .
The size of the auxiliary graph is analyzed in Theorem 3.
Theorem 3. The number of nodes and edges in the auxiliary graph are at most and , respectively, where Δ denotes the maximum degree and denotes the number of nodes in the original graph.
Proof. Firstly, as in Definition 3, for each generation node
in the auxiliary graph
, there is only one schedule node
with power level
l in
, where
denotes all of the schedule nodes of
u. Then, the schedule node
is split into several schedule nodes with power level
l after executing the transmitting time slot-determining algorithm. Let
denote the set of schedule nodes derived from
, and its power level is
l. In the worst case, we can have
. Then, for each node
, we can have:
Thus, according to Equation (
2), the total number of nodes in the auxiliary graph
can be calculated as:
where
denotes the number of nodes in the original graph.
Secondly, according to Definition 3 and Algorithm 1, for each generation node
, there exists an edge between
and
. For each schedule node
, there exists at most
edges from
to its neighboring generation nodes. Then, we can have:
☐
As we can see, compared to the original graph, the nodes in the auxiliary graph increased times and the edges increased times. Since and Δ are usually constant, the size of the auxiliary graph is controlled. In addition, we can notice that the auxiliary graph has the following properties:
(1) Given two nodes in , there are no edges between them if they are both schedule nodes or generation nodes. In other words, the neighbors of a schedule node are all generation nodes, and the neighbors of a generation node are all schedule nodes. Two generation nodes are connected through a schedule node.
(2) , if and , where and are two schedule nodes derived from the same generation node .
(3) For any two generation nodes and , which are connected to a same schedule node , then the working schedules of node u are overlapped with v, which means they can receive the packet simultaneously.
4.3. Minimum Node-Weighted Steiner Tree
Given a multicast request that includes a source node s and a set of destination nodes D in the duty-cycled sensor network G, let be the generation node of s in the auxiliary graph , and are the set of the generation nodes of the destination nodes. Now, our objective is to find a minimum node-weighted Steiner tree in , which is rooted at and spanning all of the nodes in . The minimum node-weighted Steiner tree was used to help us obtain a feasible solution for the MEMAP problem, which includes a multicast tree T and the transmitting schedules .
However, it is unlikely to have a polynomial-time algorithm to find such a minimum node-weighted tree in the auxiliary graph
unless
. Thus, a approximation algorithm [
38] is exploited to obtain the near optimal minimum node-weighted Steiner tree with approximation ratio of
.
Let denote the obtained approximate minimum node-weighted Steiner tree in the auxiliary graph . In the following, we will introduce the method to map to a feasible solution for the MEMAP problem, which is guaranteed by the following theorem.
Theorem 4. Let be a node-weighted Steiner tree, which is rooted at and spans all of the nodes in in the auxiliary graph ;
can be mapped to a feasible solution for the MEMAP problem if it satisfies the following conditions:- 1.
For any leaf node , i must be a generation node in ;
- 2.
For each schedule node in the node-weighted Steiner tree , there exists a generation node in , where is the corresponding generation node of ;
- 3.
For any non-leaf generation node in the tree and any node , node i must be a schedule node derived from .
Proof. In the following, we will prove the theorem by constructing a feasible solution for the MEMAP problem with the node-weighted Steiner tree .
Firstly, the multicast tree T in the original graph is constructed by the following three steps:
Step 1. For any schedule node in , we create an edge between its father and all of its child nodes;
Step 2. Remove all of the schedule nodes from ;
Step 3. Replace all of the generation nodes with their original nodes.
As we can see, for any tree edge , there exists a schedule node between and u in the node-weighted Steiner tree , which means that can communicate with u with a certain power. Additionally, and are all in , then s and D are in T accordingly. Therefore, the source node s can deliver the messages to all of the destination nodes by the tree T.
Secondly, we will show how to determine the transmitting schedules for T, i.e., . For each node u in T, is its corresponding generation node in . Then, for each schedule node in , we add a transmitting schedule in . Since for each non-leaf node u and its child node , there exists a schedule node between them, then we can have a transmitting schedule with which u can communicate with v with transmitting power at time slot .
Combining the above two reasons and Definition 2, a feasible solution for the MEMAP problem is obtained. The theorem is proven. ☐
In this paper, we call a node-weighted Steiner tree a valid multicast tree if it satisfies the three conditions in Theorem 4.
As the example shown in
Figure 2, there is a calculated Steiner tree in
Figure 2a, where the pink node denotes the source node and the destination nodes. We can find that the tree in
Figure 2a is a valid multicast tree since it satisfies the conditions in Theorem 4. According to the above method, then we can obtain the corresponding multicast tree and transmitting schedules on the original graph. The results are shown in
Figure 2b, where the three tuple along the links denotes a transmitting schedule.
Figure 2.
An example of a valid multicast tree.(a) A valid multicast tree; (b) The corresponding multicast tree and transmitting schedules.
Figure 2.
An example of a valid multicast tree.(a) A valid multicast tree; (b) The corresponding multicast tree and transmitting schedules.
4.4. Constructing a Valid Multicast Tree
However, the obtained approximate minimum node-weighted Steiner tree
on the auxiliary graph
may not satisfy the three conditions in Theorem 4. There exist three violations.
- (a)
Violation 1. contains a leaf node i, and i does not belong to . This violets Condition 1 in Theorem 4.
- (b)
Violation 2. contains a schedule node, which is not derived from any of its neighboring generation nodes in the tree . This violets Condition 2 in Theorem 4.
- (c)
Violation 3. contains a generation node (), but cannot be reachable by the source node , which means that there exist the tree edges and in , where is the father node of and a child node of . This violets Condition 3 in Theorem 4.
In order to eliminate the three violations in the approximate minimum node-weighted Steiner tree , we introduce three correcting operations as follows.
For Violation 1: For any leaf node i that does not belong to , we just delete it from . This procedure continues until all of the leaf nodes satisfy Condition 1 in Theorem 4.
For Violation 2: Assume
is the schedule node, which is not derived from any of its neighboring generation nodes. Let
be the generation node of
, then we do as follows:
if , then the generation node and the edge are added in the tree ;
if , but , where denotes the set of neighbors of in the tree ; in this case, we delete the tree edge from firstly, and then, we would add the tree edge in the current tree .
For Violation 3: This correcting operation is done by checking all of the nodes in the tree through a breadth-first search. All of the nodes in the tree have two states, e.g., “uncheck” and “checked” states. Let the queue Q store the set of current nodes needed to be checked. Initially, all of the nodes in are marked “uncheck”, and the root is pushed into Q. The correcting process works as follows:
Let the first node in Q be i; we first marked node i “checked” and pop it from Q. Then, we handle i according to the following two cases:
Case 1:
i is a generation node. Then, for each schedule node
, we do as follows:
If is not derived from i, let denote the corresponding generation node of . We then check for any schedule node , whether there exists an edge between and in the auxiliary graph . If yes, add an edge in . Otherwise, we choose the schedule node to add into the current tree , and then, the tree edges and are added. After that, we delete the tree edge from . Finally, the new added schedule node is pushed into Q.
If is derived from i, we just push it into Q;
Case 2: i is a schedule node. Then, for any generation node , we just push it into Q for the following computing.
The correcting operation for Violation 3 ends when Q is empty, and all of the nodes in are marked “checked”.
In the following, we will prove that the tree after the above three correcting operations can satisfy the three conditions in Theorem 4, which means it is a valid multicast tree.
Theorem 5. Let the tree after the three correcting operations be ; then, is a valid multicast tree.
Proof. In order to guarantee the correctness of Theorem 5, we just need to prove that the above three operations can eliminate the violations successfully, that is the three conditions in Theorem 4 are satisfied.
As for Condition 1 (for any leaf node , i must be a generation node in ), according to correcting Operation 1, any leaf node i that is not a generation node in is pruned. Then, Condition 1 is satisfied.
As for Condition 2 (for each schedule node in the node-weighted Steiner tree , there exists a generation node in , where is the corresponding generation node of ), according to correcting Operation 2, for any schedule node in , its generation node and the tree edge are added in the tree. Then, Condition 2 is also satisfied.
As for condition 3 (for any non-leaf generation node in the tree , then for any node, must be a schedule node derived from ), according to correcting Operation 3, for each generation node i in and any schedule node that is not derived from i, we delete the tree edge in the obtained approximate minimum node-weighted Steiner tree and add a schedule node , which is chosen to connect to ’s corresponding generation node . Obviously, Condition 3 is satisfied.
Combining the above three reasons, the theorem is proven. ☐
After the approximate minimum node-weighted Steiner tree
has been corrected to a valid multicast tree in the auxiliary graph, then we can transform it into a feasible solution for the MEMAP problem according to Theorem 4. So far, the complete approximate scheduling and constructing algorithms have all been introduced, which is shown in Algorithm 2.
Algorithm 2 Approximate scheduling and constructing algorithm. |
Input: A duty-cycled network G, a source node s and a set of destination nodes D; Output: A multicast tree T and the set of transmitting schedules for the multicast tree T;
- 1:
Construct the auxiliary graph according to Definition 3; - 2:
for all schedule node in do - 3:
Call Algorithm 1 to determine the transmitting time slot for each schedule node; - 4:
end for - 5:
Call the Steiner tree algorithm to get a multicast tree on ; - 6:
Correct to a valid multicast tree on by using the three correction operations in Section 4.4; - 7:
Map the valid multicast tree into a feasible solution for MEMAP using the method in Theorem 4, including the multicast tree T and the set of transmitting schedule ; - 8:
return the multicast tree T and the set of transmitting schedule ;
|
4.5. Approximation Ratio Analysis
In the following, we give the approximation ratio analysis of the proposed algorithm in Lemma 1 and Theorem 6 below.
Lemma 1. Given a multicast request (s:D) in the duty-cycled network, the weighted sum of the minimum node-weighted Steiner tree is the lower bound for the MEMAP problem.
Proof. Let denote the optimal result for the MEMAP problem in the duty-cycled network G. Following the construction of the auxiliary graph , can be mapped into a node-weighted Steiner tree in , which is rooted at and spanning all of the nodes in , and the transmitting schedule is mapped to a schedule node of in . Then, the total transmission power in is equal to the weighted sum of the tree .
Assume is the minimum node-weighted Steiner tree in the auxiliary graph , which spans all of the nodes in . Obviously, we can get , where denotes the weighted sum of all of the nodes in . The lemma is proven. ☐
Theorem 6. The approximation ratio of our method is , where K is the number of the destination nodes.
Proof. Let
be the obtained approximate minimum node-weighted Steiner tree through [
38]. According to [
38], we have
, where
is the minimum node-weighted Steiner tree.
Let , and denote the node-weighted Steiner tree after correcting Operations 1, 2 and 3, respectively. In the following, we will prove .
Firstly, in correcting Operation 1, we remove the leaf nodes that does not belong to
; obviously, we can have:
Secondly, in correcting Operation 2, we add the generation node of the schedule node
, of which the generation node is not in the tree
T. Since the weight of all of the generation nodes is zero, we can have:
Thirdly, in correcting Operation 3, let
be the schedule node that is not derived from its father
. We handle this case in the following two aspects:
If we can find a schedule node to reach the generation node of , then we add an tree edge . No schedule node is added in this case. Thus, the weighted sum of the tree is not changed.
If we cannot find such a power, we need to add a schedule node with in the correcting tree . Since we assume that the transmission is symmetric, so the weight of added schedule node is not larger than .
Therefore, for each schedule node
, at most a schedule node with weight
is added in the correcting tree
. Therefore, we can have:
According to Equations (
5)–(
7), we can have
. In addition, according to Lemma 1, we can have
and
, where
denotes the corresponding node-weighted Steiner tree for the optimal result for the MEMAP problem. Therefore, we can have
, and the approximation ratio is
. The theorem is proven. ☐
Additionally, the time complexity of the proposed algorithm can be proven to be polynomial by Lemma 2 and Theorem 7.
Lemma 2. The time complexity of Algorithm 1 is .
Proof. In Algorithm 1, since the number of nodes of is less than Δ, then Step 1 would take time. In addition, we can see Steps 4–17 would take time obviously. Therefore, the time complexity from Steps 3–18 is . Therefore, combining the above analysis, the time complexity of Algorithm 1 is . ☐
Theorem 7. The time complexity of the approximate scheduling and constructing algorithm is .
Proof. Firstly, according to Definition 3, Step 1 would take
time to create the schedule nodes and
time to create the edges. Then, the time complexity for Step 1 is
. As for Step 2, there are
schedule nodes, and the time complexity of Algorithm 1 is
according to Lemma 1, so the time complexity for Step 2 is
. In Step 3, since the number of nodes and edges are
and
according to Theorem 3, then the time complexity of Step 3 is
according to [
38]. In Step 4, we need to correct the obtained Steiner tree with three correction operations, where correction Operations 1 and 2 take
time by examining the tree once and correction Operation 3 would take
time by a breadth-first search. Therefore, the time complexity for Step 4 is
. In Step 5, the time complexity is also
by visiting the corrected tree once. In summary, the time complexity of Algorithm 2 is
. ☐