Is there a general formula for the number of subsets of a given size that can be created from a finite set?

1.1k Views Asked by At

I came upon the formula $(n^2-n)/2$, which gives the number of unique pairs from n elements. Am wondering if there is a general formula to achieve this for larger sized-subsets, i.e given 6 elements how many 3 member subsets can be made.

1

There are 1 best solutions below

0
On

${n \choose k }=\frac{n!}{(n-k)!k!}$, known as "$n$ choose $k$", is the number of ways of choosing $k$ elements from $n$.

Coincidentally (or not so coincidentally), and quite famously (at least among mathematicians) it is also the "binomial coefficient"... you may wish to look it up.

Check that when $k=2$ we get your formula.

So, for $n=6$ and $k=3$, we get ${6\choose 3}=\frac{6!}{(6-3)!3!}=\frac{6!}{3!3!}=\frac{6\cdot5\cdot 4}{3!}=20$.

(Btw, it's pretty easy to see why... For instance, in the last example, there are $6$ choices for the first element of the group, then $5$ choices for the second, and $4$ for the third. This gives $6\cdot5\cdot4=120$. But there are $6$ ways to "permute", or put the $3$ objects in different orders. That's because we have $3$ choices for the first, $2$ for the second, and $1$ for the third. So we divide by $6$, to arrive at $20$... groups or "combinations".)