As stated previously, our previous work [11] has been proposed for disjoint multipath routing problem in CR networks in multiple interfaces scenario. Then, we would like to introduce mirrorimagebased disjoint multipath routing algorithm (MIDMRA) for the problem under single interface environment in this section.
Problem definition
Because the concrete definition of disjoint multipath routing problem in CR networks has been proposed in our preliminary work [11], the problem definition would be introduced simply in part.
In order to quantize relationships between CR nodes under PUs’ interferences, SHM mechanism should be employed in this paper [11]. In SHM, longterm sensing information is split into pieces according to time and spectrum distributions. And each piece could be indicated as ‘spectrum time slot’:
$$s_{t,n}=\left\{ \begin{array}{ccc} 1, & & \;\;\text{PU is arriving}.\\ 0, & & \text{PU is absent}. \end{array} \right. $$
Where s
_{
t,n
} represents PU’s arrival status at n
^{th} channel and t
^{th} time period. Then, in each spectrum time slot, PUs’ arrivals could be simplified as the “ONOFF” mode. While for T channels and N time periods, the SHM M
_{
s
} could be depicted as
$$ M_{s}=\left\{ \begin{array}{cc} &s_{1,1},s_{1,2},\cdots,s_{1,N}\\ &s_{2,1},s_{2,2},\cdots,s_{2,N}\\ &\ddots,\ddots,\ddots,\ddots\\ &s_{T,1},s_{T,2},\cdots,s_{T,N}\\ \end{array}\right\}. $$
(1)
In Eq. 1, the PUs’ arrivals pattern could be mapped by a matrix for CR nodes. Therefore, if node i and node j’s s
_{
t,n
}s are both 1, these two nodes have high probability to be under the same PU’s interference range. On the other side, if node i has 0 and node j has 1 in s
_{
t,n
}, i must be independent with j.
Hence, for selecting disjoint paths, CR nodes in the same path should pay more attentions on maintaining consistency of SHMs. So logical bit level “OR” is utilized in Eq. 2.
$$ M_{path(\alpha)}=M_{1}\cup M_{2}\cup M_{3}\cup \cdots \cup M_{m}. $$
(2)
Where M
_{
path(α)} represents a m node path α
^{th}’s SHM.
Correspondingly, in order to ensure the difference between paths, logical bit level “AND” is equipped to calculate multiple paths’ SHM.
$$ M_{X}=M_{path(1)}\cap M_{path(2)}\cap M_{path(3)}\cap \cdots \cap M_{path(X)}. $$
(3)
In this case, if X paths have M
_{
X
} which is equal to 0, these paths could send data under PUs’ interferences without transmission interruption. And these paths also have high probability to be the disjoint paths.
Whereas, the discrete M
_{
X
} is not suitable for calculating and evaluating, especially when M
_{
X
} is not all 0 and \(M_{X_{1}}\) and \(M_{X_{2}}\) should be compared. Thus, a novel evaluation indicator communication efficiency is employed for estimating available spectrum time slot in SHM.
$$ C(X)=\frac{T\cdot NM_{X}}{T\cdot N} $$
(4)
where M
_{
X
} represents the sum of M
_{
X
}, so the remaining amount in T·N is the available spectrum, and communication efficiency could be depicted out by C(X).
Therefore, if M
_{
X
} could be minimized, communication efficiency C(X) would be maximized. Then, the disjoint multipath routing problem in CR networks could be simplified to a solvable pattern:
Problem 1
Given a n nodes’ weighted CR network graph G(V,E,S) with N communication channels in T period, V indicates node’s information, E indexes edge’s information, and S represents each node’s SHM knowledge. Select R paths in this network to solve the following problem for maximizing network’s communication efficiency.
$$\begin{array}{@{}rcl@{}} && \text{Minimize} \ \ M_{R}= \left \\begin{array}{ccc} &s_{1,1},s_{1,2},\cdots,s_{1,N}\\ &s_{2,1},s_{2,2},\cdots,s_{2,N}\\ &\ddots,\ddots,{,}\ddots,\ddots\\ &s_{T,1},s_{T,2},\cdots,s_{T,N} \end{array}\right \\\ && \text{Subject to}\ \ M_{R}=\mathbf{S}_{1}\cap \mathbf{S}_{2}\cap \cdots \cap \mathbf{S}_{R}. \end{array} $$
Motivation
Before the introduction of MIDMRA, a discussion on why the routing algorithm in [16, 17] could not be utilized in this paper should be held, since the SHM mechanism is inspired from [16, 17]:

PUs’ movements. Although PU and jammer have a similarity on random appearances, the basic interference patterns of these two distractions are different. Jammer is chasing and interrupting the wireless communication of users’ networks, which is different from PUs’ completely random appearances.

Priori route knowledge. In [16, 17], a quality comparison algorithm and Yen’s ranking algorithm [21] are utilized for path selection before multipath routing, so exponential time complexity is unavoidable. Besides, because multipath route mechanism in [16, 17] pays more attention on selecting as many as possible paths which could meet target formulation, the most appropriate routes may be ignored.
Hence, the route mechanism in [16, 17] could not be suitable for the Problem 1.
On the other side, SHM is a weight evaluation mechanism of networks, but traditional weighted disjoint multipath route algorithms (e.g., Suurballe Algorithm in [22], R. Bhandari Algorithm in [23]) are still not suitable on this paper. In traditional weighted disjoint multipath route, ordinary addition and subtraction are utilized on weighted value calculation, which is not appropriate for SHM.
Suppose the path from source to node i is node i’s parent path, and path from node i to destination is its son path. It is obvious that node i has multiple parent paths and son paths in a multiple node CR network. For the same parent path of node i (suppose it is path k), different son paths would lead different final paths’ SHM (suppose there are two paths a and b). Then, it can be depicted as
$$\begin{array}{@{}rcl@{}} &\mathbf{S}_{k + a}=\mathbf{S}_{k} \cup \mathbf{S}_{a},\ \mathbf{S}_{k+ b}=\mathbf{S}_{k} \cup \mathbf{S}_{b}\\ &\mathbf{S}_{k+ a}\cap \mathbf{S}_{a} \neq \mathbf{S}_{k+ b}\cap \mathbf{S}_{b} \neq \mathbf{S}_{k}. \end{array} $$
However, different son paths may change the same parent path’s weight, which is in conflict with the routing principle of traditional weighted disjoint multipath route.
Therefore, route mechanism in [16, 17] and traditional multipath route solutions are not suitable for Problem 1, a novel disjoint multipath routing algorithm which could find multiple spectrumindependent paths for maximizing communication efficiency C is necessary.
MIDMRA
To settle this problem, mirrorimagebased disjoint multipath routing algorithm (MIDMRA) is provided.
Main idea
For the Problem 1, two main questions should be addressed:

1.
Selecting multiple paths which are space disjoint.

2.
Proposing a new algorithm to guarantee paths’ disjointness with PUs by employing the SHM mechanism.
Whereas, these two questions should be considered together in routing process since the special reason which is mentioned in Section 3.2. So, if these two questions could be separate, it would be easier to settle Problem 1 than before. Hence, the mirror image algorithm is introduced to address question (1).
In network’s communication process, information exchange is always duplex from source to destination or from destination to source. Suppose R paths existing in a CR network, these R paths could be seen as R/2 paths transmitting data from source to destination and R/2 paths from destination to source, which is like a communication loop with R overlaps. Then, if the loop could be cut and expanded to a long line, the R paths would be changed to a long single path. Correspondingly, if a R headtohead and tailtotail mirror graphs sequence could be generated from original CR network graph, the multipath routing problem could be simplified to a single path routing problem in the mirror graphs sequence. Therefore, questions (1) and (2) could be changed to find one single disjoint path by employing SHM mechanism.
For easy understanding, a simple example would be stated.
As shown in Fig. 2, a simple CR network graph is depicted. Eight nodes are equipped in this CR networks, dashed lines represent candidate links between CR nodes. Two PUs are appearing in one time period, suppose there are three spectrum channels, PU1 is occupying the first channel and PU2 is interfering the third channel. Nodes 1 and 3 are under PU1’s interference range, while nodes 4 and 6 are under PU2’s interference range. According to SHM mechanism, Path 1’s SHM could be calculated as S
_{
path1}={1,0,0}, S
_{
path2} and S
_{
path3} are {1,0,1} and {0,0,1}, respectively. So, if two paths are wanted, the best choice must be path 1 and path 3 since their communication efficiency C is maximized to 1.
In this case, for selecting two disjoint paths, another mirror graph should be generated and connected to the original one. As shown in Fig. 3, the graph in which nodes are numbered with quotation marks is the mirror image of the CR network graph in Fig. 2. Hence, in this new graph, if a path could be selected from S to S
^{′} without recessive repeated nodes and get a maximum C as the blue path does in Fig. 3, the disjoint multipath routing problem could be solved.
After the explanation above, main idea of MIDMRA has been shown out. To realize this idea, two concrete algorithms are proposed. The first is mirror image algorithm, which is responsible for constructing the sequence of connected mirror graphs. While the second is optimal path selection mechanism, which is designed to route a single path from the new “source” to the new “destination” under the constraints of Problem 1 and nodes independence.
Mirror image algorithm
In this section, mirror image algorithm would be introduced in details.
Given the networkmodeled weighted graph G=(V,E,S) with V being the node set, E being the link set, and S being the node’s SHM set. If we want to find R disjoint paths in this network, a Mirrorimage() algorithm could be used as Algorithm 1.
As shown in Algorithm 1, the detailed processes could be described as below:

1.
At first, as a mirror image algorithm, R−1 copies of original graph G should be generated

2.
Number the R graphs. Original graph G is the first one, and the other R−1 graphs need to connect to G as a sequence. Hence, from the first to last graphs, they are numbered, while nodes are also numbered according to their own graph’s serial number;

3.
Connect relay junctions between neighbor graphs in headtohead and tailtotail style (source connects with source, destination connects with destination). And for the first and last graphs, only one relay junction is equipped.

4.
After R−1 iterations, a large mirror image G
^{′} could be obtained.
For better explanation, a simple example of threepath route which is using Algorithm 1 is presented.
As shown in Fig. 4
a which is the original graph G, three paths are wanted from the source S to destination D. By using Mirrorimage() algorithm, three mirror graphs are generated as G, G
^{′}, and G
^{′′}, respectively, which is shown in Fig. 4
b. They connect with each other through the dashed lines between relay junctions, destination D is the relay junction between graph G and graph G
^{′}, while source node S is the relay junction between graph G
^{′} and G
^{′′}. Hence, if we could find an optimal path from S to D
^{′′}, we could obtain three disjoint paths in the original graph. In Fig. 4
b, the extended graph has 24 nodes which are numbered according to their graphs’ serial number, the number of node i
^{′} is node i+8 and i
^{′′} is node i+2∗8 actually for easy selection and calculation.
Consequently, a mirror image sequence environment has been established by mirror image algorithm. Whereas, how to find the appropriate optimal path is still a problem that should be solved.
Optimal path selection
For the purpose of single optimal path selection in the extend mirror image sequence, a novel single path routing algorithm is necessary. As minimum ∥S∥ is needed in Problem 1, a Dijkstrabased optimal path selection mechanism is presented to solve this question.
Because the weighted distances calculation problem of Dijkstra algorithm which has been mentioned in Section 3.2, traditional Dijkstra based algorithm is not suitable for path selection in CR networks with SHM mechanism. Hence, to realize the novel Dijkstrabased optimal path selection algorithm, two questions is needed to be addressed.

Through using the mirror image algorithm, relay junctions are connections between mirror graphs in the extended mirror image, which leads the same relay junctions which appeared in multiple candidate paths in mirror graphs. Hence, traditional distance calculation in Dijkstra algorithm could not be applied since one node’s distance could not be calculated twice. While SHMs are different, by using different parent paths or son paths, only one shortest path selection from the source to destination in a single graph does not fit the requirements of CR networks and could not find out the optimal solution. Therefore, a novel shortest weighted distance calculation method needs to be proposed.

Mirror image algorithm increases CR nodes’ amount multiple times, but these additional nodes are virtual. Thus, a lot of the same nodes exist in different mirror graphs actually. Traditional Dijkstra algorithm could not be suitable for this situation. Then, how to avoid virtual node reselection in different graphs is also a problem.
To address these questions, a novel distance calculation approach is depicted as follows,
$$ {\begin{aligned} &D(i,j)\\&=\left\{ \begin{array}{rl} \left\Vert \mathbf{s}_{i}\cup\mathbf{s}_{1}\cup\mathbf{s}_{2}\cup\cdots\cup\mathbf{s}_{j} \right\Vert \ \ &, \ j\leq n \\ T\cdot N+\Vert\left(\mathbf{s}_{i}\cup\mathbf{s}_{1}\cup\mathbf{s}_{2}\cup\cdots\cup\mathbf{s}_{R_{1}}\right)\cap&\\ &, \ n<j\leq 2n\\ \left(\mathbf{s}_{R^{\prime}_{1}}\cup\mathbf{s}_{1^{\prime}}\cup\mathbf{s}_{2^{\prime}}\cup\cdots\cup\mathbf{s}_{j}\right) \Vert&\\ \left[\frac{j\epsilon}{n}\right]\cdot T\cdot N+\Vert \left(\mathbf{s}_{i}\cup\mathbf{s}_{1}\cup\mathbf{s}_{2}\cup\cdots\cup\mathbf{s}_{R_{1}}\right)\cap\\ &, \ j>2n\\ \left(\mathbf{s}_{R^{\prime}_{1}}\cup\cdots\cup\mathbf{s}_{R^{\prime}_{2}}\right)\cap\cdots \cap\left(\mathbf{s}_{R^{\prime}_{\left[\frac{j\epsilon}{n}\right]}}\cup\cdots\cup\mathbf{s}_{j}\right) \Vert\\ \infty \ \ {,} \ \left\{j\ or\ jn\ or\ \cdots \ or \ j\left[\frac{j\epsilon}{n}\right] n\right\}\ &\in \ \{Path_{i\to j}\ without\ j\} \end{array} \right. \end{aligned}} $$
(5)
As shown in Eq. 5, i and j are the ID numbers of nodes in the extended graph generated by Algorithm 1, R
_{
i
}s and \(R^{\prime }_{i}\)s represent relay junctions between mirror graphs, n is the amount of nodes in a single mirror graph G, while N and T are the total spectrum channels and time periods in SHM.
Therefore, in the routing process, four different types of distance calculation scenarios may exist:

When j≤n, “path” from i to j is in the first graph, so selected nodes in this long path are in one candidate path. Hence, logical OR operation is taken for distance calculation according to the SHM mechanism.

When n<j≤2n, j must be the node in the second mirror graph which is different from i. In this case, the selected path which includes i and j should be two different paths actually. In order to calculate the SHM of the single long path through two mirror graphs, logical AND operation is utilized. While, T·N is also added in for mitigating calculation errors which are caused by multiple selected paths in mirror graphs.

When j>2n, j is in one of the multiple mirror graphs. As a result, multiple different paths are selected in the mirror graphs from i to j, and these paths in the middle section graphs should be from relay junctions to relay junctions. For mitigating calculation errors, \(\left [\frac {j\epsilon }{n}\right ]\cdot T\cdot N\) is included. \(\left [\frac {j\epsilon }{n}\right ]\) is round operation of \(\frac {j\epsilon }{n}\), and ε is a minimum number which is used for preventing j that is divisible by n.

When \(\left \{j\ or\ jn\ or\ \cdots \ or \ j\left [\frac {j\epsilon }{n}\right ] n\right \} \in \left \{Path_{i\to j}\ without\ j\right \}\), there are multiple js in the path from i to j or j which is the virtual node copy in the extended graphs of nodes in a path. In this case, an ∞ distance is appropriate for this new path.
As a result, the two questions are solved through Eq. 5. Then,the Dijkstrabased Pathselection() algorithm is proposed as Algorithm 2.
As shown in Algorithm 2, a detailed description could be concluded as follows:

1.
At first, PATH list and DISTANCE list are prepared for storing the chosen paths and their distances, and source node S is put into PATH as the first path while 0 is its distance.

2.
Search out the shortest path’s tail node i’s neighbor nodes and calculate distance from S to node i’s neighbor nodes.

3.
Not all neighbor nodes could be added into PATH, the nodes who get ∞ distances must be deleted since they are reselected.

4.
If the selected neighbor nodes are found in PATH, another path which is from S to neighbor has been selected before. In this case, a comparison needs to be applied for finding the shorter path between these conflicting paths. After a series of comparison, the poor one would be deleted and the good one would be retained.

5.
After the comparison process, the remaining paths should be put into PATH. Correspondingly, the original shortest path should be deleted.

6.
Compare distances in DISTANCE list, in order to find out the shortest path at present.

7.
The last step is to repeat step (2) to step (6) until the destination has been found. The shortest path from S to destination is figured out. Split the path into multiple paths, they are the disjoint paths, and the algorithm is ended.
For easy understanding, a simple example of this algorithm is applied in Fig. 5. Two paths are wanted in a fivenode CR network, and there are two candidate spectrum channels which are sensed in two time slots, the detailed SHM is stated above each node. Red block in SHM represents spectrum time slot which is occupied by PUs, and white block indicates that there is no PU. The different colors of solid lines represent multiple paths which have been selected, and their distances and path lists are also stated in different colors. The shortest path from S to S
^{′} is found in PATH list as S−3−D−D
^{′}−1−S
^{′} which has the least distance by using Algorithm 2. Ultimately, a pair of disjoint paths are found as S−3−D and S−1−D, their multipath SHM is 0 and C is 1, which meets the requirement of Problem 1.
Optimization ability
After demonstrating how MIDMRA work, we now provide analysis on the optimization and time complexity of this algorithm.
Theorem 1
Given a weighted graph G(V,E,S), find multiple paths by using MIDMRA, whose set is R, the communication efficiency C of these selected paths converge to the maximum.
Proof
As it is hard to prove that selected paths has maximized C directly, we would like to prove it by contradiction. Suppose there is a path k from S to D in the long mirror graph, which has higher C than MIDMRA selected path a, then, there must exist
$${\begin{aligned} &C(path\ k)\\ \,\,&=\frac{T\cdot N\left\Vert \mathbf{S}_{path(k) S\to R_{1}}\cap \mathbf{S}_{path(k) R'_{1}\to R_{2}}\cap \cdots \cap\mathbf{S}_{path(k) R'_{[\frac{D\epsilon}{n}]}\to D} \right\Vert}{T\cdot N} >\\ &C(path\ a)\\ \,\,&=\frac{T\cdot N\left\Vert \mathbf{S}_{path(a) S\to R_{1}}\cap \mathbf{S}_{path(a) R'_{1}\to R_{2}}\cap \cdots \cap\mathbf{S}_{path(a) R'_{[\frac{D\epsilon}{n}]}\to D} \right\Vert}{T\cdot N}\\ \,\,&\Rightarrow D(path\ k)<D(path\ a). \end{aligned}} $$
Therefore, if the hypothesis of existing path k has higher C is valid, the distance D(path
k) must be lower than D(path
a), and path a could not be chosen as the selected path according to Pathselection() algorithm. Hence, the hypothesis is invalid.
But there is a precondition of this hypothesis that path k is able to compare with path a. If the hypothesis is correct, path k must be deleted in the process of MIDMRA. Then, distance comparison between path k and path a may not be realized. In MIDMRA, there are three chances of deleting paths:

1.
If the path causes ∞ distance, it would be deleted. In this case, reselected nodes must exist in this path, which is in conflict with the rule of disjoint paths route under single interface terminal environment, so this assumption is incorrect.

2.
When new paths are generated, the parent path would be deleted. According to the principle of MIDMRA, parent paths should be included in new paths when it is deleted, unless all neighbor nodes of parent paths are not appropriate for selecting or there are no neighbor nodes. The prior scenario breaks other deleting rules, and the last one means that the path could not route to destination, both assumptions are unable to find out disjoint paths.

3.
It is complicated in this case as there are a lot of comparisons between existing paths and a new path. Suppose there is tail node i in new path k, which is a reselected node between path k and another existing path b in PATH. Then, path b should be compared with path k from S to i.
If the hypothesis is correct, path k must be deleted. Hence, S
_{
Path(k)S→i
} must be worse than S
_{
Path(b)S→i
}. So, there exist:
$$\begin{array}{@{}rcl@{}} &D(path(k)) < D(path(a)) \ \ \ and \\ &D((path(b) S\to i) +(path(k) i\to D))\leq D(path(k)). \end{array} $$
Therefore, the distance of path b from S to i plus i to D must be lower than path k, while the distance of path a is higher than path k. Then, a new inequation could be depicted out,
$$D((path(b) S\to i) +(path(k) i\to D))< D(path(a)). $$
As a result, the new path c which is the combination between path b and path k could route to destination and is better than selected path a, but which is conflict with the assumption we have provided above.
Hence, the hypothesis of existing another path k which is better than path a selected by MIDMRA is invalid. In conclusion, multiple paths set R selected by MIDMRA has maximum C which could also be easily derived by this proof, The proof is completed. □
Time complexity
On the other side, time complexity as an important element of algorithm should be analyzed. Since “WHILE” iteration is utilized in MIDMRA without distinct end point, the iteration times may not be a fixed value. Hence, we would prove that the time complexity of MIDMRA is polynomial in this part.
Theorem 2
Suppose there exist n nodes in graph G(V,E,S), to find r paths by using MIDMRA to maximize their communication efficiency C, the time complexity would be polynomial.
Proof
As shown in Algorithm 3, MIDMRA could be divided into two parts, the first one is Mirrorimage() algorithm, whose time complexity could be calculated out as T(Mirrorimage())=O(r). While because the amount of paths r is a constant value, T(Mirrorimage()) should be O(1).
For another, the second part Pathselection()’s time complexity is hard to be figured out since there is a ’WHILE’ iteration, for easy calculation, Algorithm 2 is simplified as Algorithm 4.
In Algorithm 4, the main iteration could be separated into four parts: Destination finding iteration, distances calculation, neighbor nodes comparisons, and shortest path selection. Hence, these four parts could be indicated as T
_{
while
}, T
_{
d
}, T
_{
compare
}, and T
_{
short
}. And time complexity of Pathselection() could be calculated as Eq. 6.
$$ T_{Pathselection}=T_{while}(T_{d}*T_{compare}+T_{short}) $$
(6)
Because r∗n nodes exist in an extended mirror image, and all nodes are utilized in distance calculation, each iteration T
_{
d
} could be figured out as O(r∗n). While as r is constant, T
_{
d
}=O(n).
Because paths should be selected disjoint with each other, there only exist r∗n paths in PATH list at most. For a single node i, r∗n would be the most comparison times. So, T
_{
compare
}≤O(r∗n)=O(n). Correspondingly, as there are r∗n paths in PATH at most, T
_{
short
}≤O(n). And the r∗n paths must have destination D, T
_{
while
}≤O(n).
Consequently, the time complexity of Pathselection() algorithm could become as follows:
$$\begin{array}{@{}rcl@{}} & T_{Pathselection}=T_{while}(T_{d}*T_{compare}+T_{short})\leq \\ & O(n)(O(n)*O(n)+O(n))= \\ &O(n^{3}+n^{2})=O(n^{3}) \end{array} $$
so, the T
_{
Pathselection
} is less than O(n
^{3}), and the time complexity of MIDMRA would become less than O(n
^{3}+1)=O(n
^{3}). Time complexity of MIDMRA is polynomial. The proof is completed. □