I am not sure when we can use stars and bars and when we can't. For example, in this question:

How many ways are there to put 5 balls in 3 boxes if the balls are not distinguishable and neither are the boxes?

Is the answer 7 choose 2?

If, for example, the balls become distinguishable, how does that change the stars and bars formation? What if both become distinguishable (i.e. the balls and boxes?)

Thanks,

]]>