In how many possible combinations can you add 5 numbers

combinationspermutations

Suppose, I have 5 numbers, A,B,C,D and E.

My requirement is to add any of the numbers with any one or more of the other numbers?

For example,
I can do A+B, or A+B+C, or B+C+E, or B+C+D+E, etc.

I want to know how many such combinations are possible, and what are the steps to determine the combinations?

Since this is an addition, A+B and B+A are the same, and should not be treated as 2 distinct combinations.

I want to know the formula and the sequence / steps so that I can find answer for any n numbers.

I have arrived at the combinations for 3 numbers (A,B,C) as follows:

A+B,
A+C,
B+C,
A+B+C

Note that B+A, C+A, C+B, B+C+A, etc are not considered, as they are duplicates of existing combinations as there is no place value in addition.

Best Answer

Your question basically boils down to computing subsets of the set $\{A,B,C,D,E\}$ that consist of at least 2 elements, since each such subset (for example the set $\{A,C,E\}$ corresponds to one way of forming a sum.

The number of all subsets of a set with $n$ elements is $2^n$ (for every element you have two options: include it in the subset or leave it out, which gives you $2^n$ different options to form a set). There is one subset with $0$ elements, the empty set, and there are $n$ subsets with $1$ element (the singleton sets), so that indeed gives us the answer $2^n-n-1$, or in your specific case of $n=5$, we get $32-5-1=26$.

Related Question