hamiltonian fault-tolerance of hypercubes

7
Hamiltonian fault-tolerance of hypercubes Tom´aˇ s Dvoˇ ak and Petr Gregor 1 Faculty of Mathematics and Physics, Charles University Malostransk´ e n´am. 25, 11800 Prague, Czech Republic Abstract Given a set F of faulty edges or faulty vertices in the hypercube Q n and a pair of vertices u, v, is there a hamiltonian cycle or a hamiltonian path between u and v in Q n −F ? We show that in case F consists of edges forming a matching, or of at most (n 7)/4 vertices, then simple necessary conditions are also sufficient. On the other hand, if there are no restrictions on F , all these problems are NP-complete. The solution for faulty vertices was obtained as a special case of a more general result on partitioning Q n −F into vertex-disjoint paths with prescribed endvertices. We also consider a complementary problem with a prescribed set of edges. Keywords: hypercube, hamiltonian, fault-tolerance, path partition, NP-complete 1 Introduction The n-dimensional hypercube Q n is a graph whose vertex set is formed by all binary vectors of length n, with an edge joining two vertices whenever they differ in a single coordinate. The prospective use of hypercubes as intercon- nection networks for parallel computation inspired questions related to their fault-tolerance: if some processors or links are busy or faulty, under what conditions does the hypercube network preserve its functionality? 1 Email: [tomas.dvorak,petr.gregor]@mff.cuni.cz Electronic Notes in Discrete Mathematics 29 (2007) 471–477 1571-0653/$ – see front matter © 2007 Elsevier B.V. All rights reserved. www.elsevier.com/locate/endm doi:10.1016/j.endm.2007.07.074

Upload: tomas-dvorak

Post on 26-Jun-2016

214 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Hamiltonian fault-tolerance of hypercubes

Hamiltonian fault-tolerance of hypercubes

Tomas Dvorak and Petr Gregor 1

Faculty of Mathematics and Physics, Charles University

Malostranske nam. 25, 118 00 Prague, Czech Republic

Abstract

Given a set F of faulty edges or faulty vertices in the hypercube Qn and a pair ofvertices u, v, is there a hamiltonian cycle or a hamiltonian path between u and v inQn−F? We show that in case F consists of edges forming a matching, or of at most(n−7)/4 vertices, then simple necessary conditions are also sufficient. On the otherhand, if there are no restrictions on F , all these problems are NP-complete. Thesolution for faulty vertices was obtained as a special case of a more general resulton partitioning Qn − F into vertex-disjoint paths with prescribed endvertices. Wealso consider a complementary problem with a prescribed set of edges.

Keywords: hypercube, hamiltonian, fault-tolerance, path partition, NP-complete

1 Introduction

The n-dimensional hypercube Qn is a graph whose vertex set is formed by allbinary vectors of length n, with an edge joining two vertices whenever theydiffer in a single coordinate. The prospective use of hypercubes as intercon-nection networks for parallel computation inspired questions related to theirfault-tolerance: if some processors or links are busy or faulty, under whatconditions does the hypercube network preserve its functionality?

1 Email: [tomas.dvorak,petr.gregor]@mff.cuni.cz

Electronic Notes in Discrete Mathematics 29 (2007) 471–477

1571-0653/$ – see front matter © 2007 Elsevier B.V. All rights reserved.

www.elsevier.com/locate/endm

doi:10.1016/j.endm.2007.07.074

Page 2: Hamiltonian fault-tolerance of hypercubes

It is well-known that Qn is a hamiltonian graph for any n ≥ 2. Moreover,a pair of vertices u and v can be connected by a hamiltonian path of Qn iffthe distance of u and v is odd. We study these two properties in a graphQn−F , obtained from Qn by removing a given set F ⊆ E(Qn) of faulty edgesor F ⊆ V (Qn) of faulty vertices and edges incident with them. The case offaulty vertices is settled as a corollary of a more general problem of partitioningthe graph Qn − F into vertex-disjoint paths with prescribed endvertices. Wealso consider a problem in a sense complementary: is there a hamiltoniancycle or path passing through a given set P of prescribed edges?

2 Faulty edges

