s-news
[Top] [All Lists]

Re: summing algorithm

To: "Rhoderick Neri Machekano" <rodmach@uclink.berkeley.edu>
Subject: Re: summing algorithm
From: "Biggerstaff, Brad J." <bkb5@cdc.gov>
Date: Tue, 14 Feb 2006 12:07:33 -0700
Cc: <s-news@lists.biostat.wustl.edu>
Thread-index: AcYxmLzKjzn1cIeKRxaIZ5UYFbotKwAANKww
Thread-topic: [S] summing algorithm
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
> 

<Prev in Thread] Current Thread [Next in Thread>