I have been working on this problem for several months now but have not made much progress. It concerns the set of all [integer partitions](https://en.wikipedia.org/wiki/Integer_partitions) of n.


Let the vertices of the graph G=G(n) denote all the p(n) integer partitions of n. There is an edge between two partitions if and only if one can be transformed into another by only moving one dot between rows in their Ferrers diagram representations.


So, for example, the partitions (3,2,1) and (3,3) of 6 are linked because we can move the dot in the last row to the second row.



```
OOO               OOO
OO      --------  OOO
O   

```

My question: for what values of n does G(n) have a Hamiltonian path from (n) to (1,1,...,1)?


That is, is it possible to go through, without repetition, all the partitions of n by simply moving around the dots in the Ferrers diagrams?


Is there a determinate way to construct such paths?


I have only been able to construct paths for n = 1 to 6.


n=1 (trivial)


n=2:
(2) => (1,1)


n=3:  

(3) => (2,1) => (1,1,1)


n=4:  

(4) => (3,1) => (2,2) => (2,1,1) => (1,1,1,1)


n=5:
(5) => (4,1) => (3,2) => (2,2,1) => (3,1,1) => (2,1,1,1) => (1,1,1,1,1)


n=6:
(6) => (5,1) => (4,1,1) => (4,2) => (3,3) => (3,2,1) => (2,2,2) => (2,2,1,1) => (3,1,1,1) => (2,1,1,1,1) => (1,1,1,1,1,1)


None of the basic theorems about Hamiltonian paths have not helped me here.



Hamiltonian paths where the vertices are integer partitions
What you want is known as a Gray code for integer partitions.


It exists.


See C. D. Savage, [Gray code sequences of partitions](https://doi.org/10.1016/0196-6774(89)90007-2), *Journal of Algorithms* 10 (1989) 577-595. Disclaimer: I haven't actually read this paper. Other sources such as [this 1997 survey by Savage](https://people.engr.ncsu.edu/savage/AVAILABLE_FOR_MAILING/survey.pdf "A survey of combinatorial Gray codes") and [these class notes](http://homepage.divms.uiowa.edu/%7Esriram/196/fall01/lecture7.pdf) don't say what the construction is but say that it's complicated.


