Node disjoint path construction algorithm in the folded divide-and-swap cube

View article
PeerJ Computer Science

Introduction

Supercomputers are high-performance computing systems that can perform complex tasks at an unprecedented speed. These systems typically consist of thousands or even millions of processors. An interconnection network, which is the fundamental topological structure of a supercomputer, plays a vital role in the performance of a supercomputer. The topology structure of an interconnection network is always modeled with a graph G=(V(G),E(G)), where V(G) is the processor set and E(G) is the set of communication links connecting these processors. In a graph, a path is a sequence of distinct vertices μ0,μ1,,μk such that each pair of consecutive vertices μi and μi+1 is connected by an edge in E(G), where 0ik1. The length of a path P, denoted by L(P), is the number of edges it contains. The distance between two vertices μ and ν, denoted by d(μ,ν), is the length of the shortest path connecting them. The diameter of G is the maximum distance between any two vertices in G. A vertex μV(G) is a neighbor of νV(G) if there exists an edge (μ,ν)E(G). The neighborhood of ν, denoted by N(ν), is the set of all neighbors of ν. Let SV(G). Then N(S)={νV(G)|μS,(ν,μ)E(G) and ν S} and N[S]=N(S)V(S). In this work, the terms “vertex” and “node” are used interchangeably.

One-to-one node-disjoint paths between any two distinct nodes μ and ν in a graph refer to a set of paths that do not share any common nodes except the end nodes μ and ν. Since each path is independent with the other ones, node-disjoint paths allow data to be transmitted through multiple paths. In distributed computing systems, node-disjoint paths are essential for fault-tolerant communication between different nodes. By using multiple disjoint paths, supercomputers can continue to function properly even when some nodes become unavailable due to hardware failures or network issues. There are many works on disjoint path problem in hypercubes (Saad & Schultz, 1988), crossed cubes (Kulasinghe, 1997), twisted cubes (Chang, Wang & Hsu, 1999), m o¨bius cubes (Kocik & Kaneko, 2017), balanced hypercubes (Cheng, Hao & Feng, 2014; Liu et al., 2024), folded hypercubes (Lai, 2021; Liu, 2010), bcube (Fan et al., 2023), k-ary n-cube networks (Lv et al., 2024), enhanced hypercubes (Ma, Guo & Li, 2022), dcell networks (Wang et al., 2016), dragonfly networks (Wu et al., 2022), and alternating group graphs (You et al., 2015).

The n-dimensional hypercube Qn which has network cost O(n2) is one of the most important interconnection networks. The divide-and-swap cube DSCn is a newly proposed hypercube variant, which reduces the network cost to O(nlogn) (Kim et al., 2019), while DSCn and Qn have the same number of nodes. To reduce the diameter of DSCn, the folded divide-and-swap cube FDSCn is proposed. The upper bounds of diameters of DSCn and FDSCn are 5n41 and n1 ( n=2d,d2), respectively (Kim et al., 2019). Both DSCn and FDSCn are hierarchical networks. Besides, DSCn and FDSCn are Hamiltonian and Hamiltonian-connected. Chang et al. (2021) pointed out that FDSCn is suitable as a candidate topology for data center networks, and they proposed a recursive construction of a dual-CIST for FDSCn. Zhao & Chang (2023) investigated the generalized connectivity on DSCn. Zhou et al. (2024) determined the g-extra connectivity (0g10) of the divide-and-swap cube DSCn. FDSCn has a node degree of logn+2, which is much lower than most of the hypercube variants. Lower node degree reduces hardware costs, as it requires fewer ports per server/switch, minimizing the expense of network adapters and cabling. FDSCn has the smallest network cost among all hypercube variants, which proves FDSCn’s superiority in balancing performance and resource usage. Besides, FDSCn exhibits double exponential scalability, which surpasses many traditional interconnection topologies (e.g., bcube, dcell) and meets the demand for connecting massive numbers of servers in modern data centers.

In this work, we investigate the one-to-one node disjoint path problem of FDSCn. Let μ and ν be any two distinct nodes in FDSCn where n=2d and d1. We give an algorithm to construct d+2 disjoint paths between μ and ν. The main contributions of this work are shown as below:

  • We present an algorithm QP to construct a path between any two distinct nodes μ and ν based on the structural characteristics of FDSCn. This algorithm can quickly locate the subgraph where these two vertices are located, thereby reducing the scale of the path constructing problem.

  • We develop an algorithm O2OMain to build d+2 disjoint paths between any two different nodes in FDSCn and show that the maximum length of these paths shall not exceed n+9.

Preliminaries

In this section, we give the formal definition of DSCn and FDSCn. Each node μ in DSCn is denoted by an n-bit binary string, where μ=x1x2xn with xi{0,1} for 1in. DSCn is defined as follows.

