4

I've seen in several texts that $2^n$ is the total number of combinations of $n$ items. I don't get how we get that number. I always end up with $2^n - 1$.

For example, if $n = 4$, we have:

  • $\frac{4!}{1!3!} =4$
  • $\frac{4!}{2!2!} =6$
  • $\frac{4!}{3!1!} =4$
  • $\frac{4!}{4!0!} =1$

$4 + 6 + 4 + 1 = 15$.

I get $15$ instead of $16$. Yet in many texts, it says $2^n$. Why do we say it's $2^n$ and doesn't assuming it is $2^n$ when in fact it seems like it's $2^n - 1$ mess up our calculations for other stuff?

Thanks!

Rick
  • 1,934
confused
  • 427
  • 8
    Having nothing is a possible combination. – Andrew Chin May 20 '20 at 04:30
  • 4
    I.e., what about $4!/(0!*4!)$? – J. W. Tanner May 20 '20 at 04:30
  • 4
    seems like you are confused – impopularGuy May 20 '20 at 04:33
  • Yes but in practice we would never care about the empty set. – confused May 20 '20 at 04:40
  • 1
    There are $2^n-1$ nonempty subsets of a set with $n$ items. There are $2^n$ subsets in total when you remember that the empty set is also a subset and should not be forgotten. "Yes but in practice we would never care about the empty set" Not necessarily. There are plenty of reasons why you might choose not to ignore the empty set. – JMoravitz May 20 '20 at 04:41
  • 8
    Consider the following... "How many sequences of four coin flips are there?" Well... we can count these by looking at the different subsets of the set of positions which are tails... those which had one tail and three heads of which there are $\frac{4!}{1!3!}$ of them... those which had two tails and two heads of which there are $\frac{4!}{2!2!}$ of them... and so on. Had we only used those you mentioned in your post however, we would have skipped over the possibility of zero tails and four heads. There are sixteen sequences... not fifteen. TTTT should not have been left out. – JMoravitz May 20 '20 at 04:43
  • 4
    To reiterate... $2^n-1$ is a fine answer to its own question... the question of how many non-empty subsets a set has. $2^n$ is a fine answer to its own question... the question of how many subsets (empty or not) a set has. Do not confuse the questions and do not immediately discount the one or the other as being unworthy of being asked or discussed. – JMoravitz May 20 '20 at 04:46
  • 1
    Spoke wrong. Zero tails and four heads... HHHH... but you get what I mean... – JMoravitz May 20 '20 at 04:58
  • @confused It’s not true that we never care about the empty set, as JMoravitz has shown you. What’s true is that mathematical English and ordinary English use the words but sometimes in slightly different ways, and in ordinary conversation the empty subset might well be irrelevant in some situation but we wouldn’t say “non-empty” because it would be awkward sounding and implied by context. But in math we would say “non-empty” because we endure awkwardness in favor of precision. – Ned May 20 '20 at 10:29
  • I always just did those questions as 2222, or number out outcomes per slot. If rolling a die, it would be 66*6, etc.... I saw $2^n$ used in programming books I'm reading where we need to search through different sets but I don't see why an empty set ever matters. If we were building an algo that first looks through each set then does something else, I would imagine eventually the calculation gets off. – confused May 24 '20 at 07:50

2 Answers2

4

Construct any subset $S$ of $n$ items as follows: We put $n$ items in a row and go through them one by one. For each item we either say yes or no to indicate whether it belongs to $S$.

Since there are $2$ choices per item, by the rule of product, $S$ can be constructed in $2^n$ ways.

0

The reason you are getting $15$ is you did not consider 4C0 case which will be $1$, thus giving you $16$ as the answer.

Arctic Char
  • 16,972
Shivam
  • 19