Information Processing Letters 43 (1992) 285-291 North-Holland 19 October 1992 Optimal routing in toroidal networks Izidor Jerebic and Roman Trobec Jo2ef Stefan Institute, Jamocta 39, 61 1 I I Ljubljana, Slot,enia Communicated by H. Ganzinger Received 19 August I991 Revised 29 July 1992 Abstract Jerebic, I. and R. Trobec, Optimal routing in toroidal networks, Information Processing Letters 43 (1992) 2X5-291 In this paper we study routing algorithms for one-to-one communication in multiprocessors, whose interconnection networks have toroidal structure. A toroidal network is an n-dimensional rectangular mesh with additional edge-to-edge connections. Mathematically speaking, these networks are undirected graphs obtained by Cartesian product of cycles. We show that a broad class of routing algorithms, called homogeneous, is optimal for a certain class of such networks. Besides, we propose a transformation, which transforms non-optimal homogeneous routing algorithms into optimal semi-homogeneous routing algorithms. Keywords: Parallel processing; analysis of algorithms; optimal routing; toroidal interconnection networks 1. Introduction Toroidal interconnection networks are becom- ing the standard interconnection networks for multiprocessors [5-71. Figure 1 shows a two-di- mensional toroidal network. An extensive comparative analysis of the la- tency in such networks was done by Dally in [7]. An optimal dynamic routing policy was presented by Badr and Podar [l]. A deadlock-free routing algorithm was obtained by Dally and Seitz [2] and later generalized by Linder and Harden [4]. The exact lower bound for load in such networks was given by Heydemann et al. [3]. To use these networks efficiently, one needs good routing algorithms. In our paper we con- sider static routing algorithms, i.e. routing algo- rithms where the path of a message does not Correspondence to: I. Jerebic, Joief Stefan Institute, Jamova 39, 61 111 Ljubljana, Slovenia. Email: izidor.jerebic@ijs.ac. mailyu. depend on the current state of the network. Such a routing algorithm is said to be optimal, if it distributes the static communication load equally among all communication channels (for precise definition of the load, see Section 2.2). At the moment, the most common routing algorithm calculates the distance vector and decrements its components in some specified or- der. This algorithm is simple to implement and easy to understand. It is optimal, though only for networks with odd edge-size. The optimality can be deduced from the proof for the exact lower bound for load in [3]. The optimality was thus a consequence of the construction of the algorithm. There were no criteria, concerning the inner structure of the algorithm, showing that the algorithm is optimal. The only criterion was the load on edges of a graph, by which the pure optimality of communi- cation was defined. In this paper we present criteria for optimality, that require regularity of an algorithm to be ex- 0020-0190/92/$05.00 0 1992 - Elsevier Science Publishers B.V. All rights reserved 285