Keywords

1 Introduction

The design of an interconnection network is an important issue for the multicomputer system. The hypercube [17, 18] is one of the most popular interconnection networks because of its attractive properties, including regularity, node symmetric, link symmetric, small diameter, strong connectivity, recursive construction, partition capability, and small link complexity. The architecture of an interconnected network is usually modeled by a graph with vertices representing processing units and edges representing communication links. We will use graph and network interchangeably in this paper.

The n-dimensional crossed cube CQn, proposed first by Efe [4, 5], is a variant of an n-dimensional hypercube. One advantage of CQn is that the diameter is only about one half of the diameter of an n-dimensional hypercube. Hung et al. [11] showed that CQn contains a fault-free Hamiltonian cycle, even if there are up to 2n – 5 edge faults. Wang studied the embedding of the Hamiltonian cycle in CQn [19]. For more properties of CQn, the reader can refer to [4,5,6, 12].

A Hamiltonian cycle is a graph cycle through a graph that visits each node exactly once. The ring structure is important for the multicomputer system, and its benefits can be found in [13]. Two Hamiltonian cycles in the graph are said to be edge-disjoint if they do not share any common edges. Edge-disjoint Hamilton cycles can provide advantages for algorithms using ring structures, and their application can be found in [16]. Further, edge-disjoint Hamiltonian cycles also provide the edge-fault tolerant hamiltonicity for the interconnection network. That is, when one edge in the Hamiltonian cycle fails, the other edge-disjoint Hamiltonian cycle can be adopted to replace it for transmission.

Previous related works are described below. Barth and Raspaud [3] showed that the butterfly networks contain two edge-disjoint Hamiltonian cycles. Bae et al. [1] studied edge-disjoint Hamiltonian cycles in k-ary n-cubes and hypercubes. Then, Barden et al. [2] constructed the maximum number of edge-disjoint spanning trees in a hypercube. Petrovic and Thomassen [15] characterized the number of edge-disjoint Hamiltonian cycles in hypertournaments. Hung presented how to construct two edge-disjoint Hamiltonian cycles in locally twisted cubes [7], augmented cubes [8], twisted cubes [10], transposition networks, and hypercube-like networks [9], respectively. In [9], Hung designed a recursive algorithm to construct two edge-disjoint Hamiltonian cycles in CQn. In this paper, we provide a parallel algorithm to construct two edge-disjoint Hamiltonian cycles in CQn with n ≥ 4. Each vertex of CQn can simultaneously run this algorithm to know which two edges were used in Hamiltonian cycles 1 and 2, respectively. The recursive algorithm [9] can be adopted by one vertex to constructs two Hamiltonian cycles and this vertex must transfer this message to all other vertices. However, according to our algorithm, each vertex can calculate to get the message, which is more helpful for implementation.

The rest of the paper is organized as follows: In Sect. 2, the structure of crossed cubes is introduced and some notations are given. Section 3 presented two edge-disjoint Hamiltonian cycles in CQ4. Based on this result, we further show a parallel algorithm to construct two edge-disjoint Hamiltonian cycles in CQn with n ≥ 4. Finally, Sect. 4 is the concluding remarks of this paper.

2 Preliminaries

Interconnection networks are usually modeled as undirected simple graphs G = (V, E), where the vertex set V (=V(G)) and the edge set E (=E(G)) represent the set of processing units and the set of communication links between nodes, respectively. The neighborhood of a vertex v in a graph G, denoted by N(v), is the set of vertices adjacent to v in G. A cycle Ck of length k in G, denoted by v0v1v2 − … − vk−2vk-1v0, is a sequence (v0, v1, v2, …, vk−1, v0) of nodes such that (vk−1, v0) ∈ E and (vi, vi+1) ∈ E for 0 ≤ i ≤ k − 2.

Now, we introduce crossed cubes. A vertex of the n-dimensional crossed cube CQn is represented by a binary string of length n. A binary string b of length n is denoted by bn−1bn−2 ······ b1b0, where bn−1 is the most significant bit. Suppose that G is a labeled graph whose vertices are associated with distinct binary strings, and let Gx be the graph obtained from G by prefixing the binary string on every node with x. Two binary strings x = x1x0 and y = y1y0 are pair-related, denoted xy, if and only if (x, ∈ y{(00, 00), (10, 10), (01, 11), (11, 01)}. In [5], Efe introduced the notion of pair-related to obtain that the diameter of CQn is only about one half of the diameter of Qn.

Definition 1

(Efe [5].) The n-dimensional crossed cube CQn is the labeled graph with the following recursive fashion:

1) CQ1 is the complete graph on two vertices with labels 0 and 1.

2) For n ≥2, CQn is composed of two subcubes CQ 0n−1 and CQ 1n−1 such that two vertices x = 0xn−2······x1x0V(CQ 0n−1 ) and y = 1yn−2······y1y0V(CQ 1n−1 ) are joined by an edge if and only if

  1. (i)

    xn2= yn2 if n is even, and

  2. (ii)

    x2i+1x2iy2i+1y2i for 0  i < \( \left\lfloor {(n - 1)/2} \right\rfloor \),

