Minor disclaimer: This is my first question here, so I hope it is the right place to put it.
Question: Is there an algorithm to exhaustively generate all set partitions of equal size? That is, I want to list all possible ways to divide a set of $N$ elements into $K$ parts where each part has the same size $\frac{N}{K}$. At best, I want to generate all of these partitions sequentially without generating any duplicates. There are many algorithms to list all divisions of a set into $K$ parts that however do not impose a size constraint on the parts. But I have not found anything on generating set partitions of equal size.
I assume that the elements in the set are labeled using labels $1, ..., K$. For $K = 2$ groups, I can exhaustively list all partitions by sequentially generating all permutations of the group labels in lexicographic order and stop as soon as the first element is $2$ [that is assuming I started with the initial partition $(1, 1, 1, ...., 2, 2, 2)$]. However, for $K > 3$ generating permutations of the labels does work anymore without generating duplicate partitions.