Explore BrainMass

# Positive Integers, Successive Numbers and Gray Codes

This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

PROBLEM: For what N is it possible to list all the positive integers less than N in a Gray code, i.e., in such a way that successive numbers differ in exactly one position when the numbers are represented in binary form? For example, we can do so for N = 4 since the numbers 1, 2, 3 can be listed as 01, 11, 10 in binary form, whereas for N = 5 the numbers 1, 2, 3, 4 cannot be listed in a Gray code.

SOME WORK DONE: Note first of all that we are considering N greater than or equal to 2 since there are no
positive integers less than N if N < 2. To get some more information, let us consider all 2 less than or equal to N less than or equal to 16.
Number Binary Form Number Binary Form
1 0001 9 1001
2 0010 10 1010
3 0011 11 1011
4 0100 12 1100
5 0101 13 1101
6 0110 14 1110
7 0111 15 1111
8 1000 16 10000
Next we consider for what N is it possible to list all the positive integers less than N in a Gray code, i.e., in such a way that successive numbers differ in exactly one position when the numbers are represented in binary form. We have N Can positive integers?

(See the attached file for the chart to go along with this problem)

I am not 100 % sure about these, however, I cannot find a possible Gray code listing, but might be able to do so, given more time.

See the attached file for some other additional information that may be useful.