number generator
Paul Rubin
http
Fri Mar 9 11:00:48 EST 2007
Carsten Haese <carsten at uniqsys.com> 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
http://en.wikipedia.org/wiki/Partition_number
for more info.
More information about the Python-list
mailing list