# Math Help - How many ways are there ?

1. ## How many ways are there ?

Hi

I have balls of k different colors. We have an infinite supply of balls for each color. I want to select n balls(1<=k<=n). How many ways are there i.e how many combinations(not arrangements) are there such that atleast 1 ball of each color is selected.

example if n=10 and k=10 , answer =1

Regards
lali

2. Originally Posted by lali
I have balls of k different colors. We have an infinite supply of balls for each color. I want to select n balls(1<=k<=n). How many ways are there i.e how many combinations(not arrangements) are there ?

example if n=10 and k=10 , answer =1
I see some trouble with various ways someone could read your question.
From your example, we are selecting at least one of each color.
If this is correct, then in the case $n=11~\&~k=10$ the answer is $10$.
In general, $n~\&~k,~k\le n$ then $\binom{n-1}{n-k} = \frac{(n-1)!}{(n-k)!(k-1)!}$

3. Thank you very much for your reply and thanks for pointing out that my question was incomplete( i have edited it now)

Can you please guide me how you came up with that formula. I am really bad at combinatorics. So i would be glad if you could just point some learning material on the net for the above problem( or you could just point what search string to use in google, right now i am using "combinatorics" only)

The answer is $\binom{N+k-1}{N}$. But that allows some cells to be empty.
If, as in your case, no cell can be empty, then the answer is $\binom{N-1}{N-k}$.