constructing all shortest node-disjoint paths in torus networks

10
J. Parallel Distrib. Comput. 75 (2015) 123–132 Contents lists available at ScienceDirect J. Parallel Distrib. Comput. journal homepage: www.elsevier.com/locate/jpdc Constructing all shortest node-disjoint paths in torus networks Cheng-Nan Lai Department of Information Management, National Kaohsiung Marine University, Kaohsiung, 81157, Taiwan highlights An optimal construction of all shortest node-disjoint paths in a torus network. High probability of the existence of disjoint shortest paths in a torus was shown. Finding disjoint shortest paths in a torus is equivalent to that in a hypercube. article info Article history: Received 4 March 2014 Received in revised form 31 August 2014 Accepted 6 September 2014 Available online 16 September 2014 Keywords: Torus k-ary n-cube Mesh Hypercube Node-disjoint paths Optimization problem abstract An n-dimensional torus network, also called wrap-around mesh or toroidal network, is a Cartesian product of n cycle networks. In particular, it was named k-ary n-cube when the sizes of the n cycle networks are all equal to k. In this paper, m node-disjoint shortest paths from one source node to other m (not necessarily distinct) destination nodes are constructed in an n-dimensional torus network, provided the existence of such node-disjoint shortest paths which can be verified in O(mn 1.5 ) time, where m is not greater than the connectivity. The worst-case time and space complexities of the construction procedure are both optimal O(mn). In the situation that all of the source node and destination nodes are mutually distinct, brute-force computations show that the probability of the existence of the m node-disjoint shortest paths (from the source node to the m destination nodes) in a k-ary n-cube is greater than 94%, 70%, 91%, 69%, and 89% for (k, n, m) = (2, 7, 7), (3, 4, 8), (4, 3, 6), (5, 3, 6), and (6, 3, 6), respectively. © 2014 Elsevier Inc. All rights reserved. 1. Introduction Due to advanced hardware technology, it is now feasible to build a large-scale multiprocessor system consisting of hundreds or even thousands of processors. One crucial step in designing a multiprocessor system is to determine the topology of its interconnection network (network for short) where nodes and links correspond to processors and communication channels, respectively. Since the network topology plays a significant role in system performance, many possible options have been proposed in the literature. One of the most practical network topologies is the torus network (torus for short) [13,14,26] because many multiprocessor systems have been built based on it [1,18,23]. An n-dimensional torus (abbreviated to an n-torus) is a Cartesian product of n cycle networks (cycles for short) of sizes greater than one. The number of nodes of an n-torus is the product of the sizes of the n cycles, and each node has a label of an n- digit number with each digit’s value ranging from 0 to the size of its corresponding cycle minus one. Two nodes are connected by a E-mail address: [email protected]. link if and only if their labels differ by exactly one digit and the two different digits’ values are next to each other (i.e., ±1 mod the size of the digit’s corresponding cycle). Fig. 1 shows the structure of a 2-torus which is a Cartesian product of two cycles of sizes 5 and 6. Both the degree and connectivity of an n-torus are 2n minus the number of cycles of size 2. The connectivity of a network is the minimum number of nodes whose removal can make the network disconnected or trivial [5]. Note that a cycle of size 2 can be recognized as a network consisting of two nodes connected by a link. An n-torus has been further renamed to the k-ary n-cube [2,3,6, 9,30] in case that the sizes of the n cycles are all equal to k, where k 2. In particular, when k = 2, a 2-ary n-cube is just identical to an n-dimensional hypercube (abbreviated to an n-cube) [20,19,27]. Fig. 2 shows the structure of a 4-cube where two disjoint 3-cubes, i.e., a left 3-cube (consisting of eight nodes labeled with trailing 0) and a right 3-cube (consisting of eight nodes labeled with trailing 1), are connected by eight cross links. In addition, each node has a label of four bits (or binary digits) such that each bit’s position corresponds to a dimension. Routing is a process of transmitting messages among nodes/processors. Its efficiency and reliability, which are crucial http://dx.doi.org/10.1016/j.jpdc.2014.09.004 0743-7315/© 2014 Elsevier Inc. All rights reserved.

Upload: cheng-nan

Post on 06-Apr-2017

231 views

Category:

Documents


0 download

TRANSCRIPT

J. Parallel Distrib. Comput. 75 (2015) 123–132

Contents lists available at ScienceDirect

J. Parallel Distrib. Comput.

journal homepage: www.elsevier.com/locate/jpdc

Constructing all shortest node-disjoint paths in torus networksCheng-Nan LaiDepartment of Information Management, National Kaohsiung Marine University, Kaohsiung, 81157, Taiwan

h i g h l i g h t s

• An optimal construction of all shortest node-disjoint paths in a torus network.• High probability of the existence of disjoint shortest paths in a torus was shown.• Finding disjoint shortest paths in a torus is equivalent to that in a hypercube.

a r t i c l e i n f o

Article history:Received 4 March 2014Received in revised form31 August 2014Accepted 6 September 2014Available online 16 September 2014

Keywords:Torusk-ary n-cubeMeshHypercubeNode-disjoint pathsOptimization problem

a b s t r a c t

Ann-dimensional torus network, also calledwrap-aroundmeshor toroidal network, is a Cartesianproductof n cycle networks. In particular, it was named k-ary n-cubewhen the sizes of the n cycle networks are allequal to k. In this paper,m node-disjoint shortest paths from one source node to otherm (not necessarilydistinct) destination nodes are constructed in an n-dimensional torus network, provided the existence ofsuch node-disjoint shortest paths which can be verified in O(mn1.5) time, wherem is not greater than theconnectivity. The worst-case time and space complexities of the construction procedure are both optimalO(mn). In the situation that all of the source node and destination nodes aremutually distinct, brute-forcecomputations show that the probability of the existence of the m node-disjoint shortest paths (from thesource node to them destination nodes) in a k-ary n-cube is greater than 94%, 70%, 91%, 69%, and 89% for(k, n,m) = (2, 7, 7), (3, 4, 8), (4, 3, 6), (5, 3, 6), and (6, 3, 6), respectively.

© 2014 Elsevier Inc. All rights reserved.

1. Introduction

Due to advanced hardware technology, it is now feasible tobuild a large-scale multiprocessor system consisting of hundredsor even thousands of processors. One crucial step in designinga multiprocessor system is to determine the topology of itsinterconnection network (network for short) where nodes andlinks correspond to processors and communication channels,respectively. Since the network topology plays a significant role insystem performance, many possible options have been proposedin the literature. One of the most practical network topologiesis the torus network (torus for short) [13,14,26] because manymultiprocessor systems have been built based on it [1,18,23].

An n-dimensional torus (abbreviated to an n-torus) is aCartesian product of n cycle networks (cycles for short) of sizesgreater than one. The number of nodes of an n-torus is the productof the sizes of the n cycles, and each node has a label of an n-digit number with each digit’s value ranging from 0 to the size ofits corresponding cycle minus one. Two nodes are connected by a

E-mail address: [email protected].

http://dx.doi.org/10.1016/j.jpdc.2014.09.0040743-7315/© 2014 Elsevier Inc. All rights reserved.

link if and only if their labels differ by exactly one digit and thetwo different digits’ values are next to each other (i.e., ±1 mod thesize of the digit’s corresponding cycle). Fig. 1 shows the structureof a 2-torus which is a Cartesian product of two cycles of sizes5 and 6. Both the degree and connectivity of an n-torus are 2nminus the number of cycles of size 2. The connectivity of a networkis the minimum number of nodes whose removal can make thenetwork disconnected or trivial [5]. Note that a cycle of size 2 canbe recognized as a network consisting of two nodes connected bya link.

An n-torus has been further renamed to the k-ary n-cube [2,3,6,9,30] in case that the sizes of the n cycles are all equal to k, wherek ≥ 2. In particular, when k = 2, a 2-ary n-cube is just identical toan n-dimensional hypercube (abbreviated to an n-cube) [20,19,27].Fig. 2 shows the structure of a 4-cube where two disjoint 3-cubes,i.e., a left 3-cube (consisting of eight nodes labeled with trailing 0)and a right 3-cube (consisting of eight nodes labeled with trailing1), are connected by eight cross links. In addition, each node hasa label of four bits (or binary digits) such that each bit’s positioncorresponds to a dimension.

Routing is a process of transmitting messages amongnodes/processors. Its efficiency and reliability, which are crucial

124 C.-N. Lai / J. Parallel Distrib. Comput. 75 (2015) 123–132

Fig. 1. The structure of a 2-torus which is a Cartesian product of two cycles of sizes5 and 6.

to the system performance, can be enhanced by employing inter-nally node-disjoint paths (disjoint paths for short), because theycan be used to avoid congestion, accelerate transmission rate, andprovide alternative transmission routes. Two paths are internallynode-disjoint if they do not share any common node except theirend nodes. In order to reduce the transmission latency and cost,routing with disjoint paths [7,8,14,15,24,25] expects their maxi-mal length and total length to be minimized, respectively, wherethe length of a path is the number of links in it. The benefits ofdisjoint paths make them play an important role in the study ofrouting, reliability, and fault tolerance in parallel and distributedsystems [10–13,17,19–22,28,29].

There are three categories of disjoint paths, i.e., one-to-one,one-to-many, and many-to-many [11]. Suppose that W is anetwork with connectivity n. According to Menger’s theorem [5],there exist n disjoint paths between every two distinct nodes ofW .They belong to the one-to-one category. Many one-to-one disjointpaths constructed for a variety of networks can be found in theliterature [10,13,14,22]. On the other hand, according to Theorem2.6 in [4], there exist n disjoint paths from one node to other ndistinct nodes in W . They belong to the one-to-many category.One-to-many disjoint paths were first studied in [25] where theInformation Dispersal Algorithm (IDA for short) was proposed onthe hypercube. By taking advantages of disjoint paths, the IDAhas numerous potential applications to secure and fault-tolerantstorage and transmission of information. Some examples of one-to-many disjoint paths can be found in [7,8,12–15,17,21,28,29].Many-to-many disjoint paths (or named set-to-set disjoint paths),which connect two sets of nodes inW , can be found in [15,16].

Routing functions have been shown effective in derivingdisjoint paths in hypercube-like networks [19–21]. By the aid ofrouting functions, it was shown in [19] that m disjoint shortestpaths from one source node to other m (not necessarily distinct)destination nodes can be constructed in an n-cube, provided

the existence of such disjoint paths which can be verified inO(mn1.5) time (also see [8,24]), where m ≤ n. The time andspace complexities of the construction procedure are both optimalO(mn). In this paper, we study the problem of constructing disjointshortest paths from one source node to many other destinationnodes in an n-torus. Based on our idea, this problem was firsttransformed into a corresponding problem of constructing disjointshortest paths with special properties in a 2n-cube, and then itssolutions are applied to derive the required paths. By the aidof the construction procedure of [19], it will be shown that mdisjoint shortest paths from one source node to other m (notnecessarily distinct) destination nodes can be constructed in an n-torus, provided the existence of such disjoint shortest paths whichcan be verified in O(mn1.5) time, where m is not greater thanthe connectivity of the n-torus. In addition, the time and spacecomplexities of our construction procedure (of this paper) are bothoptimal O(mn).

