Efficient Generation of the Binary
Reflected Gray Code and Its Applications

Algorithms are presented to generate the n-bit
binary reflected Gray code and codewords of 
fixed weight in that code.  Both algorithms are efficient
in that the time required to generate the next 
element from the current one is constant.  Applications
to the generation of the combinations of n things
taken k at a time, the compositions of integers, and
the permutations of a multiset are discussed.

CACM September, 1976

Bitner, J. R.
Ehrlich, G.
Reingold, E. M.

Gray code, combinations, subsets, compositions, combinatorial computing

5.39

CA760905 JB January 4, 1978  9:14 AM

2466	4	2834
2834	4	2834
2834	4	2834
2834	4	2834
2834	4	2834
2884	4	2834
3115	4	2834
3115	4	2834
3115	4	2834
969	5	2834
2045	5	2834
2417	5	2834
2466	5	2834
2834	5	2834
2834	5	2834
2834	5	2834