A Smart Backtracking Algorithm for Computing Set Partitions with Parts of Certain Sizes
arXiv:2011.03004
Abstract
Let be a set of elements, be a non-negative integer, and be a total mapping. Then, we call a \emph{partition} of if and only if for all , . Further, we call a -\emph{partition} of if and only if is a partition of and for all , . We give a non-trivial algorithm that computes all -partitions of in time. On the opposite, a naive generate-and-test algorithm would compute all -partitions of in time where is the Bell number.