PlanetMath (more info)
 Math for the people, by the people. Sponsor PlanetMath
Encyclopedia | Requests | Forums | Docs | Wiki | Random | RSS  
Login
create new user
name:
pass:
forget your password?
Main Menu
Owner confidence rating: Very high Entry average rating: No information on entry rating
binary Gray code (Definition)

An $n$ bit binary Gray code is a non-repeating sequence of the integers from $0$ to $2^n-1$ inclusive such that the binary representation of each number in the sequence differs by exactly one bit from the binary representation of the previous number: that is, the Hamming distance between consecutive elements is $1$ In addition, we also define a cyclic Gray code to be a Gray code where an extra condition is imposed: The last number in the sequence must differ by exactly one bit from the first number in the sequence.

For example, one $3$ bit cyclic Gray code is:

$$000_2$$ $$010_2$$ $$011_2$$ $$001_2$$ $$101_2$$ $$111_2$$ $$110_2$$ $$100_2$$

There is a one-to-one correspondence between all possible $n$ bit Gray codes and all possible Hamiltonian cycles on an $n$ dimensional hypercube. (To see why this is so, imagine assigning a binary number to each vertex of a hypercube where an edge joins each pair of vertices that differ by exactly one bit.)




"binary Gray code" is owned by mathcam. [ full author list (2) | owner history (1) ]
(view preamble | get metadata)

View style:

Other names:  Gray code
Also defines:  cyclic Gray code
Log in to rate this entry.
(view current ratings)

Cross-references: joins, edge, vertex, Hamiltonian cycles, one-to-one correspondence, addition, consecutive, Hamming distance, number, representation, integers, sequence, binary

This is version 6 of binary Gray code, born on 2002-02-27, modified 2004-11-30.
Object id is 2733, canonical name is BinaryGrayCode.
Accessed 11987 times total.

Classification:
AMS MSC68P30 (Computer science :: Theory of data :: Coding and information theory )
 05C45 (Combinatorics :: Graph theory :: Eulerian and Hamiltonian graphs)

Pending Errata and Addenda
None.
[ View all 3 ]
Discussion
Style: Expand: Order:
forum policy

No messages.

Interact
post | correct | update request | add derivation | add example | add (any)