0
$\begingroup$

So I have this question, I have $8$ red shirts $4$ blue shirts ... and so on.

The generalized question would be: Suppose I have $k$ shirts, and they are of $m$ different colours and it's given that $a_i$ denotes the number of shirts of $i$th colour. $1 \leq i \leq m$ and $\sum a_i = k$ .

So in how many ways can I pick $n$ different coloured shirts where $n < m$?

I can solve this by picking any $n$ colours, like suppose $n = 3$ and I have red, blue, green, and yellow shirts,

my answer would $(a_{red} * a_{green} * a_{blue}) + (a_{red} * a_{green} *a_{yellow}) + (a_{green} * a_{blue} * a_{yellow} )$

but is there any general method for a random $n$, where I have don't have to calculate individual combinations?

$\endgroup$
5
  • $\begingroup$ Can you solve this problem on your own for $n=1,2$ when e.g. $m=3$, $a_1=2$, $a_2=3$, $a_3=1$? It's a good thing to start "small" and look for patterns. $\endgroup$
    – drhab
    Oct 2 '15 at 12:45
  • $\begingroup$ @drhab , I have changed the question details a bit , adding information , that I can solve for small numbers but I actually want a generalized formula for a random n, m values with $a_1 .. a_m$ already known ? $\endgroup$
    – user253651
    Oct 2 '15 at 14:37
  • $\begingroup$ If I understand you correctly then the colors of the $n$ picked shirts are distinct. Then for any fixed color you can only choose one shirt. There are $m$ shirts so $n$ of them must be elected. There are $\binom{m}{n}$ possibilities for that. Are the shirts that have the same color distinguishable? If not then the answer is just $\binom{m}{n}$. $\endgroup$
    – drhab
    Oct 2 '15 at 14:54
  • $\begingroup$ Correction on former comment: "there are $m$ colors (not shirts) so $n$ of them must be selected.." $\endgroup$
    – drhab
    Oct 2 '15 at 15:10
  • $\begingroup$ @drhab yes they are distinguishable , thats what is creating trouble $\endgroup$
    – user253651
    Oct 2 '15 at 17:27
0
$\begingroup$

suppose you need the first n colors . then u can choose it in $a_1.a_2....a_n$ ways. but then you have to choose any n colors. so the no. of ways will be $\sum a_{i_1}a_{i_2}...a_{i_n}$ where $i_k \neq i_l$ whenever $k \neq l$ and sum over possible choices

$\endgroup$
0
$\begingroup$

This answer is in essence the same as the answer of Saikat, and also matches with your own effort. Unfortunately it is not much more than a notation.

Let $B_{n,m}$ denote the collection of functions $f:\{1,\dots,n\}\rightarrow\{1,\cdots,m\}$ that are orderpreserving. This in the sense that $i_1<i_2\implies f(i_1)<f(i_2)$.

The number of possibilities equals the following expression:$$\sum_{f\in B_{n,m}}\prod_{i=1}^{n}a_{f\left(i\right)}$$

Special case: if $a_1=\cdots=a_m=r$ then the expression equals $r^n\binom{m}{n}$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.