Gray Code Sequences of Partitions. Savage & D, C. Journal of Algorithms, 10(4):577--595, December, 1989.
Gray Code Sequences of Partitions [link]Paper  doi  abstract   bibtex   
Herbert Wilf posed the following problem: Is there a way to list the partitions of integer n in such a way that an element differs from its predecessor on the list only in that one part has increased by 1 and one part has decreased by 1. (A part of size 1 may decrease to 0 or a “part” of size 0 may increase to 1.) We refer to this as a Gray code order. In this paper we show that this is possible for all n and give an effective procedure for constructing such a list. In fact, we show a more general result: For all n ≥ k ≥ 1, there is a way to list all partitions of n into integers of size at most k in Gray code order. Unless (n, k) = (6, 4), we can arrange for such a list to start at the lexicographically smallest partition and end at the lexicographically largest. As a consequence, we can also list each of the following in Gray code order for all n, k satisfying n ≥ k ≥ 1: (1) all partitions of n whose largest part is k, (2) all partitions of n into k or fewer parts, and (3) all partitions of n into exactly k parts.
@article{ Savage1989,
  abstract = {Herbert Wilf posed the following problem: Is there a way to list the partitions of integer n in such a way that an element differs from its predecessor on the list only in that one part has increased by 1 and one part has decreased by 1. (A part of size 1 may decrease to 0 or a “part” of size 0 may increase to 1.) We refer to this as a Gray code order. In this paper we show that this is possible for all n and give an effective procedure for constructing such a list. In fact, we show a more general result: For all n ≥ k ≥ 1, there is a way to list all partitions of n into integers of size at most k in Gray code order. Unless (n, k) = (6, 4), we can arrange for such a list to start at the lexicographically smallest partition and end at the lexicographically largest. As a consequence, we can also list each of the following in Gray code order for all n, k satisfying n ≥ k ≥ 1: (1) all partitions of n whose largest part is k, (2) all partitions of n into k or fewer parts, and (3) all partitions of n into exactly k parts.},
  author = {Savage, Carla D},
  doi = {10.1016/0196-6774(89)90007-2},
  file = {:Users/KunihiroWASA/Dropbox/paper/1989/Savage, Gray Code Sequences of Partitions, 1989.pdf:pdf},
  issn = {01966774},
  journal = {Journal of Algorithms},
  month = {December},
  number = {4},
  pages = {577--595},
  title = {{Gray Code Sequences of Partitions}},
  url = {http://www.sciencedirect.com/science/article/pii/0196677489900072 http://linkinghub.elsevier.com/retrieve/pii/0196677489900072},
  volume = {10},
  year = {1989}
}

Downloads: 0