The existence of a hamiltonian cycle of Qn avoiding an arbitrary number offaulty edges is known to be an NP-complete problem [2]. On the other hand,in case that the number of faulty edges does not exceed 2n− 5, a hamiltoniancycle exists provided the natural condition that every vertex is incident withat least two non-faulty edges is satisfied [2]. This upper bound is optimal inthe sense that for n ≥ 3 there are 2n − 4 faulty edges in Qn satisfying thenatural condition, but no hamiltonian cycle avoiding the faulty edges exists.A similar result holds for hamiltonian paths with given endvertices [13].

Using a standard transformation from the problem of hamiltonicity of Qn

with faulty edges, it is easy to obtain

Proposition 2.1 The following problem is NP-complete: Given a graph Qn−F for some n and F ⊆ E(Qn), and vertices u, v ∈ V (Qn), is there a hamil-tonian path of Qn −F between u and v?

However, the above quoted result [13] implies that if |F| ≤ 2n−5, the problemis decidable in polynomial time. We can show that the same holds for up to2n−1 faulty edges provided they form a matching.

For vertices u, v ∈ V (Qn) let Δ(u, v) = {i ∈ [n] | ui �= vi} where [n] denotesthe set {1, 2, . . . , n}. An edge uv ∈ E(Qn) is of dimension d if Δ(u, v) = {d}.The distance d(u, vw) of a vertex u and an edge vw is defined as the minimumof distances d(u, v) and d(u, w). The distance of edges uv and e is the minimumof distances d(u, e) and d(v, e). The following results were obtained as a jointwork with Dimitrov and Skrekovski [3].

Theorem 2.2 Let n ≥ 4, F be a set of faulty edges forming a matching inQn and u, v ∈ V (Qn). Then there is a hamiltonian path of Qn −F between uand v iff

T. Dvorák, P. Gregor / Electronic Notes in Discrete Mathematics 29 (2007) 471–477472

Page 3: Hamiltonian fault-tolerance of hypercubes

(i) d(u, v) is odd,

(ii) for any d ∈ Δ(u, v) there exists a non-faulty edge e of dimension d suchthat d(u, e) is odd,

(iii) for any d ∈ [n] \ Δ(u, v) there exist two non-faulty edges of dimension dwhose mutual distance is odd and moreover, at least one of them is notincident with u or v.

As a corollary, we obtain a similar characterization for hamiltonian cycles,avoiding a given matching.

Corollary 2.3 Let n ≥ 4 and F be a set of faulty edges forming a matchingin Qn. Then Qn−F is hamiltonian iff for any d ∈ [n] there are two non-faultyedges of dimension d whose mutual distance is odd.

In particular, it follows that if F is a perfect matching of Qn, then Qn −F ishamiltonian iff it is connected.

3 Faulty vertices and path partitions

The problem of hamiltonian cycles and paths in a graph Qn−F obtained fromQn by removing a set F of faulty vertices seems to be more involved than thecase of faulty edges.

It is known that for any distinct vertices u, v, w of Qn there is a hamiltonianpath between u and v in Qn − {w} iff u, v belong to the same partite set,different from that containing w [12]. Moreover, this path can avoid a givenset of at most n − 3 faulty edges [10]. The other results say that Qn with ffaulty vertices contains a cycle of length at least 2n − 2f if f ≤ 2n − 4 [8]and a path of length at least 2n − 2f − 1 (2n − 2f − 2) between two arbitraryvertices at odd (even) distance if f ≤ n − 2 [9].

We consider a more general problem. Given a set {ai, bi}mi=1 of pairs of

distinct vertices in a graph G, is there a collection of paths {Pi}mi=1, called a

path partition of G, such that Pi connects ai with bi and {V (Pi)}mi=1 partitions

V (G)? The following observation gives us a necessary condition for bipartitegraphs.

Proposition 3.1 Let G be a bipartite graph with partite sets A, B. If P is aset of all endvertices in a path partition of G then 2(|A| − |B|) = |P ∩ A| −|P ∩ B|.

We say that the set of pairs {ai, bi}mi=1 is balanced if

⋃m

i=1{ai, bi} satisfies theconclusion of Proposition 3.1, and connectable if the desired path partitionexists.

T. Dvorák, P. Gregor / Electronic Notes in Discrete Mathematics 29 (2007) 471–477 473

Page 4: Hamiltonian fault-tolerance of hypercubes

