5
Informgtion ~~~ygwJ Information ProcessingLetters67 (1998)283-287 An efficient algorithm for k-pairwise disjoint paths in star graphs Qian-Ping Gu *, Shietung Peng The University of Aizu, Aim- Wakmnatsu, Fukushima, 9658580 Japan Received 1 April 1998;receivedin revisedform 1 July 1998 Communicated by S.G. Akl Abstract In this paper, we give an efficient algorithm for the following problem in the n-dimensional star graph Gn: Given k = [(n - 1)/21 pairs of distinct nodes (~1, tl), . . , (sk, tk) in G,,, find k node-disjoint paths si + q, 1 < i 6 k. Our algorithm finds the k disjoint paths of length at most d(Gn) + 5 in 0(n2) optimal time, where d(Gn) = L3(n - 1)/2] is the diameter of G,, This improves the previous results of 4(n - 2) (path length) and O(n4 logn) (time), respectively. Q 1998 Published by Elsevier Science B.V. All rights reserved. Keywords: Disjoint paths; Interconnectionnetworks;Off-line routing algorithm 1. Introduction Disjoint paths problems have attracted much atten- tion due to its numerous applications in fault tolerant routing and so on [2,10,11]. In what follows, we will use disjoint paths for node-disjoint paths. One of the particular interesting disjoint paths problems is that given k pairs of distinct nodes (~1, tl), . . , (sk, tk) in a graph, find k mutually disjoint paths, one connect- ing si and ti for each i, 1 < i < k. A graph satisfies property & if the k disjoint paths exist. To find the k disjoint paths is known as the k-pairwise disjoint paths problem. This problem has been investigated in both mathematical terms and interconnection network studies [4,8,12-151. Whether a graph G(V, E) satis- fies Ak for k < 2 can be verified in Poly( IV I) time [ 141. However, for k 2 3, the existence of the k paths for * Corresponding author.Email: [email protected]. Email: [email protected]. the problem on arbitrary graphs is NP-complete [ 121 (also see [6, p. 2171). A necessary condition for any graph to satisfy Ak is that it is (2k - 1)-connected [ 151. Star graphs of dimension II are a non-trivial class of (n - 1)-connected graphs that satisfies Ar(,_1),21 [4]. Star graphs are interesting interconnection networks for parallel computation and communication. Like hy- percubes, star graphs possess rich structure and sym- metry properties as well as many desirable fault tol- erance characteristics. In addition, with regard to the important properties of node degree and diameter, star graphs are shown to be markedly superior. A number of efficient algorithms on star graphs, which exploit its versatility, have been reported [ 1,3-51. Further efforts for disjoint paths problems in star graphs have also been made by several researchers [3,4,7,9]. Dietzfel- binger and Sudborough proved that the n-dimensional star graphs G, (which is (n - l)-connected) satisfies property Ar(,_1)/21 [4]. They also gave an algorithm which finds the [(n - I)/21 disjoint paths of length at 0020-0190/98/$19.00 0 1998 Published by Elsevier Science B.V. All rights reserved. PII: SOO20-0190(98)00121-5

An efficient algorithm for k-pairwise disjoint paths in star graphs

Embed Size (px)

Citation preview

Page 1: An efficient algorithm for k-pairwise disjoint paths in star graphs

Informgtion ~~~ygwJ

Information Processing Letters 67 (1998) 283-287

An efficient algorithm for k-pairwise disjoint paths in star graphs

Qian-Ping Gu *, Shietung Peng ’ The University of Aizu, Aim- Wakmnatsu, Fukushima, 9658580 Japan

Received 1 April 1998; received in revised form 1 July 1998 Communicated by S.G. Akl

Abstract

In this paper, we give an efficient algorithm for the following problem in the n-dimensional star graph Gn: Given k = [(n - 1)/21 pairs of distinct nodes (~1, tl), . . , (sk, tk) in G,,, find k node-disjoint paths si + q, 1 < i 6 k. Our algorithm finds the k disjoint paths of length at most d(Gn) + 5 in 0(n2) optimal time, where d(Gn) = L3(n - 1)/2] is the diameter of G,, This improves the previous results of 4(n - 2) (path length) and O(n4 logn) (time), respectively. Q 1998 Published by Elsevier Science B.V. All rights reserved.

Keywords: Disjoint paths; Interconnection networks; Off-line routing algorithm

1. Introduction

Disjoint paths problems have attracted much atten- tion due to its numerous applications in fault tolerant routing and so on [2,10,11]. In what follows, we will use disjoint paths for node-disjoint paths. One of the particular interesting disjoint paths problems is that given k pairs of distinct nodes (~1, tl), . . , (sk, tk) in a graph, find k mutually disjoint paths, one connect- ing si and ti for each i, 1 < i < k. A graph satisfies property & if the k disjoint paths exist. To find the k disjoint paths is known as the k-pairwise disjoint paths problem. This problem has been investigated in both mathematical terms and interconnection network studies [4,8,12-151. Whether a graph G(V, E) satis- fies Ak for k < 2 can be verified in Poly( I V I) time [ 141. However, for k 2 3, the existence of the k paths for

* Corresponding author. Email: [email protected]. ’ Email: [email protected].

the problem on arbitrary graphs is NP-complete [ 121 (also see [6, p. 2171). A necessary condition for any graph to satisfy Ak is that it is (2k - 1)-connected [ 151. Star graphs of dimension II are a non-trivial class of (n - 1)-connected graphs that satisfies Ar(,_1),21 [4].

Star graphs are interesting interconnection networks for parallel computation and communication. Like hy- percubes, star graphs possess rich structure and sym- metry properties as well as many desirable fault tol- erance characteristics. In addition, with regard to the important properties of node degree and diameter, star graphs are shown to be markedly superior. A number of efficient algorithms on star graphs, which exploit its versatility, have been reported [ 1,3-51. Further efforts for disjoint paths problems in star graphs have also been made by several researchers [3,4,7,9]. Dietzfel- binger and Sudborough proved that the n-dimensional star graphs G, (which is (n - l)-connected) satisfies property Ar(,_1)/21 [4]. They also gave an algorithm which finds the [(n - I)/21 disjoint paths of length at

0020-0190/98/$19.00 0 1998 Published by Elsevier Science B.V. All rights reserved. PII: SOO20-0190(98)00121-5

Page 2: An efficient algorithm for k-pairwise disjoint paths in star graphs

284 Q.-P Gu, S. Peng /Information Processing Letters 67 (1998) 283-287

most 4(n - 2) in O(n4 logn) time for the k-pairwise disjoint paths problem on G,. In this paper, we pro- pose an algorithm which finds the [(n - 1)/21 dis- joint paths of length at most d(Gn) + 5 in O(n2) opti- mal time, where d(Gn) = L3(n - 1)/2] is the diame- ter of G,.

2. Preliminaries

A path in a graph G is a sequence of edges of the form (~1, RX)(SZ~ ~3). . . (~-19 Q), si E G, 1 < i < k, and si # sj, i # j. We sometimes denote the path from st to Sk by sl -+ Sk. The length of a path is the number of edges in the path. For two nodes s and t in a graph, d(s, t) denote the distance between s and t, i.e., the length of the shortest path connecting s and t. The diameter of a graph G is defined as d(G) = max{d(s, t) 1 s, t E G}. For a path P = s1 += Sk, we also use P to denote the set (~1, . . . , Sk} of nodes that appear in path P. Paths P and Q are disjoint if P rl Q = 0. Two paths P and Q that share a common end node s are called disjoint if (P \ {s}) n (Q \ {s)) =

0, where set A \ B = {u I u E A, u 6 B}. An n-dimensional star graph is an undirected graph

G,, where the nodes of G, are in a l-l correspon- dence with the permutations (~1, ~2, . . . , p,) of the set (n) = {1,2,..., n}. Two nodes of G, are con- nected by an edge if and only if the permutation of one node can be obtained from the other by ex- changing the first symbol pl with the ith symbol pi, 2 < i < n. For node s = (pt, ~2,. . . , p,), di)

denotesthenode(Pi,P2,...,Pi-l,Pl,Pi+l,...,Pn), obtained by swapping p1 and pi. Similarly, ~(‘1,~2,...,~k) is the node obtained by swapping the first symbol and the ikth symbol of node s(~~,.,.,~~-I). Fig. 1 gives a G4. G, has n! nodes, and n! x (n - 1)/2 edges. It has uniform node degree n - 1 and diameter d(GJ = L3(n - 1)/2J. G,, is node and edge symmetric and is (n - I)-connected. We will view G, as a graph and assume that each node of G, can be identified in 0( 1) time.

Star graphs have a highly recursive structure. G, is made of n copies of G,-1. Consider the partition of nodes of G, into n mutually disjoint subsets &(r), 1 < r 6 n, where

w)={(PLP2~..., Pn-1, r> I Pj E in) \ Irl

forj#n, Pj#P~forj#~}.

Fig. 1. The 4dimensional star graph G4.

In G,,, the induced subgraphs of the set S,(r), 1 < r Q n, is each an (n - I)-dimensional star graph denoted as G,(r).

For a node s = (~1, ~2, . . . , ~~-1, r) E G,(r), we have s@) E Gn(pl) and sCiyn) E G,(pi), i E (n) \

{l,n}.WewillcallnodesaporttoG,(pl)andnode sci) a port to G, (pi). Each node s E G,(r) is a port to exactly one substar G,(pr). The set of nodes

C, (r, I) = {s 1 s E G,(r) and s@) E G,(I)}

is called the port-set of G,(r) to G, (1). Clearly, the nodes in G,(r) can be partitioned into n - 1 port-sets &@,I), 1 E (n) \ {r}, with lC,(~,l)l = (n - 2)! and c,(r,z)nc,(r,m)=0forZ#m.

The following properties of G, can be easily verified.

Lemma 1. For distinct nodes s1 and s2 in the same

port-set of a substar, d(sl, ~2) >, 3.

Lemma 2. There is no odd length cycle or no cycle of

length 4 in G,.

3. Algorithm for k-pairwise disjoint paths

To solve the k-pairwise disjoint paths problem in G,, we use the recursive structure of the star graph. As stated in the previous section, G, consists of n copies of substars of dimension n - 1. Our idea is to reduce the k-pairwise disjoint paths problem in G, to k node-to-node routing problems in k substars, one

Page 3: An efficient algorithm for k-pairwise disjoint paths in star graphs

Q.-t! Gu, S. Peng /Information Processing Letters 67 (1998) 283-287 285

Fig. 2. The n - 2 paths from s E G, (5) to Gn (4).

sub-problem in a substar. To realize the idea, we first find k destination substars G, (Zi) and 2k disjoint paths

si -+ gfi E G,(Zi) and ri + hl, E G,(f;). Then nodes gli and hli are connected in Gn(li) by a shortest path. The key of the algorithm is to find the disjoint paths si -+ gli and ti + hlj, and the following lemmas will play an important role for this purpose.

Lemma 3. Givens = (~1, ~2,. . . , p,) E G, and pj E

(n) \ (~1, p,}, there are n - 2 disjointpaths of length at

most 3 thatpass through substars G, (pn) and G,(pj)

only, and connects to n - 2 distinct nodes in Gn(pj).

Proof. The n - 2 disjoint paths are:

Pi 1 1

s + ,(i) + ,(i,j) + ,(i,j,n) E Gn(Pj) if i # j,

s + Sci) -ir S(i’n) E G,(‘j) ifi=j,

for2<i<n-1. 0

Example 1. Given s = (2,3,4,1,6,5) and p3 = 4,

the n - 2 paths are (see Fig. 2):

4 : s + d2) = (3,2,4,1,6,5)

+ s(~,~) = (4,2,3,1,6,5)

+ s(~,~,@ = (5,2,3, 1,6,4),

4 : s + sc3) = (4,3,2,1,6,5)

+ sc3.@ = (5,3,2,1,6,4),

P4:s+d4)=(1,3,4,2,6,5)

+ s(~,~) = (4,3, 1,2,6,5)

+ s(~,~,@ = (5,3, 1,2,6,4),

P~:s-+~(~)=(6,3,4,1,2,5)

-+ s(‘,~) = (4,3,6, 1,2,5)

+ s(‘,~,@ = (5,3,6, 1,2,4).

Lemma 4. Given s = (~1, . . . , pn) and a subgraph C c Gn(pn) with d(C) 6 2 and s 4 C, C can block

at most one of the n - 2 paths given in Lemma 3.

Proof. Without loss of generality, assume that

areanytwoofthepathsP2,...,P,-r.FromLemma2, d(#), &j)) 2 3. Since s(‘,j) and &j) are in the

same port-set, from Lemma 1

d(S (l&, ,(m,j)) 3 3 and d(s(19j?), ,(%j?)) 2 3.

In general, it is easy to see that for a node x E (Pl \ {s}) and a node y E (Pm \ is}), if x = s(l) and y = scm)

then d(x, y) = 2, otherwise d(x, y) 3 3. On the other

hand, for C with s $ C and d(C) 6 2, from Lemma 2, C cannot block both s(l) and s@). Thus, the lemma holds. •I

Now, we are ready to show the main result of the paper.

Theorem 5. Given k = [(n - 1)/21 pairs of distinct nodes(sl,tl),..., (Sk, tk) in G,,, k disjointpaths Si +

Ii, 1 < i < k, of length at most d (G,) + 5 can be found

in 0(n2) time.

Proof. We first assign k destination substars G,(li)

to the node pairs (sir ti) (1 6 i < k). Let V =

bl,...,Sk,tl,..., tk}. Call a substar a candidate of destination substars if it has at most one node of V or it has exactly one node pair. For a candidate which has the node pair (si, ri), we assign it as the destination substar G,(Ei) for (si, ti). For a candidate which has one node si (or ti), we assign it as the destination substar G,(li) for (s;, ti) (an arbitrary candidate is selected if both Si and ti reside in candidates). For each unassigned node pair (si, ti), we assign a candidate

which does not have any node of V as the destination substar G,(Zi). Since k = [(n - 1)/21, 1 VI < n and the k destination substars can be assigned as above.

Next, we find the disjoint paths si + gli E G,(Zi) and ti + hli E G,(Zi). We only show how to find the paths si -+ glj. Paths ti + hlj can be found similarly.

If si E G, (Z;) or s:’ E G, (Ii) then the path si + gji of length at most one can be found. Otherwise, we find

Page 4: An efficient algorithm for k-pairwise disjoint paths in star graphs

286 Q.-l? GM. S. Peng /Information Processing Letters 67 (1998) 283-287

a path si + gZi of length at most 3 by checking the n - 2 paths given in Lemma 3. Notice that the path

si + gZi should be disjoint with the paths sj + gZj and tj + hlj for j # i. However, it does not matter if

si + gii meets the path ti + hii_ Assume that si is in

G,(r). If G,(r) contains some node sj or tj (j # i) then the path sj + gZj (or tj + hlj) may block some of the n - 2 paths for si . Since the path sj + gZj has a segment of length at most 2 in G,(r), from Lemma 4 it can block at most one of the n - 2 paths for si. Therefore, if there are at most n - 3 such segments in

G,(P) then the path si + gZ, can be found. If G,(r) has at most n - 2 nodes of V then at most n - 3

segments may block the n - 2 paths for si.

Assume that G,(r) has n - 1 nodes of V. If 1 VI =

n - 1 then (n - 1) - 2 = n - 3 segments may block the n - 2 paths for si . If 1 VI = n then one node,

say tk, is not in G,(r) and for nodes Si (1 < i <

k - l), (n - 1) - 2 = n - 3 segments may block the n - 2 paths for si . However, there are n - 2 segments which may block the n - 2 paths for Sk. We use a different approach to find the path Sk + gg . For node pair (Sk, tk), we assign the substar which has tk as the

destination substar G, (Zk). To find the path Sk + gl, E

G,(Zk), we check sf’ . If SF) E G, (Zk) then we have

done; otherwise SF’ is in G,(j) which does not have

any node of V. We can connect sk (‘) to G,(Zk) by a

path of length 2. Therefore, a path sk + gl, of length 1 or 3 can be found. In the case that G,(r) has n - 1 nodes of V and 1 VI = n, we find Sk + glk first and then assign destination substars to (si, ti) so that the

substar G,(j) which has SF’ is not assigned. Now, we still need to find the paths Si + gZi and

ti + hli for the case that I VI = n and G,(r) has n

nodes of V. In this case, n - 2 segments may block

the n - 2 paths of Lemma 3 for every si. We use a different approach to find all the required paths. For nodes si , ti E V we first find disjoint paths si + s( and

ti -+ t: of length at most 2 such that one substar G,(m) (m#r)hastwonodesofV’={s; ,..., s;,t; ,..., tL}

and each of substars G,,(j) (j E (n) \ {r, m}) has exactly one node of V’. Since there are n - 1 port- sets in G,(r), there is a port-set C,, (r, m) that contains at least two nodes of V. Assume nodes u, v E V are in the same port-set C, (r, m). Connect u to u’ = u@) E G,(m) and u to v’ = @) E G,(m) by paths of length 1. Let J = (n) \ (r, m). For each j E J, if

Cn(r, j) fl V # 0 then choose an arbitrary node w of

Cn(r, j) n V and connect w to w’ = w@) E G,(j);

otherwise choose an arbitrary un-connected node x of

V, and connect x to its neighbor .xcij) E &(r, j) and

then to x’ = .~(~i*‘) E G,(j). Obviously, the n paths

si + s( E G,(j) and ti + t; E G,(j) (j E (n) \ {r})

are disjoint and have length at most 2.

For u’, V’ E G,(m), if u = si and v = ti then let U’ =

gZi, v’ = hli, and G,(m) = G,(Zi); otherwise, e.g.,

u = si and v = tj, i # j, we assign the substar which

contains ti as the destination substar G,, (Zi) for the pair

(si, ti), let ti = hl, , and connect si = u’ E G,(m) to

gZi E G,(Zi) by a path of length 2. The paths sj + gl,

and tj -+ hlj can be found similarly.

For each G,(j) (j E (n) \ {r, m)) which contains s:

or t:, we assign the substar which contains ti as the

destination substar for (si , ti), let t: = hli, and connect

sf to gli E G, (Zi) by a path of length 2.

Obviously the 2k paths si += gZ, and ti -+ hli (1 <

i < k) are disjoint. After this, gl, and hri can be

connected in G,(Zi) by a shortest path of length at

most d(G+t).

The above proof implies an algorithm to construct

the k paths si + ti. The length of the k paths is at

most

d(Gn-I) + 6 < d(G,d + 5.

It takes O(n,n) time to connect nr nodes of V in

G,(r) to destination substars. Finding the shortest

path gZj += hli takes O(n) time for each i. Thus, the

total time complexity of the algorithm is O(n*). q

Example 2. Let sl E CS(l, 2), S*, S3 E Cj(l, 6), tl c c(j(1,3), and t2, t3 E Cfj(1,4) (the case that [VI = n

and G, (1) has n nodes of V). The algorithm finds the

following paths for (sl, tl), (~2, tz), and (~3, t3) (see

Fig. 3).

Sl + Sr’ E G6(2) + g3 E G6(3),

tl + h E G6(%

s2 + SF’ E G6(6) + gfl E Gcj(5),

t2 -+ hs E Gd5)>

s3 + SF) E Grj(6) + g4 E Gfj(4),

t3 + hq E G6(4).

Page 5: An efficient algorithm for k-pairwise disjoint paths in star graphs

Q.-l? Gu, S. Peng /Information Processing Letters 67 (1998) 283-287 287

Fig. 3. The three disjoint paths in Gg.

4. Concluding remarks

Since the path si + ti may have length Q((n), it takes s2 (n*) time to construct the k disjoint paths in the worst case. From this, the time complexity O(n*) of our algorithm is optimal. A simple argument can show that lower bound on the length of the path si + ti

is d(Gn) + 1: Let u be the node with d(u, ti) = d(G,), si be a neighbor of U, and sj, tj (j # i) be the TZ - 2 neighbors other than u of si. Then the path si + ti

must pass through the node u and has length at least d( G,) + 1. The optimal upper bound of the path length for k-pairwise disjoint paths problem is open.

References

[l] S.B. Akers, B. Krishnamurthy, A group theoretic model for

symmetric interconnection networks, IEEE Trans. Comput. 38

(1989) 555-566.

[2] J.C. Bermond (Ed.), Interconnection networks, Discrete Appl. Math. (Special Issue) (1992).

[3] K. Day, A. Tripathi, A comparative study of topological

properties of hypercubes and star graphs, IEEE Trans. Parallel

Distrib. Systems 5 (1) (1994) 3 l-38.

[4] M. Dietzfelbmger, S. Madhavapeddy, LH. Sudborough, Three

disjoint path paradigms in star networks, in: Proc. IEEE

Symposium on Parallel and Distributed Processing, 1991,

pp. 400-406.

[5] F. Fragopoulou, S.G. Akl, Optimal communication algorithms

on star graphs using spanning tree constructions, J. Parallel

Distrib. Comput. 24 (1995) 55-71.

[6] M.R. Carey, D.S. Johnson, Computers and Intractability, A

Guide to the Theory of NP-Completeness, Freeman, New

York, 1979.

[7] Q. Gu, S. Peng, Node-to-node cluster fault tolerant routing in

star graphs, Inform. Process. Len. 56 (1995) 29-35.

[8] Q. Gu, S. Peng, k-pairwise cluster fault tolerant routing in

hypercubes, IEEE Trans. Comput. 46 (9) (1997) 1042-1049.

[9] Q. Gu, S. Peng, Node-to-set disjoint paths problem in star

graphs, Inform. Process. Lett. 62 (1997) 201-207.

[lo] D.F. Hsu, Interconnection networks and algorithms, Networks

(Special Issue) 23 (4) (1993). [ll] D.F. Hsu, On container with width and length in graphs,

groups, and networks, IEICE Trans. Fundamentals of Elec-

tronics, Information, and Computer Sciences E77-A (4) (1994)

668480.

[12] R.M. Karp, On the computational complexity of combinatorial

problems, Networks 5 (1975) 45-68.

[13] S. Madhavapeddy, I.H. Sudborough, A topological property of

hypercubes: Node disjoint paths, in: Proc. 2nd IEEE Symp. on

Parallel and Distributed Processing, 1990, pp. 532-539.

[14] Y. Shiloach, The two paths problem is polynomial, Technical

Report STAN-CS-78-654, Stanford University, 1978. [15] M. Watkin, On the existence of certain disjoint arcs in graphs,

Duke Math. J. (1968).