In order to figure out the probability that there exist disjointshortest paths in an n-torus, brute-force computations werecarried out for verifying all the combinations of the source nodeand destination nodes by running computer programs. In thesituation that all of the source node and destination nodes aremutually distinct, computational results show that the probabilityof the existence of the m disjoint shortest paths (from thesource node to the m destination nodes) in a k-ary n-cubeis greater than 94%, 70%, 91%, 69%, and 89% for (k, n,m) =

(2, 7, 7), (3, 4, 8), (4, 3, 6), (5, 3, 6), and (6, 3, 6), respectively.Since IDA [25] relies heavily on one-to-many disjoint paths, theconstruction of disjoint shortest paths in an n-torus is not onlytheoretically interesting but also practical in real applications,especially when all shortest one-to-many disjoint paths come intouse.

The rest of this paper is organized as follows: In the nextsection, routing functions are revisited and the construction ofall shortest disjoint paths in an n-cube is described. As shown inSection 3, a necessary and sufficient condition for the existenceof disjoint shortest paths in an n- torus is described in terms ofrouting functions, and the construction of them is also provided.Section 4 shows the detailed computational results. In Section 5,this paper concludes with some remarks on the efficiency of theconstruction procedure. For the brevity of this paper, wheneverwediscuss time/space complexity, we mean worst-case time/spacecomplexity.

2. An optimal construction of disjoint shortest paths in ann-cube

Suppose that s is the source node and d1, d2, . . . , dm arem (notnecessarily distinct) destination nodes in an n-cube, where m ≤ n

Fig. 2. The structure of a 4-cube.

C.-N. Lai / J. Parallel Distrib. Comput. 75 (2015) 123–132 125

and s ∈ d1, d2, . . . , dm. Since an n-cube is node symmetric, we

assume s =

n 00 · · · 0 = 0n, i.e. the origin, without loss of generality.

Let D = d1, d2, . . . , dm be a multiset and I = k1, k2, . . . , km

be a set of m distinct integers ranging from 1 to n (actually,k1, k2, . . . , km denote m dimensions of an n-cube). A multiset is acollection of elements in which multiple occurrences of the sameelement are allowed. In [19], a one-to-one correspondence Φ :

D → I was referred to as a routing function, and it was shown thatrouting functions can be effectively used to derivem disjoint pathsfrom s to d1, d2, . . . , dm, respectively, in an n-cube.

Throughout this paper, we let ekt = 0kt−110n−kt and di =

di,1di,2 . . . di,n, where 1 ≤ t ≤ m, 1 ≤ i ≤ m, and di,k denotes thekth bit (from the left) of di for all 1 ≤ k ≤ n. Intuitively, Φ(di) = ktmeans that ekt is chosen for the node following s when we routefrom s to di. Since di,Φ(di) = di,kt = 1 assures that ekt is includedin a shortest path from s to di, we prefer a Φ with di,Φ(di) = 1for all 1 ≤ i ≤ m in order to route a shortest path from s to di.Unfortunately, such aΦ does not always exist for arbitrary D and I .

In [19], an optimalO(mn) construction procedure named Paths1was proposed. With inputs Φ,m, n,D, and I , it was shown in [19]that Paths1(Φ,m, n,D, I) can producem disjoint paths, denoted byQ1,Q2, . . . ,Qm, from s to d1, d2, . . . , dm, respectively, so that Qi isshortest with length |di| if di,Φ(di) = 1 for all 1 ≤ i ≤ m, where |di|denotes the number of bits 1 contained in di, i.e. the distance froms to di. The following lemma describes the above results formally.

Lemma 1 ([19]). Given a routing function Φ : D → I such thatdi,Φ(di) = 1 for all 1 ≤ i ≤ m, then Paths1(Φ,m, n,D, I) canproduce m disjoint paths Q1,Q2, . . . ,Qm from s to d1, d2, . . . , dm,respectively, in an n-cube so that Qi is shortest with length |di| forall 1 ≤ i ≤ m.

In [19], a one-to-one mapping Ω : d1, d2, . . . , dm →

1, 2, . . . , n was referred to as a partial routing function, wherem ≤ n. Obviously, we can obtain a routing function Φ by definingI = Ω(d1), Ω(d2), . . . , Ω(dm) and Φ(di) = Ω(di) for all 1 ≤

i ≤ m, and we have di,Φ(di) = di,Ω(di) = 1 if di,Ω(di) = 1. By the aidof Lemma 1, we have that if there exists a partial routing functionΩ such that di,Ω(di) = 1 for all 1 ≤ i ≤ m, then there exist mdisjoint shortest paths from s to d1, d2, . . . , dm. In [19], a partialrouting function Ω was said to be maximal if ΣΩ ≥ ΣΩ ′ for anyΩ ′

: d1, d2, . . . , dm → 1, 2, . . . , n, where ΣΩ =m

i=1 di,Ω(di).A maximal Ω with ΣΩ = m makes sure that di,Ω(di) = 1 for all1 ≤ i ≤ m, which implies the existence of m disjoint shortestpaths from s to d1, d2, . . . , dm. It was shown in [19] that a maximalΩ can be computed in O(mn1.5) time by solving a correspondingmaximum bipartite matching problem.

3. Constructing disjoint shortest paths in an n-torus

Suppose that s is the source node and t1, t2, . . . , tm are m(not necessarily distinct) destination nodes in an n-torus, wheres ∈ t1, t2, . . . , tm and m is not greater than the connectivityof the n-torus. Since the n-torus is node symmetric, we assume

s =

n 00 · · · 0 = 0n, i.e. the origin, without loss of generality.

In this section, m disjoint shortest paths from s to t1, t2, . . . , tm,respectively, will be constructed in the n-torus, provided theexistence of the m disjoint shortest paths which can be verified inO(mn1.5) time. In addition, the time and space complexities of theconstruction procedure are both optimal O(mn).

According to our construction strategy, each node ti is firstmapped to a node di in a 2n-cube for all 1 ≤ i ≤ m. Then, by the aidof procedure Paths1,m disjoint shortest paths Q1,Q2, . . . ,Qm from02n to d1, d2, . . . , dm, respectively, can be constructed in a 2n-cube.

As shown later, each shortest path from s to ti, denoted by Ri, can bederived from Qi for all 1 ≤ i ≤ m. In order to make R1, R2, . . . , Rmdisjoint to each other, possibly the order of Q1,Q2, . . . ,Qm needsto be changed prior to the derivation. In the rest of this section,we first show how the node-mapping works as well as how Ri isderived from Qi. Then, a procedure for rearranging Q1,Q2, . . . ,Qm,if necessary, is proposed. Finally, we give a necessary and sufficientcondition, which can be verified in O(mn1.5) time, for the existenceof them disjoint shortest paths R1, R2, . . . , Rm.

3.1. Deriving R1, R2, . . . , Rm from Q1,Q2, . . . ,Qm

Let ℑn(k1, k2, . . . , kn) denote an n-torus, where kj ≥ 2 for all1 ≤ j ≤ n. When k1 = k2 = · · · = kn = k, ℑn(k1, k2, . . . , kn)is abbreviated to ℑn(k) for short. In ℑn(k1, k2, . . . , kn), two nodesu = u1u2 . . . un and v = v1v2 . . . vn are connected by a linkif and only if u1 = v1, u2 = v2, . . . , uw−1 = vw−1, uw =

vw ± 1 mod kw, uw+1 = vw+1, . . . , un = vn for some 1 ≤

w ≤ n, where 0 ≤ uj, vj ≤ kj − 1 for all 1 ≤ j ≤ n. LetV (ℑn(k1, k2, . . . , kn)) denote the set of nodes ofℑn(k1, k2, . . . , kn).Define ϕ : V (ℑn(k1, k2, . . . , kn)) → V (ℑ2n(2)) as a node-mappingwhich maps a node u ∈ V (ℑn(k1, k2, . . . , kn)) to a node x =

x1x2 . . . x2n ∈ V (ℑ2n(2)) so that for all 1 ≤ j ≤ n, the value ofx2j−1x2j satisfies

x2j−1x2j =

00 if uj = 0,10 if (uj = 1 and kj = 2) or

0 < uj < (kj/2) and kj > 2,

01 if uj > (kj/2) and kj > 2,11 if uj = (kj/2) and kj > 2.

It should be noted that ℑ2n(2) is identical to a 2n-cube.Let u[w : c] denote a node v such that vw = c and vj = uj

for all 1 ≤ j ≤ n and j = w, where 1 ≤ w ≤ n and0 ≤ c ≤ kw − 1. Intuitively, x2j−1 = 1 (resp. x2j = 1) indicatesthat s[j : 1] = 0j−110n−j (resp. s[j : kj − 1]) can be chosen forthe node following s when we route a shortest path from s to uin ℑn(k1, k2, . . . , kn). In other words, ϕ(u) is used to indicate thetraversal directions for each dimension of the n-torus so that thechosen nodes are on a shortest path from s to u. It will be shownlater that those indications are useful in deriving R1, R2, . . . , Rmfrom Q1,Q2, . . . ,Qm. For an illustrative example, suppose u =

23 ∈ V (ℑ2(5, 6)). Since 0 < u1 = 2 < (5/2) = (k1/2), k1 =

5 > 2, u2 = 3 = (6/2) = (k2/2), and k2 = 6 > 2, we haveϕ(u) = 1011 ∈ V (ℑ4(2)), which indicates that 10, 01, and 05can be the node following s(=00) in a shortest path from s to uin ℑ2(5, 6).

Suppose that di = ϕ(ti) and Qi = (02n= θ i

0, θ i1, . . . , θ

i|di|

= di)is a shortest path from 02n to di in ℑ2n(2) for all 1 ≤ i ≤ m,and Q1,Q2, . . . ,Qm are mutually disjoint. Let the bipth bit of θ i

p−1

differ from that of θ ip for all 1 ≤ p ≤ |di|, i.e. θ i

p−1,bip= θ i

p,bipand

θ ip−1,k = θ i

p,k for all 1 ≤ k ≤ 2n and k = bip. We have θ ip−1,bip

= 0,

θ ip,bip

= 1, and that bi1, bi2, . . . , b

i|di|

are mutually distinct because

Qi is shortest. For all 1 ≤ i ≤ m, we let ti = ti,1ti,2 . . . ti,n andc ip = ⌈bip/2⌉ for all 1 ≤ p ≤ |di|, where ti,j denotes the jth digit(from the left) of ti for all 1 ≤ j ≤ n. It should be noted that c ip(resp. bip) corresponds to a dimension of ti (resp. di) so that theyare correlated by ϕ because we have bip = 2c ip − 1 if bip is odd, andbip = 2c ip otherwise (bip is even).

