www.elsevier.com/locate/ipl
Embedding hamiltonian paths in hypercubes
with a required vertex in a fixed position
Chung-Meng Lee
a, Jimmy J.M. Tan
a,∗, Lih-Hsing Hsu
baDepartment of Computer Science, National Chiao Tung University, Hsinchu, Taiwan 30010, ROC bDepartment of Computer Science and Information Engineering, Providence University, Taiwan, ROC
Received 11 September 2007; received in revised form 17 January 2008 Available online 8 March 2008
Communicated by A.A. Bertossi
Abstract
Assume that n is a positive integer with n 2. It is proved that between any two different vertices x and y of Qnthere exists
a path Pl(x, y)of length l for any l with h(x, y) l 2n− 1 and 2|(l − h(x, y)). We expect such path Pl(x, y)can be further
extended by including the vertices not in Pl(x, y)into a hamiltonian path from x to a fixed vertex z or a hamiltonian cycle. In
this paper, we prove that for any two vertices x and z from different partite set of n-dimensional hypercube Qn, for any vertex y∈ V (Qn)− {x, z}, and for any integer l with h(x, y) l 2n− 1 − h(y, z) and 2|(l − h(x, y)), there exists a hamiltonian path
R(x, y, z; l) from x to z such that dR(x,y,z;l)(x, y)= l. Moreover, for any two distinct vertices x and y of Qnand for any integer l
with h(x, y) l 2n−1and 2|(l − h(x, y)), there exists a hamiltonian cycle S(x, y; l) such that dS(x,y;l)(x, y)= l.
©2008 Elsevier B.V. All rights reserved.
Keywords: Interconnection networks
1. Introduction
In this paper, a network is represented as a loopless undirected graph. For the graph definition and notation, we follow [1]. G= (V, E) is a graph if V is a finite set and E is a subset of{(a, b) | (a, b) is an unordered pair of V}. We say that V is the vertex set and E is the edge set. A graph G= (V0∪ V1, E)is bipartite if
V (G)is the union of two disjoint sets V0 and V1such
that every edge joins V0 with V1. Two vertices u and
v are adjacent if (u, v)∈ E. A path is a sequence of
* Corresponding author.
E-mail addresses: [email protected] (J.J.M. Tan), [email protected] (L.-H. Hsu).
adjacent vertices, written asv0, v1, . . . , vm, in which
all the vertices v0, v1, . . . , vmare distinct except
possi-ble v0= vm. We also write the pathv0, P , vm where
P = v0, v1, . . . , vm. The length of a path P , denoted
by l(P ), is the number of edges in P . Let u and v be two vertices of G. The distance between u and v denoted by dG(u, v)is the length of the shortest path of G joining u
and v. A cycle is a path with at least three vertices such that the first vertex is the same as the last one. A hamil-tonian cycle is a cycle of length|V (G)|. A hamiltonian path is a path of length|V (G)| − 1.
Interconnection networks play an important role in parallel computing/communication systems. The graph embedding problem is a central issue in evaluating a network. The graph embedding problem asked if the
0020-0190/$ – see front matter © 2008 Elsevier B.V. All rights reserved. doi:10.1016/j.ipl.2008.02.013
quest graph is a subgraph of a host graph, and an im-portant benefit of the graph embeddings is that we can apply existing algorithm for guest graphs to host graphs. This problem has attracted a burst of studies in recent years. Cycle networks and path networks are suitable for designing simple algorithms with low communica-tion costs. The cycle embedding problem, which deals with all possible length of the cycles in a given graph, is investigated in a lot of interconnection networks [2, 7,9,11,14]. The path embedding problem, which deals with all possible length of the paths between given two vertices in a given graph, is investigated in a lot of inter-connection networks [3–6,11,13,14].
Let u= unun−1. . . u2u1 be an n-bit binary strings.
The Hamming weight of u, denoted by w(u), is the number of i such that ui= 1. Let u = unun−1. . . u2u1
and v= vnvn−1. . . v2v1be two n-bit binary strings. The
Hamming distance h(u, v) between two vertices u and
v is the number of different bits in the corresponding
strings of both vertices. The n-dimensional hypercube, denoted by Qn, consists of all n-bit binary strings as
its vertices and two vertices u and v are adjacent if and only if h(u, v)= 1. Thus, Qn is a bipartite graph with
bipartition {u | w(u) is odd} and {u | w(u) is even}. A vertex u of Qn is white if w(u) is odd, otherwise u is black. It is known that dQn(u, v)= h(u, v). For
i= 0, 1, let Qin−1denote the subgraph of Qninduced by
{u = unun−1. . . u2u1| un= i}. Obviously, Qin−1is
iso-morphic to Qn−1. For any vertex u= unun−1. . . u2u1,
we use unto denote the vertex v= v
nvn−1. . . v2v1with
ui= vi for 1 i n − 1 and un= 1 − vn.
The hypercube Qn is one of the most popular
in-terconnection networks for parallel computer/communi-cation system [10]. This is partly due to its attractive properties such as regularity, recursive structure, vertex and edge symmetry, maximum connectivity, as well as effective routing and broadcasting algorithm.
For the path embedding problem on hypercube, Li et al. [11] proved that between any two different vertices
x and y of Qn there exists a path Pl(x, y) of length l
for any l with h(x, y) l 2n− 1 and 2|(l − h(x, y)). Note that the requirement 2|(l − h(x, y)) is needed be-cause Qn is a bipartite graph for every positive
inte-ger n. Moreover, the requirement h(x, y) l 2n− 1 is needed because the distance between x and y in Qnis
h(x, y). Obviously, we expect such path Pl(x, y)can be
further extended by including the vertices not in Pl(x, y)
into a hamiltonian path from x to a fixed vertex z or a hamiltonian cycle. For this reason, we prove that for any two vertices x and z from different partite set of Qn, for any vertex y /∈ {x, z}, and for any integer l with
h(x, y) l 2n− 1 − h(y, z) and 2|(l − h(x, y)), there
exists a hamiltonian path R(x, y, z; l) from x to z such that dR(x,y,z;l)(x, y)= l. As a corollary, we prove that
for any n 2, for any two distinct vertices x and y of Qn and for any integer l with h(x, y) l 2n−1and
2|(l − h(x, y)) there exists a hamiltonian cycle S(x, y; l) such that dS(x,y;l)(x, y)= l.
In the following section, we introduce another in-teresting property, called 2RP-property, of hypercubes. We defer the proof of 2RP-property for hypercube in Section 3. Instead we prove that many interesting prop-erties, including the aforementioned propprop-erties, of hy-percube is a direct consequence of 2PR-property. In Section 4, we give a discussion on 2RP-property.
2. 2RP-property
Assume that n is any positive integer with n 2. Let
u and x be two distinct white vertices of Qnand v and y be two distinct black vertices of Qn. It is proved in
[8] that there are two disjoint paths P1and P2such that
(1) P1is a path joining u to v, (2) P2is a path joining x
to y, and (3) P1∪ P2spans Qn. We call such property
the be the 2P property. The 2P property has been used in many applications of hypercubes [8,12]. Obviously, the lengths of P1and P2satisfy l(P1)+ l(P2)= 2n− 2.
Yet, we can further require that the length of P1, and
hence the length of P2, can be any odd integer such that
l(P1) h(u, v) and l(P2) h(x, y). We call such
prop-erty to be the 2RP propprop-erty. More precisely, let u and x be two distinct white vertices of Qnand v and y be two
distinct black vertices of Qn. Let l1and l2are odd
inte-gers with l1 h(u, v), l2 h(x, y), and l1+l2= 2n−2.
Then there are two disjoint paths P1and P2 such that
(1) P1is a path joining u to v with l(P1)= l1, (2) P2is
a path joining x to y with l(P2)= l2, and (3) P1∪ P2
spans Qn. In next section, we will formally prove the
following theorem.
Theorem 2.1. Qnsatisfies the 2RP property if n 4.
Now, we make some remarks to illustrate that some interesting properties of hypercubes are consequences of Theorem 2.1.
Remark 1. The hamiltonian laceable property of
hyper-cubes, proved in [15], states that there exists a hamil-tonian path of Qn joining any white vertex u to any
black vertex y. Now, we prove that Qn is hamiltonian
laceable by Theorem 2.1. Obviously, Qnis hamiltonian
laceable for n= 1, 2, 3. Since n 4, we can choose a pair of adjacent vertices v and x such that v is a black vertex with v= y and x be a white vertex with x = u.
By Theorem 2.1, there are two disjoint paths P1and P2
such that (1) P1is a path joining u to v, (2) P2is a path
joining x to y, and (3) P1∪ P2 spans Qn. Obviously,
u, P1, v, x, P2, y forms a hamiltonian path joining u
to y. Thus, Qnis hamiltonian laceable.
Remark 2. The bipanconnected property of Qn, proved
in [11], stated that between any two different vertices x and y of Qn there exists a path Pl(x, y)of length l for
any l with h(x, y) l 2n−1 and 2|(l −h(x, y)). Now, we prove that Qn is bipanconnected by Theorem 2.1.
Obviously, Qn is bipanconnected for n= 1, 2, 3. Now,
we consider n 4. Without loss of generality, we as-sume that x is a white vertex.
Suppose that y is a black vertex. Thus, h(x, y) is odd. Let l be any odd integer with h(x, y) l 2n− 1. Sup-pose that l= 2n− 1. By Remark 1, Qn is hamiltonian
laceable. Obviously, the hamiltonian path of Qnjoining x and y is of length 2n− 1. Suppose that l < 2n− 1.
Since n 4, we can choose a pair of adjacent vertices u and v such that u is a white vertex with u= x and v be a black vertex with v= y. Obviously, h(u, v) = 1. By Theorem 2.1, there exist two disjoint paths P1and P2
such that (1) P1 is a path joining u to v with l(P1)=
2n− 2 − l, (2) P2is a path joining x to y with l(P2)= l,
and (3) P1∪ P2 spans Qn. Obviously, P2 is a path of
length l joining x to y.
Suppose that y is a white vertex. Thus, h(x, y) is even. Let l be any even integer with h(x, y) l < 2n− 1. Since n 4, we can choose two different neigh-bors u and v of y such that h(x, u) = h(x, y) − 1. By Theorem 2.1, there exist two disjoint paths P1and
P2 such that (1) P1 is a path joining x to u with
l(P1)= l − 1, (2) P2 is a path joining y to v with
l(P2)= 2n− l − 1, and (3) P1∪ P2 spans Qn.
Obvi-ously,x, P1, u, y is a path of length l joining x to y.
Thus, Qnis bipanconnected.
Remark 3. The edge-bipancyclic property of Qn,
proved in [11], stated that for any edge e= (x, y) and for any even integer with 4 l 2n there exists a
cy-cle of length l containing the edge e if n 2. Again, we prove that Qnis edge-bipancyclic by Theorem 2.1.
Obviously, Qn is edge-bipancyclic for n= 2, 3. Thus,
we consider n 4. Suppose that l = 2n. By Remark 1, there exists a hamiltonian path P joining x to y. Obvi-ously, x, P, y, x forms a hamiltonian cycle of length 2n containing the edge e. Suppose that l < 2n. Since n 4, we can choose a pair of adjacent vertices u and
v such that u is a white vertex. By Theorem 2.1, there
exist two disjoint paths P1and P2such that (1) P1is a
path joining u to v with l(P1)= 2n− l − 1, (2) P2is a
path joining x to y with l(P2)= l − 1, and (3) P1∪ P2
spans Qn. Obviously,x, P2, y, x is a cycle of length l
containing the edge e. Thus, Qnis edge-bipancyclic for
n 2.
The following results are also consequence of Theo-rem 2.1.
Theorem 2.2. Assume that n be any positive integer
with n 2. Let x and z be two vertices from differ-ent partite set of Qn and y be a vertex of Qn that
is not in {x, z}. For any integer l with h(x, y) l 2n − 1 − h(y, z) and 2|(l − h(x, y)), there exists a hamiltonian path R(x, y; z, l) from x to z such that dR(x,y,z;l)(x, y)= l.
Proof. By brute force, we can check the theorem holds
for n= 2, 3. Now, we consider n 4. Without loss of generality, we assume that x is a white vertex and z is a black vertex.
Suppose that y is a black vertex. Obviously, h(y, z) 2. There exists a neighbor w of y such that w= x and h(w, z)= h(y, z) − 1. Obviously, w is a white vertex. By Theorem 2.1, there exist two disjoint paths R1 and R2 such that (1) R1 is a path joining x to y
with l(R1)= l, (2) R2 is a path joining w to z with
l(R2)= 2n− l − 2, and (3) R1∪ R2spans Qn. We set
R as x, R1, y, w, R2, z. Obviously, R is the required
hamiltonian path.
Suppose that y is a white vertex. Obviously, h(x, y) 2. There exists a neighbor w of y such that w= z and h(w, x)= h(y, x) − 1. Obviously, w is a black ver-tex. By Theorem 2.1, there exist two disjoint paths R1
and R2 such that (1) R1 is a path joining x to w with
l(R1)= l − 1, (2) R2 is a path joining y to z with
l(R2)= 2n− l − 1, and (3) R1∪ R2spans Qn. We set
R as x, R1, w, y, R2, z. Obviously, R is the required
hamiltonian path. 2
Corollary 2.1. Assume that n is a positive integer with
n 2. Let x and y be any two different vertices of Qn.
For any integer l with h(x, y) l 2n−1there exists a hamiltonian cycle S(x, y; l) such that dS(x,y;l)(x, y)= l
and 2|(l − h(x, y)).
Proof. Let z be a neighbor of x such that z= y. By
The-orem 2.2, there exits a hamiltonian path R joining x to
z such that dR(x,y,z;l)(x, y)= l. We set S as x, R, z, x.
3. Proof of Theorem 2.1
Now, we prove Theorem 2.1. By brute force, we can check the theorem holds for n= 4. Assume the theorem holds for any Qk with 4 k < n. Without
loss of generality, we can assume that l1 l2. Thus,
l2 2n−1− 1. Since Qnis edge symmetric, we can
as-sume that u∈ V (Q0n−1)and x∈ V (Q1n−1). We have the following cases.
Case 1. v∈ V (Q0n−1)and y∈ V (Q1n−1). Suppose that l2<2n−1− 1. By Remark 1, there exists a hamiltonian
path R of Q0n−1joining u and v. Since the length of R is 2n−1− 1, we can write R as u, R1, p, q, R2, v for
some black vertex p with pn= x and some white vertex
q with qn= y. Obviously, h(pn, qn)= 1. By induction, there exist two disjoint paths S1and S2such that (1) S1
is a path joining pnto qnwith l(S1)= l1− 2n−1, (2) S2
is a path joining x to y with l(S2)= l2, and (3) S1∪ S2
spans Q1n−1. We set P1asu, R1, p, pn, S1, qn, q, R2, v
and set P2as S2. Obviously, P1and P2are the required
paths. See Fig. 1(a) for illustration.
Suppose that l2= 2n−1− 1. By Remark 1, there
ex-ists a hamiltonian path P1of Q0n−1joining u and v and
there exists a hamiltonian path P2 of Q1n−1 joining x
and y. Obviously, P1and P2are the required paths. See
Fig. 1(b) for illustration.
Case 2.{v, y} ⊂ V (Q1n−1). Suppose that l2<2n−1− 1.
We choose a neighbor p of v such that p= x. Obviously,
p is a white vertex. By induction, there exist two disjoint
paths S1and S2such that (1) S1is a path joining p to v with l(S1)= l1− 2n−1, (2) S2is a path joining x to y
with l(S2)= l2, and (3) S1∪S2spans Q1n−1. By Remark
1, there exists a hamiltonian path R of Q0n−1joining u and pn. We set P1asu, R, pn, p, S1, v and we set P2
as S2. Obviously, P1and P2are the required paths. See
Fig. 1(c) for illustration.
Suppose that l2 = 2n−1− 1. Again, we choose a
neighbor p of v such that p= x. By induction, there exist two disjoint paths S1 and S2such that (1) S1 is a
path joining p to v with l(S1)= 1, (2) S2is a path
join-ing x to y with l(S2)= 2n−1− 3, and (3) S1∪ S2spans
Q1n−1. Obviously, we can write S2asx, S21, r, s, S22, y
for some black vertex r with rn= u. Again by
induc-tion, there exist two disjoint paths R1and R2such that
(1) R1is a path joining u to pnwith l(R1)= 2n−1− 3,
(2) R2is a path joining rnto snwith l(R2)= 1, and (3)
R1∪ R2spans Q0n−1. We set P1asu, R1, pn, p, v and
set P2 as x, S21, r, rn, sn, s, S22, y. Obviously, P1 and
P2are the required paths. See Fig. 1(d) for illustration.
Case 3. y∈ V (Q0n−1)and v∈ V (Q1n−1). Suppose that l2= 1. Obviously, x = yn. Let p be a neighbor of y in
Q0n−1such that yn= v and let q be a neighbor of p in Q0n−1such that p= y. By induction, there exist two dis-joint paths R1and R2such that (1) R1is a path joining u to q and l(R1)= 2n−1− 3, (2) R2 is a path joining p to y and l(R2)= 1, and (3) R1∪ R2 spans Q0n−1.
Obviously, pn is a black vertex and qn is a white ver-tex. Again by induction, there exist two disjoint paths S1 and S2 such that (1) S1 is a path joining qn to v
with l(S1)= 2n−1− 3, (2) S2is a path joining x to pn
with l(S2)= 1, and (3) S1∪ S2spans Q1n−1. We set P1
asu, R1, q, p, pn, qn, S1, v and set P2asx, y.
ously, P1 and P2 are the required paths. See Fig. 1(e)
for illustration.
Suppose that l2 3. We set p be a neighbor in Q0n−1
of y with p= u if h(x, y) = 1 and set p be a neighbor of y in Q0n−1 with p= u and h(p, y) = h(x, y) − 1 if h(x, y) 3. Let q be a neighbor vn in Q0n−1such that
q= y and qn= x. Thus, h(qn, v)= 1. By induction, there exist two disjoint paths R1and R2such that (1) R1
is a path joining u to p with l(R1)= 2n−1− 3, (2) R2
is a path joining q to y with l(R2)= 1, and (3) R1∪ R2
spans Q0n−1. Again by induction, there exist two dis-joint paths S1and S2such that (1) S1is a path joining qnto v with l(S1)= l1− 2n−1+ 2, (2) S2is a path
join-ing x to pn with l(S2)= 12− 2, and (3) S1∪ S2spans
Q1n−1. We set P1as u, R1, q, qn, S1, v and set P2as
x, S2, pn, p, y. Obviously, P1and P2are the required
paths. See Fig. 1(f) for illustration.
Case 4. {v, y} ⊂ V (Q0n−1). Suppose that l2= 1.
Ob-viously, y= xn. By Remark 1, there exist a hamil-tonian path R of Q0n−1joining u to v. Obviously, R can be written asu, R1, p, y, q, R2, v. Note that u = p if
l(R1)= 0. Obviously, p and q are white vertices. Thus, pn and qnare black vertices. Let r be a neighbor of qn in Q1n−1such that r= x. By induction, there exist two disjoint paths S1and S2such that (1) S1is a path joining pn to r with l(S1)= 2n−1− 3, (2) S2is a path joining qnto x with l(S2)= 1, and (3) S1∪ S2spans Q1n−1. We
set P1asu, R1, p, pn, S1, r, qn, q, R2, v and set P2as
x, y. Obviously, P1and P2are the required paths. See
Fig. 1(g) for illustration.
Suppose that l2 3. We set p be a neighbor of y in
Q0n−1with p= u if h(x, y) = 1 and set p be a neighbor of y in Q0n−1 with p= u and h(p, y) = h(x, y) − 1 if h(x, y) 3. By induction, there exist two disjoint paths R1and R2such that (1) R1is a path joining u to v with
l(R1)= 2n−1− 3, (2) R2 is a path joining p to y with
l(R2)= 1, and (3) R1∪ R2spans Q0n−1. Obviously, we
can write R1asu, R11, s, t, R12, v for some black vertex s such that sn= x. By induction, there exist two disjoint
paths S1and S2such that (1) S1is a path joining snto tnwith l(S1)= l1− 2n−1− 2, (2) S2is a path joining x
to pn with l(S2)= l2− 2, and (3) S1∪ S2spans Q1n−1.
We set P1asu, R11, s, sn, S1, tn, t, R21, v and set P2as
x, S2, pn, p, y. Obviously, P1and P2are the required
paths. See Fig. 1(h) for illustration.
4. Discussion
Since there are four vertices in Q2, it is easy to check
that Q2 satisfies the property. However, the
2RP-property does not hold for Q3. Let u= 000, v = 111,
x= 011, and y = 001. By brute force, we can check
that we cannot find two disjoint paths P1and P2such
that P1is a path joining u to v with l(P1)= 3 and P2is
a path joining x to y with l(P2)= 3.
By changing the roles of the vertices in bipartite sets in Theorem 2.1, we have the following theorem. The proof is similar to the proof of Theorem 2.1.
Theorem 4.1. Assume that n is a positive integer with
n 4. Let u and x be two distinct white vertices of Qn
and v and y be two distinct black vertices of Qn. Let l1
and l2be even integers with l1 h(u, x), l2 h(v, y),
and l1+ l2 = 2n − 2 except for the case {l1, l2} =
{2, 2n− 4} with {u, x, v, y} inducing a cycle of length 4.
There exist two disjoint paths P1and P2such that (1) P1
is a path joining u to x and l(P1)= l1, (2) P2is a path
joining v to y and l(P2)= l2, and (3) P1∪P2spans Qn.
Suppose that n= 3. Let u = 000, v = 011, x = 100, and y= 111. We can check that there are no two dis-joint paths P1 and P2such that P1is a path joining u
to v and P2is a path joining x to y such that P1∪ P2
spans Q3. Again, the above theorem does not hold for
n= 3.
References
[1] J.A. Bondy, U.S.R. Murty, Graph Theory with Applications, North-Holland, New York, 1980.
[2] K. Day, A. Tripathi, Embedding of cycles in arrangement graphs, IEEE Trans. Comput. 12 (1993) 1002–1006.
[3] J.-M. Chang, J.-S. Yang, Y.-L. Wang, Y. Cheng, Panconnectiv-ity, fault-tolerant Hamiltonicity and Hamiltonian connectivity in alternating group graphs, Networks 44 (2004) 302–310. [4] J. Fan, X. Jia, X. Lin, Optimal path embedding in crossed cubes,
IEEE Trans. Parallel Distrib. Systems 16 (2005) 1190–1200. [5] J. Fan, X. Jia, X. Lin, Complete path embeddings in crossed
cubes, Inform. Sci. 176 (2006) 3332–3346.
[6] J. Fan, X. Jia, X. Lin, Optimal embeddings of paths with vari-ous lengths in twisted cubes, IEEE Trans. Parallel Distrib. Sys-tems 18 (2007) 511–521.
[7] A. Germa, M.C. Heydemann, D. Sotteau, Cycles in cube-con-nected cycles graph, Discrete Appl. Math. 83 (1998) 135–155. [8] L.H. Hsu, S.C. Liu, Y.N. Yeh, Hamiltonicity of hypercubes with
constraint of required and faulty edges, J. Combin. Optimiza-tion 14 (2007) 197–204.
[9] S.C. Hwang, G.H. Chen, Cycles in butterfly graphs, Net-works 35 (2) (2000) 161–171.
[10] F.T. Leighton, Introduction to Parallel Algorithms and Architec-tures: Arrays· Trees · Hypercubes, Morgan Kaufmann Publish-ers, San Mateo, CA, 1992.
[11] T.K. Li, C.H. Tsai, J.J.M. Tan, L.H. Hsu, Bipanconnected and edge-fault-tolerant bipancyclic of hypercubes, Inform. Process. Lett. 87 (2003) 107–110.
[12] C.K. Lin, J.M. Tan, D.F. Hsu, L.H. Hsu, On the spanning con-nectivity and spanning laceability of hypercube-like networks, Theoret. Comput. Sci. 381 (2007) 218–229.
[13] M. Ma, J.M. Xu, Panconnectivity of locally twisted cubes, Appl. Math. Lett. 19 (2006) 673–677.
[14] M. Ma, G. Liu, J.M. Xu, Panconnectivity and edge-fault-tolerant pancyclicity of augmented cubes, Parallel Comput. 33 (2007) 35–42.
[15] G. Simmons, Almost all n-dimensional rectangular lattices are Hamilton laceable, Congr. Numer. 21 (1978) 103–108.