# How to compute the number of combinations when $n < k$?

There are $$n$$ slots to fill with $$k$$ objects, $$n < k$$, and order doesn't matter. For example, if you had to fill ten bottles with either coffee, tea, or water, how many ways are there to fill them?

• What I mean is, the way I've learned to calculate combinations with n choose k, where you are choosing k elements from n possibilities, but here I am choosing more elements than I have possibilities. – eclare Oct 1 '19 at 18:59
• To be perfectly clear, you are allowed to repeat selections, each bottle gets one liquid added to it, and the order of the liquids doesn't matter, so you are counting situations like having one bottle of coffee, three bottles of tea and six bottles of water, or having three bottles of coffee, three bottles of tea and four bottles of water, yes? – JMoravitz Oct 1 '19 at 19:10
• Yes, exactly that situation. – eclare Oct 1 '19 at 19:28

By definition in that case

$$\binom{n}{k}=0$$

For your example, which is another problem, by stars and bars method, we can prove that we have (choose $$n=10$$ times from a set of $$k=3$$ objects with replacement):

$$\binom{n+k-1}{n}=\binom{n+k-1}{k-1}=\binom{3+10-1}{10}$$

cases.

Refer also to the related

• "and order doesn't matter"... surely this falls under a stars-and-bars style problem, wouldn't you think? – JMoravitz Oct 1 '19 at 19:01
• Ops yes I lost that part. Thanks, I fix it – user Oct 1 '19 at 19:02
• Always straordinary your answers. – Sebastiano Oct 1 '19 at 19:11
• Thank you! But from Wikipedia it looks like the equation would be (n+k-1) choose (k-1)? – eclare Oct 2 '19 at 0:24
• @eclare Yes you are right! The formula I gave is to choose k times from a set of n objects with replacement. In that case we have k=10 and n=3 then we need to reverse the variables! – user Oct 2 '19 at 6:19

You can't fill 10 bottles with either coffee, tea or water, only up to three. If you are allowed to use repetition, then: $$3\times3\dots\times3=3^{10}$$.

• What matters in this case is how many bottles are filled with each liquid. – N. F. Taussig Oct 1 '19 at 19:49