As shown below, a construction method, named R-derivation,is proposed for deriving R1, R2, . . . , Rm from Q1,Q2, . . . ,Qm. Referto Fig. 3, for all 1 ≤ i ≤ m, Ri from s to ti can be derivedfrom Qi as follows: Initially, let Ri = (0n

= r i0). For p = 1,2, . . . , |di| sequentially, Ri is extended by a path with end node

126 C.-N. Lai / J. Parallel Distrib. Comput. 75 (2015) 123–132

Fig. 3. The relations between Qi and Ri .

Fig. 4. The relations between Qi (in ℑ4(2)) and Ri (in ℑ2(5, 6)).

r ip = r ip,1rip,2 . . . r ip,n according to the following three cases, where

r i|di|

= ti.

Case 1. ti,cip = (kcip/2).Case 1a: bip is odd. Reconstruct Ri as the combination of

Ri and a path (r ip−1 = r ip−1[cip : 0], r ip−1[c

ip :

1], . . . , r ip−1[cip : ti,cip ] = r ip).

Case 1b: bip is even. Reconstruct Ri as the combination ofRi and a path (r ip−1 = r ip−1[c

ip : 0], r ip−1[c

ip :

kcip − 1], . . . , r ip−1[cip : ti,cip ] = r ip).

Case 2. ti,cip = (kcip/2) and kcip = 2 (i.e., ti,cip = 1).

Reconstruct Ri as the combination of Ri and a link (r ip−1 =

r ip−1[cip : 0], r ip−1[c

ip : ti,cip ] = r ip).

Case 3. ti,cip = (kcip/2) and kcip > 2.

Case 3a: bip is odd and θ ip−1,bip+1

= 0. Reconstruct Ri as the

combination of Ri and a path (r ip−1 = r ip−1[cip :

0], r ip−1[cip : 1], . . . , r ip−1[c

ip : ti,cip − 1] = r ip).

Case 3b: bip is even and θ ip−1,bip−1

= 0. Reconstruct Ri as

the combination of Ri and a path (r ip−1 = r ip−1[cip :

0], r ip−1[cip : kcip −1], . . . , r ip−1[c

ip : ti,cip +1] = r ip).

Case 3c. (bip is odd and θ ip−1,bip+1

= 1) or (bip is even and

θ ip−1,bip−1

= 1). Reconstruct Ri as the combination

of Ri and a link (r ip−1, rip−1[c

ip : ti,cip ] = r ip).

As shown above, Ri = (0n= r i0) for all 1 ≤ i ≤ m initially,

and then for p = 1, 2, . . . , |di| sequentially, Ri was extended fromr ip−1 to r ip until Ri is a path from s(=0n) to r i

|di|= ti according to

three cases. In Case 1, if bip is odd (resp. bip is even), then Ri wasreconstructed as the combination of Ri and a path from r ip−1 to r ip sothat the value of r i

p−1,cipincreased (resp. decreased) by 1 repeatedly

from 0 to ti,cip . In Case 2, we have ti,cip = 1, and Ri was reconstructed

as the combination of Ri and a link (r ip−1, rip−1[c

ip : ti,cip ] = r ip).

In Case 3, if bip is odd and θ ip−1,bip+1

= 0 (resp. bip is even and

θ ip−1,bip−1

= 0), then Ri was reconstructed as the combination of

Ri and a path from r ip−1 to r ip so that the value of r ip−1,cip

increased

(resp. decreased) by 1 repeatedly from 0 to ti,cip − 1 (resp. ti,cip + 1).Otherwise, Ri was reconstructed as the combination of Ri and a link(r ip−1, r

ip−1[c

ip : ti,cip ] = r ip). It should be noted that when ti,w =

(kw/2) and kw > 2, Case 3 must be applied twice, either Case 3aand then Case 3c or Case 3b and then Case 3c, for ti,w because ofdi,2w−1di,2w = 11 (by definition of ϕ), where 1 ≤ w ≤ n.

For an illustrative example, suppose ti = 23 ∈ V (ℑ2(5, 6)) forsome 1 ≤ i ≤ m. Since 0 < ti,1 = 2 < (5/2) = (k1/2), k1 =

5 > 2, ti,2 = 3 = (6/2) = (k2/2), and k2 = 6 > 2, we havedi = ϕ(ti) = 1011 ∈ V (ℑ4(2)). Let Qi = (0000 = θ i

0, 1000 =

θ i1, 1001 = θ i

2, 1011 = θ i3) be a shortest path from 0000 to

1011 = di. We have bi1 = 1, bi2 = 4, and bi3 = 3. Refer to Fig. 4,the path Ri from 00 to ti = 23 can be derived from Qi as follows:Initially, we have Ri = (00). When p = 1, bi1 = 1 takes effect. Wehave c i1 = ⌈bi1/2⌉ = 1. Since ti,ci1 = ti,1 = 2 = (5/2) = (k1/2) =

(kci1/2), Case 1 is applied. Moreover, since bi1 is odd, Case 1a makes

Ri = (00)+(00, 10, 20) = (00, 10, 20). Then,when p = 2, bi2 = 4takes effect, and hence c i2 = ⌈bi2/2⌉ = 2. Since ti,ci2 = ti,2 = 3 =

(6/2) = (k2/2) = (kci2/2) and kci2 = k2 = 6 > 2, Case 3 is applied.

Moreover, since bi2 is even and θ i1,bi2−1

= θ i1,3 = 0, Case 3b makes

Ri = (00, 10, 20) + (20, 25, 24) = (00, 10, 20, 25, 24). Finally,when p = 3, bi3 = 3 takes effect, and hence c i3 = ⌈bi3/2⌉ = 2.Since ti,ci3 = (kci3/2) and kci3 > 2, Case 3 is applied again. Moreover,

since bi3 is odd and θ i2,bi3+1

= θ i2,4 = 1, Case 3c makes Ri =

(00, 10, 20, 25, 24) + (24, 23) = (00, 10, 20, 25, 24, 23).In order to realize the properties of R1, R2, . . . , Rm, we give

the following six lemmas. Among them, we first show that Ri isshortest for all 1 ≤ i ≤ m. Then, an important relation about ϕbetween the nodes of Ri and Qi will be introduced. By the aid ofthis relation, the disjoint property of R1, R2, . . . , Rm can be verified.Finally, we give some conditions for ensuring the disjoint propertyof R1, R2, . . . , Rm. According to these conditions, we can rearrangeQ1,Q2, . . . ,Qm in advance of the R-derivation, as shown in the nextsection, so that R1, R2, . . . , Rm are disjoint to each other. For all1 ≤ i ≤ m, we let bi (resp. c i) denote bi

|di|(resp. c i

|di|) for better

readability. Moreover, let |u| denote the distance between s(=0n)and u in ℑn(k1, k2, . . . , kn), i.e. |u| =

nj=1 MINuj, (kj − uj).

C.-N. Lai / J. Parallel Distrib. Comput. 75 (2015) 123–132 127

Lemma 2. For all 1 ≤ i ≤ m, Ri is shortest in ℑn(k1, k2, . . . , kn).

Proof. For all 1 ≤ i ≤ m, Ri is shortest, i.e. the length of Ri is equalto |ti| =

nj=1 MINti,j, (kj − ti,j) because for all 1 ≤ j ≤ n, each

ti,j contributes MINti,j, (kj − ti,j) to the length of Ri, as shownbelow. We assume ti,j = 0 because otherwise (ti,j = 0) 0 =

MINti,j, (kj − ti,j) is contributed to the length of Ri. The followingdiscussions depend on three cases, i.e. (A) ti,j = kj/2, (B) ti,j = kj/2and kj = 2, and (C) ti,j = kj/2 and kj > 2.

In Case A, we have either di,2j−1di,2j = 10 or di,2j−1di,2j = 01by definition of ϕ. If di,2j−1di,2j = 10, then we have, by definition ofϕ, 0 < ti,j < (kj/2) and kj > 2,which impliesMINti,j, (kj−ti,j) =

ti,j. Since di,2j−1 = 1 and Qi is shortest (i.e., bi1, bi2, . . . , b

i|di|

aremutually distinct), we have 2j − 1 = bip for some 1 ≤ p ≤ |di|,which implies that j = ⌈bip/2⌉ = c ip and bip is odd. Hence, we haveti,cip = ti,j = kj/2 = (kcip/2), and then the construction of Case1a assures that ti,cip = ti,j = MINti,j, (kj − ti,j) is contributed tothe length of Ri. Otherwise (di,2j−1di,2j = 01), we have ti,j > (kj/2)and kj > 2, which implies MINti,j, (kj − ti,j) = kj − ti,j. Sincedi,2j = 1 and Qi is shortest, we have 2j = bip for some 1 ≤ p ≤ |di|,which implies that j = ⌈bip/2⌉ = c ip and bip is even. Hence, we haveti,cip = ti,j = kj/2 = (kcip/2), and then the construction of Case 1bassures that kcip −ti,cip = kj−ti,j = MINti,j, (kj−ti,j) is contributedto the length of Ri.

In Case B, we have MINti,j, (kj − ti,j) = ti,j, and ti,j = 1, whichimplies di,2j−1di,2j = 10 by definition of ϕ. Since di,2j−1 = 1 andQi is shortest, we have 2j − 1 = bip for some 1 ≤ p ≤ |di|, whichimplies j = ⌈bip/2⌉ = c ip. Hence, we have ti,cip = ti,j = kj/2 =

(kcip/2) and kcip = kj = 2, and then the construction of Case 2assures that 1 = ti,j = MINti,j, (kj − ti,j) is contributed to thelength of Ri.

In Case C, we haveMINti,j, (kj − ti,j) = ti,j, and by definition ofϕ, we have di,2j−1di,2j = 11, which implies 2j− 1 = bip and 2j = biqfor some 1 ≤ p, q ≤ |di| and p = q because Qi is shortest. Hence,we have j = ⌈bip/2⌉ = c ip, j = ⌈biq/2⌉ = c iq, that b

ip = biq−1 is odd,

and that biq = bip + 1 is even. Since ti,cip = ti,j = kj/2 = (kcip/2)and kcip = kj > 2, and ti,ciq = ti,j = kj/2 = (kciq/2) and kciq =

kj > 2, Case 3 was applied twice (at steps p and q, respectively)for ti,j. We have either p < q or q < p because of p = q. Ifp < q, then Qi ensures θ i

p−1,biq= 0 and θ i

q−1,bip= 1, which imply,

respectively, θ ip−1,bip+1

= θ ip−1,biq

= 0 and θ iq−1,biq−1

= θ iq−1,bip

= 1.

The former assures that the construction of Case 3a contributesti,cip − 1 = ti,j − 1 to the length of Ri. The latter assures that theconstruction of Case 3c contributes 1 to the length of Ri. As a result,(ti,j−1)+1 = ti,j = MINti,j, (kj−ti,j) is contributed to the lengthof Ri.

