Combinatorica problem
- To: mathgroup at smc.vnet.net
- Subject: [mg38950] Combinatorica problem
- From: guillerm at usal.es
- Date: Tue, 21 Jan 2003 07:39:32 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Dear group, I have m balls shared in n box. What is the probability that one box has r o more balls? If m = 4, n=3 and r = 2 the solution will be (?): In[1] := Needs["DiscreteMath`Combinatorica`"] In[2] := list = Compositions[4,3]; In[3] := (Count[list,2,2]+Count[list,2,3]+Count[list,2,4])/(3 Length[list]) The question is that this way works only when m and n are small , but for values sush as m=20, n=11 and r=5 the computer is out of memory. Any idea? Thanks Guillermo Sanchez --------------------------------------------- This message was sent using Endymion MailMan. http://www.endymion.com/products/mailman/