I have a question related to [this one](https://mathoverflow.net/questions/141999/how-to-efficiently-sample-uniformly-from-the-set-of-p-partitions-of-an-n-set). For $n,p \in \mathbb{N}\_+$ such that $p\mid n$, let $\mathcal{P}^{\rm eq}$ be the set of all *equipartitions* of $n$ in $p$ sets; i.e., in sets of equal size $\frac{n}{p}$.



> 
> Is it known how to sample efficiently (i.e., in time polynomial in $n,p$) from the uniform distribution on $\mathcal{P}^{\rm eq}$?
> 
> 
> 


**Edit:** I had forgotten a key part: can this be done using the optimal (up to constant factors) number of random bits, i.e., $O(n\log p)$ uniformly random bits?



How to efficiently sample uniformly from the set of $p$-equipartitions of an $n$-set?
Randomly permute $n$ and then divide into blocks of size $n/p$.