On the other hand, if q < p, then Qi ensures θ iq−1,bip

= 0 and

θ ip−1,biq

= 1,which imply, respectively, θ iq−1,biq−1

= θ iq−1,bip

= 0 and

θ ip−1,bip+1

= θ ip−1,biq

= 1. The former assures that the construction

of Case 3b contributes kciq − (ti,ciq + 1) = kj − (ti,j + 1) = ti,j − 1 tothe length of Ri. The latter assures that the construction of Case 3ccontributes 1 to the length of Ri. As a result, (ti,j − 1) + 1 = ti,j =

MINti,j, (kj − ti,j) is contributed to the length of Ri.

In order to verify the disjoint property of R1, R2, . . . , Rm, animportant relation about ϕ between the nodes of Ri and Qi is givenbelow. According to this relation, we haveϕ(u) ∈ Qi for every nodeu ∈ Ri. The following lemma describes this relation in detail.

Lemma 3. If node u = r ip−1 is included in the subpath of Ri from r ip−1

to r ip, then ϕ (u) = θ ip, where 1 ≤ i ≤ m and 1 ≤ p ≤ |di|.

Proof. This lemma can be proved by induction on p. First, let p = 1and u = r i0 = 0n be included in the subpath of Ri from r i0 to r i1.We have ϕ (u) = θ i

1, (i.e. induction base), as shown below. Thefollowing discussions depend on three cases, i.e. (A) ti,ci1 = (kci1/2),(B) ti,ci1 = (kci1/2) and kci1 = 2, and (C) ti,ci1 = (kci1/2) and kci1 > 2.

In CaseA,wehave either di,2ci1−1di,2ci1 = 10ordi,2ci1−1di,2ci1 = 01by definition of ϕ. If di,2ci1−1di,2ci1 = 10, then we have 0 < ti,ci1 <

(kci1/2) and kci1 > 2 (by definition of ϕ), that bi1 = 2c i1 − 1 is odd,

and θ i1 = 02n

[2c i1 − 1 : 1] (i.e. 02ci1−21002n−2ci1 ). The constructionof Case 1a assures 1 ≤ uci1

≤ ti,ci1 < (kci1/2) and uj = 0 for all

1 ≤ j ≤ n and j = c i1, which implies ϕ(u) = 02n[2c i1 − 1 : 1] = θ i

1.Otherwise (di,2ci1−1di,2ci1 = 01), we have ti,ci1 > (kci1/2) and kci1 > 2

(by definition of ϕ), that bi1 = 2c i1 is even, and θ i1 = 02n

[2c i1 : 1].The construction of Case 1b assures ti,ci1 ≤ uci1

and uj = 0 for

all 1 ≤ j ≤ n and j = c i1. Since uci1≥ ti,ci1 > (kci1/2), we have

ϕ(u) = 02n[2c i1 : 1] = θ i

1.In Case B, we have ti,ci1 = 1, which implies di,2ci1−1di,2ci1 = 10

(by definition of ϕ) and θ i1 = 02n

[2c i1 − 1 : 1]. The construction ofCase 2 assures uci1

= 1 and uj = 0 for all 1 ≤ j ≤ n and j = c i1,

which implies ϕ(u) = 02n[2c i1 − 1 : 1] = θ i

1.In Case C, we have di,2ci1−1di,2ci1 = 11 (by definition of ϕ), and by

definition, either bi1 = 2c i1−1 is oddor bi1 = 2c i1 is even. The formerimplies θ i

1 = 02n[2c i1 − 1 : 1], and then the construction of Case

3a assures 1 ≤ uci1≤ ti,ci1 − 1 < ti,ci1 = (kci1/2) and uj = 0 for all

1 ≤ j ≤ n and j = c i1, which implies ϕ(u) = 02n[2c i1 − 1 : 1] = θ i

1.The latter implies θ i

1 = 02n[2c i1 : 1], and then the construction

of Case 3b assures ti,ci1 + 1 ≤ uci1and uj = 0 for all 1 ≤ j ≤ n

and j = c i1. Since uci1≥ ti,ci1 + 1 > ti,ci1 = (kci1/2), we have

ϕ(u) = 02n[2c i1 : 1] = θ i

1.Then, (induction hypothesis) suppose that this lemma is true for

p−1 ≥ 1, i.e. if node v = r ip−2 is included in the subpath of Ri fromr ip−2 to r ip−1, then we have ϕ(v) = θ i

p−1. More specifically, we haveϕ(r ip−1) = θ i

p−1. By induction, the proof is done because we haveϕ(u) = θ i

p, as shown below. The following discussions depend onthree cases, i.e. (X) ti,cip = (kcip/2), (Y) ti,cip = (kcip/2) and kcip = 2,and (Z) ti,cip = (kcip/2) and kcip > 2.

In CaseX,wehave either di,2cip−1di,2cip = 10 or di,2cip−1di,2cip = 01by definition of ϕ. If di,2cip−1di,2cip = 10, then we have 0 < ti,cip <

(kcip/2) and kcip > 2 (by definition of ϕ), and Qi ensures odd bip =

2c ip−1, θ ip−1,2cip−1

θ ip−1,2cip

= 00, and θ ip = θ i

p−1[2cip−1 : 1][2c ip : 0]

(i.e. θ ip,2cip−1

θ ip,2cip

= 10 and θ ip,k = θ i

p−1,k for all 1 ≤ k ≤ 2n

and k ∈ 2c ip − 1, 2c ip). The construction of Case 1a assures1 ≤ ucip

≤ ti,cip < (kcip/2) and uj = r ip−1,j for all 1 ≤ j ≤ n

and j = c ip. Since ϕ (r ip−1) = θ ip−1, we have ϕ(u) = θ i

p−1[2cip −

1 : 1][2c ip : 0] = θ ip. Otherwise (di,2cip−1di,2cip = 01), we have

ti,cip > (kcip/2) and kcip > 2 (by definition of ϕ), and Qi ensures even

bip = 2c ip, θip−1,2cip−1

θ ip−1,2cip

= 00, and θ ip = θ i

p−1[2cip − 1 : 0][2c ip :

1]. The construction of Case 1b assures ti,cip ≤ ucipand uj = r ip−1,j

for all 1 ≤ j ≤ n and j = c ip. Since ucip≥ ti,cip > (kcip/2) and

ϕ(r ip−1) = θ ip−1, we have ϕ(u) = θ i

p−1[2cip − 1 : 0][2c ip : 1] = θ i

p.In Case Y, we have ti,cip = 1, which implies, by definition

of ϕ, di,2cip−1di,2cip = 10, and hence Qi ensures bip = 2c ip − 1,

θ ip−1,2cip−1

θ ip−1,2cip

= 00, and θ ip = θ i

p−1[2cip − 1 : 1][2c ip : 0].

128 C.-N. Lai / J. Parallel Distrib. Comput. 75 (2015) 123–132

The construction of Case 2 assures ucip= 1 and uj = r ip−1,j for

all 1 ≤ j ≤ n and j = c ip. Since ϕ(r ip−1) = θ ip−1, we have

ϕ(u) = θ ip−1[2c

ip − 1 : 1][2c ip : 0] = θ i

p.In Case Z, we have di,2cip−1di,2cip = 11 (by definition of ϕ), and

by definition, either bip = 2c ip − 1 or bip = 2c ip. When bip =

2c ip − 1 is odd, if θ ip−1,bip+1

= θ ip−1,2cip

= 0, then Qi ensures

θ ip−1,2cip−1

θ ip−1,2cip

= 00 and θ ip = θ i

p−1[2cip −1 : 1][2c ip : 0], and the

construction of Case 3a assures 1 ≤ ucip≤ ti,cip −1 < ti,cip = (kcip/2)

and uj = r ip−1,j for all 1 ≤ j ≤ n and j = c ip. Since ϕ(r ip−1) = θ ip−1,

we have ϕ(u) = θ ip−1[2c

ip − 1 : 1][2c ip : 0] = θ i

p. Otherwise(θ i

p−1,bip+1= θ i

p−1,2cip= 1), Qi ensures θ i

p−1,2cip−1θ ip−1,2cip

= 01

and θ ip = θ i

p−1[2cip − 1 : 1][2c ip : 1], and the construction of

Case 3c assures ucip= ti,cip and uj = r ip−1,j for all 1 ≤ j ≤ n and

j = c ip. Since ucip= ti,cip = (kcip/2) and ϕ(r ip−1) = θ i

p−1, we have

ϕ(u) = θ ip−1[2c

ip − 1 : 1][2c ip : 1] = θ i

p.On the other hand, when bip = 2c ip is even, if θ i

p−1,bip−1=

θ ip−1,2cip−1

= 0, then Qi ensures θ ip−1,2cip−1

θ ip−1,2cip

= 00 and θ ip =

θ ip−1[2c

ip − 1 : 0][2c ip : 1], and the construction of Case 3b assures

ti,cip + 1 ≤ ucipand uj = r ip−1,j for all 1 ≤ j ≤ n and j = c ip.

Since ucip≥ ti,cip + 1 > ti,cip = (kcip/2) and ϕ(r ip−1) = θ i

p−1,

we have ϕ(u) = θ ip−1[2c

ip − 1 : 0][2c ip : 1] = θ i

p. Otherwise(θ i

p−1,bip−1= θ i

p−1,2cip−1= 1), Qi ensures θ i

p−1,2cip−1θ ip−1,2cip

= 10

and θ ip = θ i

p−1[2cip − 1 : 1][2c ip : 1], and the construction of

Case 3c assures ucip= ti,cip and uj = r ip−1,j for all 1 ≤ j ≤ n and

j = c ip. Since ucip= ti,cip = (kcip/2) and ϕ(r ip−1) = θ i

p−1, we have

ϕ(u) = θ ip−1[2c

ip − 1 : 1][2c ip : 1] = θ i

p.

By the aid of Lemma 3, we can verify the disjoint property of Rw

and Rz , and the verification further depends on whether dw = dzor not, where 1 ≤ w, z ≤ m and w = z. When dw = dz , thefollowing lemma makes sure their disjoint property. On the otherhand,when dw = dz , their disjoint property can be ensured if someconditions hold, as shown in Lemmas 5–7.

Lemma 4. Suppose that dw = dz , where 1 ≤ w, z ≤ m and w = z.Then, Rw and Rz are disjoint to each other.Proof. Let Qw = (02n

= θw0 , θw

1 , . . . , θw|dw |

= dw) and Qz = (02n=

θ z0 , θ

z1 , . . . , θ

z|dz | = dz). Since Qw and Qz are disjoint and θw

|dw |=

dw = dz = θ z|dz |, we have θw

1 , θw2 , . . . , θw

|dw |, θ z

1 , θz2 , . . . , θ

z|dz |

distinct to each other. Let node u ∈ Rw and u = s(=0n), and nodev ∈ Rz and v = s. We have u = rw

