计算机科学 > 数据结构与算法
[提交于 2021年2月4日]
标题:A Smart Backtracking Algorithm for Computing Set Partitions with Parts of Certain Sizes
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:Let $\alpha=\{a_1,a_2,a_3,...,a_n\}$ be a set of elements, $\delta < n$ be a non-negative integer, and $\Gamma: \alpha \to \{0, 1, 2, ..., n\}$ be a total mapping. Then, we call $\Gamma$ a \emph{partition} of $\alpha$ if and only if for all $x \in \alpha$, $\Gamma(x) \neq 0$. Further, we call $\Gamma$ a $\delta$-\emph{partition} of $\alpha$ if and only if $\Gamma$ is a partition of $\alpha$ and for all $i \in \{1, 2, 3, ..., n\}$, $|\{x: \Gamma(x)=i\}| > \delta$. We give a non-trivial algorithm that computes all $\delta$-partitions of $\alpha$ in $\Omega(n)$ time. On the opposite, a naive generate-and-test algorithm would compute all $\delta$-partitions of $\alpha$ in $\Omega(nB_n)$ time where $B_n$ is the Bell number.
提交历史
来自:Samer Nofal[v1] 2021年2月4日 星期四 00:00:00 UTC