I have $5(N)$ boxes and some balls. Here's the description: Red Balls $= 2 (k1 = 2)$ Green Balls $= 3 (k2 = 3)$

    |    |    |    |    |    |

How many ways do I have to put in these balls in the five boxes? (The boxes are labeled/ordered)

p.s. One box can hold only one ball

  • $\begingroup$ How many balls should be in each box? $\endgroup$ – Mhenni Benghorbal Jul 5 '13 at 22:02

For the solution, we assume that a box can contain any number of balls.

You are probably familiar with the Stars and Bars way of counting the number of ways to put $2$ red balls in $5$ boxes.

If so, you also can find the number of ways to put $3$ blue balls in $5$ boxes.


Remark: $1.$ If Stars and Bars is not familiar, one can make it familiar (the Wikipedia article cited is pretty clear). Or else one can count separately, by considering cases, the answers to the $2$ ball problem and the $3$ ball problem.

$2.$ If we are to have $1$ ball per box (this was not specified), then the number of ways is the number of ways to choose where the red balls will go. This is $\binom{5}{2}$.

  • $\begingroup$ Yup, 1 ball per box. Thanks! Actually I had to use it as a part of a larger problem. The task was to find out how many anagrams of a word are Palindromes. Thanks again! $\endgroup$ – Aditya Jul 5 '13 at 22:27
  • $\begingroup$ OK. If you need a check of that answer, please leave a message. Will not be able to reply immediately, but within a couple of hours. $\endgroup$ – André Nicolas Jul 5 '13 at 22:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.