Counting the number of ordered SDRs using the PIE

combinatoricselementary-set-theorygraph theory

Given the sizes of n sets, and the sizes of the intersections between the subsets of the n sets, is it possible to use the principle of inclusion-exclusion to count the number of ordered systems of distinct representatives for the n sets?

Intuitively I think it should be possible. This question seems somewhat similar.

Best Answer

Fimpellizieri's solution is a sum of $2^{\binom{n}2}$ terms, each with a sign determined by the parity of number of conditions included, and carrying a product of sizes of intersections of certain $A_i$. Whenever two sets of condition determine the same partition of $\{1,2,\dots,n\}$, they will contribute the same thing to the sum, so we can group these together. This lets us simplify the sum of $\sim 2^{n(n-1)/2}$ terms to a sum of $B_n$ terms, where $B_n$ is the $n^{th}$ Bell number.

Namely, let $P$ represent an arbitray partition of $\{1,2,\dots,n\}$, with parts $P=\{P_1,P_2,\dots,P_k\}$ for some $k$. Then the number of SDR's is $$ \sum_{P\text{ is a partition}}(-1)^{n-|P|}\prod_{P_i\in P}(|P_i|-1)!\left|\bigcap_{j\in P_i}A_i\right| $$ For example, when $n=2$, there are two possible partitions of $\{1,2\}$: either $\{\{1\},\{2\}\}$ (both in different parts), or $\{\{1,2\}\}$ (both in same part). So it is a sum of two terms, namely, $$ |A_1|\cdot |A_2|-|A_1\cap A_2| $$ When $n=3$, there are $5$ partitions of $\{1,2,3\}$: $$ \{1\},\{2\},\{3\},\quad\{1,2\},\{3\},\quad \{1,3\},\{2\},\quad\{2,3\},\{1\},\quad\{1,2,3\} $$ Resulting in $$ |A_1||A_2||A_3|-|A_1\cap A_2||A_3|-|A_1\cap A_3||A_2|-|A_2\cap A_3||A_1|+2|A_1\cap A_2\cap A_3| $$ Note the $2$ in front of the last term; this is the $(|P_i|-1)!$ in the formula, since the size of the part is $3$.

For a hint of why an alternating sum of ordered pairs of a given partition results in the coefficient of $(n-1)!$, see this question.

Related Question