Carsten Haese <[EMAIL PROTECTED]> 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. -- http://mail.python.org/mailman/listinfo/python-list