3

How to calculate the number of possible pair combinations of a set, with no repetitions, which include all members?

For example, in a group having {a, b, c}, the possible pairs* are: {ab, ac, bc}, and the possible pair* combinations* are:

{ab, bc, ac}; (OK: includes a, b, c) 
{ab, bc};     (OK: includes a, b, c) 
{ab, ac};     (OK: includes a, b, c) 
{bc, ac};     (OK: includes a, b, c) 
{ab}          (NO: misses c)
{bc}          (NO: misses a)
{ac}          (NO: misses b)

* Non-repetitive

So, the number of (c)ombinations I'm searching for a set of three elements is: $c=4$ (the first four in the list).

The total number of pair (g)roups is $g=\frac{n(n-1)}{2}$, so, for $n=3$ elements {a, b, c}, there are $g=3$: {ab, ac, bc}. But I still can't see how to calculate:

a) the number of possible pair interactions without repetitions (all in the list above: $a=7$) (perhaps $a=2^g-1=7$?),

and

b) the number of pair groups including ALL elements in the original set, $c = a - [all misses]$ in my example.

Just tried listing the possibilities for a group of four members, {w, x, y, z} and it is not evident: {wx, xy, yz} includes all, but {wx, xy, wy} misses z, don't see how to filter those.

Any tips are welcome, thanks.

RodolfoAP
  • 143

3 Answers3

2

Hint:

Starting with the letters $a_1,\dots,a_n$ start hunting for $$2^{\binom{n}2}-|\bar a_1\cup\cdots\cup\bar a_n|$$where $\bar a_i$ denotes the collection of sets of pairs that do not contain $a_i$.

This by means of PIE and symmetry.

Here $2^{\binom{n}2}$ is the cardinality of all collections of pairs (including the empty one).

drhab
  • 151,093
1
  1. a) The guess is correct, the answer would be $2^{\binom{n}{2}}-1$. This is just because it is the powerset (excluding the emptyset) of the possible pairs that you correctly computed as $\binom{n}{2}=\frac{n(n-1)}{2}$
  2. b) You can do this using inclusion-exclusion principle. Call $B_i=\{X\subset \binom{A}{2}:a_i\not \in \bigcup _{x\in X} x\}$, where $A=\{a_1,\cdots ,a_n\}$ and $\binom{A}{2}$ denotes the set of pairs. This sets $B_i$ are the ones in which you miss the variable $a_i.$ Then you are interested in $$\{\text{All possible subsets of the pairs}\}\setminus \bigcup _{i=1}^n B_i$$ Which is given by the expression $$2^{\binom{n}{2}}-\sum _{k = 1}^{n}(-1)^{k-1}\sum _{Y\in \binom{[n]}{k}}\left |\bigcap _{y\in Y}B_y\right |,$$ Notice that the inner cardinal doesnt depend on the choices of $y$ but just in the size of them and show that $|B_i|=2^{\binom{n-1}{2}}-1$ and in general $\left |\bigcap _{y\in Y}B_y\right |=2^{\binom{n-|Y|}{2}}-1.$ Put the computations together and conclude with the formula.

The answer will be $$\sum _{k=0}^n(-1)^k\binom{n}{k}\left (2^{\binom{n-k}{2}}-1\right ).$$

Phicar
  • 14,722
1

Basically, if you didn't have the "missing" rule, then the answer would be $2^{^nC_2}$.

But there we are unnecessarily adding the cases where people are missing. Okay you know what let us delete the cases where a is missing. If a is missing that means the others must have interacted in themselves. So we should subtract $2^{^{n-1}C_2}$. So $2^{^nC_2}-2^{^{n-1}C_2}$?

No. What about when b is missing? And c? And all others? SO we should do this deletion of $n$ people. So $2^{^{n-1}C_2}$. So $2^{^nC_2}-n.2^{^{n-1}C_2}$?

That looks good. But think about the cases where both a and b are missing. Yes we did delete that cases. But we deleted them twice. One we deleted them because we decided a was missing in them and then we deleted them again because we decided b was missing in them. That is injustice. But you know what? we can cover it up. Let's just add them back again the cases in which both a and b were missing. So.... How many cases would that be where everybody except a and b would interact in themselves? $2^{^{n-2}C_2}$. So now the answer is $2^{^nC_2}-n.2^{^{n-1}C_2}+2^{^{n-1}C_2}$? Well we got to do this for the cases where both b and c were not included right? And a and c? And other such pairs. So there would be $^nC_2$ such pairs. So $2^{^nC_2}-n.2^{^{n-2}C_2}+^nC_2.2^{^{n-2}C_2}$?

Nice. But what about the case where a, b and c were missed? Sure we have deleted them thrice because we thought each of a, b and c were missing. But then we added them back again thrice while covering our injustice for ab , bc, and ac. So now we got to re-delete all such triplets again. How many? $^nC_3$. So $2^{^nC_2}-n.2^{^{n-1}C_2}+^nC_2.2^{^{n-2}C_2}-^nC_3.2^{^{n-3}C_2}$?

Alright, I'm gonna come out and say it now. This list will keep going on like this. We got to cover up for our mistakes by making new mistakes and then cover up again. At last you will get a situation where you handle the case where everybody is missing. There you do cover up by $\pm^nC_n.2^{^{n-n}C_2}$ which is basically $1$ coz it refers to the null set where everybody is missing. The plus or minus is depending on what comes to it due to the alternating terms. So if $n$ is odd, you get $-$, and if $n$ is even, you get $+$.

So answer is $$^nC_0.2^{^nC_2}-^nC_1.2^{^{n-1}C_2}+^nC_2.2^{^{n-2}C_2}-^nC_3.2^{^{n-3}C_2}....{(-1)^n}.^nC_n.2^{^{n-n}C_2}$$ $$=\sum_{i=0}^n{(-1)^i}.^nC_i.2^{^{n-i}C_2}$$