Distinct vs Identical In a bag containing 20 balls(6 red), (6 green), (8 purple)
We draw 5 balls, put them back in the bag, then draw 5 more.


*

*In how many ways can this be done if the balls are considered
distinct?


My book doesn't describe distinct vs identical well but my assumption is that distinct would include both
{red1, red2, red3} and {red3, red2, red1} 
where identical would not?


*

*So my answer would disregard color and be: 20!/(20-5)!


So my question for this post would be am I understanding this correctly or is this completely wrong?
 A: If each ball is distinct, think of the balls as having numbers on them. The order in which the five balls are drawn doesn't matter. So there are $\binom{20}{5}$ options for the first draw. Since we replace the balls, we have $\binom{20}{5}$ ways to draw the second set. The first draw is independent of the second draw, so by rule of product we have $\binom{20}{5} \cdot \binom{20}{5}$.
If the balls are identical (no numeric labels on the balls), we have the stars and bars problem. Since we are drawing five balls and there are at least six balls of each kind, the solution is $\binom{5 + 3 - 1}{5}$. If there were say, four red balls, the solution would require more analysis.
To see this, we have the equation: $x_{r} + x_{g} + x_{p} = 5$ s.t. $x_{r}, x_{g} \leq 6$ and $x_{p} \leq 8$. Clearly, the constraints don't matter here, since we will never be drawing six balls. Thus, we can directly apply the Stars and Bars theorem to get $\binom{5 + 3 - 1}{5}$ ways to choose a single draw. Notice with the equation I gave, we don't care about drawing a red first, then a green, then another red. We just care about the number of reds present or the number of greens present.
Since we have replacement after the first draw, this is the same quantity for the second draw. And so by rule of product, we have: $\binom{5 + 3 - 1}{5} \cdot \binom{5 + 3 - 1}{5}$ as our answer.
