Upload
s-latifi
View
213
Download
0
Embed Size (px)
Citation preview
Pergamon Compurers Herr. Engg Vol. 23. No. I, pp. 25-32. 1997
Copyright Q 1997 Elsevier Science Ltd
PII: SOO45-7!906(%)00021-3 Printed in Great Britain. All rights reserved
0045-7906/97 $17.00 + 0.00
ON LINK-DISJOINT HAMILTONIAN CYCLES OF TORUS NETWORKS
S. LATIFII and S. Q. ZHENG2 ‘Department of Electrical and Computer Engineering, University of Nevada, Las Vegas, NV 89154, U.S.A. and *Department of Computer Science, Louisiana State University, Baton Rouge, LA 70803,
U.S.A.
Abstract-The problem of embedding link-disjoint Hamiltonian cycles into torus networks is addressed. The maximum number of link-disjoint cycles is limited to half the degree of the node in a regular network. Simple methods are presented to embed the maximum number of link-disjoint Hamiltonian cycles in an r-dimensional torus network. An algorithm for finding a Hamiltonian cycle in an r-dimensional torus in the presence of a set of faulty links is also given. Copyright 0 1997 Elsevier Science Ltd
Key words: Fault-tolerant computing, network embedding, parallel and distributed computing, ring.
1. INTRODUCTION
An important aspect in parallel and distributed computing is the simulation between different interconnection network structures. If network A can efficiently simulate network B, then all algorithms for network B can be automatically implemented on network A. Thus, the ability of a given network to simulate networks of different structures indicates its versatility. It is important for a user of a particular machine A to be familiar with its architectural structure. This allows the user to explicitly express the parallel algorithms that are suitable for a different machine B using the facilities provided by machine A. An additional dimension of simulating network B by network A is the robustness of the simulation. This concerns with how well network A can simulate network B if there are faulty nodes and/or links in A. Much of the previous work has considered the effects of node faults. In last few years, the problem of effectively using an interconnection network in the presence of faulty links has received attention (e.g. [l&4]). In this short note, we address the issue of simulating ring networks by torus networks that have faulty links.
A torus network is a two-dimensional (2-D) array with wraparound links in rows and columns. An r-dimensional torus is a network obtained from an r-dimensional (r-D) array by adding wraparound links along each dimension. Both arrays and tori have a constant interconnection degree for each node, and therefore are suitable for hardware implementation. Many computation problems can be naturally mapped to array and torus structures so that efficient parallel computing is possible [5]. Since a torus network contains its counterpart array as a subnetwork, and the diameter of the torus is about half the diameter of its corresponding array, torus networks are more powerful than arrays. There exists a rich literature on embedding torus networks into different architectures (see [6] for some references). We show that any torus T(m,, m,) contains two link-disjoint Hamiltonian cycles (H-cycles for short). We also show that any r-D T(m,,m,,...,m,) contains r link-disjoint H-cycles if all 1 5 k I are multiples of 4. Since in
T(m,m,,..., m,) has degree 2r, the number of for these torus networks is the We show the existence of for fault-tolerant
simulation of of maximum are present.
2. IN TORUS NETWORKS
An by m,-column 2-D array x array), denoted by is a network consisting of by a pair of integers, m,, 0 I j < m,. Two nodes (ij) and (k,l) connected by if and if either and I = j + 1 for m, -
k = i + 1 and I= for i < - Since of a 2-D array has degree no 4, the array structure is suitable for hardware
25
Shahram Latifi and Si-Qing Zheng
Fig. 1. T(4.4)
is concerned. The 2-D array networks have been used in many scientific applications [7, 51. An rrt, x ml torus, denoted by T(m,,m& is an array A(m,,m,) with wraparound links in rows and
columns. (Note: for T(m,,m,) it must be that m,,m2 > 2 since otherwise there will be multiple links connecting two nodes.) We call a link connecting two end nodes in a row (column) as a horizontal (zjertical) wruparoundlink. In a torus network, each node has degree 4. Since A(m,,m,) is a subgraph of T(IM,,IM,), and the diameter of torus T(m,,m,) is half of the diameter of array A(m,&), torus structure is more attractive than array structure for parallel computation. In Fig. 1, T(4,4) is given.Now, let us describe how to find two link-disjoint H-cycles in a torus network by considering several cases.
2. I. Case I. Both ml und m, we odd
Assume that m, I m2. Consider Fig. 2(a), which illustrates one H-cycle, C,, of T(5,9). The
construction of C, is as follows. First, we include links in the m, - 1 linear arrays L,,L,,...,L,,l - 2 into C,. Linear array L, consists of nodes (l,O), (O,O), (0,l) ,..., (0, m, - 1). Linear array Li, 0 -c i 2 m, - 2, consists of nodes (i + 1,O) ,..., (i + l,i),(i,i) ,..., (i,l + 1) ,..., (i,mz - 1). Then, we include into C, the following links: the links connecting nodes (m, - 1, m, + 2i) to nodes (m, - 1, m, + 2i - l), 0 I i -c (rn? - m,)/2, and the links connecting nodes (0, m, + 2i + 1) to nodes (0, m, + 2i), 0 I i < (mz - m,)/2. Finally, all horizontal wraparound links in row 1 through row m, - 1, and vertical wraparound links in column ml - 1 through column m2 - 1 are included into C,. The resulting cycle C, is of the form shown in Fig. 2(a). The remaining links form the other H-cycle Cz of T(m,,m,), as shown in Fig. 2(b). It is easy to verify that C, and Cz are link-disjoint, and both of them are W-cycles of T(m,,m?).
2.2. Case 2. Both m, and rn: we ewn
Assume that m, I mz, and consider the construction of one H-cycle C, of T(m,,mJ. Refer to Fig. 3(a) for our construction. All horizontal wraparound links are included into C, and no vertical wraparound links belong to C,. Now consider the non-wraparound links of C,. The nodes in row 0, row m, - 2, row m, - I, column 0 and column 1 need special treatment. All following links connecting nodes in column 0 are included into C,: links connecting (2i, 0) and (2i + l,O), 0 I i < ml/2 - 2; the link connecting (m, - 2,0) and (m, - 2,l) and the link connecting (m, - 1,O) and (m, - 1,l). All links connecting nodes in row 0, except the one connecting (0,O) and (0, l), are
(a) (b)
Fig. 2. Link-disjoint Hamiltonian cycles for Case 1
Link-disjoint Hamiltonian cycles 27
(a) (b)
Fig. 3. Link-disjoint Hamiltonian cycles for Case 2.
in C,. All links connecting nodes in column 1, except the one connecting (m, - 2,l) and (m, - l,l), are in C,. The link connecting (m, - 1,l) and (m, - 1,2) is also in C,. Then, all links in a jogging path, with each of its vertical segments of length two and each of its horizontal segments of length one, that includes all remaining nodes in rows m, - 1, m, - 2, and m, - 3 from node (m, - 1,2) to node (ml - 3,mz - 1) are included into C,. Also, the link connecting (m, - 1, m, - 1) and (m, - 2, m2 - 1) is included into C,. Finally, we consider all nodes (ij), 1 s i _< m, - 4, 2 s j I m2 - 1. We introduce a set of ‘C’ shape paths, each contains remaining nodes in row 2k + 1 and row 2k + 2, 0 I k I m,/2 - 3. The links in C, form an H - cycle of T(m,,m,). It is easy to verify that all links not in C, form another H-cycle C, of T(m,,m,). C, and C, of T(6,8) are shown in Fig. 3(a) and (b), respectively.
2.3. Case 3. One of m, and m2 is even and the other is odd
Assume that m, is even and m, is odd, and m, 2 m,. Consider the construction of one H-cycle C, of T(m,,m2). Refer to Fig. 4(a) for the details of our construction of C, for T(8,5). C, contains only one vertical wraparound link, which is in column m, - 1, and two horizontal wraparound links, which are in rows m2 - 2 and m, - 3. All non-wraparound horizontal links in row 0 through row m, - 4 are in C,. The link connecting (m, - 1,0) and (m, - 1 ,l) is also included. All links connecting nodes (2i,O) and (2i + l,O), 0 < i I m,/2 - 1, and all links connecting nodes (2i + 1, m2 - 1) and (2i + 2, mz - l), 0 I i I m,/2 - 3 are included into C,. We also include the link connecting (m, - l,m, - 1) and (m, - 2,m, - 1) into C,. Finally, we include all links in a jogging path from (m, - 1,l) to (m, - 3, m2 - l), with each of its horizontal segments containing one link and each of its vertical segments containing two links, into C,. The remaining links form the other
(a) (b)
Fig. 4. Link-disjoint Hamiltonian cycles for Case 3.
28 Shahram Latifi and Si-Qing Zheng
H-cycle C? of T(m,,mz). It is easy to verify that C, and C, are link-disjoint, and both of them are H-cycles of T(m,,&. Summarizing the above constructions, we have the following theorem.
Theorem 1. There are two link-disjoint H-cycles in any torus networks T(m,,mJ.
3. LINK-DISJOINT HAMILTONIAN CYCLES IN HIGH-DIMENSIONAL TORUS NETWORKS
An r-dimensional array (r-D array), denoted by A(m,,m,,..., m,), consists of N = II;=, mk nodes. Each node is labeled by an r-vector (i&,..., i,.), where 0 I i, I m, for 1 <j < r. Two nodes are connected by a link if and only if their r-vectors differ in precisely one coordinate and the absolute value of the difference in that coordinate is 1. An r-dimensional torus (r-D torus), denoted by T(m,,m?,..., m,), where m, > 2 for 1 <.j I r, is obtained from an r-dimensional array A(m,,m,,..., m,) by adding wraparound links in all r dimensions: the links that connect (i,,&,..., i, - 1, m, - 1, i, + I,..., i,) and (i& ,..., i, - l,O, i, + I..... i,) for 1 I j I r. The 3-D arrays A(m,,mz,m3) are very useful for parallel computation in many scientific applications. This is because the physical world is of three dimensions and many problems can be characterized by a computation model of three dimensions, and such a model can be easily mapped to a 3-D array network for efficient computation. The 3-D torus T(m,,m,,m,) is superior over the 3-D array A(m,,m,,m,), since the diameter of T(m,,m?,mJ is half of the diameter of A(ml,m2,m,).
If m, = m, = . ..m. - 1 = m, = 2, then the r-D array A(2,2 ,..., 2), is also called a binary r-cube (or r-dimensional hypercube), which is commonly denoted by Qr. If m, = m2 = . ..m. - 1 = m, = k,
S-7 then the r-D torus T(k,k,...,k), is also called a k-ary r-cube. Clearly, an r-dimensional torus T(m,,m,,..., m,) has rll;=, m, links and each of its node has degree 2r. It is important to point out
A that the r-dimensional torus T(4,4,...,4), the 4-ary r-cube and the hypercube Q2, are isomophic to each other.
We show that there exist r link-disjoint H-cycles in a large class of r-D torus networks. We call a link in T(m,,m,,..., m,) that connects two node whose node labels differ in the jth coordinate a j-dimensional link. A j-dimensional link that is a wraparound link is called a wraparound link qf dimension j. In Fig. 5, T(4,4,4) is shown.
Theorem 2. There are r link-disjoint h-cycles in any r-D torus network t(m,, m,,..., m,) if m, is a multiple of 4 for 1 I j I r.
Proof. It is known that any n-dimensional hypercube Qn contains [n/2] link-disjoint cycles [3, 51.
7-& & Since T(4,4,....4) is isomophic to hypercube Q:_ T(4,4,...,4) has r link-disjoint H-cycles. First,
s- 1 r-s -f---J--
consider how to construct r link-disjoint H-cycles in T(4,4 ,..., 4, 8 4,4 ,... 4). Let C,, Cz ,..., C,, be
Fig. 5. 7’(4.4,4). One wrap-around link for each dimension is shown.
Link-disjoint Hamiltonian cycles 29
f3 c:
(a) (b)
Fig. 6. Construction of link-disjoint Hamiltonian cycles of T(8,4,4) from the link-disjoint Hamiltonian cycles of T(4,4,4).
Fig. 7. Construction of T(l6,8,12) from 24 T(4,4,4)s.
A r r
r link-disjoint H-cycles of T(4,4,..., 4). Consider two copies of T(G), T’(G) and r
T2(b,4,...,i) (also denoted by T’ and T’, respectively, for short). Let the cycle C, in T’ and T2 be
sAf=7 denoted as C: and C:, respectively. Let CL’ denote an H-cycle of T(4,4,...,4,8 4,4,...4) constructed
S-l r-s Ah
from C: and Ci. We construct T(4,4 ,..., 4, 8 4,4 ,... 4) from T’ and T2, and at the same time, we construct Ci’ from C: and C:, 1 5 k 5 r.
Consider all wraparound links of dimension s of T' and T’. For a wraparound link connecting
(~J2A..., is - 1, 0, i, + l,..., i,) and (i,,i2,i3 ,..., i., - 1, 3, i, + l,..., i,) in T’, there is a corresponding wraparound link connecting (i&i3 ,..., i,, - 1, 0, i., + l,... i,) and (il,i2,i3 ,..., i, - 1, 3, is + l,..., i,) in T*. Furthermore, these two corresponding wraparound links belong to Cl and Cl, respectively, for the same k. We replace these two wraparound links with a link that connects (i,,i2,i3,..., i.r - 1, 0, i, + 1 ,..., i,) of T’ and (i,,i,,i, ,..., is - 1, 3, i, + 1 ,..., i,), of T*, and a link that connects (i,,i2,i ,,..., i, - 1, 3, i, + l,..., i,) of T’ and (i,,i2,i3 ,..., is - 1, 0, 6 + l,..., i,) of T”. The two new links are included into C$’ if the two deleted links belong to C: and C:, respectively. We do this for all pairs of corresponding wraparound links of dimension s of T’ and T2. Such an operation is illustrated in Fig. 6 for the case of constructing H-cycles of T(8,4,4) from the H-cycles of T(4,4,4). We also consider all remaining links in C: of T’ and C: of T* to belong to CL’. After this process, the
S-l f--V-?
constructed network is a T(4,4,...,4, 8 4,4,...4), and we obtain r link-disjoint H-cycles Ck”, 1 I k I r, for this r-D torus.
For any r-D torus network T(m,, m, ,..., m,), where m, is a multiple of 4 for 1 < j I r, its r link- r
disjoint H-cycles can be constructed from link-disjoint H-cycles of II;, , m,/4 T(G) torus networks in an iterative way. Figure 7 shows the construction of T(16,8,12) by 24 T(4,4,4)s.
Corollary 1. Any k-ary r-cube such that k > 0 and k is a multiple of 4 has r link-disjoint H-cycles.
30 Shahram Lattfi and Si-Qing Zheng
(b)
(C) Cd )
i-lg. X. Four dIRei-ent Hamlltoman cycles implied by Fig. 3(a).
4. FINDING A HAMILTONIAN CYCLE IN THE PRESENCE OF FAULTY LINKS
In this section, we show how to simulate a ring using a torus when the torus contains faulty links. For an r-D torus network that satisfies certain property, we have identified r link-disjoint N-cycles. Given a set F of faulty links in a torus network, we may be able to find an H-cycles C of the network such that C does not contain any faulty link in F. Using I link-disjoint H-cycles, this process can be viewed as ‘pattern matching’.
The symmetries of torus networks allow us to identify, without considering isomorphisms, many different H-cycles. Let CA be one of the r link-disjoint cycles of an r-D torus T(m,,m,,..., m,), and E, = b,b, - l...h, be an r-bit binary number. We use C,(B,) to denote an H-cycle of T(m,,mz ,..., m,) obtained from C, by relabeling the nodes of C, in the following way: if b, = 0, then the jth coordinat:: of any node II in C;(B,) is the same as thejth coordinate of u in Ck; otherwise (i.e. b, = I), if th: jth coordinate of 11 in C, is i, then thejth coordinate of u in C,(E,) is mk - i - 1. For example, for C, of Fig. 3(a), C,(OO),C,(Ol),C,(lO) and C,(ll) are shown in (a), (b), (c) and (d) of Fig. 8, respectively. Hence, from C’i, 1 I k I I’, of T(m,,m,...., m,), we may possibly identify r2’ different H-cycles. The number of different H-cycles of T(m,, mz,..., m,) can be much larger than this. For each of these r2’ H-cycles of T(m,.m,,.... m,), we may obtain l-I;=, mk different H-cycles of T(m,,mz,..., m,) by relabeling the node coordinates cyclicly along the r dimensions.
(a) (b)
Fig. 9. (a) A set of faulty links. (b) A Hamiltonian cycle that does not contain faulty links of (a).
Link-disjoint Hamiltonian cycles 31
We present a procedure MATCH that attempts to find an H-cycle C* of a 3-D torus T(m,,m2,m,) such that C* does not contain any link of a give set of F of faulty links of T(m,,m2,m,). The input of the procedure consists of m,,mz, and m3, F, and an H-cycle C. The H-cycle C can be any of the 3.2’ H-cycle of T(m,,m,,m,) defined by the cycles C,,C, and C,, and eight 3-bit binary numbers.
procedure MATCH(m,,m,,m,,F,C) begin
Let C*: = C. for a = 0 to ‘m, - 1 do
for b = 0 to m2 - 1 do for c = 0 to m3 - 1 do
if C* does not contain any link of F then output C* and stop
for all nodes u of C* do change the third coordinate value i, of u to (i, + 1) mod m,
endfor endfor for all nodes u of C* do
change the second coordinate value i2 of u to (i2 + 1) mod m, endfor
endfor for all nodes u of C* do
change the first coordinate value i, of u to (i, + 1) mod ml endfor
endfor end
In procedure MATCH, there are three levels of nested loops. The coordinates of nodes in the H-cycle C of T(m,,m,,m,) are systematically relabeled along three dimensions by these loops. If one of the II: =, mk H-cycles generated from original C by this relabeling scheme does not contain any link of F, this H-cycle C* is reported. This procedure can be generalized to handle the r-D case by using r levels of nested loops.
A 2-D torus T(m,,m,) can be considered as a special case of a 3-D torus T(m,,m,,m,) with m3 = 1. As an example, consider the problem of finding an H-cycle in T(6,8) that does not contain any faulty link in a given set F of faulty links shown in Fig. 9(a). Using C,(lO), one of the variations of the H-cycle C, shown in Fig. 3(b), as C, and let m3 = 1, we obtain an H-cycle shown in Fig. 9(b) by applying procedure MATCH.
5. CONCLUDING REMARKS
We showed that any two-dimensional torus has two link-disjoint Hamiltonian cycles. We also showed that any r-dimensional torus T(m,,m:,..., m,) such that mk is multiple of 4,l I k 5 r, contains r link-disjoint Hamiltonian cycles. This class of r-dimensional torus includes a useful subclass, the torus networks with mk a power of 2,l I k I r. This subclass of torus networks are suitable for parallel computing using the divide-and-conquer algorithm paradigm, since the network can be easily recursively partitioned into subnetworks of the equal size. Our results have applications in fault-tolerant computing, as demonstrated by our general scheme for finding a Hamiltonian cycle that does not contain any link of a given set of faulty links in a torus network. In terms of fault-tolerant simulation of a ring by a torus, a high-dimensional torus performs better than a low-dimensional torus since the former has more links than the latter.
Several problems remain open. Does every k-ary r-cube, k > 2 and r > 2, have r link-disjoint Hamiltonian cycles? Does every r-dimensional torus, r > 2, have r link-disjoint Hamiltonian cycles? We believe that the answers to these two questions are positive. Another problem is related to the fault-tolerant computing with respect to node failures. That is, given the set of faulty nodes of a torus network is known, how to find a ring subnetwork in the torus that contains maximum number of non-faulty nodes. The solution to this problem seems not simple.
32 Shahram Latifi and Si-Qing Zheng
REFERENCES 1. Boppana, R. V. and Chalasani, S., Fault-tolerant multicast communication in multicomputers. Proceedings of 1995
International Conference on Parallel Processing, 1995, pp. I1 18-I 125. 2. Bruck, J., Cypher, R. and Soroker, D., Embedding cube-connected cycles graphs into faulty hypercubes. IEEE
Transacfions on Computers, 1994, 43( IO). 3. Chart, M. Y. and Lee, S. J., Distributed fault-tolerant embeddings of rings in hypercubes. Journal of Parallel and
Distributed Computing, 1991, 11, 63-71. 4. Latin. S., Zheng, S. Q. and Bagherzadeh, N., Optimal ring embedding in hypercubes with faulty links. Proceedings
of the 22nd International Symposium on Fault-tolerant Computing. 1992, pp. 178-l 84. 5. Leighton, F. T., Inrroduction to Parallel Algorithms and Architectures. Morgan Kaufmann Publishers, Inc., New York,
1992. 6. Dingle, A. and Barada, H., Optimal embedding of end-around meshes into pyramid networks. Proceedings of 5rh
International Parallel Processing Symposium, 199 1, pp. 44545 I. 7. Hord, R. M., The Iliiac IV: The First Supercomputer. Computer Science Press, New York, 1982.