number generator

Paul Rubin http
Fri Mar 9 17:00:48 CET 2007

Carsten Haese <carsten at> writes:
> > Given two positive integers, N and M with N < M, I have to generate N
> > positive integers such that sum(N)=M. No more constraints.
> Paul still had a point, since the word "positive" is a vital piece of
> information that never appeared in your original description.

It's maybe even more complicated that way.  Does the OP want to
generate each possible partition with equal probability?  See

for more info.

More information about the Python-list mailing list