DFDP: A Distributed Algorithm for Finding Disjoint Paths in Wireless Sensor Networks with Correctness Guarantee

In wireless sensor networks, routing messages through multiple (node) disjoint paths between two sensor nodes is a promising way to increase robustness, throughput, and load balance. This paper proposes an efficient distributed algorithm named distributedly finding disjoint paths (DFDP) to find k disjoint paths connecting two given nodes s and t. A set of paths connecting s and t are disjoint if any two of them do not have any common nodes except s and t. Unlike the existing distributed algorithms, DFDP guarantees correctness; that is, it will output k disjoint paths if there exist k disjoint paths in the network or the maximum number of disjoint paths otherwise. Compared with the centralized algorithms which also guarantee correctness, DFDP is shown to have much better efficiency and load balance by theory analysis and simulation results.


Introduction
A typical wireless sensor network (WSN) comprises a large number of small-size battery-powered sensor nodes deployed in a large area. Since the radio transmitting range of sensor nodes is very limited, data exchanging in WSNs usually needs to be relayed in a multihop manner, which makes efficient message routing a crucial problem. Instead of routing messages through a single path, multipath routing, especially routing through multiple (node) disjoint paths, has become more and more popular [1][2][3][4][5]. Let and denote a routing request, that is, two sensor nodes that want to communicate with each other; a set of paths connecting and (i.e., ∼ paths) are (node) disjoint if any two of them do not have any common nodes except and .
Compared to transmitting data through a single path, transmitting data through multiple disjoint paths can increase throughput, robustness, and load balance of routing in WSNs. Sending multiple data packets through multiple disjoint paths simultaneously will increase the throughput between and dramatically. Since link and node failures are very common in WSNs, messages may be easily lost while they are routed along a single path. We can increase reliability by sending messages redundantly through multiple disjoint paths. On the other hand, routing messages often through a fixed single path would deplete the energy of the nodes on the path quickly. By routing messages through several disjoint paths, alternately, the network can gain a better load balance. Moreover, in some applications, a sensitive message can be easily captured by eavesdropping nodes while it is routed through a single path. However, if we break the sensitive message into small pieces and send these pieces through multiple disjoint paths, capturing the entire message would be much more difficult.
This paper investigates the -disjoint-paths ( -DP) problem: in a WSN, given two nodes and , a positive integer , finding disjoint ∼ paths, we expect that the -DP problem can be solved with correctness guarantee; that is, an algorithm will output min{ , * } disjoint ∼ paths. Here, we assume that there exist up to * disjoint ∼ paths 2 International Journal of Distributed Sensor Networks in the given network. There are some works [1][2][3][4][5][6][7][8][9][10][11][12] considering the problem of finding multiple disjoint ∼ paths. To the best of our knowledge, all the existing algorithms which can solve the -DP problems with correctness guarantee are centralized algorithms. These centralized algorithms need to build the topology of the whole network and update it with every topology change, so their communication costs are overwhelming for a large-scale WSN. On the other hand, all the existing algorithms finding disjoint paths in a distributed way (so they are much more efficient) cannot guarantee correctness. Therefore, we have two challenges to solve the -DP problem in WSNs: to guarantee correctness and to maintain efficiency. This paper proposes a distributed algorithm named distributedly finding disjoint paths (DFDP) to solve the -DP problem with correctness guarantee. DFDP finds disjoint paths in a totally distributed way; that is, each node participates by exchanging short messages with its one-hop neighbors (hereinafter, "neighbor" means one-hop neighbor) and the exchange of messages does not rely on any predefined structures. DFDP is very energy-efficient and can adapt to topology changes with very limited extra cost. Both theoretical analysis and simulation results confirm the energyefficiency of DFDP. As far as we know, DFDP is the first totally distributed algorithm which can solve the -DP problem with correctness guarantee.
The rest of the paper is organized as follows. Some related works are introduced in Section 2. After giving some preliminary definitions in Section 3, we describe the proposed distributed algorithm DFDP in Section 4. The simulation results which confirm the proposed algorithm's efficiency are presented in Section 5. Finally, we conclude the whole paper in Section 6.

