A Smart Backtracking Algorithm for Computing Set Partitions With Parts of Certain Sizes