0

I have to purchase some items.

We have to tell how many ways are there to select N items of K types.

However, the constraint here is we need to have at least one item of each type.

How many ways exist?

  • How many items are there of each type? If there are infinitely many, then the answer is infinite. – Sarvesh Ravichandran Iyer Aug 21 '16 at 08:08
  • The question is similar to this http://math.stackexchange.com/questions/686/combinations-of-selecting-n-objects-with-k-different-types

    But i want atleast 1 object of each type

    – user249117 Aug 21 '16 at 08:16
  • Well, pick first exactly one object of each type. After that, proceed to pick the other $n-k$ objects as in the previous problem. – Crostul Aug 21 '16 at 08:20

1 Answers1

1

The requirement that we select at least one item of each type forces K items in our selection to contain one instance each of all the items on offer, so this part of the selection may be ignored. This leaves a choice of $N-K$ items from K types where the order doesn't matter and the number of ways this latter choice can be made is given by the multicombination $$\left(\!\!\binom{K}{N-K}\!\!\right)=\binom{K+N-K-1}{N-K}=\binom{N-1}{N-K}$$ This is the answer to your question.

Parcly Taxel
  • 103,344