Get number of combinatory complementary repeating

13 Views Asked by At

What is the number of combined elements without combining a number with it's complement?

Example: Suppose I have $n = 3$ elements and their respective complements.

$A, B, C, A', B', C'$

So, my actual $n$, let's say, $m = 6$.

Let's say, for $p = 2$:

$\complement_2^6 = \frac{6!}{2!(6-2)!} = 15$

Gives me this set:

$AB, AC, BC, A'B', A'C',B'C', AB', AC', BC', BA', CA', CB'$ and, the complement-combined: $AA', BB', CC'$.

In other words, I want to know the formula that gives me the length of the first or second set, given any $n$ and $p$.

For $n = 3$ (then $m = 6$) and $p = 1$ the repeated set will be of length $0$, for $p = 3$ this length is $12$.