An algorithm for embedding Tur´an graphs into incomplete hypercubes with minimum wirelength

. The wirelength is one of the key parameters of the quality of embedding graphs into host graphs. To our knowledge, no results for computing the wirelength of embedding irregular graphs into irregular graphs are known in the literature. We develop an algorithm that determines the wirelength of embedding of the Tur´an graph T ( ℓ, 2 p ), where 2 n − 1 ≤ ℓ < 2 n and 1 ≤ p ≤ ⌈ log 2 ℓ ⌉ ≤ n , into the incomplete hypercube I ℓn . Incomplete hypercubes form an important generalization of hypercubes because they eliminate the restriction on the number of nodes in a system.


Introduction
To establish parallel systems, various interconnected schemes have been proposed. It is much desirable that such a scheme admits construction in any size and offers incremental flexibility to maximum level. One of the most popular interconnected schemes is the binary hypercube and many machines based on this topology are available. The hypercube topology, however, interconnects precisely 2 n nodes for some positive integer n, thus severely limiting permissible system sizes.
In order to eliminate the restriction on the size of the network, that is, to be able to construct machines of arbitrary sizes, incomplete hypercubes were proposed [19]. The intrinsic structure of the incomplete hypercubes involves a copy of a large hypercube as well as hierarchically smaller hypercubes, and is thus eligible to simultaneously execute multiple jobs of different sizes [35,37]. Katseff developed algorithms for routing and broadcasting messages in incomplete hypercubes [19], while some structural properties of incomplete hypercubes have been studied in [37].
A connected graph can be used to frame the topological structure of an interconnection network, but there are various incompatible conditions such as small diameter, symmetry properties, high connectivity, high recursive constructability, strong scalability, maximum fault tolerance, efficient routing, and broadcasting, that need to be considered when designing it. It is not possible to design an optimum network to fulfill all the above criteria. A key problem in the design and assessment of an interconnection network is the study of existing networks to be embedded into this network and vice versa [28]. The embedding of the interconnection networks is intended to analyze the interrelationship between the graphs in order to determine whether a particular guest graph is included in or interrelated with the host graph. Mapping a logical graph into a host graph via graph embeddings is a major technique. If a guest graph can be efficiently embedded into the host graph with less cost, then the method developed in the interconnection network with a guest graph can be used in the interconnection network with the host graph at less cost. This technique in particular allows numerous applications [9,21,22,25,31,39], let us emphasize architecture simulations as well as processor allocations.
There are certain cost criteria to measure the quality of an embedding. Among the most important criteria are the congestion and the wirelength [28]. The former one is defined as the cardinality of a largest set of edges from the guest graph that are mapped on paths that contain a specific edge of the host graph. The key point here is that when we are faced with a large congestion, a variety of problems may occur. These include, among other issues, circuit switching, long communication delay, as well as the existence of uncontrolled noise. In data networking, typical effects include packet loss or blocking of new connections. Therefore, a minimum congestion is utmost desirable in network embeddings [29]. The other measure, that is, the wirelength, is the sum of the congestions over the edges of the host graph. Sources for its interest include VLSI design, data structures, and more [29]. Recently, graph embeddings have been thoroughly investigated for a variety of networks, such as locally twisted cubes into paths [1], hypercubes into grids [10], 3-ary n-cubes into grids [11], rooted hypertrees into hypercubes and vice-versa [30], locally twisted cubes into 2-dimensional grids [33], circulant networks into rooted binary trees, m-rooted sibling trees, r-dimensional hypertrees [32], enchanced hypercubes into windmills and necklace graphs [23], in particular, binary trees into incomplete hypercubes [36], incomplete binary trees and meshes into incomplete hypercubes [13], incomplete binary trees into incomplete hypercubes [17], and cycles into incomplete hypercubes [18]. For additional aspects of network embeddings see [15].
For example, the edge congestion and the wirelength of the embedding f : G → H, where G is the Cartesian product C 3 × C 3 and H is the path P 9 (refer to Fig. 1) are EC f (G, H) = 8 and W L f (G, H) = 48. The embedding f (x) = x which minimize the congestion, need not to minimize the wirelength and vice-versa. On the other hand, for any embedding g with g(x) = x, the sum of the edge congestions (called the edge congestion sum) and the wirelength are by definition equal, that is, EC g (e) = W L g (G, H) . Fully connected networks correspond to complete graphs. These graphs naturally generalize to complete p-partite graphs, in which the node/vertex set can be partitioned into p independent sets and all possible edges between vertices from different independent sets exist [12]. Embedding parameters were analyzed for complete multipartite graph in [2,29,31,34]. If the parts are of cardinality n i , i ∈ [p], then the complete multipartite graph is denoted by K n1,...,np . Among these graphs, Turán graphs play a prominent role. If n and p are positive integers, then the Turán graph T (n, p) is the chromatically unique p-multipartite graph of order n such that the cardinalities of its parts are as equal as possible (that is, every two cardinalities are either equal or differ by exactly one). The original source for Turán graphs lies in extremal graph theory, but they are important also in a variety of different contexts, cf. [7,27].
The distance d(u, v) = d G (u, v) between vertices u and v of a graph G = (V (G), E(G)) is the length of a shortest u, v-path. The interval I(u, v) between u and v consists of all vertices on shortest u, v-paths, that is, of all vertices (metrically) between u and v: An induced subgraph H of G is called convex if I G (x, y) lies completely in H for every x, y ∈ V (H) [3].
If n ≥ 1, then the n-dimensional hypercube Q n (n-cube for short) has the vertex set {0, 1} n , vertices being adjacent if they differ in exactly one position/bit. We can also identify the vertices of Q n with the integers 0, 1, . . . , 2 n − 1 using the natural mapping that assigns to Note that in the lexicographic labeling, integers-vertices i and j are adjacent if and only if |i−j| = 2 p for some integer p ≥ 0 [4,29].
We still need to define the incomplete hypercubes [6]. If 2 n−1 ≤ ℓ < 2 n , then the n-dimensional incomplete hypercube I ℓ n has ℓ vertices and is defined recursively as follows. I ℓ n comprises two components, Q n−1 and I ℓ−2 n−1 k , where k = ⌈log 2 (ℓ − 2 n−1 )⌉. The vertices of Q n−1 are lexicographically labeled from 0 to 2 n−1 − 1, and the vertices in I ℓ−2 n−1 k from 2 n−1 to ℓ − 1, again using the lexicographic labeling [24]. An edge exists between a vertex u ∈ V (Q n−1 ) with label i and a vertex v ∈ V (I ℓ−2 n−1 k ) with label j if and only if |i − j| = 2 n−1 . In Fig. 2 the incomplete hypercube I 23 5 is drawn. The graph I 23 5 comprises Q 4 (colored in red), Q 2 (colored in blue), and I 3 2 (colored in green). Note that I 1 1 is isomorphic to Q 0 (a single vertex), I 2 2 is isomorphic to Q 1 , and I 3 2 comprises of Q 1 and Q 0 .
To our knowledge, no results for computing the exact wirelength of embedding irregular graphs into irregular graphs are known in the literature. In this paper, we overcome this by taking the Turán graph T (ℓ, 2 p ), where 2 n−1 ≤ ℓ < 2 n and 1 ≤ p ≤ ⌈log 2 ℓ⌉ ≤ n, as a guest graph, and the ndimensional incomplete hypercube I ℓ n , n ≥ 1 as a host graph. In the next section we formally define further concepts needed and recall two key lemmas for our algorithm, the so-called Generalized Congestion Lemma and the Partition Lemma. In Section 3 the algorithm is presented and its correctness proved.