Related Works
Some works consider finding two ∼ paths in a network. Two algorithms are presented in [13,14] to find a pair of disjoint paths from each node to a fixed destination. The work in [15] considers the problem of finding two ∼ paths with the following optimizing goals: (1) the two identified paths are as disjoint as possible; (2) the second path is as short as possible compared with the first path. The work in [16] gives a distributed algorithm to check if the network configuration contains at least two disjoint paths between all node pairs. For general , some distributed algorithms [1, 3-5, 11, 12] are proposed for finding disjoint ∼ paths in a network. These algorithms have the same basic idea. They find paths one by one (most of them find the shortest ∼ path). Once a path is found, it is fixed and all its internal nodes are removed from the network so that they cannot participate in another path. To solve the -DP problem, these algorithms cannot guarantee correctness. Suppose that, in a network as shown in Figure 1, the users want to find = 2 disjoint ∼ paths, and we have already found the first path 1 = ( , , , , ) as shown by the bold lines in Figure 1(a). If we fix 1 , we cannot find another ∼ path disjoint from it, and we have to report nonexistence of two disjoint ∼ paths. However, there do exist two disjoint ∼ paths as shown in Figure 1(d). In some cases, the above mentioned distributed approaches can be very wrong in answering the -DP problem by underestimating the disjoint paths. Suppose that the topology graph of a given network is as shown in Figure 2, in which the dashed lines denote paths. If the users want to find = 5 disjoint ∼ paths and we find the first path as shown by the bold lines in Figure 2(a) and then fix this path, this path will be the only one ∼ path we can find, even though five disjoint paths do exist as shown in Figure 2(b).
In [17], a distributed algorithm is proposed to find disjoint paths from every node to a fixed destination in a network. The algorithm is based on a shortest-path tree rooted at the destination. The work in [18] gives a distributed algorithm to find multiple disjoint ∼ paths for geographic routing. These two algorithms cannot guarantee correctness either.
We propose a pseudodistributed algorithm in [19] to solve the -DP problem in WSNs with correctness guarantee. The algorithm does not process in a totally distributed manner. Although it does not need to collect the topology information of the whole network, it still needs to collect some topology information from the network, so it is not very efficient. Furthermore, the algorithm is complicated and hard to be implemented by sensor nodes.
In [2,[6][7][8][9][10]20], some centralized algorithms are given for finding disjoint ∼ paths in graphs. In particular, the algorithms in [6,9,20] can find disjoint ∼ paths with the minimum total length. All these centralized algorithms guarantee correctness. If we use these centralized algorithms to solve the -DP problem in a WSN, we will have to collect every node's neighbor list to build the topology of the whole network. The communication cost of such operation is very high for a large-scale network. On the other hand, to guarantee correctness, we have to update the network's topology with each topology change such as link failing, link recovering, node dying, and new node joining in. Since these topology changes happen frequently in WSNs, we need to pay a lot of communication to make the topology we built up-todate.
The works in [21][22][23] consider the problem of finding the maximum number of length-bounded disjoint ∼ paths in graphs. A length-bounded path is a path whose length is no more than a user-specified threshold . In [22], this problem is proven to be NP-hard for ≥ 5. In [21], this problem is further proven to be APX-complete for ≥ 5, which means that there is no polynomial time approximation scheme (PTAS) for this problem. A heuristic algorithm for this problem is given in [23] without approximation bound.
For multiple ∼ paths, we can give each path a sequence number. Each edge has costs to be in the 1st, . . . , th path. Such a network is called a multicost network. Some centralized algorithms are given in [24][25][26] to find disjoint ∼ paths in multicost networks with the minimum total cost. The works in [27] consider the problem of reliable data transmission in underwater sensor networks. Its solution is based on coding techniques rather than finding disjoint paths. To transmit a series of data packets, by effective coding, its algorithm ensures that certain amount of the packets missing does not affect our access to the complete data.
So far, all the existing algorithms which can solve the -DP problem with correctness guarantee are centralized algorithms. These centralized algorithms need to build the topology of the whole network and update it with every topology change, so they are not applicable in WSNs. On the other hand, all the existing distributed algorithms cannot guarantee correctness, although they are efficient.

