selection of balls A jar contains 17 red balls and 22 blue balls. How many ways are there to choose, without replacement, 8 balls from this jar.
This question is already answered here . Answer for this is 39C8


*

*But this answer is true when all the balls are distinct. Am i correct? 

*Suppose balls with same colors are same. Then what could be the answer? 
I think answer is equal to the number of solutions to a+b=8. Is this approach right?

*In the above case, say we add a restriction that always 2 red balls are there. Then how to go about it?

*In the question I have referred, by default, we had to consider that balls of the same color are same. isn't it? (i mean, that could have been the default case) and if so, why all the answers are on the assumption all balls are distinct?
 A: *

*Yes

*Then just consider the different combinations of two colors: e.g., $1$ red ball and $7$ blue balls; or $5$ red balls and $3$ blue balls; etc. In this interpretation there are only $9$ ways.

*Then just find the number of combinations of two colors for the remaining $6$ balls: e.g., $3$ red and $3$ blue. There are only $7$ ways.

*It is up to the question-asker to clarify what they meant. If the balls are all distinct, then the color is inconsequential, which is what might have convinced you that balls of the same color are indistinguishable, but as we see above, this assumption makes the question quite simple as well.
A: If the balls are all distinct, the answer $$\binom{39}{8}$$ is correct.
It is easy to see this. For the first ball you have $39$ choices, for the
second $38$ ... for the $8th$ ball, you have $32$ choices. This would
be $39\times 38\times 37\times 36 \times 35 \times 34 \times 33 \times 32$
possibilities, but since the order does not matter, every combination
like $2,5,9,11,17,23,27,32$ can be realized in $8!$ ways, so we
must divide by $8!$ giving $\binom{39}{8}$.
If there are two or more sorts of the balls, the problem is more complicated. In this
case, you have to multiply multiple binomial coefficients.
For example, there are $\binom{17}{4}\times \binom{22}{2}$ possibilities
to choose $4$ red and $2$ blue balls in our example.
To get all possibilities, sum up the numbers $\binom{17}{a} \times \binom{22}{b}$ for each pair $(a,b)$ of nonnegative integers with
the property $a+b=8$ to get the number of possibilities to select
$8$ from $39$, if the colors are considered.
A: *

*That is correct if order is not significant.

*If order of picking is significant (you distinguish between BBBRRBBB and BBBBBBRR), then it is just $2^8$. How many $8$-digit numbers are possible to make in a $\{0,1\}$ system? If order is not significant it is just 9 possible ways.

*I suppose that order of picking is important. It is $8C2$ - the number of ways to move 2 red balls in a sequence $RRBBBBBB$.

A: This answer assumes order does not matter
One of the most useful reasons to ask the question of "how many ways" is to figure out the probabilities involved.
For example, the question of "What is the probability of drawing eight red balls out of the described basket."  The answer being $\dfrac{\binom{17}{8}}{\binom{39}{8}}$.
The $\binom{39}{8}$ in the above probability can be phrased as referring to "the number of ways of selecting eight balls out of the described basket" and temporarily treats the balls as being distinct, but the phrasing is somewhat ambiguous.
You are correct in that "If the balls are treated as identical apart from color, how many ways to select eight balls from the described basket are there" will be a much smaller number than $\binom{39}{8}$ if you were to treat $\color{red}{1,2,3,4,5,},\color{blue}{1,2,3}$ as the same outcome as $\color{red}{2,4,10,13,17},\color{blue}{3,10,15}$.
In this scenario, to count the number of distinct outcomes, note that there are anywhere from 0 to 8 red balls, and 8 minus the number of red balls number of blue balls.  Since there are plenty of red balls and blue balls to fulfill these requirements, there are thus $\binom{9}{1}=9$ different scenarios.
This could be seen as well from the formula $\left(\!\!\binom{8}{2}\!\!\right)=\binom{9}{1}$.
This number is a great deal less useful however, as the different outcomes are not equally probable, and so we gain little insight as to how likely certain scenarios are.