where x and y are called the (n − 1)-neighbors to each other, and denote as Nn−1(x) = y or Nn−1(y) = x.

For conciseness, an edge (x, Nj(x)) is denoted as ej(x), and an ej-edge is an edge (x, Nj(x)) in G. Obviously, there are 8 e3-edges, 8 e2-edges, 8 e1-edges and 8 e0-edges in CQ4. For example, Fig. 1 shows a 4-dimensional crossed cube CQ4. A CQ4 is composed of two subcubes CQ 03 (the left half in Fig. 1) and CQ 13 (the right half in Fig. 1). According to Definition 1 and the notion of pair-related, there exists an e3-edge connecting vertices 0000 and 1000, and so on. In this paper, sometimes the labels of vertices are changed to their decimal.

Fig. 1.
figure 1

A 4-dimensional crossed cube CQ4.

3 Main Results

3.1 Two Edge-Disjoint Hamiltonian Cycles in CQ4

Hung [9] provided two edge-disjoint Hamiltonian cycles in CQ4. The first cycle C16 is equal to 0100–0000–1000–1001–1111–1101–0111–0101–0011–0001−1011–1010–0010–0110–1110–1100–0100, and there are 6 e3-edges, 4 e2-edges, 4 e1-edges and 2 e0-edges in it. Since the cycle adopts a different number of edges in each dimension, the parallel construction algorithm that will be presented in the next section becomes more complicated. Fortunately, we found another set of two edge-disjoint Hamiltonian cycles in CQ4, and each cycle has the same number of edges in each dimension. We described this result in Proposition 2, and its validness can check by Fig. 2.

Fig. 2.
figure 2

(a) The first Hamiltonian cycle HC1 in CQ4, and (b) the second Hamiltonian cycle HC2 in CQ4, where the thick lines indicate the cycle.

Proposition 2.

Let HC1 = 0000–0010–0110–0100–1100–1101–1011–1010–1110–1111–0101–0111–0001–0011–1001–1000–0000, and HC2 = 0000–0001–1011–1001–1111–1101–0111–0110–1110–1100–1000–1010–0010–0011–0101–0100–0000. HC1 and HC2 form two edge-disjoint Hamiltonian cycles in CQ4.

3.2 Constructing Two Edge-Disjoint Hamiltonian Cycles in CQ4

Based on the previous results, we now design an algorithm called Algorithm 2HCBase to construct two edge-disjoint Hamiltonian cycles in CQ4. Each vertex (processing unit) in CQ4 calls this algorithm and inputs its label to get which two edges are used in Hamiltonian cycles 1 and 2, respectively.

Algorithm 2HCBase Input: b3b2b1b0 in B //B : the label of this vertex Output: H1 and H2 //Hi : edge set of the i-th Hamiltonian cycle step 1. if b3 = 0 then H1 ← {e1} else H1 ← {e0}; step 2. if b3 = 0 then step 3.      if b2 = 0 then step 4.         if b1 xor b0 = 0 then H1 ← H1∪{e3} else H1 ← H1∪{e2}; step 5.      else step 6.         if b1 = 0 then H1 ← H1∪{e3} else H1 ← H1∪{e2}; step 7.      end if step 8. else step 9.      if b2 = 0 then step 10.         if b1 = 0 then H1 ← H1∪{e3} else H1 ← H1∪{e2}; step 11.      else step 12.         if b1 xor b0 = 0 then H1 ← H1∪{e3} else H1 ← H1∪{e2}; step 13.      end if step 14. end if step 15. H2 ← {e3, e2, e1, e0} \ H1;

In Algorithm 2HCBase, each vertex determines which two edges are used in the first Hamiltonian cycles H1. In step 1, either e0-edge or e1-edge will be selected into H1. Then, it will add e2-edge or e3-edge into H1 according to steps 2 to 14. Finally, the remaining two edges will be adopted in the second Hamiltonian cycle. Since there is no loop in Algorithm 2HCBase, we have the following lemma.

Lemma 3.

The time complexity of Algorithm 2HCBase is O(1).

Lemma 4.

By inputting the label of each vertex into Algorithm 2HCBase, we can obtain 2 cycles, which form two edge-disjoint Hamiltonian cycles in CQ4.

Proof.

According to step 1 in the algorithm, each vertex selects either e0-edge or e1-edge into H1 by b0. Then, we provide the decision tree shown in Fig. 3 to illustrate steps 2 through 14 in the algorithm. The two edges selected for each vertex can be checked by Fig. 2. □

Fig. 3.
figure 3

A decision tree to illustrate steps 2 through 14 in the Algorithm 2HCBase, where vi represents the vertex i in CQ4.