Preliminaries
The given WSN can be expressed as an undirected graph = ( , ), where = {V | V is a sensor node} and = {( , V) | there is a wireless link between ∈ and V ∈ }. Here, we assume that all the links are bidirectional; that is, can hear V if V can hear . Hereinafter, we do not distinguish the terms "network" and "graph. " A path in is a subgraph which can be expressed as a sequence of distinct nodes (V 1 , . . . , V ), where V ∈ and (V , V +1 ) ∈ . We say path Although we model the given network as an undirected graph, we still emphasize the direction of a path by nodes' order in its expression or the words "from" and "to. " Thus, the direction of path = (V 1 , . . . , A reverse segment of a ∼ path is a segment of the path along the direction from to . In the example of Figure 1(a), ( , , ) is a reverse segment of ∼ path 1 .
Suppose that we have found disjoint ∼ paths 1 , . . . , in the given network. The nodes (edges) in the found paths are called occupied nodes (edges), and the other nodes (edges) are called unoccupied nodes (edges). Let V be an occupied node. We, respectively, use V(V) and (V) to denote V's previous hop and next hop in the found path that V belongs to. For example, in the network as shown in Figure 1(a), after finding 1 , is an occupied node.
V( ) = and ( ) = . After finding some disjoint ∼ paths, we convert the original graph to another graph * by replacing each path edge with a directed edge along the direction from to . In * , each found path becomes a "river" flowing from to . In the example of Figure 1(a), after finding 1 , we convert to * as shown in Figure 1(b). Actually, * is another way to Input: two nodes and ; a positive integer Output: min{ , * } disjoint ∼ paths (1) repeat (2) Call Procedure 1; if cannot find a path from to in * then (4) Output all the found paths and stop; (5) Call Procedure 2; (6) until Find disjoint ∼ paths Algorithm 1: Distributedly finding disjoint paths (DFDP).
interpret . In the following, we do not distinguish the path in and its corresponding path in * .
We say that a path follows the crossing restriction if the path does not go through any occupied nodes except by going downstream on some river in * for at least one hop (i.e., going through a reverse segment of some found path). A path following the crossing restriction is called a CR-path. After finding the first path 1 , let us examine some paths in the converted graph as shown in Figure 1 is not a CR-path because it goes through occupied node by directly crossing the river. 2 = ( , , , , , ) is not a CR-path because it goes through occupied nodes , , by going upstream on the river. 3 = ( , , , , , , ) is a CRpath because it goes through occupied nodes , , by going downstream on the river for segment ( , , ).
A CR-path from to is an augmenting path. By adding an augmenting path to the found paths 1 , . . . , , we can get +1 disjoint ∼ paths, where "add" means adding the edges that only belong to and removing the overlapping edges of and 1 , . . . , . In the example of Figure 1(a), after finding the first path 1 = ( , , , , ), we can find an augmenting path = ( , , , , , , , , ) as shown by bold lines in Figure 1(c). By adding to 1 , we can get two disjoint ∼ paths 1 = ( , , , , ) and 2 = ( , , , , ) as shown by bold lines in Figure 1(d).

Lemma 1.
After finding disjoint ∼ paths, there exist more than disjoint ∼ paths if and only if there exists an augmenting path [8].
Lemma 1 can be easily proven by transforming the problem of finding disjoint paths to a maximum flow problem. It means that we can find the maximum number of disjoint ∼ paths by searching for augmenting path repeatedly.

Distributed Algorithm DFDP
In the given network , the users specify two nodes and and a positive integer ; the proposed algorithm DFDP will output min{ , * } disjoint ∼ paths. Here, we assume that there exist up to * disjoint ∼ paths in the given network. DFDP is iteratively searching for augmenting path and adding it to the paths found before. There are two procedures in each iteration. Procedure 1 searches for an augmenting path . Procedure 2 adds to the paths found before to generate more disjoint paths. DFDP is given by Algorithm 1. We assume that each message contains the sender's ID. Each occupied node V knows V(V) and (V).

