A physical algorithm that finds all integer partitions of a number
Let us aim at generating the partitions in the following order (below, for $n=6$):

$$
\begin{align*}
&amp; 6 \\
&amp; 5 \, 1 \\
&amp; 4 \, 2 \\
&amp; 4 \, 1 \, 1 \\
&amp; 3 \, 3 \\
&amp; 3 \, 2 \, 1 \\
&amp; 3 \, 1 \, 1 \, 1 \\
&amp; 2 \, 2 \, 2 \\
&amp; 2 \, 2 \, 1 \, 1 \\
&amp; 2 \, 1 \, 1 \, 1 \, 1 \\
&amp; 1 \, 1 \, 1 \, 1 \, 1 \, 1
\end{align*}
$$
We start with the partition $n$.

To generate a new partition, identify the last non-1 entry in the preceding partition (if there is no such, we’re done); reduce it by 1, and delete all following entries; complete it to a partition by repeatedly adding the maximum possible number, under the constraint that the partition is non-increasing.

You can check that this indeed generates all partitions.