- Home
- Documents
*Determination of Hamiltonian cycles in cube-based networks using generalized Gray Codes*

prev

next

out of 11

View

213Category

## Documents

Embed Size (px)

Pergamon Computers Herr. Engng Vol. 21, No. 3, pp. 189499, 1995

0045-7906(95)ooool-1 Copyright 0 19% Elsevier Science Ltd

Printed in Great Britain. All rights reserved 004%7906/9S $9.50 + 0.00

DETERMINATION OF HAMILTONIAN CYCLES IN CUBE-BASED NETWORKS USING GENERALIZED

GRAY CODES?

SHAHRAM LATIFI and SEQING ZHENG* Electrical and Computer Engineering Department, UNLV, 4505 Maryland Parkway, Las Vegas, Nev.

and 2Computer Science Department, LSU, Baton Rouge, La, U.S.A.

(Received 5 January 1995)

Abstract-Gray Codes (GCs) are useful in finding the Hamiltonian path, embedding linear and mesh graphs, and identification of operational subcubes in a cube with some already allocated regions. We generalize the conventional GCs by allowing the successive codewords to have a Hamming distance of greater than one when necessary. This generalization provides a useful methodology for solving such problems as: embedding, subnetwork allocation and deallocation, and fault tolerant routing for non- standard cube-based networks. To demonstrate the usefulness of this GC characterization, we focus on the problem of ring (or linear array) embedding into viable alternatives of the n-cube., namely, folded hypercube, incomplete hypercube, twisted hypercube and multiply-twisted hypercube. We show the power of the link label representation in identifying the Hamiltonian paths (cycles) in the cube.-based networks. Using the unified link label representation, Gray Codes are derived for the aforementioned networks. The available distinct GCs for each network are further enumerated. The GCs obtained as such render Hamiltonian cycles for each cube-based topology, thus providing embedding of rings (or linear arrays) of maximum size onto the cube. It is believed that the generalized GCs introduced here can be employed to solve many other problems in networks whose connectivity is defined by the binary labels of nodes.

Key worak Cube-based networks, embedding, Gray Codes, Hamiltonian cycle, Hamiltonian path, ring.

1. INTRODUCTION

Hypercube multiprocessors have been the focus of many researchers over the past few years. The appealing properties of the hypercube such as node and edge symmetry, logarithmic diameter, high fault resilience, scalability and the ability to host popular interconnection networks have made this topology an excellent candidate for many parallel processing applications [l]. Viable alternatives to the standard hypercube have been proposed such as: folded hypercube [2,3], incomplete hypercube [4], twisted hypercube [5], multiply-twisted hypercube [6], and generalized hypercube [7].

With the widespread availability of parallel and distributed architectures based on the hypercube topology, there is an ever-increasing interest in the portability of algorithms developed for architectures based on other topologies such as linear arrays and rings. Clearly, the problem of portability reduces to one of embedding the above interconnection structures into the hypercube. In embedding a given topology, it is imperative to maximize the processor utilization in the hypercube. This problem can be modeled as one of mapping a given topology of largest size onto the hypercube. The topology to be mapped onto the hypercube is called the guest graph, while the hypercube itself is commonly referred to as the host graph. Also, it is desirable for the embedding function to preserve the neighborhood property of the guest graph, i.e. the edges of the guest graph are mapped to edges in the host graph.

Linear arrays and rings are among highly structured topologies frequently demanded by parallel applications. Therefore, it is important to develop efficient embedding techniques which map these topologies onto the hypercube. A powerful mathematical tool for linear array and ring embedding is the Gray Code (GC) concept. Gray Codes also have many other important applications in parallel computing on cube-based networks. Cube-based networks are usually recursively defined, and their connectivity is succinctly represented by the binary node labels. Thus, to specify the

tThis work was supported in part by the University of Nevada, Las Vegas Information Science Research Institute.

I89

190 Shahram Latifi and Si-Qing Zheng

topology of these networks, we do not need to store the adjacency matrices explicitly. Many topological properties of cube-based networks can be directly derived using their binary node labels.

An intrinsic property of the GC is that two successive codewords differ in exactly one bit, hence the Hamming distance between successive codewords is unity. Consequently, GCs provide a simple technique to map linear arrays (or rings if the end-nodes of the sequence are adjacent) onto the cube [8]. Due to the same property, GCs also provide a convenient way of mapping multi-dimensional grids onto cube-based networks [8].

