A summing problem
silky
michaelslists at gmail.com
Mon Feb 11 15:28:54 PST 2008
if you have matlab
http://www.mathworks.com/matlabcentral/newsreader/view_thread/160110
On Feb 12, 2008 5:31 AM, Sarad AV <jtrjtrjtr2001 at yahoo.com> wrote:
> hi,
>
> there is a positive integer n and i am trying to
> device an algorithm that gives me all the possible
> summation combinations.
>
> For e.g.
> n=4
>
> 1+3=4
> 2+2=4
> 1+1+1+1=4
> 1+2+1=4
>
> The ordering is not important. Hence there are 4
> possible summation combinations.
>
> All attempts to make an algorithm gives exponential
> time solutions. Is there a polynomial time solution to
> it?
>
> Given n, is there a formula that would count all its
> existing summations?
>
> Thank you,
> Sarad.
>
>
> ____________________________________________________________________________________
> Looking for last minute shopping deals?
> Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
>
--
http://lets.coozi.com.au/
More information about the cypherpunks-legacy
mailing list