On 11/14/2009 5:04:06 PM, Tom_Gutman wrote:
>That is true. It is doing
>non-empty partitions, and you
>can't get that if N is greater
>than n. Use min(N,n-1) to
>avoid extending the sum too
>high.
That works. An alternative is to use some algebraic manipulation to come up with this:
Which calculates correctly for all N and n.
>With n levels you can't
>use more than n-1 paints.
Well, I can, but of course all possible combinations are accounted for when N=n-1.
Richard