For the hypercube Qn it is known that a balanced set of m pairs is con-nectable if m ≤ (n − 1)/3 [1]. We prove a similar result for the hypercubewith faulty vertices.

Theorem 3.2 Let F ⊆ V (Qn) and P be a set of pairs of distinct vertices inQn − F such that 3|P| + 4|F| ≤ n − 4. Then P is connectable in Qn − F iffP is balanced in Qn −F .

As a corollary we obtain the desired characterization of hamiltonicity of hy-percubes with a bounded number of faulty vertices.

Corollary 3.3 Let F ⊆ V (Qn) and u, v be distinct vertices of Qn − F suchthat |F| ≤ (n − 7)/4. Then Qn − F contains a hamiltonian path between uand v iff the set {u, v} is balanced in Qn −F .

Corollary 3.4 Let F ⊆ V (Qn) be such that |F| ≤ (n − 7)/4. Then Qn − Fcontains a hamiltonian cycle iff F is balanced in Qn.

On the other hand, if there is no restriction on the set of faulty vertices, theproblems become intractable.

Theorem 3.5 The following four problems are NP-complete: given a set S ⊆V (Qn), vertices u, v ∈ S, a set P of pairs from S, does the subgraph of Qn

induced by S contain a hamiltonian cycle, a hamiltonian path, a hamiltonianpath between u and v, a partition into paths with endvertices given by P?

The proof uses a transformation from the problem of hamiltonicity of hyper-cube with faulty edges [2]. The next problem has applications e. g. in thefield of data compression.

Corollary 3.6 The following problem is NP-complete: given a positive inte-ger k and a sequence v1, v2, . . . , vm of distinct vertices of Qn for some n, isthere a permutation p : [n] → [n] such that

m−1∑

i=1

d(vp(i), vp(i+1)) ≤ k?

The proofs of the main results in this section are deferred to [6].

4 Prescribed edges

The problem of hamiltonian cycles or paths with prescribed edges is closelyrelated to the case of faulty edges. For example, two prescribed edges em-anating from a vertex u are equivalent to the case when all the other edges

T. Dvorák, P. Gregor / Electronic Notes in Discrete Mathematics 29 (2007) 471–477474

Page 5: Hamiltonian fault-tolerance of hypercubes

incident with u are faulty.

Obviously, if a set P ⊆ E(Qn) of prescribed edges extends to a hamiltoniancycle then it induces vertex-disjoint paths. In case that |P| ≤ 2n− 3 (n ≥ 2),this natural necessary condition is also sufficient to guarantee the existence ofa hamiltonian cycle containing P [4]. There is a similar result for hamiltonianpaths with prescribed endvertices provided |P| ≤ 2n − 4 (n ≥ 5) [5].

These bounds are optimal in the sense that for n ≥ 3 there are verticesu, v and 2n−2 (2n−3) edges of Qn satisfying the natural necessary condition,but not contained in any hamiltonian cycle (hamiltonian path between u andv). However, we may consider larger sets P with additional constraints, and anatural condition is to require P to form a matching. In particular, Kreweras[11] conjectured that every perfect matching of Qn (n ≥ 2) can be extendedto a hamiltonian cycle. Recently, Fink positively answered this conjecture asa corollary of the following statement. For a graph G, let K(G) denote thecomplete graph on V (G).

Theorem 4.1 ([7]) For every perfect matching P of K(Qn) (n ≥ 2) thereexists a perfect matching R of Qn such that P ∪R forms a hamiltonian cycleof K(Qn).

For matchings in Qn that are not perfect this problem remains open. Onemight further ask whether we can in Theorem 4.1 additionally prescribe someedges for the perfect matching R, i. e. to require that R contains a givenmatching M disjoint with P .

The following generalization of Theorem 4.1 gives a partial answer to thisquestion, namely for the case when Qn can be cut into disjoint subcubesA1, . . . , Am of nonzero dimensions such that for every e ∈ M there is a one-dimensional subcube As(e) containing only e.

Theorem 4.2 Let A1, . . . , Am ⊆ Qn (n ≥ 2) be pairwise disjoint subcubes ofnonzero dimensions. Let A =

⋃m

i=1 Ai, D =⋃m

i=1 E(Ai) and let P be a perfectmatching of K(A). There exists R ⊆ D such that P ∪ R is a hamiltoniancycle of K(A) iff P ∪ D induces a connected subgraph.

