Sufficient conditions for Hamiltonicity in multiswapped networks

OTIS networks are interconnection networks amenable to deployment as hybrid networks containing both electronic and optical links. Deficiencies as regards symmetry led to the subsequent formulation of biswapped networks which were later generalized to multiswapped networks so as to still enable optoelectronic implementation (as it happens,multiswapped networks also generalize previously studied hierarchical crossed cubes). Multiswapped networks of the form Msw(H;G) are known to possess good (graph-theoretic) properties as regards their use as (optoelectronic) interconnection networks (in distributed-memory multiprocessors) and in relation to those of the component networks G and H . Combinatorially, they provide a hierarchical mechanism to define new networks from existing networks (so that the properties of the new network can be controlled in terms of the constituent networks). In this paper, we prove that if G and H are Hamiltonian networks then the multiswapped network Msw(H;G) is also Hamiltonian. At the core of our proof is finding specially designed Hamiltonian cycles in 2-dimensional and heavily pruned 3-dimensional tori, irrespective of the actual networks G and H we happen to be working with. This lends credence to the role of tori as fundamental networks within the study of interconnection networks. © 2016 The Author(s). Published by Elsevier Inc. This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/4.0/).


Introduction
Interconnection networks are used to interconnect the processors of a distributed-memory multiprocessor computer (such as a Cray Jaguar or an IBM Blue Gene) as well as within networks-onchip, cluster computers and data centres (it is primarily the combinatorics related to the former usage that concerns us in this paper).
The stereotypical examples of interconnection networks are the hypercubes although many other networks have been so proposed (for example, the two supercomputers mentioned above have their processors connected in the form of a 3-dimensional torus). The design of an interconnection network is complex with topology, flow control, routing and traffic patterns all impacting upon its practical usefulness (see, e.g., [7] for more details). There is a strong and established link between the practical behaviour of a real interconnection network and the graph-theoretic properties of its abstraction as a graph. From a topological point of view, it is desirable for an interconnection network (abstracted here as an undirected graph) to possess numerous graph-theoretic properties including: having a small diameter (to aid message routing), a low degree (so as to limit overheads related to communication) and a high connectivity (so that faults can be tolerated); possessing embeddings of paths and cycles of various lengths (to aid simulations and message routing); and being highly symmetric (to assist with programming and analysis). There has been a considerable amount of research undertaken as to the efficacy of a whole range of graphs proposed as interconnection networks, which includes, to mention just a few, n-stars, (n, k)-stars, k-ary n-cubes, generalized and augmented hypercubes, pancake graphs and recursive circulant graphs (see, e.g., [19,20,48]). The study of interconnection networks is an inter-disciplinary mix of discrete http://dx.doi.org/10.1016/j.jpdc.2016. 10.015 0743-7315/© 2016 The Author(s). Published by Elsevier Inc. This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/4.0/). mathematics, computer science and engineering; moreover, no matter which application scenario one works in, there does not exist an optimum interconnection network design and trade-offs always have to be made.
Traditionally, communication within interconnection networks has been implemented electronically. However, optoelectronic interconnection networks, where communication is undertaken via a mix of electronic and optical links, have recently been proposed and constructed. Multiswapped networks were introduced in [38] as interconnection networks amenable to optoelectronic implementation. They generalize biswapped networks, as defined in [46], which in turn generalize OTIS networks, which originated in [32,39,[50][51][52] (we shall describe these networks and their suitability in an optoelectronic framework in more detail in the next section). As was demonstrated in [38], not only does a multiswapped network Msw(H; G), where G is the base graph and H is the network graph, have numerous properties appropriate for its use as an optoelectronic interconnection network but it also merits investigation when viewed solely in graph-theoretic terms as the provider of a generic mechanism to compose two other graphs, G and H, to yield a third (in much the same way as, say, the Cartesian product or the Tensor product do); indeed, we show that existing interconnection networks, namely hierarchical crossed cubes [21], are instantiations of our multiswapped construction. Some of the graph-theoretic properties of Msw(H; G) studied in [38] involve the lengths of shortest paths joining any two nodes, the diameter, the connectivity, the fault-diameter and node symmetry. All of these properties are highly relevant with regard to the use of multiswapped networks as (optoelectronic) interconnection networks but they also hint as to the naturalness of Msw(H; G) as a method of graph composition.
In this paper, we continue with the development of multiswapped networks both as providing the topologies of potential interconnection networks and also as a generic mechanism for graph composition (we also highlight later how multiswapped networks might be relevant to the design of data centre networks). In particular, we prove that if G and H are Hamiltonian graphs then so is Msw(H; G) but that Msw(H; G) might still be Hamiltonian even if it is the case that G and H are not both Hamiltonian. As we shall see, our proof relates the construction of Hamiltonian cycles in Msw(H; G) with the existence of specially constructed Hamiltonian cycles in 2-dimensional and heavily-pruned 3-dimensional tori (that is, with many links removed), no matter which graphs are chosen as G and H. The study of interconnection networks with faulty links is well established; however, ordinarily these faults are randomly distributed and limited in number. The emergence of the heavily-pruned tori in this paper is, in so far as we are aware, the first time interconnection networks with abundant faults and structured fault patterns have featured. The study of Hamiltonicity, as well as various related concepts such as Hamiltonian-connectedness, Hamiltonian-laceability and path covers, in interconnection networks is a thriving research area (we provide numerous examples of roles of Hamiltonicity as motivation).
This paper is structured as follows. In Section 2, we provide some background as to OTIS networks, biswapped networks and multiswapped networks; we also explain how a multiswapped network is a generalization of the previously studied hierarchical crossed cubes. In addition, we provide a reasonably detailed account of the role of Hamiltonicity in and its relevance to interconnection networks. In Section 3, we prove our main results, and we present our conclusions in Section 4. We reiterate that throughout an interconnection network is equated with its abstraction as an undirected graph. For standard graph-theoretic terminology, we refer the reader to [9] and for the fundamental aspects of interconnection networks we refer the reader to [7,20,48]. In order to emphasize the architectural origins of our graphs, we often refer to graphs as networks (though we use the two terms interchangeably) and we always refer to vertices as nodes and (undirected) edges as links.

Background and motivation
In this section, we describe the evolution of multiswapped networks from their origins as OTIS networks and through their emergence from biswapped networks. In addition, we provide motivation for the study of Hamiltonicity within interconnection networks and their various implementations as, for example, distributed-memory multiprocessors, networks-on-chips, compute clusters and data centre networks.

Optoelectronic interconnection networks
Ordinarily, interconnection networks are implemented electronically and the 'two-dimensional nature' of this environment can impose restrictions. Free-space optical interconnect technologies can offer several advantages over electronic implementations. For example, optical signals can pass through one another with little interference, and over a distance of greater than a few millimetres optical connections out-perform electronic connections in terms of power consumption, speed and crosstalk. However, optical connections are not a panacea for it can be difficult to route messages and the additional hardware components can be costly (the reader is referred to, e.g., [6,14,18,23,53] for further details on the physical properties of optical connections).

OTIS networks
A popular model of optical communication is the Optical Transpose Interconnection System (OTIS) (OTIS networks originated within the optics community in [32] and within the computer architecture community in [39] and, independently under the name of swapped networks, in [50][51][52]). OTIS networks have a base graph G, on n nodes, and consist of n disjoint copies of G. These copies are labelled G 1 , G 2 , . . . , G n and the nodes of any copy are v 1 , v 2 , . . . , v n . The links involved in any one of these copies of G are intended to model (shorter) electronic connections whereas additional links, where there is a link from node v i of copy G j to node v j of copy G i , for every i, j ∈ {1, 2, . . . , n} with i ̸ = j, are intended to model the (longer) optical connections. The resulting OTIS network is denoted by OTIS-G. Of course, an OTIS network is dependent upon its base graph G, and there is an extensive literature concerning the structural and algorithmic properties for both specific base graphs and classes of base graphs (see, e.g., [4,5,8,22,[29][30][31][33][34][35][36]56] for a selection). In particular, it was proven in [34] that if G is Hamiltonian then OTIS-G is Hamiltonian.

Biswapped networks
We mentioned in the previous section that symmetry within an interconnection network is important. There is a precise definition of what we mean by symmetry: an interconnection network is node-symmetric if given any two distinct nodes u and v, there is an automorphism of the interconnection network mapping u to v (that is, a one-to-one map f whose domain and range is the set of nodes and so that (x, y) is a link if, and only if, (f (x), f (y)) is a link). Intuitively, when an interconnection network is node-symmetric every node 'looks exactly the same' as every other node. A stronger property than node-symmetry is when an interconnection network is a Cayley graph (see, e.g., [20,48] for a precise definition). This is a group-theoretic condition that yields additional benefits in relation to, for example, routing and analysis. Node-symmetry is an important property of an interconnection network: the same routing algorithm, for example, can be deployed at each node; loads tend to be well-balanced; and in any analysis of a property that is required to hold for every node, the property need only be verified at one (randomly) chosen node (see, e.g., [7,20,48] for more on aspects of symmetry).
One displeasing aspect of OTIS networks is that no matter what the base graph G is, the corresponding OTIS network OTIS-G cannot be a Cayley graph, or even a node-symmetric graph, as an OTIS network is not regular (a regular graph is a graph where every node has the same number of neighbours). In order to try and surmount this deficiency, the biswapped network Bsw(G) was defined in [45] very similarly to the OTIS network OTIS-G except that instead of having n copies of the base graph G (where G has n nodes), we have 2n copies G 1 0 , G 2 0 , . . . , G n 0 , G 1 1 , G 2 1 , . . . , G n 1 and the 'optical' links join node v j in G i 0 with node v i in G j 1 , where i, j ∈ {1, 2, . . . , n}. Immediately we see that if G is regular then the biswapped network Bsw(G) is regular and so there is some hope for recapturing any symmetric properties of the base graph G; indeed, if G is a Cayley graph then Bsw(G) is. The reader is referred to [44,46,47,55] for more detailed discussions on biswapped networks and recent related research. In particular, it was proven in [44] that if G is Hamiltonian then Bsw(G) is Hamiltonian (this latter result was reported in [46] but not proven there nor subsequently). The basic mechanism by which OTIS and biswapped networks are implemented using free-space optical interconnections can be visualized in Fig. 1, where two banks of lenslets focus light from a node's transmitter to another node's receiver (see, e.g., [53] for a good account of free-space optics).

Multiswapped networks
In [38], biswapped networks were generalized so as to obtain multiswapped networks. This generalization arises from the simple observation that if one 'concatenates' biswapped networks then one can still obtain networks that can easily be laid out (in an optoelectronic sense, just as OTIS and biswapped networks can) but where these new networks have increased flexibility and improved topological and algorithmic properties (that one might do this was hinted at in [53] where it was stated that the OTIS optical architecture 'can be cascaded to accommodate successive processing planes'). The new networks are not only parameterized by a base graph G but also by a network graph H which determines the 'pattern of concatenation'; we denote the resulting network by Msw(H; G). As such, a network Msw(H; G) is hierarchical. The biswapped network Bsw(G), with base graph G, is the network Msw(H; G) where H consists of a solitary link.
Our generalization of a biswapped network is defined as follows.

Definition 1.
Let H = (U, F ) and G = (V , E) be graphs where U and V both contain at least 2 nodes. The network Msw(H; G) is known as the multiswapped network with network graph H and base graph G and is defined as follows: the cluster links, and We say that the nodes corresponding to some node u ∈ U are the nodes of Msw(H; G) whose first component is u, and that a In addition, the links induced by the nodes of Msw(H; G) corresponding to some node u ∈ U are the cluster links. We denote the copy of G induced by the nodes corresponding to u and indexed The nodes corresponding to the nodes u and u ′ of U and the link (u, u ′ ) of F are depicted in two different ways in Fig. 2. In both depictions, the nodes of V are enumerated as v 1 , v 2 , . . . , v n . In the top depiction, the node (u, v i , v j ), for example, lies on the row corresponding to node u ∈ U, and within this row it is node v j of the cluster indexed by v i . In the bottom depiction, as regards the nodes corresponding to u ′ , there is one row for the nodes indexed by each v ∈ V , and the node (u ′ , v i , v j ), for example, lies on the row indexed by node v i ∈ V .
Various properties of Msw(H; G) were proven in [38], in terms of those of the graphs G and H. For example: the lengths of shortest paths between specific pairs of nodes in G and H, and consequently a formula for the diameter ∆(Msw(H; G)) of Msw(H; G) in terms of the diameters ∆(G) and ∆(H) of G and H, were obtained; it was proven that if G is a graph of connectivity κ ≥ 1 and H is a graph of connectivity λ ≥ 1 where λ ≤ κ then Msw(H; G) has connectivity at least κ + λ; upper bounds on the (κ + λ)-diameter of Msw(H; G) in terms of the κ-diameter of G and the λ-diameter of H were derived; a distributed routing algorithm for a distributedmemory multiprocessor whose underlying topology is Msw(H; G) was obtained; and it was proven that if G and H are Cayley graphs then Msw(H; G) need not be a Cayley graph, but when additionally H is a bipartite Cayley graph, the graph Msw(H; G) is necessarily a Cayley graph.
One immediate observation from the above results is that specific properties of Msw(H; G) are strongly related to the same properties of G and H. Not only are multiswapped networks conducive for deployment in an optoelectronic context but their modular nature means that they enable existing networks to be 'joined together' in a uniform way so that structural properties of the component networks can be retained (or even enhanced). In general, methodologies enabling the modular construction of new interconnection networks from old are extremely important. For example, modular constructions enable a much more effective packaging (analysis) of component parts (packaging is, essentially, the partitioning of nodes to the same or different boards or racks and of links as intra-board or inter-rack, for example; see, e.g., [7]). Multiswapped networks provide for much flexibility in the consideration and analysis of packaging and are reflective of the increasing move towards hierarchical constructions within interconnection networks.

Hierarchical crossed cubes
The construction of Msw(H; G) is closely related with the construction of hierarchical crossed cubes HCC (k, n), originating in [21] and further investigated in, e.g., [25,26]. The focus in [21] on the definition of hierarchical crossed cubes is algebraic (the reader is referred to [21] for a precise definition of crossed cubes as it is not important to the content of this paper).

Definition 2.
The hierarchical crossed cube HCC (k, n) has node-set {0, 1} k+2n . Each node of HCC (k, n) is written as (u, v, w), where u ∈ {0, 1} k and v, w ∈ {0, 1} n . The set of links of HCC (k, n) is partitioned into 2 sets, E int and E ext . The set E int is referred to as the set of internal links, whilst the set E ext is referred to as the set of external links. In more detail, Consequently, HCC (k, n) is identical to Msw(Q k ; CQ n ), and it is interesting to note that the same network has arisen independently from two entirely different directions. However, HCC (k, n) is but one instantiation of a multiswapped network where the network graph is chosen to be Q k and the base graph to be CQ n .
In [25], the Hamiltonicity of HCC (k, n) was investigated with HCC (k, n) shown to be Hamiltonian. Explicit algebraic properties of hypercubes and crossed cubes were used to construct Hamiltonian cycles in HCC (k, n) via generalized Gray codes in the form of reflective edge-labelled sequences and cycle patterns. Of course, the approach taken in [25] cannot be taken here as we consider Msw (H; G) where H and G are arbitrary graphs. Also, if we apply our upcoming constructions to Msw(Q k ; CQ n ) then, interestingly, we obtain a very different Hamiltonian cycle to that constructed in [25].

Hamiltonicity in interconnection networks
Not only is Hamiltonicity a fundamental graph-theoretic concept but it is also extremely relevant in the context of interconnection networks where the existence of Hamiltonian cycles or paths can have a number of applications. The relevance of Hamiltonicity runs across the spectrum of instantiations of interconnection networks as distributed-memory multiprocessors, networks-on-chips, compute clusters, and data centre networks. Now that we have provided some background as regards multiswapped networks, it is apposite that we explain and motivate the study of Hamiltonicity within interconnection networks.
We illustrate below some of the roles Hamiltonian cycles and paths have assumed within interconnection networks. We begin with some general applications (that are well established within the literature; see, e.g., [1,12,20,27]) before looking at some more specific examples. In an all-to-all communication pattern, the existence of a Hamiltonian cycle enables every node to send its packets out so that in a one-port, synchronous system what results is an optimal algorithm (the algorithm works in an asynchronous system too, although without an associated claim of optimality); if there are edge-disjoint Hamiltonian cycles then these cycles can be used to reduce the time complexity when the system is multi-port; and regardless of whether the system is one-port or multi-port, edge-disjoint Hamiltonian cycles enable improved fault-tolerance. Cycles and paths are recognized as important data structures as a large number of parallel algorithms in contexts such as matrix-vector multiplication, Gaussian elimination, and bitonic sorting have been developed within which these data structures are commonplace; consequently, having a Hamiltonian cycle or path in an interconnection network facilitates the implementation of these algorithms (as arbitrarily long paths, up to the number of nodes in the interconnection network, can be embedded within the cycle). In addition, many interconnection networks are recursively structured; consequently, the existence of Hamiltonian cycles (in the recursive sub-structures) also yields sets of disjoint cycles (within which multiple paths can be embedded). Now for some more specific applications. An influential paper was [28] where a deadlock-free path-based multicast wormhole routing algorithm for distributed-memory multiprocessors was devised, with the freedom from deadlock stemming from the existence and use of a Hamiltonian cycle embedded within the interconnection network; this paper has inspired a range of related research (see, e.g., [43] and the references therein). In [49] a method for diagnosing faults in distributed-memory multiprocessors (under the PMC model) was devised where a necessary condition is that the interconnection network is Hamiltonian: the nodes of a fault-free portion of a Hamiltonian cycle are used to diagnose the remaining nodes, so as to obtain a five-round adaptive diagnosis algorithm. In wavelength-division-multiplexing optical networks, the existence of Hamiltonian cycles in the underlying network has been used so as to develop protection algorithms; that is, algorithms which prolong the survival of paths in a faulty system (see, e.g., [15] for a recent application). As regards a networks-onchip context, in [54] a bufferless routing algorithm for the Gaussian macrochip (an optical chip-scale network) is developed that ensures that deflected packets reach their destinations; the routing algorithm takes advantage of Hamiltonian cycles within the underlying Gaussian network. Furthermore, the paper [28], mentioned above, has influenced not only deadlock-free routing in distributed-memory multiprocessors but also fault-tolerant routing in three-dimensional networks-on-chips where Hamiltonian paths are used to yield fault-tolerance [13]. In [37], the complexity of the black hole search problem (a black hole in an agentbased network is a location in which a resident process, such as an unknowingly-installed virus, deletes visiting agents or incoming data) in various interconnection networks is studied; this is the first consideration of this problem in interconnection networks and crucial to the agent-based algorithms that are developed is the existence of Hamiltonian cycles in the underlying interconnection networks. In [24], the existence of Hamiltonian cycles in specific cubic symmetric graphs (from the Foster Census) is used to build broadcast schedules that facilitate the solution of parallel molecular dynamics problems. In [11], Hamiltonian cycles are used to design privacy-preserving algorithms for distributed data mining in networks. Finally, the existence of Hamiltonian cycles in interconnection networks can be used implicitly; for example, in [2] the existence of a Hamiltonian cycle in various interconnection networks was used to obtain bounds in a congestion analysis.
In summary, Hamiltonicity in interconnection networks is an important consideration; moreover, as new networks, methodologies, and applications arise, it is likely that new applications for Hamiltonicity will arise. For example, researchers have recently turned their attention to Hamiltonicity and associated structural concepts in certain data centre networks (see, e.g., [40][41][42]) and to the use of Hamiltonian cycles in grids and clouds (see, e.g., [3]). Furthermore, the study of Hamiltonicity has given rise to the study of many new concepts in interconnection networks such as Hamiltonian-connectedness, Hamiltonian-laceability, and path covers (see, e.g., [20]).

The composition of Hamiltonian graphs
In this section, we prove our main result; that is, we prove that if G = (V , E) and H = (U, F ) are Hamiltonian graphs then Msw(H; G) is Hamiltonian too (we also show that whilst this condition on G and H is sufficient, it is not necessary). Our constructions differ depending upon the parity of the number of nodes of H and G. Throughout we use the fact that if G ′ is a subgraph of G and H ′ is a subgraph of H then Msw(H ′ ; G ′ ) is a subgraph of

Msw(H; G).
We begin with the case when H has an even number of nodes. Note that we regard a path in a graph as a sequence of nodes and so it makes sense to concatenate paths to obtain longer paths (so long as there is a link joining the last node of the first path to the first node of the second).

Lemma 3. Let H and G be Hamiltonian graphs where H has an even number of nodes. The network Msw(H; G) is Hamiltonian.
Proof. Enumerate the nodes of V as v 1 , v 2 , . . . , v n so that this enumeration forms a Hamiltonian cycle in G, and define the path ρ(v i , v j ) to be a Hamiltonian sub-path of this Hamiltonian cycle (and so j = i − 1 or j = i + 1, where we identify n + 1 with 1 and 0 with n). Denote the isomorphic copy of any path ρ( in Msw(H; G) as follows: . The path σ u,u ′ can be visualized (in bold) as in Fig. 3.

and so
Msw(H; G) is Hamiltonian (as was shown in [44,45]). Now, we turn to the more difficult case where H has an odd number of nodes; but first we define the k × k torus Q k 2 as being a k × k mesh with wrap-around links on every row and in every column.

Theorem 4. Let H and G be Hamiltonian graphs where H has an odd number of nodes and where G has an even number of nodes. The network Msw(H; G) is Hamiltonian.
Proof. Let C and D be Hamiltonian cycles in G and H, respectively, so that C = v 1 , v 2 , . . . , v n and D = u 1 , u 2 , . . . , u m . We shall work only in the spanning subgraph Msw(D; C ) of Msw(H; G). We begin by giving an example of a Hamiltonian cycle in a particular scenario and then we show how this Hamiltonian cycle can be 'flattened' to obtain a Hamiltonian cycle in a two-dimensional torus. We next apply the reversal of this construction in the general case so as to turn a specially constructed Hamiltonian cycle in an n × n torus into a Hamiltonian cycle of Msw(D; C ). Consider the subgraph X of Msw(D; C ) corresponding to the sub-path u 1 , u 2 , u 3 of D (that is, induced by the nodes whose first component is u 1 , u 2 or u 3 ). Let us start with a specific construction.
The subgraph X is depicted in Fig. 4(a) in the case when n = 4 (the indices are shaded in grey and not all nodes are named). Moreover, in this figure, there is depicted a cycle Y (in bold) spanning all nodes of X . Note how Fig. 4(a) is obtained by 're-drawing' Fig. 2 so that the nodes lie in the shape of a 'heavily pruned' 3-dimensional torus; that is, with many of the links removed. The links that have been removed are alternately the row links and the column links on each 'horizontal plane' of the 3-dimensional torus (this might be better appreciated by viewing the forthcoming Fig. 6).
Consider the 16 nodes of X corresponding to the node u 2 ∈ U.
We can also imagine these nodes as being the nodes of a 4×4 torus Q 4 2 where the node on row i and in column j is the node (u 2 , v i , v j ).
Note that in Q 4 2 all row and column links of Q 4 2 are present; so, Q 4 2 contains links that do not exist in X . In particular, all the row links of Q 4 2 are also present in X but none of the column links is.  Consider the cycle Y . Trace this cycle Y around the nodes of X so as to obtain a cycle Z in Q 4 2 as follows: • consider the nodes of Q 4 2 as being those nodes of X corresponding to the node u 2 ∈ U and whenever the cycle Y leaves the 'plane' of Q 4 2 , introduce a column link in Z in Q 4 2 joining the node where it left the plane to the node where it rejoined the plane.
So, for example, when Y leaves the plane of Q 4 2 at node (u 2 , v 1 , v 1 ) to follow the path (u 3 , v 1 , v 1 ), (u 3 , v 1 , v 2 ) before rejoining the plane at node (u 2 , v 2 , v 1 ), we introduce the link ((u 2 , v 1 , v 1 ), (u 2 , v 2 , v 1 )) into Z . Note that all such paths in Y that leave the plane of Q 4 are such that i and i ′ differ by 1 or are 1 and 4 (and so correspond to column links in Q 4 2 ). This construction can be visualized in Fig. 4(b), where the dotted lines denote the new column links (which, of course, only exist in Q 4 2 and not in Msw(D; C )). What results is a Hamiltonian cycle Z of Q 4 2 , namely: (we have suppressed the first component u 2 in the names of all these nodes). Note that the column links used in Z (and derived from Y ) correspond to either a link of some cluster of X (corresponding to u 3 ) or a path of length 3 in some cluster of X (corresponding to u 1 ). We can extend this construction (or, more precisely, its reversal) to the general case as we now describe. Whereas in our example above we have constructed a Hamiltonian cycle Z in Q 4 2 from our spanning cycle Y in X , we can equally well start with a Hamiltonian cycle in Q 4 2 , with certain properties (to be defined), and use this cycle to obtain a spanning cycle Y of X . For the moment, we continue to work with our sub-path u 1 , u 2 , u 3 of D. However, suppose that Q n 2 is an n × n torus whose node set is the set {(u 2 , v i , v j ) : i, j = 1, 2, . . . , n} and where there is a link and j ′ = n)): or j = j ′ and (i = i ′ + 1 or (i = 1 and i ′ = n)). In what follows, we suppress the first component u 2 when we denote such nodes. Suppose that we can find a Hamiltonian cycle Z in Q n 2 with the following property: • the intersection I of any set of n column links of Q n 2 (lying in the same column) with the links of Z results in a set of n 2 − 1 mutually node-disjoint paths all but one of which is a link so that the remaining path has length 3.
Such a Hamiltonian cycle Z for the torus Q 8 2 is depicted in Fig. 5(a) where, if one looks at the first column, for example, the intersection set I consists of the links ((v 1 , v 1 ), (v 2 , v 1 )) and ((v 3 , v 1 ), (v 4 , v 1 )) together with the path ((v 5 , v 1 ), (v 6 , v 1 ), (v 7 , v 1 )) (the cycle Z is given by the bold black and grey links in Fig. 5(a)).
Colour the n 2 − 2 isolated links of all such intersection sets I (that is, all paths in I consisting of a solitary link) black and also colour the two non-incident links of the path of length 3 black, with the internal link of the path of length 3 coloured grey (as is done in Fig. 5(a)). Fix some column of Q n 2 . Note that when the nodes of this column are regarded as nodes in X , there are links from every node to the nodes of a cluster in Msw(D; C ) corresponding to node u 1 ∈ U and also to the nodes of a cluster corresponding to node u 3 ∈ U (these links are the vertical links in Fig. 4(a)). For each column: replace every black link by a path of length 3 through a link of the cluster corresponding to node u 3 ∈ U; and replace the grey link by a path of length n + 1 through all nodes of the cluster corresponding to node u 1 ∈ U (this corresponds to a reversal of the 'flattening' of Y in Fig. 4(a) to get Z in Fig. 4(b)). Because of the specific property required of Z , this gives us a cycle spanning all the nodes of X .
What is more, if our (Hamiltonian) path D is u 1 , u 2 , u 3 , . . . , u m with m ≥ 5 odd then we can extend the cycle spanning X constructed above by removing every column link involving nodes  corresponding to u 3 , such as the link (( and replacing it with the path The construction can be visualized in Fig. 5(b) for the torus Q 8 2 (the white nodes are the nodes corresponding to u 2 and not all nodes and links are depicted). What results is a Hamiltonian cycle of Msw(H; G).
It is important to note that if our (Hamiltonian) path D is . . , u m , with m ≥ 4 even, then our construction does not work: for example, starting from (u 2 , v 3 , v 1 ), there is no 'vertical' path 'up' to (u m , v 1 , v 3 ) and on to (u m , v 1 , v 4 ) and 'down' to (u 2 , v 4 , v 1 ). This is why we require the number of nodes in H to be odd. All that remains is to demonstrate that such a Hamiltonian cycle Z , with the required properties, exists in Q n 2 irrespective of n (recall that n is always even). Construct Z as follows (with reference to Fig. 5(a)).
• If j ̸ = n is even then include the link ((v n−j , v j ), (v n−j , v j+1 )), and also include the link ((v n , v n ), (v n , v 1 )).
It is not difficult to verify that the links of Z form a Hamiltonian cycle in Q n 2 so that the intersection of the set of links of Z with the set of links in some column results in a mutually node-disjoint collection of n 2 − 1 paths all but one of which is a link so that the remaining path has length 3. The result follows.
In fact, the proof of Theorem 4 yields the following slightly stronger result.

Corollary 5. Let H be a graph containing a Hamiltonian path and let G be a Hamiltonian graph where H has an odd number of nodes and where G has an even number of nodes. The network Msw(H; G) is Hamiltonian.
Of course, Corollary 5 shows that there exist graphs H of arbitrary size for which Msw(H; G) is Hamiltonian even though H is not.
We now deal with the case where both H and G have an odd number of nodes. We begin with an observation. Consider the m × n × n mesh M(m, n, n) where the first component denotes the 'level', the second the 'row' and the third the 'column'. Thus, viewed 3-dimensionally, M(m, n, n) consists of m levels of n × n twodimensional meshes with 'vertical' links joining corresponding nodes on adjacent levels. We suppose that the 'bottom' level is level 1 and the 'top' level is level m. Amend M(m, n, n) so that there are wrap-around links for each row and each column of each level (there are no wrap-around links from the top level to the bottom level), and then remove all row (resp. column) links from all odd-numbered (resp. even-numbered) levels. Denote the resulting graph byM(m, n, n). Our observation is that if we ignore links joining nodes of Msw(D; C ) corresponding to u 1 ∈ U and nodes corresponding to u m ∈ U then the remaining subgraph of Msw(D; C ) is the graphM(m, n, n). In particular,M(m, n, n) is a spanning subgraph of Msw(H; G). The graphM (7,5,5) is depicted in Fig. 6 where not all of the (row and column) wrap-around links are shown and where we have added some additional (dotted) links (from Msw(H; G)) that we shall return to later (for the moment, ignore the fact that some links are bold and some are not, and ignore the dotted links). This observation assists in visualizing the following construction.
There is an alternate view ofM(m, n, n). We can think of it as n disjoint copies of an m × n 'mesh', where there are m rows and n columns, so that there are (wrap-around) row links on the odd-numbered rows but no row links on the even-numbered rows (in Msw(D; C ), the ith m × n mesh is induced by the nodes of With reference to Fig. 6, the first of these five 7 × 5 meshes is that sub-graph in the 'vertical' plane containing the nodes (u 1 , v 1 , v 3 ) and (u 7 , v 1 , v 4 ) (for example), the second is that containing the nodes (u 1 , v 2 , v 4 ) and (u 7 , v 2 , v 5 ), and so on. We shall construct, in each of these meshes, a spanning path so that we can join these paths together, using links of Msw(D; C ) joining nodes corresponding to u m ∈ U and nodes corresponding to u 1 ∈ U (dotted links, as in Fig. 6), so as to obtain a Hamiltonian cycle in Msw(D; C ). In Fig. 6, note how the bold spanning paths of the meshes are joined by dotted links to yield a Hamiltonian path in Msw(D; C ) from (u 1 , v 1 , v 3 ) to (u 7 , v 3 , v 1 ), and that there is a link ((u 7 , v 3 , v 1 ), (u 1 , v 1 , v 3 )) (not shown).
For some pair a = (i, j) ∈ {1, 2, . . . , n} 2 , we write (u, v a ) to denote the node (u, v i , v j ). Note that there is a link joining (u, v a ) and (u, v a+1 ) and if (u, u ′ ) is a link of H then there is a link joining (u, v a ) and (u ′ , vã). In Fig. 6, note how there is a spanning path of: the first mesh from (u and so on. Note also that there are links ((u 7 , v b 1 ), (u 1 , v a 2 )), ((u 7 , v b 2 ), (u 1 , v a 3 )), and so on.
In general, if a 1 , b 1 , a 2 , b 2 , . . . , a n , b n is the sequence as in the statement of Claim 7 then let f (i) be the first component of a i and b i (f is well-defined). In particular, f is a permutation of {1, 2, . . . , n}. For every i ∈ {1, 2, . . . , n}, in the mesh induced by the nodes whose second component is f (i), there is a spanning path from node (u 1 , v a i ) to node (u m , v b i ) (this spanning path is obtained by going up and down the columns and across the rows as depicted in Fig. 6). Moreover, for every i ∈ {1, 2, . . . , n − 1}, there is a link ((u m , v b i ), (u 1 , v a i+1 )), as well as a link ((u m , v b n ), (u 1 , v a 1 )). Consequently, we obtain a Hamiltonian cycle in Msw(D; C ) and so in

Msw(H; G).
The following is immediate from Lemma 3 and Theorems 4 and 6.

Corollary 8. If H and G are both Hamiltonian graphs then Msw(H; G) is a Hamiltonian network.
Note that the fact that Msw(H; G) can be Hamiltonian when both G and H are not can be viewed positively, with the multiswapped construction enhancing properties of the component networks.

Conclusion
In this paper, we have demonstrated that multiswapped networks provide a mechanism for graph composition, as well as further demonstrating the efficacy of multiswapped networks as interconnection networks for parallel computing (and not just in an optoelectronic environment). Our proofs also reinforce the fundamental role of low-dimensional tori in interconnection network design.
There are numerous directions for further research, motivated by the role of multiswapped networks as interconnection networks. For example, from a structural perspective, it would be interesting to consider the embedding of various paths and cycles within multiswapped networks and also the tolerance of multiswapped networks to faults (be these node or link faults), as well as more refined Hamiltonicity properties such as Hamiltonianconnectedness; and from an algorithmic perspective, it would be interesting to develop message-routing and broadcasting protocols in the situations where messages need to be simultaneously routed from one node to a collection of nodes and from a collection of nodes to another collection of nodes (the fact that multiswapped networks are designed to be used in optoelectronic environments could mean that any performance analysis might have to be with respect to specific switching techniques). In short, it would be useful to generalize results on hierarchical crossed cubes to multiswapped networks (we note that previously established results on the connectivity, symmetry and Hamiltonicity of hierarchical crossed cubes from [21,25,26] actually follow from general results here and in [38]).
It is worthwhile mentioning existing research on the Hamiltonicity of Cartesian products of graphs. The Cartesian product of two Hamiltonian graphs is clearly Hamiltonian (the Cartesian product of two cycles, a 2-dimensional torus, is Hamiltonian). Hence, any 3-dimensional torus is clearly Hamiltonian. We reduce the problem of determining the Hamiltonicity of Msw(H; G) (with G and H Hamiltonian) to determining the Hamiltonicity of a subgraph of a 3-dimensional torus where this subgraph is missing many links of the 3-dimensional torus; as we have seen, this situation is much more complex. However, there has been quite a bit of work on necessary and sufficient conditions for the Hamiltonicity of the Cartesian product of two (not necessarily Hamiltonian) graphs (see, e.g., [10]). Obtaining necessary and sufficient conditions for the Hamiltonicity of Msw(H; G) in terms of properties of G and H is worthy of further study (and [10] might be a good place to start).
Finally, the design of data centre networks (DCNs) is becoming increasingly important as the scale of these networks expands rapidly (some DCNs consist of hundreds of thousands of processors and have footprints of thousands of square metres) so that physically laying out these DCNs is a complex process. Recentlyproposed DCNs (such as DCell, BCube and FiConn; see, e.g., [16]) are recursively defined with clusters being recursively interconnected. Multiswapped networks have much potential as blueprints for the design of DCNs: their cluster links will correspond to the links within clusters; and their swap links will correspond to longer inter-cluster links. Of course, it will be important to choose the base graph and the network graph carefully but the theory of multiswapped networks will allow us to better understand the properties of the resulting DCNs. Multiswapped networks also have potential as regards the design of DCNs such as the very recently-proposed DCN FireFly [17] where wireless or optical inter-rack links are added to a DCN. It should be clear as to how the swap links of a multiswapped network can be used to model and design DCNs such as FireFly.