How many ways to partition a set?

2.1k Views Asked by At

I have a set $A:=\{1,2,3,4,5,6,7\}$.

How many ways I have to partition $A$ in $5$ non-empty subsets? Which are these ways?

1

There are 1 best solutions below

0
On BEST ANSWER

You have to consider two cases: $7=1+1+1+1+3$, $7=1+1+1+2+2$.

Hence the number of such partitions is $$\binom{7}{3}+\frac{1}{2}\left(\binom{7}{2}\cdot\binom{5}{2}\right)=140.$$

If you are interested in the number of partitions of a set of $n$ elements in $k$ subsets then take a look here: https://en.wikipedia.org/wiki/Stirling_numbers_of_the_second_kind