# Thread: Combination and Permutation

1. ## Combination and Permutation

The question is, "How many possible ways could you split 24 unique color balls among 3 bins such that these 3 bins gets at least 1 ball?"

I've tried thinking that there were 24! permutations, and for each possibility, I can draw two "lines" in spaces between the balls and split the balls into three groups. That gives me 23C2 choices, and then I use the product rule and multiply these two together.

The problem with this is that each person that it doesn't keep track of the order of the balls.

Then I tried solving case by case but because there are 23C2 cases . . . well, that's quite large to solve by hand.

2. ## Re: Combination and Permutation

The way this question is worded twenty-four unique objects are assigned to three unique cells.
The number of functions from a set of $n$ elements to a set of $m$ elements is $m^n$.
But among those not every element of the final set is an image of some element in the initial set.
That can only happen if $n\ge m$. In this question that is not a problem: $24\ge 3$.
Such functions are called surjections. These are also known as onto functions.
But among those not every element of the final set is an image of some element in the initial set.
That can only happen if $n\ge m$. In this question that is not a problem: $24\ge 3$.
Such functions are called surjections. These are also known as onto functions.
Using the inclusion/exclusion principle we get:
$\text{surj}(n,m)=\begin{cases}0 & n< m \\\sum\limits_{k = 0}^m {{\left( { - 1} \right)}^k{m \choose k}{{\left( {m - k} \right)}^n}} & n\ge m\end{cases}$
You want to find $\text{surj}(24,3)$

3. ## Re: Combination and Permutation

Plato, that capital N in the binomial is supposed to be an m, isn't it?