Remark on "Algorithm 246: Graycode [Z]"

  title={Remark on "Algorithm 246: Graycode [Z]"},
  author={Jayadev Misra},
  journal={ACM Trans. Math. Softw.},
The following modifications to Algorithm 246 will generate Gray code for any N, with each code word being generated in a bounded amount of time. Let A be a vector of zeros and ones of length N which will be the successive code words. New code words are successively generated by reversing a single bit in A each time. Routine OUTPUT, to be supplied by the user, is called on generation of every new code word. Initially A contains all zeros. At every odd-numbered step, AEN 1 is reversed. At every… CONTINUE READING