# Possible ways of drawning balls from a bag, but it is a permutation.

I made a calculation for a much simpler problem, of which I'm not sure if it is correct or not. It is the following: having a bag with 20 red (R) and 10 white balls (W), in how many ways can you drawn 3 balls, one by one so that drawning one red ball and then two whites (WBB) is different to say, drawning a white one, then a red, and lastly a white (WBW).

My sample space would be

$$S = \left\{BBB, \; BBW, \; BWB, \; BWW, \; WBB, \; WBW, \; WWB, \; WWW \right\}$$

And the total number of ways of drawning three balls, where the order matters, is

$$n = \left(10\right)_3 + 3 \times (10)_{2} (20)_1 + 3 \times (20)_{2} (10)_1 + (20)_3 = 24360$$

where

$$(k)_l = \frac{k!}{(k-l)!}$$

which accouts for drawning $$l$$ balls from a total of $$k$$ balls, taking into account that you do not put the ball you drawned back to the bag.

My question is, how could I generalize this to having $$k$$ types of balls, where there are $$l_{k}$$ balls of each $$k$$ type, from a total of $$n$$ balls, where $$\sum_{k} l_{k} = n$$ (for example, in the problem above, $$n=30$$, $$k =$${red, white}, $$l_{red} = 20$$ and $$l_{white} = 10$$, and $$\sum_{k}l_{k} = l_{red} + l_{white} = 20+10 = 30$$).

• What are the $B$s? Are they supposed to be $W$s? Note that the events in your sample space are not equally probable. Commented Mar 8, 2020 at 14:49
• I'm not sure whether I understand your reasoning correctly, however you assume that the balls in one colour are pairwise distinguishable, that is that there are e.g. $10\cdot 9 \cdot 8$ ways to draw $BBB$. In such reasoning we don't even need colours, notice that you can just go for $30$ distinguishable balls. Even your calculations are correct, as drawing a sequence of $3$ distinguishable balls from a set of $30$ balls can be done in $30\cdot 29\cdot 28 =24360$ ways Commented Mar 8, 2020 at 15:13
• @RossMillikan sorry, typo, it's fixed now. Commented Mar 8, 2020 at 16:40
• @NikoWielopolski Thanks for your answer! Then in the general case, it would be correct to say that the number of ways of drawning $m$ balls from a bag with $n$ balls, there being $l$ distinct colors of balls, where there are $n_{l}$ balls of each color, is simply $(n)(n-1) \cdots (n-(m-1))$? Commented Mar 8, 2020 at 16:45
• @Jpmarulandas With current setup yes, it would be correct. I feel a bit anxious about that answer, as usually (as far as my short experience in discrete mathematics goes) balls are treated as indistinguishable, however there is nothing wrong with your answer if the balls are actually distinguishable. Commented Mar 8, 2020 at 16:59

"I'm not sure whether I understand your reasoning correctly, however you assume that the balls in one colour are pairwise distinguishable, that is that there are e.g. $$10⋅9⋅8$$ ways to draw $$BBB$$. In such reasoning we don't even need colours, notice that you can just go for $$30$$ distinguishable balls. Even your calculations are correct, as drawing a sequence of $$3$$ distinguishable balls from a set of $$30$$ balls can be done in $$30⋅29⋅28=24360$$ ways"