Preliminaries
For n ≥ 1, we denote the set {1, . . . , n} by [n]. If X ⊆ V (G), then the subgraph of G induced by X will be denoted by G[X].
Let G = (V (G), E(G)) and H = (V (H), E(H)) be graphs. An For brevity, we will denote in the rest of the paper the pair (f, P f ) simply as f . The edge congestion of a given embedding f of G into H is the maximum number of edges of the graph G that are embedded on paths containing a single edge of H.
Then the congestion of f is defined as and the congestion of embedding G into H is defined as H) .
The wirelength of an embedding f of G into H is and the wirelength of embedding G into H is If G is a graph and M ⊆ V (G), then set In other words, is the number of edges in the subgraph of G induced by the vertices of M . Further, . Such a set is called an optimal set with respect to k [5,16]. Recall that the famous Turán's theorem asserts that among the graphs of order n with no subgraph K p+1 , the Turán graph T (n, p) has the maximum number of edges. An example is given if Fig. 3, where H 1 is a Turán 5-partite subgraph of G with 47 vertices and H 2 is not. For later purposes we state the following consequence of the Turán's theorem.
Property 2.1 If G is a complete p-partite graph and T (n, p) is its subgraph, then V (T (n, p)) is an optimal set with respect to the number of vertices.
The next two lemmas describe efficient techniques to find the exact wirelength using MSP [26,31]. (i) For every uv ∈ E(G i ), i ∈ {1, 2}, the path P f (uv) has no edges in S.
, the path P f (uv) has exactly one edge in S.
(iii) V (G 1 ) and V (G 2 ) are optimal with respect to the number of vertices.
If S exists, then EC f (S) is minimum over all embeddings f : G → H and    Fig. 4 (a) and (b). Let F be the identity mapping from G to H, and let S and T be the edge cuts as shown in Fig. 4 (c) and (d), respectively. The edge cuts S and T satisfy the first two conditions of the Generalized Congestion Lemma. On the other hand, S satisfies the third condition of the Generalized Congestion Lemma, whereas T does not. Hence, finding edge cuts that form an edge partition of the host graph satisfying all the conditions of the Generalized Congestion Lemma is a challenging problem.
If G is a connected graph, then the relation Θ is a defined on E(G) in the following way. An edge e = xy is in relation Θ with an edge t = uv, if and only if d( where d is the distance function as defined in the introduction. It is straightforward to see that Θ is both reflexive and symmetric, but it is in general not transitive; a small example for this fact is provided by the complete bipartite graph K 2,3 . Hence it is natural to consider the transitive closure of Θ, denoted by Θ * . Clearly, if Θ is transitive, then Θ * = Θ. The relation Θ * is then an equivalence relation; the partition of E(G) induced by the Θ * -equivalence classes is called the Θ * -partition, see [8,20,38].

The algorithm
In this section we describe an algorithm that computes the minimum wirelength of embedding T (ℓ, 2 p ) into I ℓ n , where 2 n−1 ≤ ℓ < 2 n and 1 ≤ p ≤ ⌈log 2 ℓ⌉ ≤ n. For this sake we first have a closer look to incomplete hypercubes.
The incomplete hypercube I ℓ n contains a set of hypercubes of dimension n − 1 and below, where no two cubes have the same cardinality. For instance, I 23 5 (Fig. 2) comprises Q 4 and I 7 3 , which, in turn, contains Q 2 and I 3 2 . If the binary representation of ℓ is 1x n−2 . . . x 1 x 0 , then I ℓ n contains, in addition to Q n−1 , also Q i , for all i such that x i = 1, 0 ≤ i ≤ n − 2. That is, Q i is a cube of I ℓ n iff the bit x i in the binary representation of ℓ equals 1. Consequently, the set of constituent cubes in an incomplete hypercube is unique [6]. Recall that the lexicographic labeling of I ℓ n assigns to its vertices node-labels ranging from 0 to ℓ − 1. For our purposes, we increase each label by one, so that the set labels of the vertices in I ℓ n is {1, . . . , 2 n−1 , 2 n−1 + 1, . . . , ℓ}. To make the algorithm more transparent, we first consider in detail the following specific case. The relation Θ * partitions E(I 23 5 ) into Θ * -classes E i , i ∈ [5], see the right-hand side of Fig. 5. We label the vertices of I 23 5 using the lexicographic labeling from 1 to 23, see the right-hand side of   T (23, 4)), the path P f (kk ′ ) is an arbitrary, fixed shortest f (k), f (k ′ )-path in I 23 5 . We shall demonstrate how to use Lemma 2.2 and Lemma 2.3 to compute the wirelength of T (23, 4) into I 23 5 .  Fig. 6. The graphs G 1 and G 2 are isomorphic to K 4,4,4,4 and to K 1,2,2,2 , respectively. Since these are Turán graphs, Property 2.1 implies that V (G 1 ) and V (G 2 ) are optimal sets. The following conclusions follow from the fact that H 1 and H 2 induce convex subgraphs of H. If xy ∈ E(G 1 ), then all shortest paths between f (x) and f (y) lie in H 1 . Similarly, if xy ∈ E(G 2 ), then all shortest paths between f (x) and f (y) lie in H 2 . Moreover, if xy ∈ E(G), where x ∈ V (G 1 ) and y ∈ V (G 2 ), then a shortest path between f (x) and f (y) contains exactly one edge from E 1 . In summary, E 1 satisfies conditions (i)-(iii) of Lemma 2.2. Consequently, EC f (E 1 ) is minimum and Using similar arguments as above, we proceed with I 23    (11,4). So EC f (E 5 ) is minimum and