p−1 included in the subpath ofRw from rw

p−1 to rwp for some 1 ≤ p ≤ |dw|, and v = rzq−1 included

in the subpath of Rz from rzq−1 to rzq for some 1 ≤ q ≤ |dz |. ByLemma 3 (substituting w for i, and substituting z and q for i and p,respectively), we have ϕ(u) = θw

p and ϕ(v) = θ zq . It follows that

Rw and Rz are disjoint to each other because of u = v, otherwise(u = v) θw

p = ϕ(u) = ϕ(v) = θ zq , which contradicts to that

θw1 , θw

2 , . . . , θw|dw |

, θ z1 , θ

z2 , . . . , θ

z|dz | are mutually distinct.

When dw = dz , the disjoint property of Rw and Rz dependson whether tw,cw = (kcw/2) or not. If tw,cw = (kcw/2), then thefollowing lemma ensures their disjoint property, provided that oneof the three conditions holds. It will be shown in the next sectionthat when all the three conditions fail, we can swap tw for tz inorder to make one of them hold, and hence their disjoint propertycan be ensured by swapping Qw for Qz (instead of swapping tw fortz) prior to the R-derivation. Recall that bi = bi

|di|and c i = c i

|di|=

⌈bi|di|

/2⌉ = ⌈bi/2⌉ for all 1 ≤ i ≤ m.

Lemma 5. Suppose that dw = dz and tw,cw = (kcw/2), where1 ≤ w, z ≤ m and w = z. If (1) bw is odd and tw,cw < tz,cw ,or (2) bw is even and tw,cw > tz,cw , or (3) tw,cw = tz,cw and|tw| ≥ |tz |, then Rw and Rz are disjoint to each other.

Proof. Let Qw = (02n= θw

0 , θw1 , . . . , θw

|dw |= dw) and Qz = (02n

=

θ z0 , θ

z1 , . . . , θ

z|dz | = dz). Assume that node u = 0n is included in the

subpath of Rw from 0n to rw|dw |−1, node v ∈ rw

|dw |−1, rw|dw |

= tw

is included in the subpath of Rw from rw|dw |−1 to rw

|dw |, and node

τ ∈ rz|dz |−1, r

z|dz | = tz is included in the subpath of Rz from rz

|dz |−1to rz

|dz |. The Rw and Rz are disjoint to each other because (A1) u ∈ Rz ,(A2) v and tw are not included in the subpath of Rz from0n to rz

|dz |−1,and (A3) v = τ , v = tz , and tw = τ , as shown below. Lemma 3assures ϕ(u) = θw

p for some 1 ≤ p ≤ |dw|−1 and ϕ(v) = ϕ(tw) =

θw|dw |

. We have u ∈ Rz because otherwise there is a node h = 0n inRz such that h = u. Since Lemma 3 assures ϕ(h) = θ z

q for some1 ≤ q ≤ |dz |, we have θw

p = ϕ(u) = ϕ(h) = θ zq , which contradicts

to that Qw and Qz are disjoint.Moreover, we have v = 0n (resp. tw = 0n) not included in the

subpath of Rz from 0n to rz|dz |−1, i.e. condition A2 holds, because

otherwise there is a node h = 0n in the subpath of Rz from 0n

to rz|dz |−1 such that h = v (resp. h = tw). Since Lemma 3 assures

ϕ(h) = θ zq for some 1 ≤ q ≤ |dz | − 1, we have θw

|dw |= ϕ(v) =

ϕ(h) = θ zq (resp. θw

|dw |= ϕ (tw) = ϕ(h) = θ z

q ), which contradictsto that Qw and Qz are disjoint. In the following, we show that thecondition A3 holds if (1) bw is odd and tw,cw < tz,cw , or (2) bw iseven and tw,cw > tz,cw , or (3) tw,cw = tz,cw and |tw| ≥ |tz |.

When (1) bw is odd and tw,cw < tz,cw , we have v = τ , v = tz ,and tw = τ because of vcw < τcw , vcw < tz,cw , and tw,cw < τcw ,as shown below. Since tw,cw = (kcw/2) and bw

= 2cw− 1 is

odd, the construction of Case 1a (substitute w and |dw| for i andp, respectively) assures vcw ≤ tw,cw − 1, and hence we havevcw < tz,cw (because of vcw ≤ tw,cw −1 < tw,cw < tz,cw ).Moreover,since dw,2cw−1 = dw,bw = 1, we have dw,2cw−1dw,2cw = 10 bydefinition of ϕ. Since dw = dz and Qw is disjoint with Qz , we havebw

= bz , which implies bw= bzq for some 1 ≤ q ≤ |dz | − 1, and

hence we have cw= ⌈bw/2⌉ = ⌈bzq/2⌉ = czq . In addition, since

dz,2cw−1dz,2cw = dw,2cw−1dw,2cw = 10, we have, by definition ofϕ, either (0 < tz,cw < (kcw/2) and kcw > 2) or (tz,cw = 1 andkcw = 2). The latter was impossible because of tw,cw < tz,cw (byassumption) and 0 < tw,cw (by definition of ϕ). The former assurestz,czq = tz,cw = (kcw/2) = (kczq/2), and hence the construction ofCase 1a (substitute z and q for i and p, respectively) assures rzq,czq =

tz,czq , which implies τczq = tz,czq because of q ≤ |dz | − 1. It followsthat τcw = τczq = tz,czq = tz,cw , which implies vcw < tz,cw = τcw

and tw,cw < tz,cw = τcw .When (2) bw is even and tw,cw > tz,cw , we have v = τ , v = tz ,

and tw = τ because of vcw > τcw , vcw > tz,cw , and tw,cw > τcw ,as shown below. Since tw,cw = (kcw/2) and bw

= 2cw is even,the construction of Case 1b (substitute w and |dw| for i and p,respectively) assures tw,cw + 1 ≤ vcw , and hence we have vcw >tz,cw (because of vcw ≥ tw,cw + 1 > tw,cw > tz,cw ). Moreover,since dw,2cw = dw,bw = 1, we have dw,2cw−1dw,2cw = 01 bydefinition of ϕ. Since dw = dz and Qw is disjoint with Qz , we havebw

= bz , which implies bw= bzq for some 1 ≤ q ≤ |dz | − 1, and

hence we have cw= ⌈bw/2⌉ = ⌈bzq/2⌉ = czq . In addition, since

dz,2cw−1dz,2cw = dw,2cw−1dw,2cw = 01, we have, by definition ofϕ, tz,cw > (kcw/2) and kcw > 2, which imply tz,czq = tz,cw =

(kcw/2) = (kczq/2). It follows that the construction of Case 1b(substitute z and q for i and p, respectively) assures rzq,czq = tz,czq ,which implies τczq = tz,czq because of q ≤ |dz | − 1. Hence, we haveτcw = τczq = tz,czq = tz,cw , which implies vcw > tz,cw = τcw andtw,cw > tz,cw = τcw .

C.-N. Lai / J. Parallel Distrib. Comput. 75 (2015) 123–132 129

a b

Fig. 5. The paths Rw, Rz , Rw , and Rz .

When (3) tw,cw = tz,cw and |tw| ≥ |tz |, we have v = τ , v = tz ,and tw = τ , as shown below. Since Lemma 2 assures that Rz isshortest, we have |τ | < |tz |, which implies |τ | < |tz | ≤ |tw|, andhence tw = τ . If bw is odd, thenwe have, as shown in condition (1),vcw ≤ tw,cw − 1 and τcw = tz,cw , which implies vcw ≤ tw,cw − 1 =

tz,cw − 1 < tz,cw = τcw . It follows that vcw < τcw and vcw < tz,cw ,which implies v = τ and v = tz . On the other hand, if bw is even,thenwe have, as shown in condition (2), tw,cw +1 ≤ vcw and τcw =

tz,cw , which implies vcw ≥ tw,cw + 1 = tz,cw + 1 > tz,cw = τcw .It follows that vcw > τcw and vcw > tz,cw , which imply v = τ andv = tz , respectively.

For an illustrative example, let tw = 23 and tz = 13 inℑ2(5, 6). We have dw = ϕ(tw) = 1011 = ϕ(tz) = dz by defini-tion of ϕ. Moreover, let Qw = (0000, 0010, 0011, 1011) and Qz =

(0000, 1000, 1010, 1011). Refer to Fig. 5(a), we have Rw =

(00, 01, 02, 03, 13, 23) and Rz = (00, 10, 11, 12, 13) derivedfrom Qw and Qz , respectively. In addition, we have odd bw

= 1,cw

= ⌈bw/2⌉ = 1, tw,cw = tw,1 = 2, tz,cw = tz,1 = 1,kcw = k1 = 5, and thus tw,cw = 2 = (5/2) = (kcw/2).Since tw,cw = 2 > 1 = tz,cw , the condition (1) of Lemma 5fails, and Rw is not disjoint with Rz . In fact, node 13 ∈ Rz isincluded internally in Rw . However, after swapping Qw for Qz ,we have Qw = Qz = (0000, 1000, 1010, 1011) and Qz =

Qw = (0000, 0010, 0011, 1011). Refer to Fig. 5(b), we have Rw =

(00, 10, 20, 21, 22, 23) and Rz = (00, 01, 02, 03, 13) derivedfrom Qw and Qz , respectively. In addition, refer to Qz , we have oddbz = 1, cz = ⌈bz/2⌉ = 1, tz,cz = tz,1 = 1, tw,cz = tw,1 =

2, kcz = k1 = 5, and thus tz,cz = 1 = (5/2) = (kcz/2). Sincetz,cz = 1 < 2 = tw,cz , the condition (1) of Lemma 5 (exchange w

and z) holds, and hence Rw is disjoint with Rz by Lemma 5 (substi-tute Rz and Rw for Rz and Rw , respectively).

Finally, when dw = dz and tw,cw = (kcw/2), the disjointproperty of Rw and Rz can be ensured if kcw = 2 and |tw| ≥ |tz |,as shown in the following lemma. If kcw = 2 and |tw| < |tz |, thentheir disjoint property can be ensured similarly by swapping Qw

for Qz . Moreover, if tz,cz = (kcz/2), then Rw and Rz are disjoint toeach other, as shown in Lemma 7.

Lemma 6. Suppose that dw = dz , where 1 ≤ w, z ≤ m and w = z.If kcw = 2 and |tw| ≥ |tz |, then Rw and Rz are disjoint to each other.

Proof. Let Qw = (02n= θw

0 , θw1 , . . . , θw

|dw |= dw) and Qz = (02n

=

θ z0 , θ

z1 , . . . , θ

z|dz | = dz). Assume that node u = 0n is included in the

subpath of Rw from 0n to rw|dw |−1. Lemma 3 assures ϕ(u) = θw

p forsome 1≤ p ≤ |dw|−1We have u ∈ Rz because otherwise there is anode v = 0n in Rz such that v = u. Lemma 3 assures ϕ(v) = θ z