Finding Augmenting Path.
Suppose that we have found disjoint ∼ paths 1 , . . . , in the first iterations. In the ( + 1)th iteration, Procedure 1 searches for an augmenting path by finding a CR-path from to each node in the network.
To make sure that the paths we found follow the crossing restriction, we divide the nodes in a CR-path into three categories: unoccupied node (UN), first hop of a reverse segment (FHR), and other hops in a reverse segment (OHR) of some found path. In the example of Figure 1 Each unoccupied node V maintains variable UN ℎ (V) to record V's previous hop in the CR-path we found from to V. Each occupied node V maintains variables FHR ℎ (V) and OHR ℎ (V). FHR ℎ (V) records V's previous hop in the CR-path we found from to V with V as a FHR. OHR ℎ (V) records V's previous hop in the CR-path we found from to V with V as an OHR.
Procedure 1 starts with broadcasting a FIND-AP message. The other nodes find a CR-path from to themselves by exchanging FIND-AP messages. Each FIND-AP message has an empty data field. Next, we discuss the following four cases. Case 1. Unoccupied node V receives a FIND-AP message (let the sender be ). It means that we find a CR-path (denoted by ) from to V and is V's previous hop in . Since V is an unoccupied node, V is an UN in . To further extend as a CR-path, V's next hop in this path could be any neighbor of V. In this case, if UN ℎ (V) is not set yet, we set UN ℎ (V) to and let V broadcast a FIND-AP message (lines 2-4 in Procedure 1).

Case 2.
Occupied node V receives a FIND-AP message from and is V(V). It means that we find a path from to V and is V's previous hop in . Since is V(V), does not follow the crossing restriction. In this case, we let V discard the message. Input: disjoint ∼ paths 1 , . . . , Output: an augmenting path / * Each node V ̸ = executes the following pseudo-codes while receiving a FIND-AP message (Let the sender be ); Start with broadcasting a FIND-AP message.
* / (1) case V is an unoccupied node: (2) Mark itself as an occupied node; Send a TRACE-AP message to UN ℎ (V); (6) case V is an occupied node and ̸ = V(V): Still mark itself as an occupied node; Send a TRACE-AP message to OHR ℎ (V); (10) case V is an occupied node and = V(V) and FHR ℎ (V) = NULL: (11) Mark itself as an unoccupied node; (12) Send a TRACE-AP message to OHR ℎ (V); (13) case V is an occupied node and = V(V) and FHR ℎ (V) ̸ = NULL: (14) Still mark itself as an occupied node; Send a TRACE-AP message to FHR ℎ (V); Procedure 2: Tracing augmenting path.
Case 3. Occupied node V receives a FIND-AP message from and is not V(V) or (V). It means that we find a CRpath from to V and is V's previous hop in . Since is not V(V) or (V), V is a FHR in . To further extend as a CR-path, V's next hop in this path must be V(V). In this case, if FHR ℎ (V) is not set yet, we set FHR ℎ (V) to and let send a FIND-AP message to V(V) (lines 6-11 in Procedure 1).

Case 4.
Occupied node V receives a FIND-AP message from and is (V). It means that we find a CR-path from to V and is V's previous hop in . Since = (V), V is an OHR in . To further extend as a CR-path, V's next hop in this path could be any neighbor of V except (V). In this Case, if OHR ℎ (V) is not set yet, we set OHR ℎ (V) to and let broadcast a FIND-AP message (lines 13-15 in Procedure 1). Although this message will be redundantly received by (V), (V) will discard this message according to Case 2.
We assume that, at the beginning of each iteration, UN ℎ (V) = NULL for each unoccupied node and FHR ℎ (V) = OHR ℎ (V) = NULL for each occupied node. For example, UN ℎ (V) = NULL means that V (as an UN) has not received a FIND-AP message yet in the current iteration. It can be implemented by the following mechanism. Each node V maintains a variable (V) to denote the number of the current iteration. At the beginning of each new iteration, updates the iteration number by adding 1 to the number of the last iteration. This number is included by every FIND-AP message so that each node can update its (V). When V receives a FIND-AP message whose iteration number is larger than

