In how many ways can nine chips be selected from a bag that contains three red chips, three blue chips, three white chips, and three yellow chips? (Assume that the order of selection is irrelevant and that the chips are identical except for their color.)
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Yep, same way. Nicely written up. Seems tricky to extend to a more general problem, though. Any ideas?
Log in to reply
It can be generalised...
Suppose that we have a total of N K chips, with N chips of each of K different colours. The number A M of ways of choosing M chips is the coefficient of x M in the polynomial F ( X ) = ( 1 + X + X 2 + ⋯ + X N ) K (the combination of a 1 of colour 1 , a 2 of colour 2 , and so in corresponds to selecting X a 1 from the first bracket, X a 2 from the second bracket, and so on). We note that F ( X ) = ( 1 − X 1 − X N + 1 ) K = ( a = 0 ∑ K ( − 1 ) a ( a K ) X a ( N + 1 ) ) ( b = 0 ∑ ∞ ( K − 1 b + K − 1 ) X b ) It is particularly easy to determine A M provided that M ≤ N , for then we only need the a = 0 term from the first bracket, and A M = ( K − 1 M + K − 1 ) The formula for M > N gets more complicated. For example A N + 1 = ( K − 1 K + N ) − K A 2 N = ( K − 1 2 N + K − 1 ) − K ( K − 1 N + K − 2 ) For this particular problem we have M = N = 3 and K = 4 , so that A 3 = ( 3 6 ) = 2 0
It is interesting to note that F ( X ) is a polynomial of degree K N , but we have expressed it as an infinite power series. This means that we have automatically proved a variety of combinatorial identities from the fact that A M = 0 for all M > N K . For example a = 0 ∑ K ( − 1 ) a ( a K ) ( K − 1 ( K − a ) ( N + 1 ) + K − 1 ) = A K ( N + 1 ) = 0
Use the generating function ( 1 − x ) 4 ( 1 − x 4 ) 4 . The rest is just calculation.
Brute force of what is not selected:
Length [ Union [ Table [ Sort [ p ] , { p , Permutations [ { r , r , r , b , b , b , w , w , w , y , y , y } , { 3 } ] } ] ] ] ⇒ 2 0
By the way, the same brute force method applied to the selected chips gives the same answer.
Translation: generate all size 3 permutations of 3 r's, 3 b's,3 w's and 3 y's, sort the selections alphabetically (in this case), and reduce the set to a list by removing the duplicates and report the size of the resulting set.
In some sense, this duplicates Mark Hennings solution.
This method seems to generalize well. Of course, it works faster on the smaller side of the problem.
Length ⎣ ⎢ ⎢ ⎢ ⎢ ⎡ Union ⎣ ⎢ ⎢ ⎢ ⎢ ⎡ ParallelTable ⎣ ⎢ ⎢ ⎢ ⎢ ⎡ Sort [ p ] , ⎩ ⎪ ⎪ ⎪ ⎪ ⎨ ⎪ ⎪ ⎪ ⎪ ⎧ p , Permutations ⎣ ⎢ ⎢ ⎢ ⎢ ⎡ Flatten ⎣ ⎢ ⎢ ⎢ ⎢ ⎡ Join ⎣ ⎢ ⎢ ⎢ ⎢ ⎡ Table ⎣ ⎢ ⎢ ⎢ ⎢ ⎡ ConstantArray @@ s , ⎩ ⎪ ⎪ ⎪ ⎪ ⎨ ⎪ ⎪ ⎪ ⎪ ⎧ s , ⎝ ⎜ ⎜ ⎜ ⎜ ⎛ r w b y g 1 2 3 4 5 ⎠ ⎟ ⎟ ⎟ ⎟ ⎞ ⎭ ⎪ ⎪ ⎪ ⎪ ⎬ ⎪ ⎪ ⎪ ⎪ ⎫ ⎦ ⎥ ⎥ ⎥ ⎥ ⎤ ⎦ ⎥ ⎥ ⎥ ⎥ ⎤ ⎦ ⎥ ⎥ ⎥ ⎥ ⎤ , { 1 2 } ⎦ ⎥ ⎥ ⎥ ⎥ ⎤ ⎭ ⎪ ⎪ ⎪ ⎪ ⎬ ⎪ ⎪ ⎪ ⎪ ⎫ ⎦ ⎥ ⎥ ⎥ ⎥ ⎤ ⎦ ⎥ ⎥ ⎥ ⎥ ⎤ ⎦ ⎥ ⎥ ⎥ ⎥ ⎤ ⇒ 2 9 .
Flatten ⎣ ⎢ ⎢ ⎢ ⎢ ⎡ Join ⎣ ⎢ ⎢ ⎢ ⎢ ⎡ Table ⎣ ⎢ ⎢ ⎢ ⎢ ⎡ ConstantArray @@ s , ⎩ ⎪ ⎪ ⎪ ⎪ ⎨ ⎪ ⎪ ⎪ ⎪ ⎧ s , ⎝ ⎜ ⎜ ⎜ ⎜ ⎛ r w b y g 1 2 3 4 5 ⎠ ⎟ ⎟ ⎟ ⎟ ⎞ ⎭ ⎪ ⎪ ⎪ ⎪ ⎬ ⎪ ⎪ ⎪ ⎪ ⎫ ⎦ ⎥ ⎥ ⎥ ⎥ ⎤ ⎦ ⎥ ⎥ ⎥ ⎥ ⎤ ⎦ ⎥ ⎥ ⎥ ⎥ ⎤ ⇒ { r , w , w , b , b , b , y , y , y , y , g , g , g , g , g } .
Problem Loading...
Note Loading...
Set Loading...
The required number is the same as the number of ways of choosing 3 from the 1 2 chips (we can choose the 3 that are left behind instead of the 9 we are taking). The colours of these three coins could be
Thus there are 4 + 1 2 + 4 = 2 0 ways in which the 9 chips can be chosen.