q forsome 1 ≤ q ≤ |dz |, which implies θw

p = ϕ(u) = ϕ(v) = θ zq and it

contradicts to thatQw andQz are disjoint. The Rw and Rz are disjointto each other because the subpath of Rw from rw

|dw |−1 to rw|dw |

= tw

is just a link (rw|dw |−1, tw) and tw is not included internally in Rz . The

former holds because kcw = 2 implies tw,cw = 1 = (kcw/2), andhence the construction of Case 2 (substitute w and |dw| for i and p,respectively) assures that the subpath of Rw from rw

|dw |−1 to rw|dw |

isa link (rw

|dw |−1, rw|dw |

= tw). The latter holds because |tw| ≥ |tz | andLemma 2 assures that Rz is shortest.

Lemma 7. Suppose that dw = dz , where 1 ≤ w, z ≤ m and w = z.If tw,cw = (kcw/2) and tz,cz = (kcz/2), then Rw and Rz are disjointto each other.

Proof. Let Qw = (02n= θw

0 , θw1 , . . . , θw

|dw |= dw) and Qz = (02n

=

θ z0 , θ

z1 , . . . , θ

z|dz | = dz). Assume that node u = 0n is included in the

subpath of Rw from 0n to rw|dw |−1, and node v = 0n is included in

the subpath of Rz from 0n to rz|dz |−1. Lemma 3 assures ϕ(tw) = θw

|dw |,

ϕ(u) = θwp for some 1 ≤ p ≤ |dw|−1, ϕ(tz) = θ z

|dz |, andϕ(v) = θ zq

for some 1 ≤ q ≤ |dz | − 1. We have u = v because otherwise(u = v) θw

p = ϕ(u) = ϕ(v) = θ zq , which contradicts to that

Qw and Qz are disjoint. In addition, we have tw = v and tz = ubecause otherwise (tw = v or tz = u) θw

|dw |= ϕ (tw) = ϕ(v) = θ z

qor θ z

|dz | = ϕ(tz) = ϕ(u) = θwp , which contradicts to that Qw and

Qz are disjoint. It follows that Rw and Rz are disjoint to each otherbecause (B1) the subpath of Rw from rw

|dw |−1 to rw|dw |

= tw is just alink (rw

|dw |−1, tw) and (B2) the subpath of Rz from rz|dz |−1 to rz

|dz | = tzis just a link (rz

|dz |−1, tz), as shown below.When tw,cw = (kcw/2), only the case of kcw > 2 needs to be

considered because kcw = 2 implies that the subpath of Rw fromrw|dw |−1 to rw

|dw |= tw is a link (rw

|dw |−1, tw), as shown in Lemma 6.Since kcw > 2, we have dw,2cw−1dw,2cw = 11 by definition of ϕ. Bydefinition,wehave either bw

= 2cw−1or bw

= 2cw . If bw= 2cw

1 is odd, then Qw ensures θw|dw |−1,bw+1 = θw

|dw |−1,2cw = dw,2cw = 1,and hence the construction of Case 3c (substitute w and |dw| for iand p, respectively) assures that the subpath of Rw from rw

|dw |−1 torw|dw |

is a link (rw|dw |−1, r

w|dw |

= tw). On the other hand, if bw= 2cw is

even, then Qw ensures θw|dw |−1,bw−1 = θw

|dw |−1,2cw−1 = dw,2cw−1 =

1, and hence the construction of Case 3c (substitute w and |dw| fori and p, respectively) assures that the subpath of Rw from rw

|dw |−1 torw|dw |

is a link (rw|dw |−1, r

w|dw |

= tw). As a result, the condition B1 holds.With the same arguments (by substituting z for w), the conditionB2 holds when tz,cz = (kcz/2).

3.2. The construction procedure and its complexity

Let D = d1, d2, . . . , dm and let Ω : D → 1, 2, . . . , 2nbe a maximal partial routing function, where di = ϕ(ti) for all1 ≤ i ≤ m. Define a routing function Φ : D → I as follows:I = Ω(d1), Ω(d2), . . . , Ω(dm) and Φ(di) = Ω(di) for all1 ≤ i ≤ m. By the aid of procedure paths1, a procedure namedpaths2 is proposed. Let T be themultiset t1, t2, . . . , tm.With inputΦ,m, n,D, I , and T , it will be shown later that if di,Φ(di) = 1for all 1 ≤ i ≤ m, then Paths2(Φ,m, n,D, I, T ) can produce mdisjoint shortest paths Q1,Q2, . . . ,Qm from 02n to d1, d2, . . . , dm,respectively, in a 2n-cube. Moreover, each Ri from s(=0n) to ti inℑn(k1, k2, . . . , kn) can be derived from Qi by R-derivation for all1 ≤ i ≤ m so that R1, R2, . . . , Rm are all shortest and disjoint toeach other. The formal descriptions of Paths2(Φ,m, n,D, I, T ) aregiven below, and its intuitive meanings follow.Procedure Paths2(Φ,m, n,D, I, T ).

Step 1. Obtain Q1,Q2, . . . ,Qm from 02n to d1, d2, . . . , dm, respec-tively, in a 2n-cube by executing Paths1(Φ,m, 2n,D, I).

Step 2. /∗ Without loss of generality, assume that d1, d2, . . . , dmare divided into p node-disjoint (consecutive) sections sothat the qth section consists of nodesdiq−1+1,diq−1+2, . . . ,diqsuch that diq−1+1 = diq−1+2 = · · · = diq , where i0 = 0, 1 ≤

130 C.-N. Lai / J. Parallel Distrib. Comput. 75 (2015) 123–132

i1 ≤ i2 ≤ · · · ≤ ip ≤ m, 1 ≤ p ≤ m, and 1 ≤ q ≤ p. Fur-thermore, assume that for all 1 ≤ q ≤ p, dβ,2cβ−1dβ,2cβ =

11 for all iq−1 + 1 ≤ β ≤ lq, and dβ,2cβ−1dβ,2cβ = 11 for alllq + 1 ≤ β ≤ iq, where iq−1 ≤ lq ≤ iq. ∗/

For q = 1, 2, . . . , p, For β = iq−1 + 1, iq−1 + 2, . . . , lq,

If bβ is odd, thenFind a w ∈ β, β + 1, . . . , iq such that eithertw,cβ < tz,cβ or (tw,cβ = tz,cβ and |tw| ≥ |tz |)for all z ∈ β, β + 1, . . . , iq − w.

else /* bβ is even */Find a w ∈ β, β + 1, . . . , iq such that eithertw,cβ > tz,cβ or (tw,cβ = tz,cβ and |tw| ≥ |tz |)for all z ∈ β, β + 1, . . . , iq − w.

If tβ = tw , then swap tβ for tw . /* That is,tβ and tw are exchanged. */

Step3. /* Assume that the final t1, t2, . . . , tm were obtained afterthe rearrangements of t1, t2, . . . , tm in Step 2 so that Qi isfrom 02n to di = ϕ(ti) and ti = tfi for all 1 ≤ i ≤ m, where1 ≤ fi ≤ m and f1, f2, . . . , fm are mutually distinct. */Return Q1, Q2, . . . , Qm, where Qfi = Qi for all 1 ≤ i ≤ m.

As shown in Step 1 of procedure Paths2(Φ,m, n,D, I, T ),Q1,Q2, . . . ,Qm from 02n to d1, d2, . . . , dm, respectively, were firstobtained in a 2n-cube by executing Paths1(Φ,m, 2n,D, I). Then,d1, d2, . . . , dm were divided into p node-disjoint sections in Step 2so that the nodes in the same section are identical to each other,where 1 ≤ p ≤ m. In addition, the nodes in the same sectionwere further divided into two parts so that dβ,2cβ dβ,2cβ = 11for β in the first part, and dβ,2cβ dβ,2cβ = 11 for β in the secondpart. In order to make the derived R1, R2, . . . , Rm disjoint to eachother, for all 1 ≤ q ≤ p, each tβ with β in the first part of theqth section may possibly be swapped for some tw = tβ with walso in the qth section, and henceforth the resulting tβ will neverbe chosen for swapping again. It should be noted that if the nodeswaps took place, then the order of t1, t2, . . . , tm would be changedwhile the order of Q1,Q2, . . . ,Qm kept intact. Finally, we obtainedthe required m disjoint shortest paths in Step 3 by rearrangingQ1,Q2, . . . ,Qm according to the original order of t1, t2, . . . , tm.

Lemma 8. Given T = t1, t2, . . . , tm,D = d1, d2, . . . , dm, and arouting function Φ : D → I such that di,Φ(di) = 1 for all 1 ≤ i ≤ m,then Paths2(Φ,m, n,D, I, T ) can produce m disjoint shortest pathsQ1,Q2, . . . ,Qm from 02n to d1, d2, . . . , dm, respectively, in a 2n-cube,where di = ϕ(ti) for all 1 ≤ i ≤ m. Moreover, each Ri from s to tiin ℑn(k1, k2, . . . , kn) can be derived from Qi by R-derivation for all1 ≤ i ≤ m so that R1, R2, . . . , Rm are all shortest and disjoint to eachother.

Proof. Refer to Paths2(Φ,m, n,D, I, T ),Q1,Q2, . . . ,Qm from 02n

to d1, d2, . . . , dm, respectively, in a 2n-cubewere obtained in Step 1by executing Paths1(Φ,m, 2n,D, I). Since di,Φ(di) = 1 for all 1 ≤

i ≤ m, Lemma 1 (substitute 2n for n) assures that Q1,Q2, . . . ,Qmare mutually disjoint and each one of them is shortest. Withoutloss of generality, it was assumed in Step 2 that d1, d2, . . . , dmwere divided into p node-disjoint (consecutive) sections so thatthe qth section consists of nodes diq−1+1, diq−1+2, . . . , diq such thatdiq−1+1 = diq−1+2 = · · · = diq , where i0 = 0, 1 ≤ i1 ≤ i2 ≤ · · · ≤

ip ≤ m, 1 ≤ p ≤ m, and 1 ≤ q ≤ p.For all 1 ≤ q ≤ p, tβ may possibly be swapped for some

tw with w ∈ β, β + 1, . . . , iq for all iq−1 + 1 ≤ β ≤ lqsequentially. After the execution of Step 2, it is not difficult toverify that we have tiq−1+1, tiq−1+2, . . . , tiq , which is a permutationof tiq−1+1, tiq−1+2, . . . , tiq , so that for all iq−1 + 1 ≤ β ≤ lq and

