Place n indistinguishable items into k distinguishable boxes

Michael Robertson mcrobertson at hotmail.com
Wed Feb 27 23:33:37 EST 2008


castironpi at gmail.com wrote the following on 02/27/2008 08:14 PM:
> On Feb 27, 10:12 pm, castiro... at gmail.com wrote:
>>> For n=4, k=3, there are (4+3-1)!/(3-1)!/4! = 15 ways.

>>> (0,0,4)
>>> (0,4,0)
>>> (4,0,0)
>>> (0,2,2)
>>> (2,0,2)
>>> (2,2,0)
>>> (0,1,3)
>>> (0,3,1)
>>> (3,0,1)
>>> (3,1,0)
>>> (1,1,2)
>>> (1,2,1)
>>> (2,1,1)
> 
> Ah, correction, retracted.  -disting-uishable boxes.  Copy, but then,
> where's ( 1, 0, 3 )?

I only listed 13 ways...sorry about that.  Missing are:

(1, 0, 3) and (1, 3, 0)



More information about the Python-list mailing list