Tracing Augmenting Path.
At first, let us describe the last hop in a reverse segment of some found path. In the example of Figure 1, after finding the augmenting path as shown in Figure 1(c), we say is the last hop of the reverse segment ( , , ). By adding to the paths found before, should be an occupied node, V( ) does not change, and ( ) changes to its next hop in , that is, . In a CR-path, the last hop of a reverse segment is certainly an OHR.
Suppose that we find an augmenting path in Procedure 1. Procedure 2 adds to the paths found before. Starting from , in sequence, each node in sends a TRACE-AP message (with empty data field) to its previous hop in . At first, sends a TRACE-AP message to FHR ℎ ( ) to start the procedure. Next, we discuss the following four cases.
Case 5. Unoccupied node V receives a TRACE-AP message (let the sender be ). Then V is an UN in and its next hop in is . Its previous hop in should be UN ℎ (V). To add to the paths found before, V becomes an occupied node. V(V) should be UN ℎ (V) and (V) should be . In this case, we let V execute lines 2-5 in Procedure 2.
Case 6. Occupied node V receives a TRACE-AP message from and is not V(V). Then V's next hop in is . Since is not V(V), V is the last hop in a reverse segment of some found path. Of course, V is an OHR in . V's previous hop in should be OHR ℎ (V). By adding to the paths found before, V is still an occupied node. V(V) does not change and (V) changes to . In this case, we let V execute lines 7-9 in Procedure 2.

Case 7.
Occupied node V receives a TRACE-AP message from and is V(V) and FHR ℎ (V) = NULL. Then V's next hop in is . Since is V(V), V is not the last hop in a reverse segment. Since FHR ℎ (V) is NULL, V is an OHR in and its previous hop in should be OHR ℎ (V). By adding to the paths found before, V becomes an unoccupied node. In this case, we let V execute lines 11-12 in Procedure 2.

Case 8. Occupied node V receives a TRACE-AP message from and is
V(V) and FHR ℎ (V) ̸ = NULL. Then V's next hop in is . Since is V(V), V is not the last hop in a reverse segment. Since FHR ℎ (V) is not NULL, V is a FHR in and its previous hop in should be FHR ℎ (V). By adding to the paths found before, V is still an occupied node.
V(V) changes to FHR ℎ (V) and (V) does not change. In this case, we let V execute lines 14-16 in Procedure 2.

An Example of DFDP's Execution.
In the example of Figure 1, after finding the first ∼ path 1 as shown in Figure 1(a), the nodes execute DFDP as follows.
Procedure 1 starts with broadcasting a FIND-AP message, which is received by and . will discard the message according to Case 2.
Receiving the FIND-AP message from , according to Case 1, sets UN ℎ ( ) = and then broadcasts a FIND-AP message, which is received by and . Although the message will be also received by , will discard the message.
Receiving the FIND-AP message from , according to Case 3, sets FHR ℎ ( ) = and then sends a FIND-AP message to ( will discard the message).
Receiving the FIND-AP message from , according to Case 1, sets UN ℎ ( ) = and then broadcasts a FIND-AP message, which is received by and . Since UN ℎ ( ) is set yet, discards the FIND-AP message from .
Receiving the FIND-AP message from , according to Case 3, sets FHR ℎ ( ) = and then sends a FIND-AP message to .
Receiving the FIND-AP message from , according to Case 4, sets OHR ℎ ( ) = and then broadcasts a FIND-AP message, which is received by .
Receiving the FIND-AP message from , according to Case 4, sets OHR ℎ ( ) = and then broadcasts a FIND-AP message, which is received by and ( will discard the message).
Receiving the TRACE-AP message from , according to Case 5, marks itself as an occupied node, sets V( ) = UN ℎ ( ) = and ( ) = , and then sends a TRACE-AP message to .
Receiving the TRACE-AP message from , according to Case 5, marks itself as an occupied node, sets V( ) =UN ℎ ( ) = and ( ) = , and then sends a TRACE-AP message to .
Receiving the TRACE-AP message from , according to Case 6, still marks itself as an occupied node, sets ( ) = ( V( ) is still ), and then sends a TRACE-AP message to OHR ℎ ( ) = .
Receiving the TRACE-AP message from , according to Case 7, marks itself as an unoccupied node and then sends a TRACE-AP message to OHR ℎ ( ) = .
Receiving the TRACE-AP message from , according to Case 8, still marks itself as an occupied node, sets V( ) = FHR ℎ ( ) = ( ( ) is still ), and then sends a TRACE-AP message to .
In this way, marks itself as an occupied node and sets V( ) = and ( ) = . marks itself as an occupied node and sets V( ) = and ( ) = . Now, we add to 1 and generate two disjoint ∼ paths 1 and 2 as shown in bold lines in Figure 1(d).