Definition 1. (Kim et al., 2019) For any integers n=2d and d1, DSCn has 2n nodes, each of which is represented by an n-bit binary string, where μ=x1x2xn=s1s2s3 and xi{0,1} with 1in. For each k with 1kd, s1=x1x2xn2k, s2=xn2k+1xn2k+2xn2k1 and s3=xn2k1+1xn2k1+2xn. If k=1, then μ=s1s2 and s3 is empty. If node v satisfies one of the following conditions, then (μ,v)E(DSCn).

  • (1)

    v=x¯1x2xn, where x¯1 is the complement of x1. Here, (μ,v) is called an e(1)-edge.

  • (2)

    v={s¯1s¯2s3ifs1=s2,s2s1s3ifs1s2 Here, (u,v) is called an e(2n2k)-edge.

DSC2 and DSC4 are shown in Fig. 1. Each node in DSCn has d+1 neighbors. Hence, DSCn is (d+1)-regular. If ν is connected to μ with an e(1)-edge, then we call ν the 1-neighbor of μ, denoted by μ1; If ν is connected to μ with an e(2n2k)-edge ( 1kd), then we call ν the i-neighbor of μ, denoted by μi, where i=d+2k (See Table 1).


$DS{C_{2}}$DSC2
 and 
$DS{C_{4}}$DSC4
.

Figure 1: DSC2 and DSC4.

Table 1:
Relationship between the values of k, edge types, neighboring nodes and label s1s2 of μ.
Symbols Values
k d d1 2 1
e(2n2k)=e(2d+1k) e(21) e(22) e(2d1) e(2d)
ui(i=d+2k) u2 u3 ud ud+1
s1s2 x1x21 x1x2x22 x1x2x2d1 x1x2x2d
DOI: 10.7717/peerj-cs.3458/table-1

Definition 2. Let x2h+1x2h+2x2d be a specific ( 2d 2h)-digit binary string where 1hd and d1. Define DSC2hx2h+1x2h+2x2d as a subgraph of DSC2d induced by {a1a2a2hx2h+1x2h+2x2d|a1a2a2h is a 2h-digit binary string}. We call DSC2hx2h+1x2h+2x2d an embeded DSC2h of DSC2d with the identifier x2h+1x2h+2x2d.

For example, DSC200 is an embeded DSC2 induced by {0000,1000,0100,1100} in Fig. 1, where 00 is the identifier. The rightmost 2-digit binary string of each node in DSC200 is same, which is 00. Let μ=x1x2kx2k+1x2k+2x2d with 1kd1. According to Definition 2, node μ belongs to DSC2kx2k+1x2k+2x2d. For two different nodes μ and ν of DSC2d, if the rightmost ( 2d 2k)-digit binary strings of μ and ν are same, or only the leftmost 2k-digit binary strings of μ and ν are different, then μ and ν belong to the same DSC2kx2k+1x2k+2x2d. In this work, we say that DSC2d is an embeded subgraph of its own, where the identifier is empty.

From Table 1, we can see that only the leftmost 2i1-digit binary strings of ui and u are different. Hence, ui and u are in the same embeded DSC2i1(2id+1). In this work, in order to simplify the expression, we may omit the identifier of the embeded subgraph sometimes.

Next, we give the definition of FDSCn. For any integer n with n=2d and d1, FDSCn is built based on DSCn by adding an edge to each node of DSCn. Hence, FDSCn is (d+2)-regular.

Definition 3. (Kim et al., 2019) V(FDSCn)=V(DSCn), E(FDSCn)=E(DSCn)Ef, where Ef={(u,v)|u=x1x2x3xn and v=x1x¯2x3xn}. An edge in Ef is called an e(f)-edge.

If ν is connected to μ with an e(f)-edge, then we call ν the 0-neighbor of μ, denoted by μ0. FDSC2 and FDSC4 are shown in Fig. 2. By the definition of FDSCn, the concept of embeded subgraph can also apply to FDSCn. Hence, we have the following properties:


$FDS{C_{2}}$FDSC2
 and 
$FDS{C_{4}}$FDSC4
.

Figure 2: FDSC2 and FDSC4.

Property 1. For any node μV(FDSCn) with n=2d and d1, there exist the following properties:

  • (1)

    If the rightmost ( 2d 2k)-digit binary strings of μ and ν are the same, or only the leftmost 2k-digit binary strings of μ and ν are different where 1kd, then μ and ν are in the same embeded FDSC2k.

  • (2)

    μ has k+2 neighbors {μ0,μ1,μ2,,μk+1} in the embeded FDSC2k of FDSCn, where 1kd.

  • (3)

    μ0, μ1, μ2 and μ are in the same embeded FDSC2.

Suppose D=FDSC2k is an embeded subgraph of FDSCn, where n=2d,d2 and 2kd. The direct subgraph of D is callled a module of D. D can be decomposed into 22k1 embeded subgraph FDSC2k1s, each of which is a module of FDSC2k. For example, in Fig. 3, suppose D=FDSC8, then D can be decomposed into 24 embeded FDSC4s. Let μ=x1x2xn=ABC, where A=x1x2x2k1 is the address in a module and B=x2k1+1x2k1+2x2k is the address of the module in D. For example, in Fig. 3, suppose D=FDSC8, then {0000,0001,,1111} are the module addresses of the 16 embeded FDSC4s in D. Suppose D=FDSC40000, then {00,01,10,11} are the module addresses of the four embeded FDSC2s in D. Each module in FDSC2k is denoted by DBi where Bi( 1i22k1) is the module address. Each node μ in DBi has k+1 interior neighbors {u0,u1,,uk} inside DBi and uk+1 is the external neighbor outside DBi. Any two distinct modules in D are connected by at least one edge, which is called a bridge edge.

A partial view of 
$FDS{C_{8}}$FDSC8
.

Figure 3: A partial view of FDSC8.

Property 2. (Kim et al., 2019) For any two distinct modules DBi and DBj in FDSC2k with identifier B where 2kd and 1ij22k1, there exist the following properties:

  • (1)

    if BiB¯j, then there is one bridge edge (BjBiB,BiBjB) between modules DBi and DBj.

  • (2)

    if Bi=B¯j, there are two bridge edges (BiBiB,B¯iB¯iB) and (BjBiB,BiBjB) between modules DBi and DBj.

For example, in Fig. 3, suppose D=FDSC8. For modules FDSC40000 and FDSC41111 in D, there are two bridge edges (00000000, 11111111) and (11110000, 00001111). For modules FDSC40000 and FDSC41000 in D, there is one bridge edge (00001000, 10000000). Suppose D=FDSC40000. For modules FDSC200 and FDSC211 in D, there are two bridge edges (00000000, 11110000) and (11000000, 00110000). For modules FDSC200 and FDSC201 in D, there is one bridge edge (01000000, 00010000).

Let μ=x1x2x2d and ν=y1y2y2d be two distinct nodes in different modules DBi and DBj of the same FDSC2k where 2kd. Then, Bi=x2k1+1x2k1+2x2k is the module address of DBi, and Bj=y2k1+1y2k1+2y2k is the module address of DBj. If we replace the first 2k1 bits of μ with Bj to obtain node s, and replace the first 2k1 bits of ν with Bi to obtain node t, then (s,t) is a bridge edge between DBi and DBj.

For example, in Fig. 3, suppose μ=00000000, ν=01010000 and D=FDSC40000 with k=2. Then μ is in module DBi with Bi=00 and ν is in module DBj with Bj=01. If we replace the first 2 bits of μ with Bj, then we get node s=01000000. And if we replace the first 2 bits of ν with Bi, then we get node t=00010000. Then, (01000000, 00010000) is a bridge edge between D00 and D01. We list some acronyms and notations in Table 2, which will be used in this work.

Table 2:
Acronyms and notations.
Symbol Definition
FDSCn(n=2d,d1) An n-dimensional folded divide-and-swap cube
FDSC2k(1kd) An embeded subgraph of FDSCn(n=2d)
FDSC2k1(2kd) A direct embeded subgraph of FDSC2k or a module of FDSC2k
{μi|0ik} The interior neighbor set of μ inside the FDSC2k1 where μ lies
μk+1 The external neighbor of μ in FDSC2k outside the FDSC2k1 where μ lies
Mu The module which node u is connected to
MS The module set {Mt|tS}
DOI: 10.7717/peerj-cs.3458/table-2

Construction of a path between any two distinct nodes in FDSCn

In this section, we will give two basic algorithms which will be used to build a path between any two distinct nodes in FDSCn. Let μ=x1x2xn and ν=y1y2yn be any two distinct nodes in FDSCn and k=max{i|x2i1+1x2i1+2x2iy2i1+1y2i1+2y2i with 2id}. If k exists, then x1x2x2ky1y2y2k and x2k+1x2k+2xn=y2k+1y2k+2yn. By Property 1(1), μ and ν are in the same embeded FDSC2kx2k+1x2k+2x2d(2kd). Otherwise, μ and ν are in the same embeded FDSC2x3x4x2d.

If μ and ν are in the same embeded FDSC2k where 2k<d, then they are also in the same embeded FDSC2k+1. For example, suppose μ=00000000 and ν=11110000. Then these two nodes are in the same FDSC40000, and we can also consider that μ and ν are in the same FDSC8. Hence, 2k is the minimum common dimension of the embeded subgraph where μ and ν lie. We give an algorithm to get the minimum common dimension for μ and ν as follows.

As shown in Fig. 3, for nodes μ=00000000 and ν=10110101 where d=3, since x5x6x7x8y5y6y7y8, then algorithm MinCommonDimension returns 3. Hence, 23 is the minimum common dimension of the embeded subgraph, and μ, ν are in the same embeded FDSC8. For nodes μ=00000000 and ν=00110000 where d=3, since x5x6x7x8=y5y6y7y8 and x3x4y3y4, then algorithm MinCommonDimension returns 2, and μ, ν are in the same embeded FDSC40000. For nodes μ=00000000 and ν=10000000 where d=3, since x5x6x7x8=y5y6y7y8 and x3x4=y3y4, then algorithm MinCommonDimension returns 1, and μ, ν are in the same embeded FDSC2000000.

Next, we use a recursive algorithm to build a path between any two different nodes. Let μ and ν be any two distinct nodes in FDSCn. If μ and ν are in the same embeded FDSC2, then μ,ν is the required path. If μ and ν are in the same embeded FDSC2k(2kd) where 2k is the minimum common dimension of the embeded subgraph in which μ and ν lie, then μ and ν are in different FDSC2k1s. We select nodes s and t where μ and s, ν and t are in the same FDSC2k1 respectively, and (s,t) is the bridge edge connecting these two FDSC2k1s. For nodes μ and s, ν and t, we use the same method to build the paths between them. Therefore, we can adopt a recursive construction approach to build the path between μ and ν. The detailed algorithm is shown as below.

Each node exists in a certain embeded subgraph. In line 1, we get the minimum common dimension of the embeded subgraph where μ and ν lie with Algorithm 1; In lines 2–4, if μ and ν exist in the same FDSC2, we return the required path μ,ν, since FDSC2 is a complete graph. If μ and ν lie in the same embeded FDSC2k(2kd), we need to get the bridge edge which connects the FDSC2k1s where μ and ν lie. In line 5, we get node s by replacing x1x2x2k1 of μ with y2k1+1y2k1+2y2k of ν. In line 6, we get node t by replacing y1y2y2k1 of ν with x2k1+1x2k1+2x2k of μ. Then, (s,t) is the required bridge edge.

Algorithm 1:
MinCommonDimension ( μ,ν,d).
Input: Nodes μ=x1x2xn, ν=y1y2yn, and d1.
Output: an integer k where 2k is the minimum common dimension of the embeded subgraph in which μ and ν lie.
 1: for i=d;i2;i do
 2:    if x2i1+1x2i1+2x2iy2i1+1y2i1+2y2i then
 3:       ki;
 4:      return k;
 5:   end if
 6: end for
 7: return k1;
DOI: 10.7717/peerj-cs.3458/table-4
Algorithm 2:
QP ( μ,ν,d).
Input: Nodes μ=x1x2xn, ν=y1y2yn and d1.
Output: a path P between μ and ν in FDSCn.
 1:  kMinCommonDimension(μ,ν,d);
 2: if k=1 then
 3:    return μ+ “,” +ν;
 4: end if
 5:  sreplace(μ,x1x2x2k1,y2k1+1y2k1+2y2k);
 6:  treplace(ν,y1y2y2k1,x2k1+1x2k1+2x2k);
 7: if sμ then
 8:   if tv then
 9:       PQP(μ,s,k1)+ “,” +QP(t,ν,k1);
10:   else
11:        PQP(μ,s,k1)+ “,” +t;
12:  end if
13: else
14:  if tv then
15:    Ps+ “,” +QP(t,ν,k1);
16:  else
17:    Ps+ “,” +t;
18:  end if
19: end if
20: return P;
DOI: 10.7717/peerj-cs.3458/table-5

As shown in Fig. 3, for nodes μ=00000000 and ν=10110101 where d=3, μ, νV(FDSC8), μV(FDSC40000) and νV(FDSC40101). In this case, k=3. Then, we have s=01010000, t=00000101 and (s,t) is the bridge edge which connects subgraphs FDSC40000 and FDSC40101. For nodes μ=00000000 and ν=00110000 where d=3, μ and ν are in the same FDSC40000. In this case, k=2. Then, we have s=11000000 and t=00110000. Subgraphs FDSC2000000 and FDSC2110000 are connected by the bridge edge (11000000, 00110000).

For node μ and s, we apply the recursive call of algorithm QP to build the path between μ and s. If μ=s, use node s to represent the path between μ and s. The same method is used to build the path between ν and t. In lines 7–19, we concatenate the path between μ and s, as well as the path between ν and t to obtain the path between μ and ν.

Algorithm QP first determines the minimum common subgraph FDSC2k with 2kd where μ and ν are located, such that μ and ν are in two different modules of FDSC2k, named D0 and D1. Then select the connecting edge between D0 and D1. Note that the recursive path construction only occurs within the modules D0 and D1, and does not involve nodes from other modules of FDSC2k.

Construction of node disjoint paths in FDSCn

In this section, we will give some algorithms to construct one-to-one disjoint paths between any two disctinct nodes μ and ν in FDSCn, where μ and ν are in the same embeded subgraph FDSC2k(1kd).

Lemma 1. Let μ be any vertex in the embeded FDSC2k of FDSCn with 1kd1. Then for each i with k+2id+1, μ and μi belong to the same embeded FDSC2i1, but in different FDSC2i2s.

Proof. Let μ=x1x2xn = s1s2s3, s1=x1x2x2i2, s2=x2i2+1x2i2+2x2i1 and s3=x2i1+1x2i1+2x2d with k+2id+1. By Definition 1, we have

μi={s¯1s¯2s3=x¯1x¯2x¯2i2x¯2i2+1x¯2i2+2x¯2i1s3ifs1=s2s2s1s3=x2i2+1x2i2+2x2i1x1x2x2i2s3ifs1s2

Obviously, only the leftmost 2i1-digit binary strings of μ and μi are different, then μ and μi belong to the same embeded FDSC2i1s3. Besides, μ belongs to the embeded FDSC2i2s2s3, and μi belongs to the embeded FDSC2i2s¯2s3 or FDSC2i2s1s3. Hence, μ and μi belong to different embeded FDSC2i2s of the same embeded FDSC2i1s3.

As seen in Fig. 3, suppose that μ=00000000 which lies in the embeded FDSC2000000 of FDSC8. Then, μ3=11110000 and μ4=11111111. We can see that μ lies in FDSC2000000, μ3 lies in FDSC2110000, while μ and μ3 belong to the same embeded FDSC40000. Similarly, μ and μ4 belong to the same FDSC8, while μ belongs to the embeded FDSC40000 and μ4 belongs to the embeded FDSC41111.

Lemma 2. Suppose nodes μ and ν are in the same embeded FDSC2k of FDSCn with 1kd1, then for each i with k+2id+1, μi and νi are in the same embeded FDSC2i1, but in the embeded FDSC2i2s in which μ and ν don’t lie.

Proof. Let μ=x1x2xn = s1s2s3, s1=x1x2x2i2, s2=x2i2+1x2i2+2x2i1 and s3=x2i1+1x2i1+2x2d with k+2id+1. Meanwhile, Let ν=y1y2yn = t1t2t3, t1=y1y2y2i2, t2=y2i2+1y2i2+2y2i1 and t3=y2i1+1y2i1+2y2d. Since μ and ν are in the same embeded FDSC2k, we have x2k+1x2k+2xn=y2k+1y2k+2yn. Since i1>k, then s3=t3.

By Lemma 1, μ and μi are in the same embeded FDSC2i1s3 for each i with k+2id+1. For the same reason, ν and νi are in the same embeded FDSC2i1t3. Hence, μi and νi are in the same embeded FDSC2i1s3 for each i with k+2id+1.

Again, by Lemma 1, μ and μi are in different FDSC2i2s of FDSC2i1s3 for each i with k+2id+1. For the same reason, ν and νi are in different FDSC2i2s of FDSC2i1s3. Since i2k, μ and ν are in the same embeded FDSC2i2 of FDSC2i1s3. Hence, for each i with k+2id+1, μi and νi are in the embeded FDSC2i2s in which μ and ν do not lie.

μi and νi can lie in the same FDSC2i2 or in different FDSC2i2s. As seen in Fig. 3, we suppose μ=00000000 and ν=11000000, which lie in the same FDSC2000000. Then we have μ3=11110000,μ4=11111111,ν3=00110000, and ν4=00001100. We can see that μ3 and ν3 lie in the same FDSC40000, and the same FDSC2110000. For μ4 and ν4, they lie in the same FDSC8, but in different embeded FDSC4s which are FDSC41111 and FDSC41100.

Lemma 3. Suppose nodes μ and ν are in the same embeded FDSC2k of FDSCn with 1kd1, then for each i with k+2id, μi and νi lie in the same embeded subgraph FDSC2i1, which is different from the FDSC2i1s where μi+1 and νi+1 are located.

Proof. Let μ=x1x2xn. Then μ and ν are in the same embeded FDSC2kx2k+1x2k+2x2d. By Lemma 2, μi and νi lie in the same embeded subgraph FDSC2i1x2i1+1x2i1+2x2d, while μi+1 and νi+1 lie in the same embeded subgraph FDSC2ix2i+1x2i+2x2d, where k+2id. Since k+2i, then i1>k. Hence, μ and ν are in the same embeded subgraph FDSC2i1x2i1+1x2i1+2x2d as μi and νi. By Lemma 2, μi+1 and νi+1 lie in the embeded FDSC2i1s in which μ and ν don’t lie. Hence, μi and νi lie in the same embeded subgraph FDSC2i1, which is different from the FDSC2i1s where μi+1 and νi+1 are located.

Let μ=00000000 and ν=01000000 where μ and ν are in the same embeded FDSC2. Then we have μ3=11110000,μ4=11111111,ν3=00010000 and ν4=00000100. We can see that μ3 and ν3 lie in the same embeded FDSC40000, which is different from FDSC41111 and FDSC40100 where μ4 and ν4 are located. Please see Fig. 3.

Lemma 4. Let μ and ν be any two distinct nodes in the same embeded FDSC2k of FDSCn, where n=2d, d1 and 1kd1. There exist dk disjoint paths between μ and ν out of FDSC2k.

Proof. By Lemma 2, μ has an i-neighbor μi and ν has an i-neighbor νi, which lie in the same embeded FDSC2i1 of FDSCn for each i with k+2id+1. And we can use algorithm QP to construct a path Pi=μ,QP(μi,νi,d),ν between μ and ν which traverses μi and νi for each i with k+2id+1. The detailed algorithm is shown as below.

In Algorithm 3, a loop is used to build dk node disjoint paths between μ and ν out of FDSC2k, where μ and ν are in a certain embeded FDSC2k.The loop will take dk iterations. Therefore, it takes O(dk) time. In lines 2–9, we get the i-neighbor μi of μ. And in lines 10–17, we get the i-neighbor νi of ν. In line 18, we use algorithm QP to obtain the path between μ and ν which traverses μi and νi. In line 20, we return the constructed dk node disjoint paths between μ and ν out of FDSC2k.

Algorithm 3:
DisjointPathOutFDSCK ( μ,ν,k,d).
Input: Nodes μ=x1x2xn, ν=y1y2yn, d1 and 1kd1.
Output: d − k disjoint paths {Pi|k+2id+1} in a FDSC2d.
 1: for i=k+2;i<=d+1;i++ do
 2:     s1x1x2x2i2;
 3:     s2x2i2+1x2i2+2x2i1;
 4:     s3x2i1+1x2i1+2x2d;
 5:    if s1=s2 then
 6:        μis¯1s¯2s3;
 7:    else
 8:        μis2s1s3;
 9:    end if
10:     t1y1y2y2i2;
11:     t2y2i2+1y2i2+2y2i1;
12:     t3y2i1+1y2i1+2y2d;
13:    if t1=t2 then
14:        νit¯1t¯2t3;
15:    else
16:         νit2t1t3;
17:    end if
18:     Piμ,QP(μi,νi,d),ν;
19: end for
20: return {Pi|k+2id+1};
DOI: 10.7717/peerj-cs.3458/table-6

According to Lemma 2, nodes μk+2 and νk+2 are in the same embeded FDSC2k+1, but in the embeded FDSC2ks in which μ and ν don’t lie. Hence, algorithm QP (μk+2,νk+2,d) only occupies the embeded FDSC2ks where μk+2 and νk+2 are located and where μ and ν don’t lie. By Lemma 2 and Lemma 3, for each i with k+2id, nodes μi+1 and νi+1 are in the same embeded FDSC2i, but in the embeded FDSC2i1s in which μi and νi don’t lie. Hence, algorithm QP (μi+1,νi+1,d) only occupies the embeded FDSC2i1s where μi+1 and νi+1 are located and where μi and νi don’t lie. Hence, each path in algorithm DisjointPathOutFDSCK is disjoint. Then, there exist dk disjoint paths between μ and ν out of FDSC2k. Please see Fig. 4 for an illustration.

An example of one to one node disjoint paths between 
$\mu$μ
 and 
$\nu$ν
 out of 
$FDS{C_{{2^k}}}$FDSC2k
.

Figure 4: An example of one to one node disjoint paths between μ and ν out of FDSC2k.

Each pair of μi and νi can lie in different FDSC2i1s. In the worst case, Pd+1 is the longest path which occupies two embeded FDSC2d1s. Since the diameter of FDSCn is n1, then in theory, the maximum length of these paths is L(Pd+1)=n+1.

Lemma 5. Let μ and ν be any two distinct nodes in the same embeded FDSC2 of FDSCn ( n=2d and d1). There exist d+2 node disjoint paths between μ and ν in FDSCn.

Proof. Let μ=x1x2xn and ν=y1y2yn. In this case, x3xn=y3yn, then μ,νV(FDSC2x3xn). Since FDSC2x3xn is a complete graph, we can construct 3 disjoint paths between μ and ν with algorithm DisjointPathInFDSC2 ( μ,ν) (Algorithm 4).

Algorithm 4:
DisjointPathInFDSC2 (μ,ν,d).
Input: Nodes μ=x1x2xn, ν=y1y2yn, and d1.
Output: 3 disjoint paths P0,P1,P2 in an embeded FDSC2.
 1:  nodes{00x3xn,01x3xn,10x3xn,11x3xn}{μ,ν}
 2: for i=0;i1;i++ do
 3:     Piμ,nodes[i],ν;
 4: end for
 5:  P2μ,ν;
 6: return {Pi|0i2};
DOI: 10.7717/peerj-cs.3458/table-7

Then, we use algorithm DisjointPathOutFDSCK to construct disjoint paths out of FDSC2x3xn.

Algorithm 5 is used to build d+2 node disjoint paths between μ and ν, where μ, νV(FDSC2x3xn). In line 1, we get three disjoint paths in FDSC2x3xn, which takes O(1) time. In line 3, we use algorithm DisjointPathOutFDSCK to obtain d1 disjoint paths between μ and ν out of FDSC2x3xn. Since algorithm DisjointPathOutFDSCK takes O(d) time, the time complexity of Algorithm 5 is O(d)+O(1)=O(d). In line 5, we return the constructed d+2 node disjoint paths between μ and ν. The theoretical maximum length of {Pi|0id+1} is L(Pd+1)=n+1 where d2. If d=1, then Algorithm 5 only needs to construct three disjoint paths in FDSC2. The theoretical maximum length of these three disjoint paths in FDSC2 is 2. Please see Fig. 5 for an illustration.

Algorithm 5:
O2OInFDSC2 (μ,ν,d).
Input: Nodes μ=x1x2xn, ν=y1y2yn and d1.
Output: d+2 disjoint paths {P0,P1,,Pd+1} in FDSC2d.
 1: {Pi|0i2} DisjointPathInFDSC2( μ,ν);
 2: if d2 then
 3:   {Pi|3id+1} DisjointPathOutFDSCK( μ,ν,1,d);
 4: end if
 5: return {Pi|0id+1};
DOI: 10.7717/peerj-cs.3458/table-8
An example of one-to-one node disjoint paths between 
$\mu$μ
 and 
$\nu$ν
 in the same 
$FDS{C_{2}}$FDSC2
.

Figure 5: An example of one-to-one node disjoint paths between μ and ν in the same FDSC2.

Lemma 6. Let μ and ν be any two distinct nodes in the same embeded FDSC4 of FDSCn ( n=2d and d1). There exist d+2 node disjoint paths between μ and ν in FDSCn.

Proof. Suppose that μ and ν are any two distinct nodes in the same embeded FDSC4 named D. First, we will construct four disjoint paths between μ and ν in D. According to the locations of μ and ν, we have the following two cases.

Case 1. μ and ν are in the same FDSC2 of D.

We can easily get the four disjoint paths with algorithm O2OInFDSC2( μ,ν,d).

Case 2. μ and ν are in different FDSC2s of D.

Suppose that μ is in D0 and ν is in D1, where D0 and D1 are two different FDSC2s of D. By Property 1(3), each node has three neighbors in FDSC2. Then, let U={μ0,μ1,μ2,μ} in D0 and V={ν0,ν1,ν2,ν} in D1. We can build four disjoint paths with the following steps.

Step 1: For each s in U, if s is adjacent with a node t in V, build a path as follows. Then remove s from U and t from V.

P={μ,νifs=μandt=ν,μ,s,νifsμandt=ν,μ,t,νifs=μandtν,μ,s,t,νifsμandtν..

Step 2: For each s in U, if there is a node tV such that s and t are connected to the same FDSC2, build a path as follows. Then remove s from U and t from V.

P={μ,QP(μ3,ν3,2),νifs=μandt=ν,μ,s,QP(s3,ν3,2),νifsμandt=ν,μ,QP(μ3,t3,2),t,νifs=μandtν,μ,s,QP(s3,t3,2),t,νifsμandtν..

Step 3: For each s in U, if there is a node tV such that s and t are connected to different FDSC2s, build a path using the method of Step 2. Then remove s from U and t from V.

By Property 2, there exist one or two edges between D0 and D1. Then, we have the following two subcases.

Case 2.1. there exist two edges between D0 and D1.

In this case, we can construct two disjoint paths between μ and ν with Step 1, and two disjoint paths between μ and ν with Step 2. Hence, there exist four disjoint paths between μ and ν.

Case 2.2. there exists one edge between D0 and D1.

In this case, assume the other two modules of D are named D2 and D3. With Step 1, we can construct one disjoint path between μ and ν. In Step 2, for each pair sU and tV where s3 and t3 are in the same Di(2i3), we can construct a disjoint path according to Eq. (6.2) where QP (s3,t3,2) returns s3,t3. Hence, there exist two disjoint paths between μ and ν with Step 2. Let Mi(2i3) be the subgraph of Di, containing the nodes not used in Step 2. Since Di is a complete graph, then Mi is a connected graph. Since the bridge edge between D2 and D3 exists, M2M3 is connected. Each node in UV is connected to a different node out of D0D1, then sU and tV in Step 3 can only connected to M2M3, and there exists one disjoint path between μ and ν with Step 3. Hence, there exist 4 disjoint paths between μ and ν.

For example, in Fig. 2, suppose μ=1000,ν=0010, U={1100,0000,0100,1000} and V={0110,1010,1110,0010}. With Step 1, we can construct a disjoint path 1000,0010, then U={1100,0000,0100} and V={0110,1010,1110}. In Step 2, node pairs {1100,1110} and {0100,0110} are connected to the same FDSC2, respectively. We can construct two disjoint paths 1000,1100,0011,1011,1110,0010 and 1000,0100,0001,1001,0110,0010, then U={0000} and V={1010}. We can see that M2M3 is connected where V(M2M3)={1111,0111,1101,0101}. In Step 3, 0000U is connected to 1111V(M2M3) and 1010V is connected to 0101V(M2M3). We can build a disjoint path 1000,0000,1111,0111,1101,0101,1010,0010. Hence, there exist 4 disjoint paths between 1000 and 0010.

After building four disjoint paths in the embeded FDSC4, we can build d2 disjoint paths out of the embeded FDSC4 with algorithm DisjointPathOutFDSCK. Hence, there exist d+2 disjoint paths between any two distinct nodes μ and ν in FDSCn.

Algorithm O2OInFDSC4 is used to build d+2 node disjoint paths between μ and ν, where μ and ν are in the same embeded FDSC4. In lines 1–3, if μ and ν are in the same embeded FDSC2, we can get d+2 disjoint paths with algorithm O2OInFDSC2. In lines 4–9, we use algorithm DisjointPathInFDSC4 (Algorithm 6) to construct four disjoint paths in the embeded FDSC4, which takes O(1) time. Then use DisjointPathOutFDSCK to obtain d2 disjoint paths between μ and ν out of the embeded FDSC4, which takes O(d) time. Therefore, the time complexity of Algorithm 7 is O(1)+O(d)=O(d). In line 10, we return the constructed d+2 node disjoint paths between μ and ν. The theoretical maximum length of {Pi|0id+1} is L(Pd+1)=n+1 where d2. If d=2, then Algorithm 7 needs to construct 4 disjoint paths in FDSC4. The theoretical maximum length of 4 disjoint paths in FDSC4 is 7, and the path is generated in Step 3.

Algorithm 6:
DisjointPathInFDSC4 ( μ,ν,d).
Input: Nodes μ=x1x2xn, ν=y1y2yn and d2.
Output: 4 disjoint paths between μ and ν in an embeded FDSC4.
 1: paths ← []; U{μ0,μ1,μ2,μ}; V{ν0,ν1,ν2,ν};
 2: for each sU do                                         Δ Step 1
 3:    for each tV do
 4:       if isAdjacent(s, t) then
 5:          build a path P according to Eq. (6.1);
 6:          paths.append(P);
 7:          U.remove(s); V.remove(t);
 8:       end if
 9:    end for
10: end for
11: for each sU do                                         Δ Step 2
12:    for each tV do
13:       if s and t are connected to the same FDSC2 then
14:          build a path P according to Eq. (6.2);
15:          paths.append(P);
16:          U.remove(s); V.remove(t);
17:       end if
18:    end for
19: end for
20: for each sU do                                         Δ Step 3
21:    for each tV do
22:       if s and t are connected to different FDSC2s then
23:          build a path P according to Eq. (6.2);
24:          paths.append(P);
25:          U.remove(s); V.remove(t);
26:       end if
27:    end for
28: end for
29: return paths;
DOI: 10.7717/peerj-cs.3458/table-9
Algorithm 7:
O2OInFDSC4( μ,ν,d).
Input: Nodes μ=x1x2xn, ν=y1y2yn, and d2.
Output: d+2 disjoint paths {P0,P1,,Pd+1} in FDSC2d.
 1: if μ and ν are in the same embeded FDSC2 then
 2:     {Pi|0id+1} O2OInFDSC2 (μ,ν,d);
 3: end if
 4: if μ and ν are in different embeded FDSC2s then
 5:     {Pi|0i3} DisjointPathInFDSC4 (μ,ν,d);
 6:    if d>2 then
 7:        {Pi|4id+1} DisjointPathOutFDSCK( μ,ν,2,d);
 8:    end if
 9: end if
10: return {Pi|0id+1};
DOI: 10.7717/peerj-cs.3458/table-10

Lemma 7. Let μ be any node in the embeded FDSC2k with identifier B in FDSCn( n=2d, d3 and 3kd) and U={μ0,μ1,,μk}. Each μi(0ik) in U is connected to a different module of FDSC2kB.

Proof. Suppose that μiU and μjU are in DBi, and they are connected to the same DBj, where DBi and DBj are two modules of FDSC2kB. By Property 2, we have μi=BiBiB and μj=B¯iBiB, or vice versa, where Bi is a 2k1-digit binary string. Hence, μi and μj are in the same embeded FDSC2k1BiB, but in different embeded FDSC2k2s of FDSC2k1BiB. According to the definition of FDSCn, (μi,μj)E(FDSC2k1BiB). Then μ,μi and μj form a triangle. There is no triangles in DSCn, and for FDSCn, an e(f)-edge is added for each node in the embeded FDSC2s. Hence, there only exist trangles in the embeded FDSC2s in FDSCn. Then, μi and μj should be in the same embeded FDSC2, which conflicts with that μi and μj are in different embeded FDSC2k2s. Hence, each μi(0ik) in U is connected to a different module of FDSC2kB.

Let μ=00000000 in FDSC40000 and U={μ0=01000000,μ1=10000000,μ2=11000000}. We can see that each element in U is connected to a different element in {FDSC2100000,FDSC2110000,FDSC2010000} in Fig. 3.

Lemma 8. Let μ and ν be any two nodes in different embeded FDSC2k1s of the same embeded FDSC2k in FDSCn where n=2d, d3 and 3kd. There exist d+2 node disjoint paths between μ and ν in FDSCn.

Proof. Suppose D is the embeded FDSC2k, D0 and D1 are two embeded FDSC2k1 s of D where μV(D0) and νV(D1). By Property 1(2), each node has k+1 neighbors in FDSC2k1. Let UI={μ0,μ1,,μk} in D0, U=UI{μ}, VI={ν0,ν1,,νk} in D1, and V=VI{ν}. First, we construct k+2 disjoint paths between μ and ν in D. Then use algorithm DisjointPathOutFDSCK to obtain the dk disjoint paths between μ and ν out of D. Considering the locations of μ and ν in FDSCn, we have the following steps to construct d+2 disjoint paths.

Step 1: Identify the vertex pairs sU and tV such that s and t are directly connected. If such pairs are found, for each pair of s and t, use the following method to construct a path P between μ and ν, and then remove s from U and t from V. Please see Fig. 6 for an illustration. In this case, s=μ is directly connected to t=νm, then there exists a path μ,νm,ν.

P={μ,νifs=μandt=ν,μ,s,νifsμandt=ν,μ,t,νifs=μandtν,μ,s,t,νifsμandtν.

An illustration of step 1.

Figure 6: An illustration of step 1.

Step 2: Identify the vertex pairs sU and tV such that the external neighbor sk+1 of s in D1 is directly connected to t. If such pairs are found, for each pair of s and t, use the following method to construct a path between μ and ν, and then remove s from U and t from V. Please see Fig. 7 for an illustration. In this case, s=μm, whose external neighbor (μm)k+1 is directly connected to t=νm, then there exists a path μ,μm,(μm)k+1,νm,ν.

P={μ,sk+1,νifs=μandt=ν,μ,s,sk+1,νifsμandt=ν,μ,sk+1,t,νifs=μandtν,μ,s,sk+1,t,νifsμandtν.

An illustration of step 2.

Figure 7: An illustration of step 2.

Step 3: Identify the vertex pairs sU and tV such that the external neighbor tk+1 of t in D0 is directly connected to s. If such pairs are found, for each pair of s and t, use the following method to construct a path P between μ and ν, and then remove s from U and t from V. Please see Fig. 8 for an illustration. In this case, t=νm, whose external neighbor (νm)k+1 is directly connected to s=μm, then there exists a path μ,μm,(νm)k+1,νm,ν.

P={μ,tk+1,νifμ=sandt=ν,μ,s,tk+1,νifμsandt=ν,μ,tk+1,t,νifμ=sandtν,μ,s,tk+1,t,νifμsandtν.

An illustration of step 3.

Figure 8: An illustration of step 3.

Step 4: Check each vertex s in U. If s is connected to D1 and is not adjacent to any of the vertices in V and N(V), we select an edge (x,y)E(D1) such that xN(sk+1), yk+1V(D0) and MyMU{s}. Then put y into U to replace s, and build a partial path from s to y as follows. Since |MU{s}|k+1 and |MN(sk+1)|=k+1 by Lemma 7, then MU{s}=MN(sk+1) for the worst case. Hence, we can easily find a node y such that D0My and MyMU{s}. Please see Fig. 9 for an illustration. In this case, s=μm, then there exists a partial path μm,(μm)k+1,x,y.

P={sk+1,x,yifs=μ,s,sk+1,x,yifsμ.

An illustration of step 4.

Figure 9: An illustration of step 4.

Step 5: Check each vertex t in V. If t is connected to D0 and is not adjacent to any of the vertices in U and N(U), then similiar to Step 4, select an edge (x,y)E(D0) such that xN(tk+1), yk+1V(D1) and MyMV{t}. Then put y into V to replace t, and build a partial path from t to y as follows. Please see Fig. 10 for an illustration. In this case, t=νm, then there exists a partial path νm,(νm)k+1,x,y.

P={tk+1,x,yift=ν,t,tk+1,x,yiftν.

An illustration of step 5.

Figure 10: An illustration of step 5.

Step 6: If μU, check each vertex s in U{μ}. For each s, if s and μ are connected to the same module in D, select a neighbor z of s in D0 such that MzMU. Then, put z into U to replace s and construct a partial path from s to z as follows. By Lemma 7, any two different neighbors of μ in D0 are connected to different modules in D. Then only μ and one of its neighbor s in D0 can be linked to the same module. Since |N(s)|=k+1 and each neighbor of s is connected to a different module, we can easily find a neighbor z of s such that MzMU. Please see Fig. 11 for an illustration. In this case, s=μk, then there exists a partial path μk,z.

P=s,z.

An illustration of step 6.

Figure 11: An illustration of step 6.

Step 7: If νV, check each vertex s in V{ν}. Similar to Step 6, for each s, if s and ν are connected to the same module in D, then select a neighbor z of s in D1 such that MzMU. Put z into V to replace s and construct a partial path from s to z according to Eq. (7.6).

Step 8: Identify vertex pairs sU and tV, such that s and t are connected to the same FDSC2k1. If found, for each pair of s and t, place s into set U1, t into set V1, and then remove s from U and t from V.

Step 9: For each pair of vertices sU1 and tV1 which are connected to the same FDSC2k1, use the following method to construct a disjoint path between μ and ν. If s is the replaced node generated in step 4 or step 6, then set S as the partial path generated in step 4 or step 6. Otherwise, set S to an empty string. If t is the replaced node generated in step 5 or step 7, then set T as the partial path generated in step 5 or step 7. Otherwise, set T to an empty string. Afterwards, construct a path P between sk+1 and tk+1 with algorithm QP, and connect P with S and T. Then, we can build a disjoint path between μ and ν. Please see Fig. 12 for an illustration.

P={μ,connect(S,QP(sk+1,tk+1,k),T),ν,ifs=μandt=νμ,s,connect(S,QP(sk+1,tk+1,k),T),ν,ifsμandt=νμ,connect(S,QP(sk+1,tk+1,k),T),t,ν,ifs=μandtνμ,s,connect(S,QP(sk+1,tk+1,k),T),t,ν,ifsμandtν.

An illustration of step 9.

Figure 12: An illustration of step 9.

We give the detailed algorithm as follows.

Step 10: For each pair of vertices sU and tV which are connected to the different FDSC2k1 s, use a method similar to Step 9 to construct a disjoint path between μ and ν. Please see Fig. 13 for an illustration.

An illustration of step 10.

Figure 13: An illustration of step 10.

Step 11: If k<d, then μ has a neighbor μi in FDSC2i1 and ν has a neighbor νi in FDSC2i1 for each i with k+2id+1. We can build dk disjoint paths between μ and ν with algorithm DisjointPathOutFDSCK.

In lines 3–6, construct a path for each sU and tV, if (s,t)E(FDSCn). In lines 7–16, construct a path for each sU and tV, if (sk+1,t)E(FDSCn) or (s,tk+1)E(FDSCn). In lines 17–23, check each vertex s in U, if sk+1V(D1VN(V)), select an edge (x,y)E(D1) such that xN(sk+1), yk+1V(D0) and MyMU{s}. In lines 24–30, check each vertex t in V, if tk+1V(D0UN(U)), select an edge (x,y)E(D0) such that xN(tk+1), yk+1V(D1) and MyMV{t}. In lines 31–39, if sU and μ are connected to the same module of D, then select a neighbor z of s in D0 such that MzMU. In lines 40–48, if sV and ν are connected to the same module of D, then select a neighbor z of s in D1 such that MzMU. In lines 49–52, put sU and tV connected to the same module of D into U1 and V1, respectively. In lines 53–56, construct a path for each sU1 and tV1 connected to the same module of D between μ and ν with Algorithm 8. In lines 57–60, construct a path for each sU and tV connected to different modules of D between μ and ν with Algorithm 8. In lines 61–63, construct disjoint paths out of D between μ and ν.

Algorithm 8:
DisjointPathInFDSCK( μ,ν,s,t,k).
Input: Nodes μ,ν,s and t in FDSC2k(k3).
Output: a disjoint path between μ and ν in FDSC2k.
 1: S ← “”; T ← “”;
 2: if s was generated in step 4 or step 6 then
 3:    S ← partial path from step 4 or 6;
 4: end if
 5: if t was generated in step 5 or step 7 then
 6:    T ← partial path from step 5 or 7;
 7: end if
 8: construct a path P according to Eq. (7.7);
 9: return P;
DOI: 10.7717/peerj-cs.3458/table-11

From Step 1 to Step 3, for each vertex pair sU and tV which are adjacent or connected with a common neighbor, we construct a disjoint path between μ and ν which traverses s and t. Each step takes O(k2) time. From Step 4 to Step 7, we ensure that the vertices in U and V are connected to different modules of DD0D1, respectively. Each step takes O(k) iterations. From Step 8 to Step 10, we first construct disjoint paths between μ and ν which traverses vertex pairs connected to the same module of D, then we construct disjoint paths between μ and ν which traverses vertex pairs connected to different modules of D. Each step has less than or equal to O(k) iterations. Hence, the time complexity from Step 1 to Step 10 is O(k2). In Step 11, we construct disjoint paths between μ and ν out of D. Since the time complexity of algorithm DisjointPathOutFDSCK is O(dk), the time complexity of algorithm O2OInFDSCK is O(max(k2,dk)). When k approaches d, O(k2d2) dominates the time complexity of algorithm O2OInFDSCK. Hence, O(d2) is the time complexity of algorithm O2OInFDSCK in the worst case.

Since |U|=k+2 and |V|=k+2, then we can build k+2 disjoint paths between μ and ν in FDSC2k from Step 1 to Step 10. In Step 11, we can build dk disjoint paths between μ and ν out of FDSC2k. Hence, there exist d+2 node disjoint paths between μ and ν in FDSC2d.

In the worst case, sU(sμ) is the replaced node in Step 4 and tV(tν) is the replaced node in Step 5, where s and t are connected to different modules of FDSC2d. Set S as the partial path generated in Step 4 where L(P)=3 and set T as the partial path generated in Step 5 where L(T)=3. Then, P=μ,s,connect(S,QP(sk+1,tk+1,k),T),t,ν and the theoretical maximum path length is L(P)=1+L(S)+1+(2d11) +1+(2d11)+1+L(T)+1=n+9 for d3.

Theorem 1. Let μ and ν be any two distinct nodes in the same embeded FDSC2k of FDSCn where n=2d, d1 and 1kd. There exist d+2 node disjoint paths between μ and ν in FDSCn.

Proof. We have the following three cases.

Case 1. μ and ν are in the same embeded FDSC2.

By Lemma 5, the theorem holds in this case.

Case 2. μ and ν are in the same embeded FDSC4.

By Lemma 6, the theorem holds in this case.

Case 3. μ and ν are in the same embeded FDSC2k where 3kd.

By Lemma 8, the theorem holds in this case.

Hence, there exist d+2 node disjoint paths between μ and ν in FDSCn where μ and ν are any two distinct nodes in the embeded FDSC2k with 1kd.

Based on Algorithms 5, 7 and 9, we define the main algorithm to construct disjoint paths between μ and ν. Algorithm 10 is an implementation of Theorem 1. Since the theoretical maximum path lengths for Algorithms 5, 7 and 9 is n+1,n+1 and n+9, Hence, the theoretical maximum path length for Algorithm 10 is n+9 for d3. For d=1, the theoretical maximum path length for Algorithm 10 is 2, and for d=2, the theoretical maximum path length for Algorithm 10 is 7. The time complexity of algorithms O2OInFDSC2, O2OInFDSC4 and O2OInFDSCK are O(d), O(d) and O(d2), respectively. Therefore, O(d2)=O((logn)2) is the time complexity of algorithm O2OMain.

Algorithm 9:
O2OInFDSCK( μ,v,k,d).
Input: Nodes μ=x1x2xn, ν=y1y2yn, k3 and d3.
Output: d+2 disjoint paths between μ and ν in FDSC2d.
 1: paths ← []; U{μi|0ik}{μ}; V{νi|0ik}{ν};
 2: for each sU and tV where (s,t)E(FDSC2k) doΔ Step 1
 3:    construct a path P according to Eq. (7.1);
 4:    paths.append(P);
 5:    U.remove(s); V.remove(t);
 6: end for
 7: for each sU and tV where (sk+1,t)E(FDSC2k) do Δ Step 2
 8:     construct a path P according to Eq. (7.2);
 9:     paths.append(P);
10:     U.remove(s); V.remove(t);
11:  end for
12:  for each tV and sU where (tk+1,s)E(FDSC2k) do Δ Step 3
13:    construct a path P according to Eq. (7.3);
14:    paths.append(P);
15:    U.remove(s); V.remove(t);
16: end for
17: for each sU do Δ Step 4
18:     if sk+1V(D1) and sk+1V and sk+1N(V) then
19:        select an edge (x,y)E(D1) such that xN(sk+1), yk+1V(D0) and MyMU{s}.
20:        U.replace(y, s);
21:        build a partial path from s to y according to Eq. (7.4);
22:     end if
23:  end for
24:  for each tV do Δ Step 5
25:    if tk+1V(D0) and tk+1U and tk+1N(U) then
26:       select an edge (x,y)E(D0) such that xN(tk+1), yk+1V(D1) and MyMV{t}.
27:       V.replace(y, t);
28:        build a partial path from t to y according to Eq. (7.5);
29:     end if
30:  end for
31:  if μU then Δ Step 6
32:     for each sU{μ} do
33:        if s and μ are connected to the same module in D then
34:           select a neighbor z of s in D0 such that MzMU.
35:           U.replace(z, s);
36:           build a partial path from μ to z according to Eq. (7.6);
37:       end if
38:     end for
39:  end if
40: if νV thenΔ Step 7
41:     for each sV{ν} do
42:        if s and ν are connected to the same module in D then
43:           select a neighbor z of s in D1 such that MzMV.
44:           V.replace(z, s);
45:           build a partial path from ν to z according to Eq. (7.6);
46:       end if
47:     end for
48:  end if
49:  for each sU and tV connected to the same module of D do Δ Step 8
50:      U1.add(s); V1.add(t);
51:      U.remove(s); V.remove(t);
52:  end for
53:  for each sU1 and tV1 connected to the same module of D do Δ Step 9
54:      P DisjointPathInFDSCK (μ,ν,s,t,k);
55:     paths.append(P);
56:  end for
57:  for each sU and tV connected to different modules of D do Δ Step 10
58:      P DisjointPathInFDSCK (μ,ν,s,t,k);
59:     paths.append(P);
60:  end for
61:  if k<d then                              Δ Step 11
62:     paths.append(DisjointPathOutFDSCK( μ,ν,k,d));
63:  end if
64:  return paths;
DOI: 10.7717/peerj-cs.3458/table-12
Algorithm 10:
O2OMain( μ,ν,d).
Input: Nodes μ=x1x2xn, ν=y1y2yn, and d1.
Output: d+2 node disjoint paths {Pi|0id+1} in FDSCn.
 1:  kMinCommonDimension(μ,ν,d);
 2: if k=1 then
 3:    return O2OInFDSC2( μ,ν,d);
 4: else if k=2 then
 5:    return O2OInFDSC4( μ,ν,d);
 6: else
 7:   return O2OInFDSCK( μ,ν,k,d);
 8: end if
DOI: 10.7717/peerj-cs.3458/table-13

Table 3 compares the number of generated paths, longest path length, time complexity of the disjoint path algorithms for FDSCn and some other hypercube variants. FDSCn has a smaller time complexity because O((logn)2) grows far more slowly than O(n2). For large n, this makes FDSCn’s disjoint path algorithm much more efficient than those of other hypercube variants. For the longest path length, FDSCn has a length of n+9, which is longer than that of twisted cubes ( n2+1) and folded hypercubes ( n2+2) but comparable to hypercubes ( n+1) and better than crossed cubes and m o¨bius cubes( 3n5).

Table 3:
Comparison of the number of generated paths, longest path length, time complexity of the disjoint path algorithms for FDSCn and some other hypercube variants.
Network Diameter Number of generated paths Longest path length Time complexity
Hypercubes n n n+1 O(n2)
Crossed cubes (n+1)2 n 3n5 O(n2)
Twisted cubes (n+1)2 n n2+1 O(n2)
Folded hypercubes n2 n+1 n2+2 O(n2)
M o¨bius cube (n+1)2 or (n+2)2 n 3n5 O(n2)
FDSCn n1 logn+2 n+9 O((logn)2)
DOI: 10.7717/peerj-cs.3458/table-3

Performance evaluation

In the section, we conduct a computer experiment to inspect the practical performance of the algorithm O2OMain. We implemented the algorithm using Java programming language, and the target machine is equipped with an Intel Core i5-7200U CPU 2.80 GHz and 12 GB RAM. For FDSCn with various values of n(n=2d,1d8), we constructed d+2 node disjoint paths between any two distinct nodes for a certain number of times. Then we evaluated the average path length and the average of the maximum path lengths for each FDSCn. Taking into account the impact of both the parameter n and the positions of the two nodes in FDSCn when constructing disjoint paths, we randomly selected six distinct node pairs for FDSC2, 120 distinct node pairs for FDSC4 and 10,000 distinct node pairs for FDSCn(n=2d,3d8), respectively.

For each value of n(n=2d,1d8), Fig. 14 illustrates the average of maximum and the average lengths of all disjoint paths obtained using algorithm O2OMain compared with theoretical maximum lengths. The theoretical maximum lengths take values of 2, 7, 2d+9, corresponding to FDSC2, FDSC4, FDSCn ( n=2d,3d8). We can see that the actual average of maximum lengths are very close to the theoretical maximum lengths when n16. However, when n32, the gap between them gradually becomes larger.

Results of average of maximum and average path lengths compared with the theoretical maximum path lengths.

Figure 14: Results of average of maximum and average path lengths compared with the theoretical maximum path lengths.

Conclusion

As a newly proposed hypercube variant, FDSCn has many superior properties over the hypercube. In this work, we investigate the disjoint path problem for FDSCn. The main contributions of this work are that we give an algorithm QP to build a path between any two distinct nodes μ and ν, as well as an algorithm O2OMain for constructing one-to-one disjoint paths in FDSCn. In future work, we can consider the construction of node-to-set disjoint paths (Wang et al., 2022; Kocik, Hirai & Kaneko, 2016; Ling & Chen, 2014) or set-to-set disjoint paths (Zhuang et al., 2024) for FDSCn. In addition, component diagnosticability (Liu et al., 2022) and extra fault diagnosticability (Lin et al., 2021) are also future research directions.

Supplemental Information