IEEE TRANSACTIONS ON COMPUTERS, VOL. 46, NO. 12, DECEMBER 1997
1293
Optimal Parallel Routing in Star Networks Chi-Chang Chen and Jianer Chen Abstract—Star networks have recently been proposed as attractive alternatives to the popular hypercube for interconnecting processors on a parallel computer. In this paper, we present an efficient algorithm that constructs an optimal parallel routing in star networks. Our result improves previous results for the problem. Index Terms—Network routing, star network, parallel routing, partition matching, graph container, shortest path.
—————————— ✦ ——————————
1 INTRODUCTION
T
star network [2] has received considerable attention recently by researchers as a graph model for interconnection network. It has been shown that it is an attractive alternative to the widely used hypercube model. Like the hypercube, the star network is vertex- and edge-symmetric, strongly hierarchical, and maximally fault tolerant. Moreover, it has a smaller diameter and degree while comparing with hypercube of comparable number of vertices. The rich structural properties of the star networks have been studied by many researchers. The n-star network Sn is a degree n - 1, (n - 1)-connected, and vertex symmetric Cayley graph [1], [2]. Jwo et al. [17] showed that the star networks are Hamiltonian. Qiu et al. [24] showed that the n-star network can be decomposed into (n - 1)! nodedisjoint paths of length n - 1, and can be decomposed into (n - 2)! node-disjoint cycles of length (n - 1)n. Results in embedding hypercubes into star networks have been obtained by Nigam et al. [22] and by Miller et al. [20]. Broadcasting on star networks has also been studied recently [3], [4], [14], [25]. Routing on star networks was first studied by Akers and Krishnamurthy [2], who derived a formula for the length of the shortest path between any two nodes in a star network and developed an efficient algorithm for constructing such a path. Recently, parallel routing, i.e., constructing nodedisjoint paths, on star networks has received much attention. Sur and Srimni [26] demonstrated that n - 1 nodedisjoint paths can be constructed between any two nodes in Sn in polynomial time. Dietzfelbinger et al. [11] derived an improved algorithm that constructs n - 1 node-disjoint paths of length bounded by four plus the diameter of Sn. The algorithm was further improved by Day and Tripathi [10], who developed an efficient algorithm that constructs n - 1 node-disjoint paths of length bounded by four plus the distance from u to v in Sn. The problem was also investigated by Jwo et al. [18]. Misic and Jovanovic [21] derived a HE
¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥
• C.-C. Chen is with the Department of Computer Science, Tatung Institute of Technology, Taipei 10451, Taiwan, Republic of China. E-mail:
[email protected]. • J. Chen is with the Department of Computer Science, Texas A&M University, College Station, TX 77843-3112. E-mail:
[email protected]. Manuscript received 5 May 1996; revised 5 Apr. 1997. For information on obtaining reprints of this article, please send e-mail to:
[email protected], and reference IEEECS Log Number 105669.
general algebraic expression for all (not necessarily nodedisjoint) shortest paths between any two nodes in Sn. Palis and Rajasekaran [23], Dietzfelbinger et al. [11], Qiu et al. [24], and Chen and Chen [9] have considered the problem of node-disjoint paths between two sets of nodes in a star network. In this paper, we will improve the previous results on node-to-node parallel routing in star networks by developing an efficient algorithm that constructs optimal parallel routing between any two nodes in a star network. Formally, let u and v be two nodes in the n-star network Sn. Following the conventions introduced in [15] (see also [16]), let d(u, v) denote the distance (i.e., the length of the shortest paths) between u and v in Sn. A container C(u, v) is a set of nodedisjoint paths between u and v in Sn. The width of C(u, v) is the number of paths in C(u, v), and the length of C(u, v) is the length of the longest path in C(u, v). The w-wide distance between the two nodes u and v, denoted dw(u, v), is the minimum length over all containers C(u, v) of width w. From the viewpoint of parallel routing, reliability, and fault tolerance in interconnection networks, it is desirable to construct containers of largest width and smallest length for any two given nodes u and v in the n-star network Sn. Since the n-star network Sn has degree n - 1 and is (n - 1)-vertexconnected, for any two nodes u and v in Sn, there is a container of width n - 1 but no container of width larger than n - 1. A parallel routing algorithm $ for the star networks constructs a container of width n - 1 between any two given nodes in the n-star network Sn. The parallel routing algorithm $ is optimal if for any two nodes u and v in Sn, the algorithm $ constructs a width n - 1 container of length dn-1(u, v) between u and v. The main result of the current paper is an O(n2 log n) time optimal parallel routing algorithm for the star networks. Our algorithm involves careful analysis on the lower bound on the (n - 1)-wide distance dn-1(u, v) between two nodes u and v in Sn, a nontrivial reduction from the parallel routing problem on star networks to a combinatorial problem called Partition Matching, a subtle solution to the Partition Matching problem, and a number of parallel routing algorithms on different kinds of pairs of nodes in a star network. The basic idea of the algorithm can be roughly described as follows. Let u and v be two nodes in the n-star network Sn. According to Day and Tripathi [10], the (n - 1)-wide distance
0018-9340/97/$10.00 © 1997 IEEE
1294
IEEE TRANSACTIONS ON COMPUTERS, VOL. 46, NO. 12, DECEMBER 1997
dn-1(u, v) is equal to d(u, v) + b, where b = 0, 2, or 4. We first derive a necessary and sufficient condition for a pair of nodes u and v to have the (n - 1)-wide distance dn-1(u, v) equal to d(u, v) + 4. For a pair u and v whose (n - 1)-wide distance is less than d(u, v) + 4, we develop an efficient algorithm that constructs a width n - 1 container of length d(u, v) + 2 between u and v. Finally, an efficient algorithm, which is obtained from a reduction of an efficient algorithm solving the Partition Matching problem, is developed that constructs a length-d(u, v) container of the maximum width between two given nodes u and v. Combining all these analyses and algorithms gives us an optimal parallel routing algorithm for the star networks. The running time of our algorithm is bounded by O(n2 log n). We point out that, in terms of the running time, our algorithm is also very efficient, as we can easily derive that any parallel routing algorithm for the star networks has running time at least as large as W(n2).
2 PRELIMINARY A permutation u = a1a2 an of the symbols 1, 2, º, n can be given by a product of disjoint cycles [5], which is called the cycle structure of the permutation. A cycle is nontrivial if it contains more than one symbol. Otherwise, the cycle is trivial. The cycle containing the symbol 1 will be called the primary cycle in the cycle structure. A p[1, i] transposition on the permutation u is to exchange the positions of the first symbol and the ith symbol in u: p[1, i](u) = aia2a3 ai-1a1ai+1 an. It is sometimes more convenient to write the transposition p[1, i](u) on u as p[ai](u) to indicate that the transposition exchanges the positions of the first symbol and the symbol ai in u. Let us consider how a transposition changes the cycle structure of a permutation. Write u in its cycle structure
4
94
u = a11 a1n 1 a21 a2 n 1
2
9 4a
k1
9
akn . k
05 4
94
2
1
3
9 4a
k 1 aknk
u = c1 cke1 em, where ci are nontrivial cycles and ej are trivial cycles. If we further let l =
k
Âi =1 ci , where |ci| de-
notes the number of symbols in the cycle ci, then the distance d(u) from the node u to the identity node e is given by the following formula [2]:
0 5 %&'ll ++ kk - 2
du =
if the primary cycle is a trivial cycle if the primary cycle is a nontrivial cycle
Combining this formula with the above discussion on the effect of applying a transposition on a permutation, we derive the following necessary rules for tracing a shortest path from the node u to the identity node e in the n-star network Sn: Shortest Path Rules
If ai is not in the primary cycle, then p[1, i] “merges” the cycle containing ai into the primary cycle. More precisely, suppose that ai = a21 (note that each cycle can be cyclically permuted and the order of the cycles is irrelevant), then the permutation p[1, i](u) will have the following cycle structure: p 1, i u = a21 a2 n a11 a1n 1 a31 a3 n
The n-dimensional star network (or simply the n-star network) Sn is an undirected graph consisting of n! nodes labeled with the n! permutations on symbols 1, 2, º, n. There is an edge between two nodes u and v in Sn if and only if there is a transposition p[1, i], 2 £ i £ n, such that p[1 ,i](u) = v. A path from a node u to a node v in the n-star network Sn corresponds to a sequence of applications of the transpositions p[1, i], 2 £ i £ n, starting from the permutation u and ending at the permutation v. Since the n-star network Sn is (n - 1)-vertex-connected [2] and every node in Sn is of degree n - 1, by Menger’s theorem [19], for any pair of nodes u and v in Sn, there is a width n - 1 container between u and v. Moreover, since the n-star network is vertex symmetric [2], a width n - 1 container between any two given nodes can be easily mapped to a width n - 1 container of the same length between a node and the identity node e in Sn. Therefore, we will concentrate on containers between a given node u and the identity node e. We will write d(u) and dn-1(u) for the distance d(u, e) and the (n - 1)-wide distance dn-1(u, e), resepctively. By definitions, we always have dn-1(u) ≥ d(u). Let u be a node in the n-star network with cycle structure
9.
Rule 1. If the primary cycle is a trivial cycle in u, then in the next node on any shortest path from u to e, a nontrivial cycle ci is merged into the primary cycle. This corresponds to applying transposition p[a] to u with a Œ ci; Rule 2. If the primary cycle c1 = ( a11a12 a1n a1n 1
nontrivial cycle in u, where a1n
1
+1
1
+1
) is a
= 1 , then, in the next
If ai is in the primary cycle, then p[1, i] “splits” the primary
node on any shortest path from u to e, either a nontrivial
cycle into two cycles. More precisely, suppose that ai = a1j,
cycle ci π c1 is merged into the primary cycle (this corre-
where 2 £ j £ n1 + 1 and we have let a1n + 1 = 1 (note that a11 1
sponds to applying transposition p[a] to u, where a Œ ci),
= a1 and we assume i > 1), then p[1, i](u) will have the following cycle structure:
or the symbol a11 is deleted from the primary cycle c1
05 4
94
94
p 1, i u = a11 aij -1 a1 j a1n 1 a21 a2 n 1
2
9 4a
k 1 aknk
9.
In particular, if ai = a12, then we say that the transposition p[1, i] “deletes” the symbol a11 from the primary cycle. Note that, if a symbol ai is in a trivial cycle in the cycle structure of the permutation u = a1a1 an, then the symbol is in its “correct” position, i.e., ai = i, and that, if a symbol is in a nontrivial cycle, then the symbol is not in its correct position. Denote by e the identity permutation e = 12 n, in which every symbol is in a trivial cycle.
(this corresponds to applying transposition p[a12] to u).
FACT 2.1. A shortest path from u to e in Sn is obtained by a sequence of applications of the Shortest Path Rules, starting from the permutation u. FACT 2.2. If a symbol a π 1 is in a trivial cycle in u, then a will stay in a trivial cycle in any node on a shortest path from u to e. FACT 2.3. If an edge [u, v] in Sn does not lead to a shortest path from u to e, then d(v) = d(u) + 1. Consequently, let P be a path from u to e in which exactly k edges do
CHEN AND CHEN: OPTIMAL PARALLEL ROUTING IN STAR NETWORKS
not follow the Shortest Path Rules, then the length of the path P is equal to d(u) + 2k. FACT 2.4 [10]. There are no cycles of odd length in the n-star network. Consequently, the length of any path from a node u to the node e is equal to d(u) plus an even number. Given a node u = c1 º cke1 º em in the n-star network Sn, where ci are nontrivial cycles and ej are trivial cycles, a shortest path from u to e can be constructed through the following two-stage process: 1) Merge in an arbitrary order each of the nontrivial cycles into the primary cycle. This will result in a node whose cycle structure has a single nontrivial cycle, which is the primary cycle. For example, suppose that c1 = ( a11 a1n 1) is the primary cycle in u and that 1
ci = ( ai1 ain ) , i = 2, º, k. Then, by applying the i
4a
transpositions p[a21], p[a31], º, p[ak1] in this order, we obtain a node with cycle structure
k 1 aknk ak - 11 ak - 1nk - 1
9
a21 a2 n a11 a1n 1 e1 em . (1) 2
1
2) Delete each of the symbols in the primary cycle until the node e is reached. For example, suppose that we start with the node with the cycle structure as described in (1), then we apply the transpositions p ak 2 , , p akn , p ak - 11 , , p ak -1n k
k -1
, ,
p a21 , , p a2 n , p a11 , , p a1n , p 1 , 2
1
in this order, to reach the node e. The above process will be called the Merge-Delete process. It is easy to verify, using the Shortest Path Rules, that the Merge-Delete process produces a shortest path from the node u to the node e in the n-star network Sn. The most important property of the Merge-Delete process is that in each node (except the node e) of the constructed shortest path, the primary cycle is of form ( a1n 1) , where a1n is fixed 1
1
for all nodes on the path. Parallel routing from a node u to e in Sn is particularly simple when the primary cycle in u is a trivial cycle [10], [18]. For completeness, we describe the routing process for this case here. Let u be such a node in Sn. For each symbol i, 2 £ i £ n, construct a path Pi as follows. The path Pi starts with the edge [u, p[i](u)] followed by a shortest path from the node p[i](u) to e, which is obtained by applying the Merge-Delete process starting from the node p[i](u). It is easy to verify that, if i is in a nontrivial cycle in u, then the path Pi has length d(u), and that, if i is in a trivial cycle in u, then the path Pi has length d(u) + 2. On the other hand, if any symbol i, 2 £ i £ n, is in a trivial cycle in u, then any path from u to e via p[i](u) has length at least d(u) + 2. Since the node u has degree n - 1, any width n - 1 container from u to e contains a path whose first edge is [u, p[i](u)]. This implies that the (n - 1)-wide distance dn-1(u) is at least d(u) + 2 if there is a symbol i in a trivial cycle in u, for 2 £ i £ n. Therefore, to show that the constructed paths Pi, 2 £ i £ n, constitute a width n - 1 container of length dn-1(u), we only
1295
need to prove that all these paths are node-disjoint. In fact, since the first edge on Pi is via p[i](u) and the subpath from p[i](u) to e on Pi follows the shortest path obtained by the Merge-Delete process, it is easy to verify that for each path Pi, there is a symbol bi Œ {2, º, n} uniquely associated with the path Pi, such that, for each interior node on the path Pi, the primary cycle is of the form ( bi 1). Therefore, no two of the n - 1 paths P1, º, Pn-1 can share a common interior node, and the paths Pi, 2 £ i £ n, are node-disjoint. This gives a width n - 1 container of length dn-1(u) from the node u to the identity node e. Therefore, throughout the rest of this paper, we discuss the parallel routing problem in the star networks based on the following assumption: ASSUMPTION 2.1. The node u in the n-star network Sn has cycle structure u = c1 cke1 em, where ci are nontrivial cycles and ej are trivial cycles, and the primary cycle c1 = (a1a2 ap 1) is a nontrivial cycle.
3 NODES WITH (n - 1)-WIDE DISTANCE d(u) + 4 Day and Tripathi [10] have developed a parallel routing algorithm, of running time O(n2), which constructs a width n - 1 container of length d(u) + 4 from a node u to the identity node e in the n-star network Sn. The basic idea of DayTripathi’s algorithm can be described as follows: For each symbol a Œ {2, º, n}, construct a path Pa in which nodes have their primary cycle of the form ( a1). Thus, the primary cycle structure distinguishes the path Pa from the other constructed paths. Let u = c1 cke1 em, c1 = (a1a2 ap1), be the node as described in Assumption 2.1. We describe the path Pa in three different cases. CASE 1. The symbol a is in a nontrivial cycle ci, for i > 1. Without loss of generality, let ci = (a¢ a¢¢a). In this case, the first four nodes on the path Pa are u1 = u, u2 = p[a¢](u1), u3 = p[1](u2), and u4 = p[a1](u3). The rest of the path Pa is constructed by applying the MergeDelete process, starting from the node u4. CASE 2. The symbol a is in a trivial cycle ej = (a). Then, the first four nodes on the path Pa are u1 = u, u2 = p[a](u1), u3 = p[1](u2), and u4 = p[a1](u3), and the rest of the path Pa is obtained by applying the Merge-Delete process starting from the node u4. CASE 3. The symbol a is in the cycle c1. Let a = aj, where 1 £ j £ p. Then, the first four nodes on the path Pa are u1 = u, u2 = p[aj+1](u1), u3 = p[1](u2), and u4 = p[a1](u3) (in case j = p, simply let u4 = u and discard the nodes u1, u2, and u3), and the rest of the path Pa is obtained by applying the Merge-Delete process starting from the node u4. It is easy to verify that, in each of the above three cases, the nodes u2 and u3 on the path Pa are not contained in any other constructed path Pa¢ for a¢ π a. It is also easy to check that the fourth node u4 on the path Pa contains a cycle of form ( a1). Since the Merge-Delete process keeps the cycle pattern ( a1) along the path Pa, we conclude that all these n - 1 constructed paths Pa, a Œ {2, º, n}, are node-disjoint. Finally, by examining each constructed path Pa, we find out
1296
IEEE TRANSACTIONS ON COMPUTERS, VOL. 46, NO. 12, DECEMBER 1997
that, at most, two edges on Pa do not follow the Shortest Path Rules. By Fact 2.3, the path Pa has length at most d(u) + 4. This completes the description of Day-Tripathi’s algorithm. Combining Day-Tripathi’s algorithm and Fact 2.4, we conclude that, for any node u in the n-star network Sn, the (n - 1)-wide distance dn-1(u) is equal to d(u) + bu, where bu = 0, 2, or 4. In this section, we derive a necessary and sufficient condition for a node u to have the (n - 1)-wide distance d(u) + 4. Let P be a path in Sn from u to e. We say that the path P leaves u with symbol a if the second node on P is p[a](u), and we say that the path P enters e with symbol a¢ if the node next to the last node e on P is p[a¢](e), which has a single nontrivial cycle (a¢1). LEMMA 3.1. Let u = c1 cke1 em, c1 = (a1a2 ap1), be the node in the n-star network Sn, as described in Assumption 2.1. Suppose that
%K &K '
-
k m > min 2 2 , 1 +
(K *
 ci )K . k