Correctness and Complexity.
By the description of Sections 4.1 and 4.2, after finding disjoint ∼ paths 1 , . . . , , Procedure 1 will find an augmenting path if there exists one, and Procedure 2 is a correct way to add the augmenting path to 1 , . . . , . By Lemma 1, we can get the following theorem. Theorem 2. DFDP will output min{ , * } disjoint ∼ paths, where * is the maximum number of disjoint ∼ paths in the given network.
Suppose that there are nodes in the given network. In Procedure 1, each unoccupied node sends at most one FIND-AP message and each occupied node sends at most two FIND-AP messages. In Procedure 2, each node in sends one TRACE-AP message and the other nodes do not send any messages. Both FIND-AP message and TRACE-AP message have constant length (empty data field), so the communication complexity of DFDP is ( ⋅min{ , * }). The time complexity of DFDP is ( ⋅ min{ , * }) too.

Dealing with Topology
Changes. Let us consider three types of topology changes. Type 1. During the processing of DFDP, the nodes or links in some found path fail. This type of topology changes will cause not to receive the expected number of TRACE-AP messages (one plus the number of disjoint paths found in the last iteration) in the current iteration. Therefore, we can set a timer for the execution of each iteration. The timer is triggered by at the beginning of each iteration. If the timer expires and has not received the expected number of TRACE-AP messages, knows that there is node or link failure in the path from which it has not received TRACE-AP message. Let the failed path be . Before going into the next iteration, DFDP frees the nodes in by tracing them from both and . With the topology changes, DFDP still guarantees correctness. The extra cost for DFDP to deal with this type of topology changes is tracing the failed path (which can be neglected compared to the total cost of the algorithm) and one more iteration of the algorithm (which is inevitable).

Type 2.
During the processing of DFDP, the topology beyond the found paths changes. Since each node participates in DFDP by communicating with its neighbors and the exchange of messages does not rely on any predefined structures, DFDP can handle this type of topology changes while guaranteeing correctness without any modification. Type 3. After the execution of DFDP (min{ , * } paths have been used for routing), the nodes or links in some found path fail. After detecting the path failure, we can free the nodes in the failed path and execute one more iteration of DFDP to find one more disjoint path. The extra cost for DFDP to deal with this type of topology changes is also tracing the failed path and one more iteration of the algorithm.
On the contrary, to handle all the three types of topology changes and guarantee correctness, centralized algorithms have to collect the whole network's topology once again, which is a very expensive operation for WSN.