The general case
In this section we give an algorithm that computes the minimum wirelength of embedding T (ℓ, 2 p ) into I ℓ n , where 2 n−1 ≤ ℓ < 2 n and 1 ≤ p ≤ ⌈log 2 ℓ⌉ ≤ n.
We first label the vertices of T (ℓ, 2 p ) by labels 0, 1, . . . , ℓ − 1. We use the snake-wise labeling just as it as done in the previous subsection for the case T (23, 4); see the left-hand side of Fig. 5. A minor difference is that here we use labels 0, 1, . . . , ℓ − 1 instead of 1, 2, . . . , ℓ to be consistent with the labeling to be used for the vertices of the corresponding incomplete hypercubes. Set m = 2 p . We write the labels into a matrix M (x, y) of dimension m × ⌈ℓ/m⌉. In M (x, y), x denotes a part and y denotes the vertex position within the part. The snake-wise labeling guarantees that each of the m parts contains either ⌈ℓ/m⌉ or ⌈ℓ/m⌉−1 labels. In the latter parts, we set M (x, ⌈ℓ/m⌉) = −1 to have the whole matrix M well-defined. For instance, the matrix M for T (23, 4) is:  6, 9, 14, 17, 22}, {2, 5, 10, 13, 18, 21}, and {3, 4, 11, 12, 19, 20}. We further define the matrix M lex which is obtained from M by replacing each entry M (x, y) by the lexicographic label of M (x, y), that is, its binary representation. Each lexicographic label is thus an array of length n. The set of elements of the matrix M lex is hence equal to the vertex set of I ℓ n . The mapping M → M lex that maps M (x, y) to M lex (x, y) can be interpreted as a bijection V (T (ℓ, 2 p )) → V (I ℓ n ). As we shall shortly see, this mapping leads to the minimum wirelength of embedding T (ℓ, 2 p ) into I ℓ n . Now we are ready for the main algorithm. First, the vertices of T (ℓ, 2 p ) are labeled using the values from the matrix M . The labeling implies the aforementioned mapping f : has the lexicographic label of the vertex v as given in the matrix M lex . Then we use the Θ * -partitions of I ℓ n to apply Lemmas 2.2 and 2.3. This is formalized in Algorithm 1.