i=2
Then, the (n - 1)-wide distance dn-1(u) from the node u to the identity node e is at least d(u) + 4. PROOF. Assume that {P1, º, Pn-1} is a width n - 1 container of length bounded by d(u) + 2 from the node u to the identity node e. We show that, in this case, we must
J
have m £ min 2 k - 2 , 1 +
Âi = 2 ci L . First, note that for k
each symbol b that is in a trivial cycle in u, one of the paths P1, º, Pn-1 must leave u with b, and one of the paths P1, º, Pn-1 must enter e with b. Suppose that a path Pi leaves u with a symbol b in a trivial cycle in u. By the Shortest Path Rules, the node p[b](u) does not lead to a shortest path from u to e. By Fact 2.3, d(p[b](u)) = d(u) + 1. On the other hand, the length of Pi is bounded by d(u) + 2. Thus, starting from the node p[b](u), the path Pi must strictly follow the Shortest Path Rules. In particular, no node on the path Pi (including the node p[b](u)) can contain a cycle of form ( b¢1), where b¢ π ap and b¢ œ
i = 2 ci . This k
implies that the path Pi must enter e with a symbol in the set { ap }
i =2 ci . Since there are exactly m of the k
paths P1, º, Pn-1 leaving u with symbols in trivial cycles in u, and since all these paths are node-disjoint and must enter e with symbols in { ap }
i =2 k
ci , we
conclude that there are at least m different symbols in the set { ap }
i =2 ci . That is, m £ 1 + Âi = 2 ci . k
k
Now, again, consider the path Pi leaving u with a symbol b in a trivial cycle in u. Let ui be the first node on Pi in which the primary cycle is a trivial cycle. Note that ui π u and ui π p[b](u). Moreover, since the
nontrivial cycles in the node p[b](u) are c1¢ , c2 , , ck , where c1¢ = (ba1 ap 1) , and the path Pi strictly follows the Shortest Path Rules after the node p[b](u), every nontrivial cycle in the node ui is a cycle in the set {c2, º, ck}. Therefore, the node ui, hence, the path Pi, corresponds to a subset of the set {c2, º, ck}. Similarly, suppose that Ph is a path among P1, º, Pn-1 that enters e with a symbol b in a trivial cycle in u. Since, at node u, the symbol b is in a trivial cycle while, at node p[b](e) on the path Ph, the symbol b is in a nontrivial cycle, we can find two consecutive nodes uh and vh on the path Ph such that the symbol b is in a trivial cycle in the node uh while in a nontrivial cycle in the node vh. By Fact 2.2, the edge [uh, vh] on the path Ph does not follow the Shortest Path Rules. By our assumption, the length of the path Ph is bounded by d(u) + 2. We conclude that the subpaths of Ph from u to uh and from vh to e, respectively, must strictly follow the Shortest Path Rules. Note that, by our assumption on the nodes uh and vh, we must have vh = p[b](uh), and the symbols b and 1 are in the same cycle in the node vh. Since the node p[b](e) = (b 1) (we discard trivial cycles) is on the subpath of Ph from vh to e, in order to let the subpath of Ph from vh to e to strictly follow the Shortest Path Rules, the node vh must have a cycle of form (b 1). Consequently, the symbol 1 is in a trivial cycle in the node uh. Now, since the subpath of Ph from u to uh follows strictly the Shortest Path Rules, every nontrivial cycle in the node uh must be one of the nontrivial cycles c2, º, ck in the node u. This proves that the node uh, thus the path Ph, corresponds to a subset of the set {c2, º, ck}. As we have shown before, no path in P1, º, Pn-1 can both leave u with a symbol b and enter e with a symbol b¢, where b and b¢ are symbols in trivial cycles in the node u. Therefore, there are exactly 2m paths among P1, º, Pn-1 that either leave u or enter e with a symbol in a trivial cycle in u. Each of these 2m paths corresponds to a subset in the set {c2, º, ck}. Since all these paths are node-disjoint, we conclude that there are at least 2m different subsets of the set {c2, º, ck}. k-1 k-2 That is, 2 ≥ 2m, or equivalently, m £ 2 . Combined with Day-Tripathi’s algorithm, Lemma 3.1 provides a sufficient condition for a node u in the n-star network Sn to have (n - 1)-wide distance d(u) + 4. In the following, we show that this condition is also necessary. For this, we demonstrate that, when
%K &K '
-
k m £ min 2 2 , 1 +
(K *
 ci )K , k
i=2
we can always construct a width n - 1 container of length d(u) + 2 from the node u to the identity node e. We first make some conventions. We assume that n ≥ 3, since the parallel routing on an n-star network Sn for n £ 2 is trivial. Let c be a cycle, given in any fixed cyclic order. We will denote by [c] the sequence of the symbols in the cycle c. Therefore, ([c] a1 ap) is a cycle starting with the symbols
CHEN AND CHEN: OPTIMAL PARALLEL ROUTING IN STAR NETWORKS
in the cycle c followed by the symbols a1, º, ap. Recall that a cycle can be arbitrarily cyclically rotated, still resulting in the same cycle. In many cases, we will discard irrelevant trivial cycles in a cycle structure. Let u = c1 cke1 em, c1 = (a1a2 ap1), be the node in the n-star network Sn as described in Assumption 2.1, and sup-
J
Âi = 2 ci L . k
pose m £ min 2 k - 2 , 1 +
We describe our con-
struction in three different cases.
2a a a 17 Æ 2a a 17 Æ Æ 2a 17 Æ e , D
n -1
n-1
2
n-1
D
where Æ Æ stands for a sequence of transpositions that repeatedly deletes a symbol from the primary cycle. A path P2 leaving u with 1 and entering e with a1 is given by
2a a a 17 Æ 2a a a 7015 Æ 2a a Æ Æ 2 a 17 Æ e. n -1
1 2
n-1
1 2
2
7Æ
n - 1a1 1
D
1
For j = 3, º, n - 1, there is a path Pj leaving u with aj and entering e with aj-1, given by
4a a
9 Æ 4a a 94a a 19 Æ Æ Æ 4 a a 92 a 17 Æ Æ 4 a a 9015 Æ 4 a a 19 Æ Æ 4 a 19 Æ e. 1
j - 1a j an - 1 1
j -1
1
n-1
j
D
j -1
1
n -1
D
j -1
1
j -1
1
M
where Æ Æ stands for a sequence of transpositions that repeatedly merges a nontrivial cycle into the primary cycle. For j = 2, º, p, there is a path Pj leaving u with aj and entering e with aj-1, given by
4a a
9c c Æ 4a a 94a a 19c c Æ Æ 4 a a 9015c c Æ 4 a a 19c c Æ Æ Æ 4 c c a a 19 Æ Æ 4 a 19 Æ e. 1
j -1
It is easy to verify that each path Pj, j = 1, º, n - 1, has, at most, one edge that does not follow the Shortest Path Rules. Thus, all these constructed paths have length, at most, d(u) + 2. The path P1 keeps a cycle of form ( an-1 1). The path P2 keeps a cycle of form ( a1 1). For j = 3, º, n - 1, the first part of the path Pj keeps a distinguished cycle (a1 aj-1) and the second part of the path Pj keeps a cycle of form ( aj-1 1). Therefore, all these constructed paths are nodedisjoint. This gives, in this case, a width n - 1 container {P1, P2, º, Pn-1} of length bounded by d(u) + 2 from the node u to the identity node e. CASE II. The number k of nontrivial cycles in u is at least two, and the number m of trivial cycles in u is zero. In this case, the node u can be written as u = (a1 ap1)c2 ck. A path P1 leaving u with 1 and entering e with ap is given by
4a a 19c c Æ 4a a 9015c c Æ Æ Æ 4 a a 93 c c 18 Æ Æ Æ 4 a a 9015 Æ 4 a a 19 Æ Æ 4 a 19 Æ e , p
1
2
p
1
k
2
2
p
k
k
D
D
1
p
1
2
j -1
1
k
p
p
j
2
p
k
Æ
D
j -1
1
2
j -1
1
k
2
k
D
2
j -1
1
k
j -1
Note that this group of paths is constructed only when p ≥ 2. For each symbol a Œ
i =2 ci , there is a path Pa leaving u k
with a and entering e with a. Since each nontrivial cycle can be cyclically rotated and the order of the cycles c2, º, ck is irrelevant, we can assume, without loss of generality, that c2 = (aa¢ a¢¢). The path Pa is given by
4a a 192aa¢ a¢¢7c c Æ 4aa¢ a¢¢a a 19c c Æ Æ 4 aa¢ a¢¢a a 9015c c Æ 4 a¢ a¢¢a a a19c c Æ Æ Æ 4 c c a¢ a¢¢a a a19 Æ Æ 0 a15 Æ e. 1
3
p
1
p
1
k
3
3
p
1
k
M
p
k
3
k
D
3
1
k
p
It is again easy to verify that all these n - 1 paths are of length at most d(u) + 2 and node-disjoint. Thus, this gives, in this case, a width n - 1 container of length bounded by d(u) + 2 from the node u to the identity node e. CASE III. The number k of nontrivial cycles in u is at least two and the number m of trivial cycles in u is at least one. In this case, the node u can be written as u = (a1 ap1)c2 ck(b1) (bm), where (a1 ap1), c2, º, ck are nontrivial cycles and (b1), º, (bm) are trivial cycles. A path P1 leaving u with b1 and entering e with ap is constructed as follows:
4a a 19c c 2b 7 2b 7 Æ 4b a a 19c c 2b 7 2b 7 Æ Æ 4 c c b a a 19 Æ Æ 4 a 19 Æ e. 1
2
p
1
k
1 1
m
M
2
p
k
2
m
D
2
k
1 1
p
p
A path P1¢ leaving u with a2 and entering e with b1 is given by
4a a a 19c c 2b 7 2b 7 Æ 4a a 19c c 2b 7 2b 7 Æ Æ 015c c 2b 7 2b 7 Æ 2b 17c c Æ Æ Æ 3 c c b 18 Æ Æ 2b 17 Æ e. 1 2
p
2
k
1
m
2
2
k
1
m
1
p
2
k
1
m
D
M
2
k
D
2
k
1
1
If p = 1, then the above constructed path P1¢ leaves u with the symbol 1 and enters e with b1. For each i, i = 2, º, m, we construct two paths Pi and Pi¢ as follows: First, mark all symbols in
M
1
j - 1a j ap 1
M
CASE I. The number k of nontrivial cycles in u is equal to 1. k-2 By the condition m £ 2 , we obtain m = 0. Therefore, the cycle structure of the node u consists of a single (nontrivial) cycle u = (a1 an-1 1). Note that the unique cycle in u contains at least three symbols, since n ≥ 3. The n - 1 nodedisjoint paths from u to e are given as follows: A path P1 leaving u with a2 and entering e with an-1 is given by 1 2
1297
i =2 ci k
as “unused,”
and mark all subsets of the set S = {c2, º, ck} as “unused”. Then, for each i = 2, º, m, pick an unused symbol ai¢ in
i =2 ci and an unused subset Si = Jc20i5. , ch0i5L from the set k
i
S = {c2, º, ck}, such that Si π S and ai¢ is contained in a cycle
1298
IEEE TRANSACTIONS ON COMPUTERS, VOL. 46, NO. 12, DECEMBER 1997
J 05
0i 5
i
in the subset Si. Let ch + 1 , , ck i
L = S - S . Without loss of i
generality, we assume that the cycle ch0 5 contains the symi
bol ai¢ : ch0 5 = ( ai¢a¢ a¢¢) . The path Pi leaves u with ai¢ and i
i
If the cycle c1 = (a1 ap 1) contains more than two symbols, i.e., p ≥ 2, then we also construct the following p - 1 paths Q2, º, Qp. The path Q2 leaves u with the symbol 1 and enters e with a1:
4a a a 19c c Æ 4a a a 9015c c Æ 4a a a 19c c Æ Æ 4 c c a a a 19 Æ Æ Æ 2 a 17 Æ e ,
i
1 2
enters e with bi, and is given by
4a a 19c c 2b 7 2b 7 = 4a a 19c0 5 c0 5c0 5 c0 5 2b 7 2b 7 Æ 4 a¢a¢ a¢¢a a 19c0 5 c0 5 c0 5 05 05 0 5 a¢a¢ a¢¢a a 1 c 2b 7 2b 7 Æ Æ c c 0 5 c 0 5 2 b 7 2 b 7 Æ Æ a 1 c 0 5 c 0 5 2b 7 c 4 9 0 5 0 5 2b 7 Æ 015c c 2b 7 2b 7 Æ 2b 17c0 5 c0 5 Æ 0 5 c0 5 b 1 Æ Æ 2b 17 Æ e , Æ Æ c p
1
i k
2
1
m
1
k
m
1
i
M
i k
1
i hi + 1
i 2
p
i 2
m
i hi - 1
D
i k
m
1
m
i hi + 1
i k
M
i hi + 1
i hi
m
i hi + 1
1
i
i k
1
i hi + 1
i
p
i k
D
i k
i
i
and the path Pi¢ leaves u with bi and enters e with ai¢ , and is given by
4a a 19c c 2b 7 2b 7 = 4a a 19c0 5 c0 5c0 5 c0 5 2b 7 2b 7 Æ 4b a a 19c0 5 c0 5c0 5 c0 5 Æ Æ c0 5 c0 5 b a a 1 c0 5 c0 5 Æ Æ 015c0 5 c0 5 Æ 2a¢ a¢¢a¢17c0 5 c0 5 Æ Æ c0 5 c0 5 a¢ a¢¢a¢1 Æ Æ 2 a¢17 Æ e. 05 05 Now, mark the symbol a¢ and the subsets Jc , , c L and Jc0 5 , , c0 5L of the set {c , º, c } as “used.” p
1
i k
2
1
k
i 1
m
i hi + 1
i k
i 1
i 2
i
m
1
p
i 2
p
i 2
i hi
i hi
i hi + 1
i 2
i hi + 1
M
i k
D
i hi
M
i hi - 1
i 2
p
1
i 2
i hi
i hi - 1
i
D
i
i 2
i
i hi +1
i k
2
i hi
k
We must justify that the construction of the paths Pi and Pi¢ is always possible. Since m £ 1 + least m - 1 symbols in
k
Âi = 2 ci , there are at
i =2 ci . Therefore, for each i, i = 2, k
º, m, we should always be able to find an unused symbol ai¢ in
i =2 ci . Now, fix the symbol ai¢ . There are 2 k
k-2
- 1 dif-
ferent subsets S¢ of the set S = {c2, º, ck}, such that S¢ π S k-2
and a cycle in S¢ contains the symbol ai¢ . Since m £ 2 , at least one of such subsets has not been used for constructing the previous paths Pj and Pj¢ , j = 2, º, i - 1 (note that, in the
J16 j
1 j6
two subsets c2 , , ch
j
L and Jc1 6
j h j +1 ,
1 j6
, ck
L used for the
paths Pj and Pj¢ , only one of them has a cycle containing the symbol ai¢ ). Also note that, if S¢ is an unused subset of S, then S - S¢ is also an unused subset of S. Therefore, we are always able to find an unused subset Si of S such that Si π S
2
1 2
k
p
2
k
M
2
p 1
2
2
k
2
k
p 1
D
i i hi - 1 hi + 1
i hi + 1
p
1
i 2
p
1
p
1
and for j = 3, º, p, the path Qj leaves u with aj and enters e with aj-1:
4a a
9c c Æ 4a a 94a a 19c c Æ Æ 4 a a 9015c c Æ 4 a a 19c c Æ Æ Æ 4 c c a a 19 Æ Æ 4 a 19 Æ e. 1
j - 1a j ap 1
2
j -1
1
k
j
2
p
k
Æ
D
j -1
1
2
j -1
1
k
M
2
k
D
2
k
j -1
1
j -1
Finally, for each symbol a in
i =2 ci k
that is not used in
constructing the paths Pi and Pi¢ , i = 2, º, m, we construct a path Pa leaving u with a and entering e with a. Without loss of generality, let the symbol a be in the cycle c2: c2 = (aa¢ a¢¢).
4a a 192aa¢ a¢¢7c c Æ 4aa¢ a¢¢a a 19c c Æ Æ 4 aa¢ a¢¢a a 9015c c Æ 4 a¢ a¢¢a a a19c c Æ Æ 4 c c a¢ a¢¢a a a19 Æ Æ Æ 0 a15 Æ e. 1
p
3
1
p
1
k
3
p
1
k
M
3
p
k
3
k
D
3
1
k
p
The above process constructs n - 1 paths from the node u to e. It is easy to verify that each of the constructed paths has at most one edge that does not follow the Shortest Path Rules. By Fact 2.3, all these n - 1 paths are of length, at most, d(u) + 2. What remains is to show that all these paths are node-disjoint. On each of the constructed paths, the nodes have a special cycle pattern to ensure that the path is node-disjoint from the other paths. 1) Path P1 consists of two parts of different format: Each node in the first part has a cycle of form ( b1a1 ap1), and each node in the second part has a single nontrivial cycle of form ( ap1), where the symbol ap is uniquely associated with the path P1; 2) Path P1¢ consists of two parts of different format: Each node in the first part has a cycle structure of form ( 1)c2 ck, and each node in the second part has a cycle of form ( b11), where the symbol b1 is uniquely associated with the path P1¢ ; 3) Path Pi, i = 2, º, m, consists of three parts of different format: Each node in the first part has a cycle of form ( ai¢a¢ a¢¢a1 ap 1) , each node in the second part has
and a cycle in Si contains the symbol ai¢ . This ensures the
a cycle structure of form ( 1)ch( i )+ 1 ck( i ) , where the
possibility of the construction of the paths Pi and Pi¢ , for all
subset
i = 2, º, m.
0i 5 c
J
hi +1
0i 5 , , c k
i
L is uniquely associated with the
CHEN AND CHEN: OPTIMAL PARALLEL ROUTING IN STAR NETWORKS
path Pi, and each node in the third part has a cycle of form ( bi1), where the symbol bi is uniquely associated with the path Pi. Note that the assumption Si π S is necessary here—otherwise, the path Pi would enter e with the symbol ap and would share a common interior node with path P1; Similarly, path Pi¢ , i = 2, º m, consists of three parts of different format: Each node in the first part has a
1299
To construct the paths Pi and Pi¢ , we need to find an unused symbol ai¢ . The symbol ai¢ can be simply found in time O(n) if we keep a record for each symbol to indicate whether it has been used. Once the symbol ai¢ is decided, we need to find an unused subset Si of the set S = {c2, º, ck}. For this, suppose that the symbol ai¢ is in cycle c¢. We pick arbitrarily another r = log m cycles c1¢ , , cr¢ from the set S (note
cycle of form ( bia1 ap1), each node in the second
that, by our assumption, log m + 2 £ k). Now, instead of using the set S, we use the set S0 = {c ¢ , c1¢ , , cr¢ } .
part has cycle structure of form ( 1)c2( i ) ch( i ) , where
Since the set S0 has 2 - 1 ≥ m - 1 subsets S¢, such that
i
the subset
Jc0 5 , , c0 5L is uniquely associated with i 2
i hi
the path Pi¢ , and each node in the third part has a cycle of form ( ai¢1) , where the symbol ai¢ is uniquely associated with the path Pi¢ . Again, here, the condition Si π S is necessary—otherwise, the third node of the path Pi¢ would be the node u again and the path Pi¢ would then leave u with the symbol a2 and share an interior node with the path P1¢ . 4) The second node of the path Q2 has a distinguished cycle (a1 ap), and the rest of the nodes in the path Q2 have a cycle of form ( a11), where the symbol a1 is uniquely associated with the path Q2; 5) The path Qj, j = 3, º, p, consists of two parts of different format: Each node in the first part has a distinguished cycle (a1 aj-1), and each node in the second part has a cycle of form ( aj-11), where the symbol aj-1 is uniquely associated with the path Qj; 6) For each symbol a that is not used in the paths Pi and
r
S¢ π S0, and the cycle c¢ is in S¢, at least one of these r
subsets has not been used. These 2 - 1 subsets of S0 can be enumerated in a systematic manner in time r O(r 2 ) = O(m log m) = O(n log n), since each such subset contains, at most, r = O(log m) cycles. Now, an unused subset of S0 is also an unused subset of S, with which we can construct the paths Pi and Pi¢ in time O(n). In conclusion, the paths Pi and Pi¢ can be constructed in time O(n log n) for each i = 2, º, m. Since m £ n, the total time needed to construct the paths Pi and 2
Pi¢ , for all i = 2, º, m, is bounded by O(n log n). In conclusion, the width n - 1 container of length bounded by d(u) + 2 from the node u to the identity node e can be constructed in time O(n2 log n). Combining Lemma 3.1 and Lemma 3.2, we obtain immediately the following theorem. THEOREM 3.3. Let u = c1 cke1 em, c1 = (a1a2 ap1), be the
Pi¢ , i = 2, º, m, the second node in the path Pa has a
node in the n-star network Sn as described in Assump-
cycle (aa¢ a¢¢a1 ap1), the third node in the path Pa
tion 2.1. The (n - 1)-wide distance dn-1(u) from the node u
has a cycle (aa¢ a¢¢a1 ap), and the rest of the nodes
to the identity node e is d(u) + 4 if and only if
in Pa have a cycle of form ( a1), where the symbol a
m > min 2 k - 2 , 1 +
is uniquely associated with the path Pa. Therefore, all these n - 1 constructed paths are nodedisjoint. Summarizing all the above discussions, we obtain the following lemma. LEMMA 3.2. Let u = c1 cke1 em, c1 = (a1a2 ap1), be the node in the n-star network Sn as described in Assumption
J
2.1. If m £ min 2 k - 2 , 1 +
Âi = 2 ci L , then a width n - 1 k
container of length bounded by d(u) + 2 from u to e can be 2
constructed in time O(n log n). PROOF. The construction of the width n - 1 container of length bounded by d(u) + 2 from u to e has been given in the above discussion. For each P of the paths P1, P1¢ , Qj, j = 2, º, p, and Pa, where a is a symbol in
i =2 ci k
that is not used in
the construction of the paths Pi and Pi¢ , i = 2, º, m, the construction of P can be obviously implemented in time O(n). (Note that, according to [2], d(u) = O(n).)
J
Âi = 2 ci L . k
4 CONSTRUCTING LENGTH-d(u) CONTAINERS OF MAXIMUM WIDTH Theorem 3.3, together with Day and Tripathi’s algorithm [10], shows that, when the (n - 1)-wide distance dn-1(u) from a node u to the identity node e is equal to d(u) + 4, a width n - 1 container of length dn-1(u) from u to e can be constructed in time O(n2). Now, suppose dn-1(u) < d(u) + 4. Then, by Fact 2.4, we have dn-1(u) = d(u) + 2 or dn-1(u) = d(u). In case dn-1(u) = d(u) + 2, Lemma 3.2 claims that a width n - 1 container of length dn-1(u) from u to e can be constructed in time O(n2 log n). Therefore, what remains is how we can tell whether dn-1(u) = d(u) and, in case dn-1(u) = d(u), how we can construct a width n - 1 container of length d(u).
1300
IEEE TRANSACTIONS ON COMPUTERS, VOL. 46, NO. 12, DECEMBER 1997
We approach these problems from a dual version. That is, we fix the container length d(u), and consider how a length-d(u) container of the maximum width from u to e can be constructed. It is easy to see that the length-d(u) container of the maximum width has width n - 1 if and only if the (n - 1)-wide distance dn-1(u) is equal to d(u). This problem is closely related to a combinatorial problem, called Maximum Partition Matching, formulated as follows:
node on Pi such that in ui the primary cycle is a trivial cycle. The node ui is obtained by repeatedly applying Rule 2 of the Shortest Path Rules, starting from the node u. It is easy to prove, by induction, that, in any node v on the subpath from u to ui on the path Pi, the only possible nontrivial cycle that is not in {c2, º, ck} is the primary cycle. In particular, the node ui must have a cycle structure of the form ui = c1¢ ck¢ e1¢ = em ¢ , i
Let 6 = {C1, C2, º, Ck} be a collection of subsets of the universal set U = {1, 2, º, n} such that
i =1 k
i
where ci¢ are nontrivial cycles, e ¢j are trivial cycles, and %i = {c1¢ , , ck¢ } is a subcollection of the collec-
Ci = U ,
i
and Ci > Cj = f for all i π j. A partition matching (of or-
tion 6 = {c2, º, ck}.
der m) of 6 consists of two ordered subsets L = {a1, a2,
Assume that the path Pi leaves u with the symbol
º, am} and R = {b1, b2, º, bm} of m elements of U (the subsets L and R may not be disjoint), together with a
bi. By Rule 2 in the Shortest Path Rules, bi is either a2 or one of the symbols in
sequence of m distinct partitions of 6: ($1, %1), ($2, %2),
in the path Pi, it will stay in the primary cycle in the
tained in a subset in the collection $i and bi is con-
nodes along the path Pi until it is deleted from the pri-
tained in a subset in the collection %i. The Maximum Partition Matching problem is to construct a partition matching of order m for a given collection 6 with m maximized.
mary cycle, i.e., until bi is contained in a trivial cycle. In particular, the symbol bi is not in the set
THEOREM 4.1. The Maximum Partition Matching problem is solvable in time O(n2 log n). PROOF. An O(n2 log n) time algorithm has been developed in [7] that, given a collection 6 of subsets in U = {1, 2, º, n}, constructs a maximum partition matching of 6. We refer our readers to [7] (and [6]) for details. Now we show how Theorem 4.1 can be used to construct a length-d(u) container of the maximum width from the node u to the identity node e in the n-star network Sn. LEMMA 4.2. Let u = c1 cke1 em, c1 = (a1a2 ap1), be the node in the n-star network Sn, as described in Assumption 2.1. Then, the width of any length-d(u) container from u to k
Âi = 2 ci .
PROOF. According to Rule 2 of the Shortest Path Rules, only the path leaving u with a symbol in the set {a2 }
i = 2 ci
can be a shortest path (of length d(u)) from u to e.
k
rule, once bi is contained in the primary cycle in a node
º, ($m, %m), such that, for all i = 1, º, m, ai is con-
e is bounded by 1 +
i =2 ci . Moreover, also by this
k
Another upper bound on the width of a length-d(u) container from u to e can be derived in terms of the maximum partition matching of the collection 6 = {c2, º, ck} of nontrivial cycles in u, where each nontrivial cycle is regarded as a set of symbols. LEMMA 4.3. Let u = c1 cke1 em, c1 = (a1a2 ap1), be the node in the n-star network Sn, as described in Assumption 2.1. Then, the width of a length-d(u) container from u to e is bounded by two plus the number of partitions in a maximum partition matching in the collection 6 = {c2, º, ck}, where the cycles ci are regarded as sets of symbols. PROOF. Let {P1, º, Ps} be a container of length d(u) from u to e, where P1, º, Ps are all shortest paths of length d(u) from u to e. For each shortest path Pi, let ui be the first
j =1 c¢j . ki
Now, suppose that the path Pi enters the node e with a symbol qi. Thus, the node wi before e on the path Pi must have a cycle structure (qi1) if we discard trivial cycles in wi. Since the symbol qi is in a nontrivial cycle in wi, by Fact 2.2, qi is also in a nontrivial cycle in the node ui, that is, qi Œ
j =1 c¢j . The only exki
ception is qi = ap (in this case, ui = e). Now, we let $i = 6 - %i. Then, we can conclude that, except for, at most, two paths P1 and P2, each Pi, i ≥ 3, of the other paths P3, º, Ps must leave the node u with a symbol bi in $i and enter e with a symbol qi in %i. (The two exceptional paths P1 and P2 may leave u with the symbol a2 or enter e with the symbol ap.) Now, since the s paths P1, º, Ps are node-disjoint, the symbols b3, º, bs are all pairwise distinct, and the symbols q3, º, qs are also pairwise distinct. Moreover, since all nodes u3, º, us are pairwise distinct, the collections %3, º, %s of cycles are also pairwise distinct. Consequently, the partitions ($3, %3), º, ($s, %s) of the collection 6 = {c2, º, ck}, together with the symbol sets {b3, º, bs} and {q3, º, qs}, form a partition matching of the collection 6. This concludes that s cannot be larger than two plus the number of partitions in a maximum partition matching of the collection 6 = {c2, º, ck}, thus proving the lemma. Now we show how we construct a length-d(u) container of the maximum width from the node u = c1 cke1 em, c1 = (a1 ap1), as described in Assumption 2.1, to the identity node e in the n-star network Sn. We first show how to route a single shortest path of length d(u) from u to e, given
CHEN AND CHEN: OPTIMAL PARALLEL ROUTING IN STAR NETWORKS
Algorithm. SINGLE ROUTING A partition ($, %) of 6 = {c2, º, ck}, and two symbols b and q, where b is in a cycle in $ and q is in a cycle in %. b can be a2 with $ = f, and q can be ap with % = f. OUTPUT: A shortest path of length d(u) from u to e leaving u with b and entering e with q. 1. if b π a2 apply p[b] to u to merge the cycle in $ that contains b into the primary cycle c1; then merge in an arbitrary order the rest of the cycles in $ into the primary cycle; 2. repeatedly delete symbols in the primary cycle until the primary cycle becomes a trivial cycle; 3. if q π ap suppose that the cycle c containing q in % is c = (q¢ q). Apply p[q¢] to merge c into the primary cycle (1); then; merge in an arbitrary order the rest of the cycles in % into the primary cycle; 4. repeatedly delete symbols in the primary cycle until reach the node e. INPUT:
Fig. 1. The algorithm SINGLE ROUTING.
cycle in %. We also allow b to be a2—in this case, q must be
i =2 ci and $ = f, and % = 6. Similarly, we allow q to be k ap—in this case b must be in ci and % = f, and $ = 6. i =2 k
Consider the algorithm SINGLE ROUTING given in Fig. 1. Since the algorithm SINGLE ROUTING starts with the node u and applies only transpositions described in the Shortest Path Rules, we conclude that the algorithm SINGLE ROUTING constructs a shortest path of length d(u) from the node u to the identity node e. Now, we are ready for describing our algorithm that constructs a length-d(u) container of the maximum width. Consider the algorithm MAXIMUM SHORTEST ROUTING given in Fig. 2. THEOREM 4.4. The algorithm MAXIMUM SHORTEST ROUTING constructs a length-d(u) container of the maximum width from the node u to the identity node e in time O(n2 log n). PROOF. From Lemma 4.2 and Lemma 4.3, we know that the number of shortest paths constructed by the algorithm MAXIMUM SHORTEST ROUTING is at least as large as the width of a length-d(u) container of the maximum width from u to e. What remains is to show that all these paths are node-disjoint. Suppose that the algorithm MAXIMUM SHORTEST ROUTING constructs h shortest paths P1, P2, º, Ph from node u to node e, here, h = s + 1 or h = s + 2, depending on whether s =
k
Âi = 2 ci ,
Algorithm. MAXIMUM SHORTEST ROUTING The node u in the n-star network Sn, as described in Assumption 2.1. OUTPUT: A length-d(u) container of the maximum width from u to e. 1. Construct a maximum partition matching M[(b1, q1), º, (bs, qs)] in 6 = {c2, º, ck} with the partitions ($1, %1), º, ($s, %s) of 6; INPUT:
2. if s =
Â
k
i=2
ci then construct s + 1 node-disjoint shortest
paths as follows. 2.1. Call the algorithm SINGLE ROUTING with the partition (f, 6) of 6 and the symbol pair (a2, q1); 2.2. Call the algorithm SINGLE ROUTING with the partition (6, f) of 6 and the symbol pair (b1, ap); 2.3. For i = 2 to s, call the algorithm SINGLE ROUTING with the partition ($i, %i) of 6 and the symbol pair (bi, qi); 3. if s
min 2
k-2
, 1+
Â
k i=2
ci
L
use Day and Tripathi’s algorithm [10] to construct a width n - 1 container of length dn-1(u) = d(u) + 4; STOP
J
3. case 2 m £ min 2
k-2
, 1+
Â
k i=2
ci
L
apply the algorithm MAXIMUM SHORTEST Routing to construct a length-d(u) container C(u, e) of the maximum width from u to e; if the container C(u, e) has width n - 1 then return C(u, e), which is a width n - 1 container of length dn-1(u) = d(u) else apply the algorithm in Lemma 3.2 to construct a width n - 1 container of length dn-1(u) = d(u) + 2 Fig. 3. The algorithm OPTIMAL PARALLEL ROUTING.
Construction of length-d(u) containers of the maximum width between two nodes in the star networks was previously studied in [18], which presents an algorithm that runs in exponential time in the worst case. More seriously, the algorithm seems based on an incorrect observation, which claims that when there are more than one nontrivial cycles in a node u, the width of a length-d(u) container of the maximum width from u to e is always an even number. Therefore, the algorithm in [18] always produces a lengthd(u) container of an even width from u to e. A counterexample to this observation has been constructed in [6].
5 CONCLUSION: AN OPTIMAL PARALLEL ROUTING ALGORITHM Combining all the previous discussion in the present paper, we obtain an O(n2 log n) time algorithm, OPTIMAL PARALLEL ROUTING, as shown in Fig. 3, which constructs a width n - 1 container of length dn-1(u) from any node u to the identity node e in the n-star network Sn. The correctness of the algorithm OPTIMAL PARALLEL ROUTING has been proved by Lemma 3.1, Lemma 3.2, Theorem 4.4, and the results in [10]. Since each subroutine in the algorithm has running time bounded by O(n2 log n), the total running time of the algorithm is bounded by O(n2 log n). We would like to make a few remarks on the complexity of our algorithm. The problem of minimizing the length and maximizing the width of containers in a general graph is NP-hard (see [13] and [12]) (the problem is called the MAXIMUM LENGTH-BOUNDED DISJOINT PATHS problem in [13]). Thus, it is very unlikely that the problem can be solved in time polynomial in the size of the input graph. On the other hand, our algorithm solves the problem in time O(n2 log n) on the n-star network Sn. Note that the n-star network Sn has n! nodes. Therefore, the running time of our algorithm is actually a polynomial of the logarithm of the size of the input star network. Moreover, one may not expect
CHEN AND CHEN: OPTIMAL PARALLEL ROUTING IN STAR NETWORKS
to significantly improve the running time of the algorithm, since the following lower bound can be easily observed— the distance d(u) from a node u to the identity node e can be as large as Î3(n - 1)/2˚ (see [2]). Thus, constructing n - 1 node-disjoint paths from u to e takes time at least Q(n2) in the worst case.
ACKNOWLEDGMENTS The authors are grateful to Professor Jonathan Gross for informing them of the recent discovery by Galil and Yu on graph containers [12]. The authors also thank Professors Laxmi Bhuyan, Don Friesen, Mi Lu, and Dr. Xiangdong Yu for their comments and discussion, and thank Professor Frank Hsu for his help and encouragement. Finally, the authors express their sincere thanks to the referees, whose critical comments and suggestions have been important for significantly improving the presentation of the paper. ChiChang Chen’s research was supported in part by an Engineering Excellence Award from Texas A&M University. Jianer Chen’s research was supported in part by the U.S. National Science Foundation under Grants CCR-9110824 and CCR-9613805.
1303
[16] D.F. Hsu and T. Luczak, “On the k-Diameter of k-Regular kConnected Graphs,” Discrete Mathematics, vol. 133, pp. 291-296, 1994. [17] J. Jwo, S. Lakshmivarahan, and S.K. Dhall, “Embedding of Cycles and Grides in Star Graphs,” Proc. Second IEEE Symp. Parallel and Distributed Processing, pp. 540-547, 1991. [18] J. Jwo, S. Lakshmivarahan, and S.K. Dhall, “Characteristics of Node Disjoint (Parallel) Path in Star Graphs,” Proc. Fifth Int’l Parallel Processing Symp., pp. 404-409, 1991. [19] K. Menger, “Zur allgemeinen kurventheorie,” Fundamentals Math., vol. 10, pp. 96-115, 1927. [20] Z. Miller, D. Pritikin, and I.H. Sudborough, “Near Embeddings of Hypercubes into Cayley Graphs on the Symmetric Group,” IEEE Trans. Computers, vol. 43, pp. 13-22, 1994. [21] J. Misic and Z. Jovanovic, “Routing Function and Deadlock Avoidance in a Star Graph Interconnection Network,” J. Parallel and Distributed Computing, vol. 22, pp. 216-228, 1994. [22] M. Nigam, S. Sahni, and B. Krishnamurthy, “Embedding Hamiltonians and Hypercubes in Star Interconnection Graphs,” Proc. Int’l Conf. Parallel Processing, pp. 340-343, 1990. [23] M.A. Palis and S. Rajasekaran, “Packet Routing and PRAM Emulation on Star Graphs and Leveled Networks,” J. Parallel and Distributed Computing, vol. 20, pp. 145-157, 1994. [24] K. Qiu, S.G. Akl, and H. Meijer, “On Some Properties and Algorithms for the Star and Pancake Interconnection Networks,” J. Parallel and Distributed Computing, vol. 22, pp. 16-25, 1994. [25] J. Sheu, C. Wu, and T. Chen, “An Optimal Broadcasting Algorithm without Message Redundancy in Star Graphs,” IEEE Trans. Parallel and Distributed Systems, vol. 6, pp. 653-658, 1995. [26] S. Sur and P.K. Srimani, “Topological Properties of Star Graphs,” Computers and Math. Applications, vol. 25, pp. 87-98, 1993.
REFERENCES [1] [2] [3] [4] [5] [6] [7] [8]
[9] [10] [11] [12] [13] [14] [15]
S.B. Akers, D. Harel, and B. Krishnamurthy, “The Star Graph: An Attractive Alternative to the n-Cube,” Proc. Int’l Conf. Parallel Processing, pp. 393-400, 1987. S.B. Akers and B. Krishnamurthy, “A Group-Theoretic Model for Symmetric Interconnection Networks,” IEEE Trans. Computers, vol. 38, pp. 555-565, 1989. N. Bagherzadeh, M. Dowd, and S. Latifi, “A Well-Behaved Enumeration of Star Graphs,” IEEE Trans. Parallel and Distributed Systems, vol. 6, pp. 531-535, 1995. N. Bagherzadeh, N. Nassif, and S. Latifi, “A Routing and Broadcasting Scheme on Faulty Star Graphs,” IEEE Trans. Computers, vol. 42, pp. 1,398-1,403, 1993. G. Birkhoff and S. MacLane, A Survey of Modern Algebra. New York: MacMillan, 1965. C.C. Chen, “Combinatorial and Algebraic Methods in Star and de Bruijn Networks,” PhD dissertation, Dept. of Computer Science, Texas A&M Univ., 1995. C.C. Chen and J. Chen, “The Maximum Partition Matching Problem with Applications,” SIAM J. Computing, to appear. C.C. Chen and J. Chen, “Optimal Parallel Routing in Star Graphs,” Proc. 19th Int’l Workshop Graph-Theoretic Concepts in Computer Science, Lecture Notes in Computer Science, vol. 1197, pp. 7384, 1997. C.C. Chen and J. Chen, “Nearly Optimal One-to-Many Parallel Routing in Star Networks,” IEEE Trans. Parallel and Distributed Systems, vol. 8, no. 12, pp. 1,196-1,202, Dec. 1997. K. Day and A. Tripathi, “A Comparative Study of Topological Properties of Hypercubes and Star Graphs,” IEEE Trans. Parallel and Distributed Systems, vol. 5, pp. 31-38, 1994. M. Dietzfelbinger, S. Madhavapeddy, and I.H. Sudborough, “Three Disjoint Path Paradigms in Star Networks,” Proc. Third IEEE Symp. Parallel and Distributed Processing, pp. 400-406, 1991. Z. GAlil and X. Yu, “Short Length Versions of Menger’s Theorem,” Proc. 27th Ann. ACM Symp. Theory of Computing, pp. 499508, 1995. M.R. Garey and D.S. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness. San Francisco: Freeman, 1979. S.W. Graham and S.R. Seidel, “The Cost of Broadcasting on Star Graphs and k-Ary Hypercubes,” IEEE Trans. Computers, vol. 42, pp. 756-759, 1993. D.F. Hsu, “On Container Width and Length in Graphs, Groups, and Networks,” IEICE Trans. Fundamentals, vol. E77-A, no. 4, pp. 668680, 1994.
Chi-Chang Chen received the BA degree in computer science from Soochow University, Taiwan, in 1984; and the MS degree in computer science and engineering from Tatung Institute of Technology, Taiwan, in 1986. After completing military service, he became a research assistant and lecturer at Tatung Institute of Technology in 1988. He received his PhD degree in computer science from Texas A&M University in 1995. He is currently an associate professor in the Department of Computer Science and Engineering, Tatung Institute of Technology. His research interests include interconnection networks, parallel processing, distributed systems, and graph theory. Jianer Chen received the PhD degree in computer science from Courant Institute of Mathematical Sciences, New York University, in 1987. His PhD dissertation was awarded the Janet Fabri Award for the best PhD dissertation at the Courant Institute of Mathematical Sciences, New York University. After graduation from NYU, he went to the Department of Mathematics at Columbia University, where he received the PhD degree in mathematics in 1990. Since then, he has been with the Department of Computer Science at Texas A&M University, where he is currently an associate professor. His research interests include computational complexity and optimization, graph theory and algorithms, and parallel processing. He has published about 70 journal and conference papers in these areas. He received the Research Initiation Award from the U.S. National Science Foundation in 1991, and TEES Select Young Faculty Award from Texas A&M University in 1993.