The GC commonly encountered in the literature is the Binary Reflected Gray Code (BRGC) [9] which provides a systematic way of visiting all the nodes in the n-cube, whose labels are given in the GC sequence, and returning to the origin. The BRGC, thus, gives a solution to embedding of rings of size 2 in the n-cube. As it turns out, BRGC is not the only GC sequence which produces a Hamiltonian cycle in the n-cube. In fact, BRGC can be constructed according to the ordered set (0, 1. . II - 1) of the cube dimensions; nevertheless, any other permutation of the set {O,l,..., n - I} can produce a different sequence which also gives z Hamiltonian cycle in the cube. This was the basis for the generalization of BRGC [7] which results in n! distinct GC sequences in the n-cube. In this paper, unless otherwise specified, by GC we mean the Gray Code which yields a Hamiltonian cycle in the network. We focus on Hamiltcnian cycles in particular since we are interested in maximum size embedding of the guest graph (ring or linear array). A given GC can be uniquely represented by a sequence of node labels, or by a sequence of link labels provided that the origin is known. In [lo], a different generalization of BRGC referred to as base-h rtlflected grq codes is given in order to map linear arrays and rings onto the Generalized base-h hypercubes.

The usefulness of conventional GCs (i.e. GCs in which two successive codewords are of Hamming distance 1) is severely restricted when applied to non-standard cube-based networks. This is because the adjacency of nodes in non-standard cubes is not necessarily conditioned upon the unity (Hamming) distance of two nodes. For instance, in an n-dimensional folded hypercube. two nodes of Hamming distance n are adjacent, but this adjacency cannot be captured by conventional GCs whose setup hinges on two successive words being of Hamming distance 1.

In this paper, we introduce the concept of generalized GCs where two successive codewords may have a Hamming distance greater than one. It is important to note that conventional GCs can be derived from our generalized GCs, but the reverse is not true. Our unified way of characterizing GCs allows the application of this concept to the class of networks whose connectivity is specified by their binary node labels, including cube-based networks. We demonstrate this by focusing on the problem of embedding linear arrays and rings into cube-based networks. The representation of GCs here is essentially based on link labels (previous representations usually specify GCs by node labels). The link label representation provides a simple and compact way for defining the GCs in other cube-based topologies, in addition to the conventional n-cube. The rest of the paper is organized as follows. Section 2 includes the preliminaries. In Section 3, a formal description of Gray Codes is given which leads to a convenient embedding of rings into the cube-based networks. Section 4 concludes the paper.

2. NOTATIONS AND TERMINOLOGY

Let G( V, E) be a finite graph without loops or parallel edges, with the node set V(G) = Y and the edge set E(G) = E. In the text, edges are also referred to as links. When G is known from the context, the sets V(G) and E(G) will be referred to by V and E, respectively. If an edge e = (u, I) E E, then the nodes u and P are said to be adjacent and the edge e is said to be incident on these nodes.

An n-dimensional hypercube (i.e. Qn) is a graph G( V, E), with 1 V) = N = 2, and ] E 1 = n2- . The graph G (V, E) is both node and edge symmetric. Each node in G( V, E) represents a processor and each edge represents a link between a pair of processors. Nodes are assigned binary numbers from 0 to 2 - 1 such that labels of any two adjacent nodes differ only in one bit position. Links are also labeled from 0 to (n - 1) such that link i connects two nodes whose labels differ in the ith bit, the rightmost bit position being 0. The Hamming distance between two nodes u and u,

The determination of Hamiltonian cycles 191

H(u, v), is the number of links between them along the shortest path. The Hamming distance between u and u is also the number of bits in which labels of u and u differ.

Let Z be the ternary set (0, 1, X>, where X is a dont cure symbol. Then every subcube of Q,, can be uniquely represented by a string of symbols in C. Such a string of symbols is called the label of the corresponding subcube. Each symbol in the label of a subcube corresponds to a certain dimension, starting from the rightmost symbol in the label as dimension 0. If dimension i in the label of a subcube corresponds to symbol X, then the subcube is said to span dimension i; otherwise dimension i is fixed to its corresponding symbol (i.e. 0 or 1). A k-cube contained in an n-cube (0

192 Shahram Latifi and Si-Qing Zheng

Table 1

GCs(link labels)

0-1-0-2-0-1-0 0-2-0-1-0-

Recommended