A Smart Backtracking Algorithm for Computing Set Partitions with Parts of Certain Sizes
Samer Nofal

TL;DR
This paper introduces an efficient backtracking algorithm for generating all set partitions with parts of certain sizes, significantly reducing the computational complexity compared to naive methods.
Contribution
The paper presents a novel backtracking algorithm that computes all -partitions of a set in linear time, improving over the exponential naive approach.
Findings
Algorithm computes all -partitions in (n) time
Naive methods require (nB_n) time, where B_n is the Bell number
Efficient enumeration of set partitions with size constraints
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.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAlgorithms and Data Compression · graph theory and CDMA systems · Advanced Combinatorial Mathematics
