Holiday notice: Cycling '74 will be closed Monday, October 9th. Manual authorization, support cases, and manual order processing will be delayed.

Feb 03 2010 | 9:39 pm

I am trying to find a more or less elegant way to distribute a random number of random variables that all add up to a fixed number. Maybe there is a fancy sigma formula out there, or maybe there is a dead easy way that I have overlooked.

For example: I would like to divide the number 20 into whatever: (4, 5, 9, 2), (10, 10), (9, 6, 5) and so on.

Any ideas?

Thanks a bunch

Eskil