document.write( "Question 892316: Given a set of N numbers, find the number of distinct possible sums that can be obtained by taking any number of elements from the N number of numbers and adding them.
\n" ); document.write( "this is a generalised question need to derive a general formula
\n" ); document.write( "

Algebra.Com's Answer #540476 by Edwin McCravy(20056)\"\" \"About 
You can put this solution on YOUR website!
\r\n" );
document.write( "Taking N=5, it's quite easy to see that every sum of {1,10,100,1000,10000} \r\n" );
document.write( "would be unique.\r\n" );
document.write( "\r\n" );
document.write( "On the other hand, also for N=5, it's quite easy to see that the sums of\r\n" );
document.write( "{2,4,6,8,10} would not all be unique.\r\n" );
document.write( "\r\n" );
document.write( "So there is no such general formula.  That's because for there to be a general\r\n" );
document.write( "formula, the number of distinct sums would have to be the same for all sets of 5\r\n" );
document.write( "distinct numbers.  And as we see that is not the case. \r\n" );
document.write( "\r\n" );
document.write( "To esplain further with smaller set:\r\n" );
document.write( "\r\n" );
document.write( "Suppose you are given the set of N = 3 numbers {1,2,3}.\r\n" );
document.write( "Let's form all distinct sums by taking any number of\r\n" );
document.write( "numbers and adding them:\r\n" );
document.write( "\r\n" );
document.write( "1 = 1\r\n" );
document.write( "2 = 2\r\n" );
document.write( "3 = 3\r\n" );
document.write( "1+2 = 3\r\n" );
document.write( "1+3 = 4\r\n" );
document.write( "2+3 = 5\r\n" );
document.write( "1+2+3 = 6\r\n" );
document.write( "\r\n" );
document.write( "The 3 appears as a sum twice, so there are 6 distinct sums.\r\n" );
document.write( "\r\n" );
document.write( "Now suppose you are given the set of N = 3 numbers {1,2,4}.\r\n" );
document.write( "Let's form all possible sums by taking any number of\r\n" );
document.write( "numbers and adding them:\r\n" );
document.write( "\r\n" );
document.write( "1 = 1\r\n" );
document.write( "2 = 2\r\n" );
document.write( "4 = 4\r\n" );
document.write( "1+2 = 3\r\n" );
document.write( "1+4 = 5\r\n" );
document.write( "2+4 = 6\r\n" );
document.write( "1+2+4 = 7\r\n" );
document.write( "\r\n" );
document.write( "None of those sums appear twice, so there are 7 distinct sums.\r\n" );
document.write( "\r\n" );
document.write( "No general formula can could give you both 6 and 7 when you \r\n" );
document.write( "substitute N=3 into it.\r\n" );
document.write( "\r\n" );
document.write( "So there can be no such general formula.  It would depend on\r\n" );
document.write( "how many different ways you could get the same sum by adding \r\n" );
document.write( "different combinations of the numbers.\r\n" );
document.write( "\r\n" );
document.write( "Sorry.\r\n" );
document.write( "\r\n" );
document.write( "Edwin
\n" ); document.write( "
\n" );