# Total number of possible combinations for a vector of variable length

I am trying to understand the formula behind generalizing the computation of the number of unique combinations possible for a vector of length n. Say x=(a,b,c) with n = 3, the number of possible combinations would be: [3 choose 1 (a,b,c) + 3 choose 2 (ab, ac, bc) + 3 choose 3 (abc) ]. While if n is 4, the number of possible combinations would be [4 choose 1 (a,b,c,d) + 4 choose 2 (ab, ac, ad, bc, bd, cd) + 4 choose 3 (abc, abd, bcd, acd) + 4 choose 1 (abcd)], and so on for increasing number of n. But what is the general formuation for these type of combinations?

Thanks for any help! Fra

• $\sum_{k=0}^{n}{}_nC_k = 2^n$ and $\sum_{k=1}^{n}{}_nC_k = 2^n - 1$. Apr 5 '17 at 20:20

With each of the $n$ components of the vector, you have 2 options - select it or not. So the number of combinations is $2^n$. If you want to exclude the case where none of the components are chosen, then subtract 1.
• With $n=4$, there are $2^4-1=15$ combinations which are a,b,c,d,ab,ac,ad,bc,bd,cd,abc,bcd,acd,abd,abcd. Apr 5 '17 at 20:43