β + 1 ≤ z ≤ iq, either tβ,cβ < tz,cβ or (tβ,cβ = tz,cβ and|tβ | ≥ |tz |) if bβ is odd, and either tβ,cβ > tz,cβ or (tβ,cβ = tz,cβand |tβ | ≥ |tz |) otherwise (bβ is even). Let Ri from s (=0n) to ti bederived from Qi by R-derivation for all 1 ≤ i ≤ m. By Lemma 2(substitute Ri for Ri), Ri is shortest. Since the gth section and thehth section are node-disjoint for all 1 ≤ g, h ≤ p and g = h,Lemma 4 (for all ig−1 + 1 ≤ w ≤ ig and ih−1 + 1 ≤ z ≤ ih,and substitute Rw and Rz for Rw and Rz , respectively) assures thatRig−1+1, Rig−1+2, . . . , Rig are disjoint with Rih−1+1, Rih−1+2, . . . , Rih .It follows that R1, R2, . . . , Rm are mutually disjoint because for all1 ≤ q ≤ p, (C1) Rβ and Rz are disjoint for all iq−1 + 1 ≤ β ≤ lqand β + 1 ≤ z ≤ iq, and (C2) Rw and Rz are disjoint for alllq + 1 ≤ w, z ≤ iq and w = z, as shown below.

We first show that the condition C2 holds as follows: Byassumption, we have dw = dz , and dw,2cw−1dw,2cw = 11 anddz,2cz−1dz,2cz = 11 (for all lq + 1 ≤ w, z ≤ iq and w = z),which implies, by definition of ϕ, tw,cw = (kcw/2) and tz,cz =

(kcz/2), respectively. By Lemma 7 (substitute tw, tz, Rw , and Rz fortw, tz, Rw , and Rz , respectively), Rw and Rz are disjoint. Then, weshow that the condition C1 holds, as explained below.

By assumption, we have dβ = dz and dβ,2cβ−1dβ,2cβ = 11 (forall iq−1 + 1 ≤ β ≤ lq and β + 1 ≤ z ≤ iq). By definition, wehave either bβ

= 2cβ− 1 or bβ

= 2cβ . If bβ= 2cβ

− 1 is odd,then we have dβ,2cβ−1dβ,2cβ = 10, which implies, by definitionof ϕ, either tβ,cβ = (kcβ /2) or (tβ,cβ = 1 and kcβ = 2). Theformer and Lemma 5(1) and (3) (substitute β, tβ , tz, Rβ , and Rz forw, tw, tz, Rw , and Rz , respectively) assure that Rβ and Rz are disjointbecause either tβ,cβ < tz,cβ or (tβ,cβ = tz,cβ and |tβ | ≥ |tz |). Thelatter (kcβ = 2) assures tz,cβ = 1 because of dz,2cβ−1dz,2cβ =

dβ,2cβ−1dβ,2cβ = 10 and the definition of ϕ. Since tβ,cβ = 1 = tz,cβ ,we have |tβ | ≥ |tz | because either tβ,cβ < tz,cβ or (tβ,cβ = tz,cβand |tβ | ≥ |tz |). By Lemma 6 (substitute β, tβ , tz, Rβ , and Rz forw, tw, tz, Rw , and Rz , respectively), Rβ and Rz are disjoint. On theother hand, if bβ

= 2cβ is even, then we have dβ,2cβ−1dβ,2cβ = 01,which implies, by definition of ϕ, tβ,cβ = (kcβ /2). By Lemma 5(2)and (3) (substitute β, tβ , tz, Rβ , and Rz for w, tw, tz, Rw , and Rz ,respectively), Rβ and Rz are disjoint because either tβ,cβ > tz,cβor (tβ,cβ = tz,cβ and |tβ | ≥ |tz |).

As shown in Step 3, it was assumed that Qi is from 02n to di =

ϕ(ti), ti = tfi , and Qfi = Qi for all 1 ≤ i ≤ m, where 1 ≤ fi ≤ m andf1, f2, . . . , fm are mutually distinct. Let Rfi = Ri. Since Ri from s toti was derived from Qi, we have Rfi (=Ri) from s to tfi (=ti) derivedfrom Qfi (=Qi). Since Rfi = Ri is shortest and R1, R2, . . . , Rm aremutually disjoint, we have R1, R2, . . . , Rm all shortest and disjointto each other.

Obviously, if ΣΩ = m, then we have di,Ω(di) = 1 for all1 ≤ i ≤ m, which implies di,Φ(di) = di,Ω(di) = 1. By Lemma 8,R1, R2, . . . , Rm are all shortest and disjoint to each other. On theother hand, suppose that there exist m disjoint shortest pathsR1, R2, . . . , Rm from s to t1, t2, . . . , tm, respectively. For all 1 ≤

i ≤ m, let αi denote the node following s (=0n) in Ri such thatαi,ai = 0 and αi,j = 0 for all 1 ≤ j ≤ n and j = ai, where1 ≤ ai ≤ n. Obviously, we have either αi,ai = 1 or (αi,ai =

kai − 1 and kai > 2). Define a partial routing function Ω ′:

d1, d2, . . . , dm → 1, 2, . . . , 2n as follows: Ω ′(di) = 2ai − 1if αi,ai = 1, and Ω ′(di) = 2ai otherwise for all 1 ≤ i ≤ m, wheredi = ϕ(ti). We have 1 ≤ Ω ′(di) ≤ 2n because of 1 ≤ ai ≤ n.Moreover, Ω ′(d1), Ω ′(d2), . . . , Ω ′(dm) are distinct to each otherbecause α1, α2, . . . , αm are mutually distinct. We have ΣΩ ′ = mand hence Ω ′ is maximal because of di,Ω ′(di) = 1 for all 1 ≤ i ≤ m,

C.-N. Lai / J. Parallel Distrib. Comput. 75 (2015) 123–132 131

as shown below. If αi,ai = 1, then we have (ti,ai = 1 and kai = 2)or (0 < ti,ai ≤ (kai/2) and kai > 2) because Ri is shortest. Itfollows that by definition of ϕ, we have di,2ai−1 = 1, which impliesdi,Ω ′(di) = di,2ai−1 = 1. Otherwise (αi,ai = kai − 1 and kai > 2),since Ri is shortest, we have ti,ai ≥ (kai/2), which implies di,2ai = 1by definition of ϕ and hence di,Ω ′(di) = di,2ai = 1. In summary, weconclude with the following theorem.

Theorem 1. Given m non-origin nodes t1, t2, . . . , tm in an n-dimensional torus network, there exist m node-disjoint shortest pathsfrom origin to t1, t2, . . . , tm, respectively, if and only if there existsa maximal partial routing function Ω : d1, d2, . . . , dm →

1, 2, . . . , 2n such that ΣΩ = m,where di = ϕ(ti) for all1 ≤ i ≤ mand m is not greater than the connectivity of the n-dimensional torusnetwork.

Since an n-torus is node symmetric, Theorem 1 can alsobe applied to the general case that the source node (insteadof the origin) is arbitrary. The condition for the existence ofm disjoint shortest paths in an n-torus can be verified inO(mn1.5) time because a maximal partial routing function Ω :

d1, d2, . . . , dm → 1, 2, . . . , 2n can be computed in O(m ×

(2n)1.5) = O(mn1.5) time [19], and di = ϕ(ti) for all 1 ≤

i ≤ m can be determined in O(mn) ≤ O(mn1.5) time. Inthe following, we show that the worst-case time and spacecomplexities of Paths2(Φ,m, n,D, I, T ) are both optimal O(mn).As shown in [19], the worst-case time and space complexities ofPaths1(Φ,m, n,D, I) are both O(mn). It follows that the executionof Paths1(Φ,m, 2n,D, I) in Step 1 takesO(m×(2n)) = O(mn) timeand space. Obviously, Step 3 takes O(m) time.

Refer to Step 2 of Paths2(Φ,m, n,D, I, T ), without loss of gen-erality, d1, d2, . . . , dm were divided into p node-disjoint sectionsso that the qth section consists of nodes diq−1+1, diq−1+2, . . . , diqsuch that the nodes in the same section are identical to each other,where i0 = 0, 1 ≤ i1 ≤ i2 ≤ · · · ≤ ip ≤ m, 1 ≤ p ≤ m, and1 ≤ q ≤ p. Moreover, for all 1 ≤ q ≤ p, the qth section was furtherdivided into two parts, and each tβ with β in the first part of it maypossibly be swapped for some tw = tβ with w in the same section.Letmq = iq−iq−1 denote the number of nodes in the qth section forall 1 ≤ q ≤ p. Obviously, we havem1+m2+· · ·+mp = m. Since ittakes O(mq) time to divide the qth section into two parts, it needsatmostO(m1)+O(m2)+· · ·+O(mp) = O(m) time to divide all thep sections. Furthermore, it is easy to verify that the node swaps forthe qth section takes O((mq)

2) time. Hence, the total node swapsin Step 2 takes at most O((m1)

2) + O((m2)2) + · · · + O((mp)

2) ≤

O((m1 + m2 + · · · + mp)2) = O(m2) ≤ O(mn) time. As a re-

sult, the worst-case time complexity of Paths2(Φ,m, n,D, I, T ) isO(mn) because it takes O(mn) time to divide d1, d2, . . . , dm by 2nprocessing steps each of time O(m), as explained below.

In the first step, by comparing the first bits of d1, d2, . . . , dm,we can divide d1, d2, . . . , dm into two node-disjoint sections, i.e.the 0-section and 1-section, so that the nodes with their firstbits equal to 0 are included in the 0-section, and others in the1-section. In the second step, by comparing the second bits ofd1, d2, . . . , dm, the 0-section (resp. 1-section) is divided into twosections, i.e. the 00-section and 01-section (resp. 10-section and11-section), so that the nodes of 0-section (resp. 1-section) withtheir second bits equal to 0 are included in the 00-section (resp.10-section), and the nodes of 0-section (resp. 1-section) with theirsecond bits equal to 1 are included in 01-section (resp. 11-section).Consequently, it is easy to derive that after 2n steps, d1, d2, . . . , dmcan be divided into p node-disjoint sections so that the nodes ofeach section are identical to each other, where 1 ≤ p ≤ m.Since each step compares m bits, there are m × 2n = O(mn) bitcomparisons in total. On the other hand, since each Qi, representedas (bi1, b

i2, . . . , b

i|di|

) instead, can be stored in O(|di|) ≤ O(2n) =

O(n) space for all 1 ≤ i ≤ m, at most m × O(n) = O(mn) spaceis necessary in Paths2(Φ,m, n,D, I, T ). It should be noted that theO(mn) is optimal because any procedure must take at least O(mn)time and space in the worst case to constructm disjoint paths in a2n-cube.

4. The probability of existence of all shortest disjoint paths

In order to figure out the probability that there exist m disjointshortest paths from s to t1, t2, . . . , tm, respectively, in an n-torus, brute-force computations were made by the aid of runningcomputer programs, where m is not greater than the connectivityof the n-torus and s was assumed to be the origin, i.e. 0n. In thissection, we outline the process of computations and give somediscussions about its results.

