-1
$\begingroup$

Not sure where to head with this one for an answer. I have a little knowledge of cominatorics. Looking for a method to calculate how many ways to combine $n$ objects once each. Given $n=2$ the answer is $1$. For $n=3$, the answer is $4$ (namely $\{a,b\},\{a,c\},\{b,c\},\{a,b,c\}$). I don't want to include repeat combinations like $\{b,a\}$ and $\{a,b\}$ that pair can only be counted once.

I saw some things in graph theory that might work, but having 0 knowledge in graph theory it's a needle in a haystack problem.

  • 1
    What's the question? For $n=3$, why don't you include the subsets with one (or no) elements? Is that the only restriction or are there others?2017-02-08
  • 0
    Just to say, if my guess (and that's all it is) as to the question is correct, then the answer is $2^n-(n+1)$. Does that give the answer you want for, say, $n=4$?2017-02-08
  • 0
    Yes l, I can add n to include the subsets with 1 elements. Or +1 to include the empty set. That much I do know.2017-02-08
  • 0
    Ok, then my formula should be what you want. There are $2^n$ subsets with no restrictions, there are $n$ with exactly one element, and there is $1$ with no elements.2017-02-08
  • 0
    I answered yes to the first question - is that the only restriction. And after checking the formula against brute force, it is the formula I was looking for, thanks! Not sure why I thought it was going to be more complicated.2017-02-08

1 Answers 1

2

Basically, you're counting all subsets of a given set with size at least $2$. The total number of subsets of a set of size $n$ is $2^n$. There are exactly $n$ singleton subsets and there's one subset without any elements (the empty set).

Combined you get $$2^n - n - 1.$$