A Smart Backtracking Algorithm for Computing Set Partitions with Parts of Certain Sizes
Abstract
Let α=\a1,a2,a3,...,an\ be a set of elements, δ < n be a non-negative integer, and : α \0, 1, 2, ..., n\ be a total mapping. Then, we call a partition of α if and only if for all x ∈ α, (x) ≠ 0. Further, we call a δ-partition of α if and only if is a partition of α and for all i ∈ \1, 2, 3, ..., n\, |\x: (x)=i\| > δ. We give a non-trivial algorithm that computes all δ-partitions of α in (n) time. On the opposite, a naive generate-and-test algorithm would compute all δ-partitions of α in (nBn) time where Bn is the Bell number.
0