Let's say we had a sack with exactly 4 green marbles, 4 orange marbles, 4 black marbles and 4 violet

Ellen Chang

Ellen Chang

Answered question

2022-07-06

Let's say we had a sack with exactly 4 green marbles, 4 orange marbles, 4 black marbles and 4 violet marbles.
How many different picks are there having exactly 8 marbles that have at least one marble of each color?
I'm not quite sure whether this is a permutation or a combination. Going with the assumption that it is a combination I'm guessing the sample space is ( 16 8 ) . To find at least one marble of each color we could go with the complement of this statement. Not quite sure how to express it.
Perhaps ( 16 8 ) with the assumption that the complement of "at least one of each color" could be expressed as 4 ( 12 4 ) . But even that seems lacking.

Answer & Explanation

Nirdaciw3

Nirdaciw3

Beginner2022-07-07Added 20 answers

Step 1
Assuming order does not matter and each marble were uniquely identifiable, approach by inclusion-exclusion, getting rid of the "bad" outcomes which were missing one or more colors. We start with the total number of ways to pick, then subtracting those ways where at least one color was missing, adding back in the ways where two colors were missing.
( 16 8 ) 4 ( 12 8 ) + ( 4 2 ) ( 8 8 )
This answer which uses marbles as all distinct is the most likely answer to be helpful when answering the related probability question under the most common assumptions about distribution and such, the probability being this answer divided by ( 16 8 ) .
Step 2
The more likely question if we were purely concerned with practicing our counting skills is where order does not matter and marbles are all identical except perhaps by color. For this, we use stars-and-bars.
Relate your problem to the problem of counting the number of integer solutions to the system { x 1 + x 2 + x 3 + x 4 = 8 1 x i 4     i .
By ignoring the upperlimit, this becomes a question of stars-and-bars. We imagine laying out eight stars in a row and then simultaneously choosing three of the available gaps between the stars to place bars having not repeated a choice and interpreting the result as an arrangement we are interested in (or interpreting as a solution to the linear system above). The stars to the left of the first bar will correspond to the number of marbles of the first color we used. The stars between the first and second bar will correspond to the number of marbles of the second color we used etc...
There are seven available gaps and we want to choose three of them so there are ( 7 3 ) different ways to pick marbles here.
Now we take into consideration the upper bounds... some of these ways we counted were bad because we used more marbles than were possible for a color. In this problem we see that the only way to have picked eight marbles with more than four marbles of a color while also having at least one of every marble would be if we picked exactly five marbles of a color and one marble of each of the others. There are thus exactly four "bad" outcomes we counted.
( 7 3 ) 4
To emphasize again, the outcomes counted by stars-and-bars will generally not be equally likely (unless the problem explicitly states otherwise) and so this is generally unhelpful for most probability questions. Also, as problems get more complicated, there may have been greater challenges here at the last step in counting how many outcomes were bad. For the general approach, you may need to repeat the stars-and-bars argument multiple times having performed some algebraic manipulations or changes of variable and iterated through a more full inclusion-exclusion argument. For more on that, search elsewhere on this site for larger examples.
Note also the use of stars-and-bars for solving systems. The number of solutions to the system
{ x 1 + x 2 + + x a = b 0 x i
The number of solutions to the system
{ x 1 + x 2 + x a = b 1 x i
Be warned that some books will write the above system where the number of variables is n and they sum to r. Other authors may write it where the number of variables is instead r and they sum to n. This can lead to some confusion in whether you were meant to use ( n + r 1 r 1 ) or if you were meant to use ( n + r 1 r ) . If you remember the derivation and where the formula comes from in the first place, you should be able to keep it straight in your head.

Do you have a similar question?

Recalculate according to your conditions!

New Questions in Discrete math

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?