In order to make the computations not only representativebut accomplished within a reasonable short time, it was carriedout in the situation that all of the source node s and destinationnodes t1, t2, . . . , tm are mutually distinct in a k-ary n-cube, where2 ≤ k ≤ 6, 2 ≤ n ≤7, and m is equal to the connectivityof the k-ary n-cube. In the computations, C(kn − 1,m) differentcombinations of t1, t2, . . . , tm were first enumerated in a recursiveway by executing a computer program. For the interested reader,please visit URL ‘‘http://mework.nkmu.edu.tw/userfilev4/4209/optorus.c ’’ for the computer program, which was coded in Clanguage and can be complied by any ANSI C/C++ compiler. Then,for each combination, a maximal partial routing function Ω :

d1, d2, . . . , dm → 1, 2, . . . , 2n was computed, where di =

ϕ(ti) for all 1 ≤ i ≤ m. If ΣΩ = m, then there exist the m disjointshortest paths from s to t1, t2, . . . , tm, respectively, by Theorem 1.Otherwise (ΣΩ < m), there does not exist such disjoint shortestpaths.

Refer to Table 1, the numbers of all the different combinationsof t1, t2, . . . , tm as well as the numbers of combinations for theexistence of disjoint shortest paths (from s to t1, t2, . . . , tm) areshown for all 2 ≤ k ≤ 6 and part of 2 ≤ n ≤ 7. Accordingto the computational results, the probability that there exist mdisjoint shortest paths (from s to t1, t2, . . . , tm) in a k-ary n-cubeis greater than 94%, 70%, 91%, 69%, and 89% for (k, n,m) =

(2, 7, 7), (3, 4, 8), (4, 3, 6), (5, 3, 6), and (6, 3, 6), respectively. Itfollows that not only is Theorem 1 theoretically interesting but ourconstruction procedures are also practical in real applications, suchas IDA [25] in case that all shortest one-to-many disjoint paths areemployed. Another two interesting phenomena are that when kis even, the probability becomes higher as n gets larger, and thatthe probability of even k is much greater than that of odd k. Oneof the explanations for these two phenomena may be that whenti,j = ⌈k/2⌉ (or ti,j = ⌊k/2⌋), there is one more choice of thetraversal directions along dimension j for constructing the shortestpath from s to ti in case of even k than odd k, where 1 ≤ i ≤ m and1 ≤ j ≤ n.

5. Concluding remarks

In this paper, we focus on the problem of (A) constructing mdisjoint shortest paths from one source node s to other m (notnecessarily distinct) destination nodes t1, t2, . . . , tm, respectively,in an n-torus,wherem (≤2n) is not greater than the connectivity ofthe n-torus. It was shown that a necessary and sufficient conditionfor the existence of the m disjoint shortest paths can be verifiedin O(mn1.5) time by computing a maximal partial routing functionΩ : d1, d2, . . . , dm → 1, 2, . . . , 2n, where di = ϕ(ti) is a nodein a 2n-cube for all 1 ≤ i ≤ m. In addition, when the conditionholds, we have shown that the m disjoint shortest paths can beconstructed in optimal O(mn) time. Consequently, this problemcan be solved in O(mn1.5) time as a whole. The solutions of this

132 C.-N. Lai / J. Parallel Distrib. Comput. 75 (2015) 123–132

Table 1The summary of computational results.

k n m Total (A) Existence of disjoint shortest paths (B) Probability (B/A)

2 4 4 1,365 1,201 87.98%2 5 5 169,911 151,286 89.03%2 6 6 67,945,521 62,453,670 91.91%2 7 7 89,356,415,775 84,707,326,890 94.79%3 2 4 70 46 65.71%3 3 6 230,230 139,490 60.58%3 4 8 28,987,537,150 20,316,188,768 70.08%4 2 4 1,365 1,201 87.98%4 3 6 67,945,521 62,453,670 91.91%5 2 4 10,626 5,944 55.93%5 3 6 4,465,475,476 3,084,405,472 69.07%6 2 4 52,360 40,514 77.37%6 3 6 127,860,662,755 114,297,243,476 89.39%

problem have also been shown practical by our computationalresults.

As shown in [19], the problem of (B) constructing m disjointshortest paths from one source node s to other m (not necessarilydistinct) destination nodes d1, d2, . . . , dm, respectively, in an n-cube, the problem of (C) computing a maximal partial routingfunction Ω : d1, d2, . . . , dm → 1, 2, . . . , n, and the problemof (D) finding a maximum matching of a bipartite graph withtwo partite sets of sizes m and n are equivalent in the sensethat each of them can be transformed into the others in optimalO(mn) time, where m ≤ n. Since the mapping ϕ takes O(n) time,our results assure that the three problems A, B, and C are alsoequivalent, which implies that the four problems A, B, C, and D areall equivalent. In otherwords, if one of them can be solved in bettertime complexity than O(mn1.5), then so can the others. Since themaximum bipartite matching problem has been well studied, it isnot likely to improve the efficiency of our solutions.

Acknowledgments

We would like to express our sincere gratitude to the editorsand reviewers for their valuable comments and constructivesuggestions. We also thank the National Science Council, Taiwan,Republic of China, for supporting this research under the grantNSC-102-2221-E-022-016.

References

[1] E. Anderson, J. Brooks, C. Grassl, S. Scott, Performance of the CRAY T3Emultiprocessor, in: Proceedings of ACM/IEEE Supercomputing Conference,November 1997, pp. 1–17.

[2] Y.A. Ashir, I.A. Stewart, Fault-tolerant embeddings of Hamiltonian circuits ink-ary n-cube, SIAM J. Discrete Math. 15 (3) (2002) 317–328.

[3] M.M. Bae, B. Bose, Edge disjoint Hamiltonian cycles in k-ary n-cubes andhypercubes, IEEE Trans. Comput. 52 (10) (2003) 1271–1284.

[4] B. Bollobás, Extremal Graph Theory, Academic Press, New York, 1978.[5] J.A. Bondy, U.S.R. Murty, Graph Theory with Applications, North-Holland, New

York, 1976.[6] B. Bose, B. Broeg, Y. Kwon, Y. Ashir, Lee distance and topological properties of

k-ary n-cubes, IEEE Trans. Comput. 44 (1995) 1021–1030.[7] C.C. Chen, J. Chen, Nearly optimal one-to-many parallel routing in star

networks, IEEE Trans. Parallel Distrib. Syst. 8 (12) (1997) 1196–1202.[8] E. Cheng, S. Gao, K. Qiu, Z. Shen, On disjoint shortest paths routing on the

hypercube, in: Proceedings of the Third Annual International Conference onCombinatorial Optimization and Applications, COCOA’09, in: LNCS, vol. 5573,2009, pp. 375–383.

[9] W.J. Dally, Performance analysis of k-ary n-cube interconnection networks,IEEE Trans. Comput. 39 (6) (1990) 775–785.

[10] K. Day, A.E. Al-Ayyoub, Fault diameter of k-ary n-cube networks, IEEE Trans.Parallel Distrib. Syst. 8 (9) (1997) 903–907.

[11] M. Dietzfelbinger, S. Madhavapeddy, I.H. Sudborough, Three disjoint pathparadigms in star networks, in: Proceedings of the Third IEEE Symposium onParallel and Distributed Processing, 1991, pp. 400–406.

[12] D.R. Duh, G.H. Chen, On the Rabin number problem, Networks 30 (3) (1997)219–230.

[13] S. Gao, D.F. Hsu, Short containers in Cayley graphs, Discrete Appl. Math. 157(2009) 1354–1363.

[14] Q.-P. Gu, S. Peng, Fault tolerant routing in toroidal networks, IEICE Trans. Inf.Syst. E79-D (1996) 1153–1159.

[15] Q.P. Gu, S. Peng, Node-to-set and set-to-set cluster fault tolerant routing inhypercubes, Parallel Comput. 24 (1998) 1245–1261.

[16] Q.P. Gu, S. Peng, An efficient algorithm for the k-pairwise disjoint pathsproblem in hypercubes, J. Parallel Distrib. Comput. 60 (2000) 764–774.

[17] D.F. Hsu, On containerwidth and length in graphs, groups, and networks, IEICETrans. Fundam. Electron. Commun. Comput. Sci. E77-A (4) (1994) 668–680.

[18] R.E. Kessler, J.L. Schwarzmeier, CRAY T3D: a new dimension for Cray research,in: Proceedings of the 38th IEEE Computer Society International Conference,San Francisco, CA, 1993, pp. 176–182.

[19] C.N. Lai, Optimal construction of all shortest node-disjoint paths in hypercubeswith applications, IEEE Trans. Parallel Distrib. Syst. 23 (6) (2012) 1129–1134.

[20] C.N. Lai, Two conditions for reducing the maximal length of node-disjointpaths in hypercubes, Theoret. Comput. Sci. 418 (2012) 82–91.

[21] C.N. Lai, An efficient construction of one-to-manynode-disjoint paths in foldedhypercubes, J. Parallel Distrib. Comput. 74 (4) (2014) 2310–2316.

[22] S. Latifi, On the fault-diameter of the star graph, Inform. Process. Lett. 46 (3)(1993) 143–150.

[23] M. Noakes, D. Wallach, W.J. Dally, The J-machine multicomputer: anarchitectural evaluation, in: Proc. IEEE Int’l Symp. Computer Architecture,May1993, pp. 224–235.

[24] K. Qiu, An efficient disjoint shortest paths routing algorithm for the hypercube,in: Proceedings of the 14th IEEE International Conference on Parallel andDistributed Systems, ICPADS 2008, IEEE Computer Society Press, Melbourne,2008, pp. 43–47.

[25] M.O. Rabin, Efficient dispersal of information for security, load balancing, andfault tolerance, J. ACM 36 (2) (1989) 335–348.

[26] T.G. Robertazzi, Toroidal networks, IEEE Commun. Mag. 26 (6) (1988) 45–50.[27] Y. Saad, M.H. Schultz, Topological properties of hypercubes, IEEE Trans.

Comput. 37 (7) (1988) 867–872.[28] R.Y. Wu, G.H. Chen, Y.L. Kuo, G.J. Chang, Node-disjoint paths in hierarchical

hypercube networks, Inform. Sci. 177 (19) (2007) 4200–4207.[29] Y. Xiang, I.A. Stewart, One-to-many node-disjoint paths in (n, k)-star graphs,

Discrete Appl. Math. 158 (2010) 62–70.[30] M.C. Yang, J.J.M. Tan, L.H. Hsu, Hamiltonian circuit and linear array embeddings

in faulty k-ary n-cubes, J. Parallel Distrib. Comput. 67 (4) (2007) 362–368.

Cheng-Nan Lai received the B.S. degree in mathematicsand theM.S. degree in computer science from the NationalTsing Hua University, Taiwan, in 1986 and 1988, respec-tively, and the Ph.D. degree in computer science and in-formation engineering from the National Taiwan Univer-sity, Taiwan, in 2001. He is currently an associate professorin the Department of Information Management, NationalKaohsiung Marine University, Taiwan. His research inter-ests include interconnection networks, fault tolerant com-puting, parallel processing, graph theory and algorithms,and combinatorial optimization.