Abstract

Graphs and Algorithms A (cyclic) n-bit Gray code is a (cyclic) ordering of all 2(n) binary strings of length n such that consecutive strings differ in a single bit. Equivalently, an n-bit Gray code can be viewed as a Hamiltonian path of the n-dimensional hypercube Q(n), and a cyclic Gray code as a Hamiltonian cycle of Q(n). In this paper we study (cyclic) Gray codes avoiding a given set of faulty edges that form a matching. Given a matching M and two vertices u, v of Q(n), n >= 4, our main result provides a necessary and sufficient condition, expressed in terms of forbidden configurations for M, for the existence of a Gray code between u and v that avoids M. As a corollary. we obtain a similar characterization for a cyclic Gray code avoiding M. In particular, in the case that M is a perfect matching, Q(n) has a (cyclic) Gray code that avoids M if and only if Q(n) - M is a connected graph. This complements a recent result of Fink, who proved that every perfect matching of Q(n) can be extended to a Hamiltonian cycle. Furthermore, our results imply that the problem of Hamilionicity of Q(n) with faulty edges, which is NP-complete in general, becomes polynomial for up to 2(n-1) edges provided they form a matching.

Highlights

  • A n-bit Gray code is a ordering of all 2n binary strings of length n such that consecutive strings differ in a single bit

  • An n-bit Gray code can be viewed as a Hamiltonian path of the n-dimensional hypercube Qn, and a cyclic Gray code as a Hamiltonian cycle of Qn

  • We obtain a similar characterization for a cyclic Gray code avoiding M

Read more

Summary

Introduction

A (cyclic) n-bit Gray code is a (cyclic) ordering of all 2n binary strings of length n such that consecutive strings differ in a single bit. They showed that for any n ≥ 3 there is a set of 2n − 2 edges, satisfying this necessary condition, but there is no Hamiltonian cycle of Qn containing them. In this paper we study (cyclic) Gray codes avoiding a given set of faulty edges that form a matching. Given a matching M and two vertices u, v of Qn, n ≥ 4, our main result provides a necessary and sufficient condition for the existence of a Gray code between u and v that avoids M. In the case that M is a perfect matching, Qn has a (cyclic) Gray code that avoids M if and only if Qn − M is a connected graph Note that this complements the above quoted result of Fink.

Preliminaries
Some fundamental results
Half-layers
Admissible configurations
Gray codes in hypercubes of higher dimensions
The main results
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call