3.3 Constructing Two Edge-Disjoint Hamiltonian Cycles in CQn for n ≥ 5

We all know that CQn+1 is composed of CQ 0n and CQ 1n . As described in the previous subsection, there exist two edge-disjoint Hamiltonian cycles in CQ4. The construction method of Hamiltonian cycle in CQn+1 is as follows. First, we have the Hamiltonian cycle HCA in CQ 0n and the Hamiltonian cycle HCB in CQ 1n . Second, remove an edge in HCA (respectively, HCB) to get the Hamiltonian path HPA (respectively, HPB). Third, connect one end vertex of HPA and one end vertex of HPB with an en-edge. Finally, connect the other end vertex of HPA and the other end vertex of HPB to obtain a Hamiltonian cycle in CQn+1. Figure 4 illustrates the construction of two such edge-disjoint Hamiltonian cycles in CQn+1. Base on this method, we design Algorithm 2HC as shown below.

Fig. 4.
figure 4

The construction of two edge-disjoint Hamiltonian cycles in CQn+1 while n ≥ 4, where thin red lines (respectively, thick blue lines) indicate the first (respectively, the second) Hamiltonian cycle.

Algorithm 2HC Input: B(= bn−1bn−2······b1b0) and n //B : the label of this vertex, n : the dimension Output: HC1 and HC2 //HCi : edge set of the i-th Hamiltonian cycle step 1. By calling Algorithm 2HCBase, HC1 ← H1 and HC2 ← H2; step 2. if b2 = 0 and b1 = 0 and b0 = 0 then step 3.        flag ← 1 step 4.        for i = 3 to n – 3 do step 5.          if bi = 1 then step 6.             HC1 ← HC1 \ {e3}∪{ei+1}; flag ← 0; break for; step 7.          end if step 8.        end for step 9.        if flag = 1 then HC1 ← HC1 \ {e3}∪{en-1}; step 10. end if //end if at step 2 step 11. if b2 = 0 and b1 = 1 and b0 = 0 then step 12.        flag ← 1 step 13.        for i = 3 to n – 3 do step 14.             if bi = 1 then step 15.             HC2 ← HC2 \ {e2}∪{ei+1}; flag ← 0; break for; step 16.             end if step 17.        end for step 18.        if flag = 1 then HC2 ← HC2 \ {e2}∪{en-1}; step 19. end if //end if at step 11

In Algorithm 2HC, each vertex will call Algorithm 2HCBase to obtain HC1 and HC2, where HCi is the edge set of the i-th Hamiltonian cycle. In steps 2 to 10, if this vertex is one end vertex of the Hamiltonian path, it will modify its HC1. For example, in CQ6, vertex 000000 obtains HC1 = {e1, e3} by call Algorithm 2HCBase. Since vertex 000000 is one end vertex of the Hamiltonian path, HC1 = {e1, e3} \ {e3}  ∪ {e5}. By the same way, in steps 11 to 19, if this vertex is one end vertex of Hamiltonian path, it will modify its HC2. For example, in CQ6, vertex 000010 obtains HC2 = {e1, e2} by call Algorithm 2HCBase. Since vertex 000010 is one end vertex of the Hamiltonian path, HC2 = {e1, e2} \ {e2} ∪ {e5}. According to Lemma 3 and steps 4, 13 in Algorithm 2HC, we have the following lemma.

Lemma 5.

The time complexity of Algorithm 2HC is O(n).

Theorem 6.

By inputting the label of each vertex into Algorithm 2HC, we can obtain 2 cycles, which form two edge-disjoint Hamiltonian cycles in CQn with n  4 in O(n2n) time. In particular, it can be parallelized on CQn to run in O(n) time.

Proof.

Each vertex of CQn can simultaneously run Algorithm 2HC to know which two edges were used in Hamiltonian cycles 1 and 2, respectively. By lemma 5, it can be parallelized on CQn to run in O(n) time.

Without loss of generality, we consider vertex 0 to be the starting vertex in CQn. By Algorithm 2HC, vertex 0 obtains two edges used in the Hamiltonian cycle. With the dimension of the edge, we can obtain the next vertex of the Hamiltonian cycle. In the same way, the vertex sequence of the Hamiltonian cycle can be get. Since there are 2n vertices in CQn, two edge-disjoint Hamiltonian cycles in CQn can be obtained in O(n2n) time. □

For the convenience of checking the correctness of all results, we provide an interactive verification at the website [14]. It shows the usefulness and efficiency of our algorithms in practical settings.

4 Concluding Remarks

In this paper, we first present two edge-disjoint Hamiltonian cycles in CQ4, and each cycle has the same number of edges in each dimension. Then, we provide an O(n) time algorithm for each vertex in CQn to determine which two edges were used in Hamiltonian cycles 1 and 2, respectively. It is interesting to see if there are three edge-disjoint Hamiltonian cycles in CQn for n ≥ 6. So far it is still an open problem.