Think about it a bit; you'll see the answer is not substantially different between the problems. On Mon, Jan 19, 2009 at 12:40 PM, Steve Witham <sw@tiac.net> wrote:
I have a sorted list of n integers, that may contain duplicates, in the range 0..(m-1). How many possible such lists are there given n and m? The possibility of duplicates makes it different from "n out of m," right?
If you add a 0 to the front of the list, then take differences between successive numbers, the question becomes, How many lists of n ints between 0 and m-1 are there that add up to < m?
--Steve
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
-- Check out Golly at http://golly.sf.net/