How many ways to split 5 numbers in 2 groups? How many ways can you split the numbers 1 to 5 into two groups of varying size?
For example: '1 and 2,3,4,5' or '1,2 and 3,4,5' or '1,2,3 and 4,5'. How many combinations are there like this? What is the formula?
 A: Great question.  It seems to me that there are two decisions that should be made.  The first is to determine the size of the two groups.  After that decision has been made, we must then decide which elements will go in which groups.
Suppose we split the $5$ numbers into a group of size $1$ and a group of size $4$.  How many ways can we do this?  Well, it suffices to just choose which number will be alone, so there are $5$ ways.
Next, let's split the numbers into a group of size $2$ and a group of size $3$.  How many ways can we do this?  Again, it suffices to choose the numbers for the smaller group.  Using a binomial coefficient, we find there are $\binom{5}{2}=10$ ways to do this.
Altogether, you will find $15$ ways.
See if you can show with $n$ elements there are $2^{n-1}-1$ ways to split into two smaller groups.
A: The OP has specified that the order of the groups in the splitting doesn't matter, and also that the two groups must both be non-empty.  One of the groups must have the $1$, and that group either has or doesn't have each of the other four numbers, except that it can't have all four (which would leave the other group empty), so there are in total $2^4-1=15$ splittings.
A: This is a basic application of the famous "Stirling Numbers of the second kind".
In case of $n$-subset-$2$, the formula is given by $2^{n-1} - 1$.
So, here, we get the answer to be $2^{5-1} - 1$, i.e. $15$.
A: Here's another way of looking at the problem of splitting the numbers into group A and group B:
For every number, there are two choices: into group A or group B. If there are n numbers, then there are $2^n$ combinations.
We know that the order of the groups isn't important. For example, using the numbers in the original question, A={1,2,3} and B={4,5} is the same as A={4,5} and B={1,2,3}. As such, each combination in $2^n$ has a duplicate. Thus, $\frac{2^n}{2}$ or $2^{n-1}$.
There is one case where a group is empty. Since groups must be non-empty, we subtract this one case. Thus, $2^{n-1}-1$.
