These are called "partitions". You might start with
http://mathworld.wolfram.com/Partition.html,
which metions a greedy algorithm for finding these, among other, useful
facts.
Cheers,
Brad
Brad Biggerstaff, Ph.D.
Mathematical Statistician
Division of Vector-Borne Infectious Diseases
National Center for Infectious Diseases
Centers for Disease Control and Prevention
P.O. Box 2087
Fort Collins, Colorado 80522-2087
(970) 221-6473 ... BBiggerstaff@cdc.gov
> -----Original Message-----
> From: s-news-owner@lists.biostat.wustl.edu
> [mailto:s-news-owner@lists.biostat.wustl.edu] On Behalf Of
> Rhoderick Neri Machekano
> Sent: Tuesday, February 14, 2006 11:43 AM
> To: s-news@lists.biostat.wustl.edu
> Subject: [S] summing algorithm
>
> Dear users
>
> Is there a general algorithm for finding all sets of say k
> +ve integers that sum to S. For
> example, say I need all sets of 3 positve integers that sum
> to 6 : (1,2,3), (1,1,4),(2,2,2).
>
> Thanks
>
> rhoderick
> --------------------------------------------------------------------
> This message was distributed by s-news@lists.biostat.wustl.edu. To
> unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
> the BODY of the message: unsubscribe s-news
>
|