1

Apologies if my formatting is incorrect, this is my first post.

I'm currently taking Discrete Mathematics, but I'm struggling to understand more complicated uses of PIE. The only examples we've covered in class are things such as giving out cookies using binomial coefficients, but we've never done anything like this problem, although this problem is labeled as 1.6 in our book, we've got no examples similar, unless I'm not interpreting the problem correctly. Any help?

Let $X = \{1, 2, 3, \dots, n\}$ and $A = \{1, 2, 3, \dots, k\}$ for some $n \ge k \ge 0$.

We say that a subset $B$ of $X$ is disjoint from $A$ if $A \cap B = \emptyset$. Using PIE, count the number of subsets of $X$ of size $k$ that are disjoint from $A$.

RobPratt
  • 45,619

2 Answers2

1

For PIE, the $k$ properties to be avoided here are $i\in B$, where $i=1$ to $k$. For a given count of $r$ properties, there are $\binom{k}{r}$ choices of properties and then $\binom{n-r}{k-r}$ ways to complete the $k$-subset, so PIE yields $$\sum_{r=0}^k (-1)^r \binom{k}{r} \binom{n-r}{k-r} =\binom{n}{k}-k \binom{n-1}{k-1}+\binom{k}{2} \binom{n-2}{k-2}-\binom{k}{3} \binom{n-3}{k-3}+\dots+(-1)^k \binom{n-k}{0}$$

RobPratt
  • 45,619
1

Probably breaking protocol here, but I'm a noob so don't have enough reputation to respond to RobPratt with a comment. I'm trying to help my nephew with discrete mathematics, and he got this same question. We got here by trial & error, but I think Rob's answer is off a bit. This is what we had to use:

$$\binom{n}{k} - \binom{k}{1}\binom{n-k}{k-1} - \binom{k}{2}\binom{n-k}{k-2} - \binom{k}{3}\binom{n-k}{k-3} - \dots - \binom{k}{k}\binom{n-k}{k-k}$$

I wanted to share in case this is the correct answer, and if by chance Rob might see this and comment.

  • Isn't the second term meant to be $-\binom{k}{1}\binom{n-1}{k-1}$ instead? Also the sign alternating in Rob's answer is correct, it is basically "Inclusion–exclusion" part of the Inclusion–exclusion principle. By the way, you can summon someone by using @ in front of their nickname, like @RobPratt (but they must have been present previously in the question so I am not sure if it will work here). – Sil Apr 20 '21 at 14:14
  • I just checked my answer again and don't see anything wrong. If you think otherwise, please specify values of $n$ and $k$ for which the PIE formula differs from $\binom{n-k}{k}$. – RobPratt Apr 20 '21 at 14:50
  • @Sil Sorry about that, the second in mine term was "right" (in that it matched the formula we had used) but the last 3 were wrong, so I updated my original answer to reflect what I intended. It sounds like while it seemed to get us the right answer in all the cases we tested, it was either dumb luck or there may be 2 ways to skin the same cat. – BrianRobinson Apr 21 '21 at 15:27
  • We could not find any leads on how to compute the overlapping sets to include/exclude, but we knew ultimately that any set that overlapped by any # of elements between 1 and k had to be subtracted from ##\binom{n}{k}## so we tinkered until we happened upon a combination that accurately got the # of sets overlapping by 1, 2, 3, ..., n items. Then yesterday I came across this post, which had the answer, albeit a different one! – BrianRobinson Apr 21 '21 at 15:30
  • One last comment because I'm trying to learn enough to help my nephew. Using Rob's formula with n=10 and k=4 for example, there are 210 total sets of 4 in the set of 10 ##\binom{10}{4}## but then the first number subtracted out is 336 before the subsequent components of the formula add/subtract back to the answer of 15. I don't know PIE well, but it feels off to subtract more items (sets) than we have in total. – BrianRobinson Apr 21 '21 at 15:40
  • @BrianRobinson After the update, we can see that your formula and Rob's formula are actually equal, even if it doesn't look that way at first, but both can be shown to be equal to $\binom{n−k}{k}$ (which we know is correct). Specifically your formula can be written as $\binom{n}{k}+\binom{n-k}{k}-\sum_{i=0}^{k}\binom{k}{i}\binom{n-k}{k-i}$, where the sum is known to be equal to $\binom{n}{k}$ (see for example this post), and so only $\binom{n-k}{k}$ remains. – Sil Apr 21 '21 at 17:57
  • As for your doubt of removing more items than we have, you can see how it works on following example $A={1,2,3,4,5},B={1,2,3,4},C={1,2,3,5},D={1,2,4,5}$. Then $|A|+|B|+|C|+|D|=17$ but $|A∩B|+|A∩C|+|A∩D|+|B∩C|+|B∩D|+|C∩D|=21$, so in the PIE we have $5=17−21+11−2$. Basically that's the point of the method, we have subtracted (excluded) too much (even made it negative), so then more is added (included), then subtracted, and so on... – Sil Apr 21 '21 at 17:58