7:
Use Lemma 2.2 to determine the edge congestion of E i , i ∈ [n]. 8: Use Lemma 2.3 to find the exact wirelength.
In order to apply Lemma 2.2 in Algorithm 1, we use the Θ * -partition of I ℓ n as inherited by the Θ * -partition of Q n . Therefore, we need to prove that the conditions of Lemma 2.2 are satisfied: Proof: The Θ * -classes F 1 , . . . , F n of Q n are well-understood: the class F i , i ∈ [n], consists of the edges that differ in position i, cf. [14]. (In the lexicographic labeling of the vertices of Q n , the class F i then consists of the edges xy such that |x − y| = 2 i−1 .) Moreover, removing a class F i from Q n disconnects Q n into two copies of Q n−1 , both being convex subgraphs of Q n . These two components are induced by the vertices of the forms x 1 . . . x i−1 0x i+1 . . . x n and x 1 . . . x i−1 1x i+1 . . . x n , respectively. Using the lexicographic labeling this implies that the set of vertices of such a component consists of 2 i−1 blocks of 2 n−i consecutive integers. The described structure of Q n is hereditary when considering its induced subgraph I ℓ n . In particular, the Θ * -classes E 1 , . . . , E n of I ℓ n are the restrictions of the Θ * -classes F 1 , . . . , F n of Q n . (For an example consider Fig. 5, where I 23 5 and its five Θ * -classes are shown.) Moreover, since the Θ * -classes of Q n satisfy the first two conditions of Lemma 2.2 and Θ * -classes of I ℓ n are the restriction of the Θ * -classes of Q n , we infer that also the Θ * -classes of I ℓ n satisfy the first two conditions of Lemma 2.2.
We assume that the vertices of T (ℓ, 2 p ) are ordered based on their lexicographic labels. Then the vertices of G 1 have labels of the form x 1 . . . x i−1 0x i+1 . . . x n . Hence they are partitioned in at most 2 i−1 blocks of consecutive vertices. Note that all blocks, except possibly for the last one, contain 2 n−i vertices. We consider two cases depending on whethere p ≤ n − i or p > n − i.
In the first case, each block of 2 n−i vertices, contains exactly 2 n−i−p vertices from each part of the partition vertex-sets of T (ℓ, 2 p ), as shown in the left figure in Fig. 7. If the last block contains fewer than 2 n−i−p vertices, say s, then we write s = r2 p + t where r ≥ 0 and 0 ≤ t < 2 p . Now this block contains either r or r + 1 vertices of each part. Hence, the parts of the vertex-partition of G 1 either have the same size or differ by 1, i.e. G 1 is a Turán graph. It remains to consider the case where p > n − i. We further group the blocks of vertices to groups of size 2 p−n+i−1 ; see the right figure in Fig. 7. The first group contains the first vertex of half of the parts of the vertex-partition of T (ℓ, 2 p ), the second one the second vertex of the other half parts, and in general, the group 2s − 1 contains the (2s − 1)-th vertex of half of the parts, and group 2s contains the 2s-th vertex of the other half parts. If b is the total number of blocks (recall that b ≤ 2 i−1 ), we write b = r2 p−n+i + t, where r ≥ 0 and 0 ≤ t < 2 p−n+i . The first r2 p−n+i blocks contain exactly r vertices of each part of the vertex-partition of T (ℓ, 2 p ), and the last t blocks contain at most one vertex from each part. We conclude that G 1 is a Turán graph. Similarly, one can argue that G 2 is also a Turán graph, as claimed. 2 We are now ready to prove our main theorem: