Wasn't there also the requirement that the numbers be drawn from a uniform distribution? These sequences are not. I wonder whether this can for all practical purposes be simplified to consider only the sequence with maximum entropy.
B. > On 2018-07-11, at 06:23, Rolf Turner <r.tur...@auckland.ac.nz> wrote: > > On 11/07/18 12:46, Jim Lemon wrote: >> Hi Nell, >> I may not have the right idea about this, but I think you need to do >> this in two steps if it can be done. Let's say you want a sequence of >> 20 (N) numbers between 0 and 10 that sums to 10 (M). You can enumerate >> the monotonically increasing sequences like this: >> c(0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1) >> c(0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,2) >> ... >> c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10) > > <SNIP> > > Jim: You should *not* do people's homework for them! > > cheers, > > Rolf > > -- > Technical Editor ANZJS > Department of Statistics > University of Auckland > Phone: +64-9-373-7599 ext. 88276 > > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.