5 Concluding remarks

The results of Section 3 provide upper bounds on the number of faulty verticeswhich guarantee that the problems formulated in Theorem 3.5 are decidablein polynomial time. However, the values we obtained are rather far from thosethat are known in the case of faulty edges (Section 2). In particular, let f(n)denote the maximum integer such that the statement of Corollary 3.4 holds

T. Dvorák, P. Gregor / Electronic Notes in Discrete Mathematics 29 (2007) 471–477 475

Page 6: Hamiltonian fault-tolerance of hypercubes

for any F ⊆ V (Qn), |F| ≤ f(n). We showed that f(n) ≥ (n − 7)/4. On theother hand, it is not difficult to see that f(n) ≤ 2n − 3. What is the exactvalue of f(n)?

Moreover, in Section 2 we managed to settle the problem, generally in-tractable by Proposition 2.1, for up to 2n−1 faulty edges under a restriction ontheir structure. Inspired by that result, we may look for similar constraints onthe structure of the set F ⊆ V (Qn) of faulty vertices that would resolve theproblem of hamiltonicity of Qn −F . In particular, it may be of interest to ad-dress the complexity of this problem for isometric subgraphs of a hypercube,also known as partial cubes.

Finally, a comparison of Sections 2 and 4 reveals a certain gap in what isknown about both problems: while the problem with faulty edges F has beencharacterized both in general (Proposition 2.1) and in case F forms a matchingin Qn (Theorem 2.2), for the complementary problem with prescribed edgesP only the case when P forms a perfect matching has been resolved so far(by Theorem 4.1). Comparing both variants, it is tempting to conjecture thatthe problem for prescribed edges is NP-complete in general and polynomial incase P forms a matching in Qn.

Acknowledgements

We are grateful to Vaclav Koubek for many inspiring and helpful discussions.

References

[1] Caha, R., V. Koubek, Spanning multi-paths in hypercubes, to appear in DiscreteMath., doi:10.1016/j.disc.2005.12.050.

[2] Chan, M. Y., S-J. Lee, On the existence of Hamiltonian circuits in faulty

hypercubes, SIAM J. Discrete Math. 4 (1991), 511–527.

[3] Dimitrov, D., T. Dvorak, P. Gregor, R. Skrekovski, Gray codes faulting

matchings, in preparation.

[4] Dvorak, T., Hamiltonian cycles with prescribed edges in hypercubes, SIAM J.Discrete Math. 19 (2005), 135–144.

[5] Dvorak, T., P. Gregor, Hamiltonian paths with prescribed edges in hypercubes, toappear in Discrete Math., doi:10.1016/j.disc.2005.12.045.

[6] Dvorak, T., P. Gregor, Partitions of faulty hypercubes into paths with prescribed

endvertices, submitted.

T. Dvorák, P. Gregor / Electronic Notes in Discrete Mathematics 29 (2007) 471–477476

Page 7: Hamiltonian fault-tolerance of hypercubes

[7] Fink, J., Perfect matchings extend to Hamilton cycles in hypercubes, to appearin J. Comb. Theory B, doi:10.1016/j.jctb.2007.02.007.

[8] Fu, J.-S., Fault-tolerant cycle embedding in the hypercube, Parallel Comput. 29

(2003), 821–832.

[9] Fu, J.-S., Longest fault-free paths in hypercubes with vertex faults, Inform. Sci.176 (2006), 759–771.

[10] Hsu, L.-H., T. Liang, J. J. M. Tan, C.-H. Tsai, Fault-tolerant hamiltonian

laceability of hypercubes, Inf. Process. Lett. 83 (2002), 301–306.

[11] Kreweras, G., Matchings and Hamiltonian cycles on hypercubes, Bull. Inst.Combin. Appl. 16 (1996), 87–91.

[12] Lewinter, M., W. Widulski, Hyper-Hamilton laceable and caterpillar-spannable

product graphs, Comput. Math. Appl. 34 (1997), 99–104.

[13] Tsai, C.-H., Linear array and ring embeddings in conditional faulty hypercubes,Theor. Comput. Sci. 314 (2004), 431–443.

T. Dvorák, P. Gregor / Electronic Notes in Discrete Mathematics 29 (2007) 471–477 477