Simulation Results
We use a simulator written in C++ to evaluate the proposed algorithm. The simulator is a high level simulator which neglects the MAC layer. The effective transmitting radius of each sensor node is set to 50 m. Each packet has a 6byte header containing the information of destination's ID (2 bytes), sender's ID (2 bytes), packet type (1 byte), and packet length (1 byte). The data field of each packet contains up to 50 bytes.
To simulate energy consumption, we set the parameters of sensor nodes according to TelosB motes [28]. The supply voltage is 3.0 V. When MCU is on and radio is on TX or RX mode, the node's current is 22 mA. The transmit bit rate is 250 kbps. Therefore, the energy consumption for the sender to send 1-bit data (or for the receiver to receive 1-bit data) successfully is 2.64 × 10 −7 J. For the TelosB sensor node, the energy consumption to transmit one-bit data can be used for MCU to execute more than 400 instructions, so we neglect the energy consumption for computing.
We compare our algorithm DFDP with the centralized algorithm in [6] (denoted by CA), the pseudodistributed algorithm in [19] (denoted by EA), and the distributed algorithm in [5] (denoted by DA). CA collects the topology information of the whole network (each node's neighbor list) to the sink and finds disjoint paths at the sink. CA can find disjoint ∼ paths with the minimum total length. CA is a good representation of the centralized algorithms in [2,[6][7][8][9][10]. All these centralized algorithms have to collect the topology information of the whole network, so they have the same communication cost. On the other hand, all of them guarantee correctness, so they find the same number of disjoint paths. DA finds paths iteratively. In each iteration, DA finds a ∼ path and removes the internal nodes of the path from the network. As we know, DA is the most efficient algorithm for finding disjoint paths with no other constraints. Note that DA cannot guarantee correctness; that is, DA may only find < paths when there do exist disjoint ∼ paths in the given network.
At first, let us compare the efficiency of four algorithms in theory. Suppose that there are nodes and edges in the 8 International Journal of Distributed Sensor Networks network. Let be the diameter of the network. The energy consumption of the algorithms is mainly determined by data communication. We already know that the communication complexity of DFDP is ( ⋅ min{ , * }). CA collects the topology information of the whole network. Each node is ( ) hops away from the sink on average, so the information of each edge is transmitted ( ) hops to the sink on average and the communication complexity of CA is ( ). EA has bad upper bound on communication complexity. In the worst case, EA has to collect the topology information of the whole network in each iteration, so its communication complexity is ( ⋅ min{ , * }). DA is the simplest algorithm to find disjoint path although it cannot guarantee correctness. In each iteration, each node sends one message with constant length to find a new path from to , so the communication complexity of DA is ( ⋅min{ , * }). We know that ≪ in most applications. In the aspect of communication complexity, DFDP and DA are much better than CA and EA. Although with the same communication complexity compared with DA, DFDP can guarantee correctness, whereas DA cannot.
We evaluate the performances of the algorithms at four aspects: (1) path number, (2) average path length, (3) energyefficiency, and (4) load balance. "Path number" is the number of disjoint ∼ paths found by the algorithms. "Average path length" represents the quality of the disjoint paths. We use "average energy/path number" to measure algorithms' energy-efficiency, where "average energy" is the average energy consumption of each node in the network. Load balance is measured by "max energy/path number, " where "max energy" is the maximum energy consumption of any node in the network.
There are two groups of simulations. In Group 1, 2500 sensor nodes are randomly deployed in a 1500 m × 1500 m area. In Group 2, 2500 sensor nodes are deployed as a 50 × 50 grid and each node dies or sleeps with 25% probability. As a result, 1859 nodes are left as alive nodes in the grid. The comparison of the algorithms is conducted for different , that is, the number of the paths the users want to find. To get each result, we performed 10 simulations with different ( , ) pairs and took their average value. The ( , ) pairs are generated randomly.
The comparison results for Group 1 are given in Figure 3. The path number of the four algorithms is given in Figure 3(a). With the growth of , all the four algorithms find more disjoint paths, until they reach their "limits. " DA finds no more disjoint paths when ≥ 7. CA, EA, and DFDP find no more disjoint paths when ≥ 10. Since CA, EA, and DFDP all guarantee correctness, they always find the same number of disjoint paths. When ≤ 3, all the four algorithms can find disjoint paths. When ≥ 4, compared with DA, the other three algorithms find more disjoint paths. CA, EA, and DFDP can find the maximum number of the disjoint paths in the network, whereas DA cannot. For = 10, compared with DA, the other three algorithms find 20.3% more disjoint paths.
Next, we want to compare the average path length of the four algorithms. For different ( , ) pairs, the difference of paths' average lengths may be very large. To compare fairly, for each ( , ) pair, we set the value of CA to 1 and  normalize the values of the other three algorithms. The average path length of the four algorithms for Group 1 is given in Figure 3(b). The centralized algorithm (CA) always finds disjoint paths with the minimum total length. EA and DFDP almost have the same performance as CA in this aspect. In all cases, the average path length of DFDP is at most 3% higher than the one of CA. When = 10, the average path length of DA is even less than the one of CA. This is because DA finds less disjoint paths and all the algorithms have the trends to find shorter path first. The energy-efficiency of the four algorithms for Group 1 is given in Figure 3(c). No matter what value is, CA collects the topology information of the whole network, so the energy cost of CA does not change with . With CA finding more disjoint paths, it is more energy-efficient, until it finds the maximum number of disjoint paths. EA finds paths iteratively and collects an abstract of the network topology in each iteration. With finding more disjoint paths, EA needs to collect more and more complicated topology information and becomes less and less energy-efficient. When > 7, EA is even worse than CA in this aspect. DFDP and DA also find paths iteratively and their energy cost for each iteration is steady. DFDP and DA almost have the same performance in this aspect, and both of them are much more energy-efficient than CA and EA.
The load balance of the four algorithms for Group 1 is given in Figure 3(d). Note that the value of the -axis increases logarithmically. Since CA collects the topology information of the whole network, the nodes near the sink need to send and receive a large amount of data, so CA is two orders of magnitude worse than the other three algorithms in this aspect. Although EA is much better than CA, it is still International Journal of Distributed Sensor Networks  a "collecting" algorithm, so it is not as good as DFDP and DA in terms of load balance. By finding more disjoint paths, sometimes DFDP even gains a better load balance compared with the simplest distributed algorithm (DA). The specific simulation results for Group 1 when = 10 are shown in Table 1. "Average Comm. Bytes" is the average number of bytes sent and received by each node in the network. "Max Comm. Bytes" is the maximum number of bytes sent and received by any node in the network.
The comparison results for Group 2 are given in Figure 4. The path number of the four algorithms is given in Figure 4(a). With the growth of , all the four algorithms find more disjoint paths. DA reaches its "limit" when = 3, whereas CA, EA, and DFDP reach their "limits" when = 4. Since CA, EA, and DFDP all guarantee correctness, they always find the same number of disjoint paths. When = 4, compared with DA, the other three algorithms find 47.8% more disjoint paths.
The average path length of the four algorithms for Group 2 is given in Figure 4(b). The centralized algorithm (CA) always finds disjoint paths with the minimum total length. Note that CA, EA, and DFDP find the same number of disjoint paths. No matter what the value of is, the average path length of DFDP is at most 2% higher than the one of CA. The "average energy/path number" of the four algorithms for Group 2 is given in Figure 4(c). In the aspect of energyefficiency, DFDP and DA are much better than CA and EA. DFDP and DA almost have the same energy-efficiency, but DFDP finds more disjoint paths.
The "max energy/path number" of the four algorithms for Group 2 is given in Figure 4(d). In the aspect of load balance, CA is two orders of magnitude worse than the other three algorithms. DA and DFDP almost have the same performances and both of them are significantly better than EA. The specific simulation for Group 2 when = 4 is shown in Table 2.
Let us summarize the simulation results for Group 1 and Group 2. Compared with DA, DFDP finds significantly more disjoint paths. In the aspect of energy-efficiency and load balance, DFDP is almost the same as DA. CA, EA, and DFDP find the same number of disjoint paths with almost the same length. However, in the aspect of energy-efficiency and load balance, DFDP is much better than CA and EA.

Conclusion
This paper proposes an efficient distributed algorithm DFDP to find disjoint paths connecting two given nodes and in a WSN. Unlike the existing distributed algorithms for this problem, DFDP guarantees correctness. Compared to the existing centralized algorithms which also guarantee correctness, DFDP is much more efficient. Compared to the state-ofthe-art distributed algorithms for the same problem, DFDP has the same energy-efficiency and load balance, with the important advantage that DFDP guarantees a correct answer, whereas the compared algorithms do not. In conclusion, DFDP is correct and efficient to find disjoint paths between two nodes in a WSN.