How can I arrange $10$ balls in $5$ cells, so that in every cell there is at least $1$ ball and in the first cell there is an odd number of balls?

Note: all the balls are the same, they are not labeled

  • $\begingroup$ Are the balls labeled or unlabeled? (The mention of a "first" cell suggests that the cells are labeled -- i.e., that there is also a second, third, fourth, and fifth cell. Are the balls also numbered, or are they all the same, e.g., all white?) $\endgroup$ – Barry Cipra Aug 17 '13 at 16:40
  • $\begingroup$ Um, isn't this trivial? Put one ball in each cell, and then split the remaining balls any way you like between every cell that isn't the first. Or do you mean to ask how many ways this can be done? $\endgroup$ – ire_and_curses Aug 17 '13 at 16:41
  • $\begingroup$ The balls aren't labeled, and I know it's kind of trivial, but I don't know how to solve problems of counting with certian conditions, like this problem. Thanks $\endgroup$ – HaloKiller Aug 17 '13 at 16:43

If this is a counting problem, then here’s a solution.

Disclaimer: there’s probably a better one; I’m just solving this particular problem.

Begin by putting one ball in each cell.

This leaves five balls that you have to put in cells. You now need to put an even number in the first cell, so count the number of ways to put $0$ in the first cell and split the remaining balls among the other $4$, repeat for placing $2$ and $4$ in the first cell.

Also perhaps I should mention that if you have $n$ objects and and $k$ cells, the number of ways to distribute them is $\binom{n+k-1}{k-1}$; that kind of counting problem often goes by the name stars-and-bars, from one way of proving the formula; there’s a decent discussion here.

  • $\begingroup$ I took the liberty of adding a reference for the stars-and-bars formula. (+1) $\endgroup$ – Brian M. Scott Aug 17 '13 at 17:32
  • $\begingroup$ ah thanks, always good :) $\endgroup$ – jgon Aug 17 '13 at 18:50

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.