[Math] How many combinations can a group of n people form

combinatoricspermutations

how many groups can $20$ (or $n$) people form? The size of the groups vary from $2$ to $20$, where no group should have only a single member, and the order doesn't matter

I'm sorry if this is a common question, but every single question I've found refers to "$3$ teams from $30$ people" or "How many ways can $10$ people be split intro groups of $2$ and $3$".

The question stems from a discussion about how many chat groups our family of $20$ would form if everyone had a different chat group with everyone.

I've thought about this for a long time now but I'm not getting anywhere.

Surely the answer isn't $20!$, because that would count AB and BA as $2$, while in this case it's only a single group

Best Answer

I think you mean: "How many different subsets that are not empty does the set $\{1,\ldots,n\}$ have?".

A subset can be represented as $0$-$1$-string. Let us assume that the elements of a set are numbered from $1$ to $n$. $0$ at position $i$ means that the i-th element of the set is not in the subset, $1$ on position $i$ means that the i-th element is a member of the subset. E.g. the subset $\{2,3,5,7\}$ of the set $\{1,2,3,4,5,6,7,8,9,10\}$ is represented by the string $0110101000$. The empty subset is represented by the string that contains only $0$. There are $2^n$ possible string and therefore $2^n$ possible subsets, including the empty one. If we neglect the empty subset and the $n$ subsets that contain only one element we have $2^n-n-1$ possible subsets. For $n=20$ this is $1048555$