Why use Inclusion-Exclusion principle

87 Views Asked by At

Below is a screenshot of a video of TrevTutor, which is about Inclusion Exclusion Problems.

I would like to ask why we don't simply get the result by subtracting S0 by S1 only, as S1 should have included all arrangements with different numbers of consecutive pairs. So in my understanding, S0 - S1 already represent the arrangements that DISCRETEMATHROCKS have no consecutive pair.

Can anyone explain to me the use of Inclusion-Exclusion Principle here? Thank you!

Video link: https://www.youtube.com/watch?v=Y0CYHMqomgI

enter image description here

1

There are 1 best solutions below

1
On BEST ANSWER

What $S_1$ counts is the number of arrangements containing a pair of adjacent identical letters. However, subtracting $S_1$ from the total subtracts too much since it counts each arrangement with exactly $k$ pairs of adjacent identical letters $k$ times, once for each way we could have designated one of those $k$ pairs as the pair of identical letters.

For example, the arrangement DISSCCRETEMATHROK is counted twice in $S_1$, once when you designate SS as the pair of adjacent identical letters and once when you designate CC as the pair of adjacent identical letters. Therefore, subtracting $S_1$ from the total will subtract each arrangement with exactly two pairs of identical letters twice. We only want to subtract such arrangements once, so we must add $S_2$ to the total so that they are only subtracted once.

This does not fully correct the problem since we subtracted arrangements with exactly three pairs of adjacent identical letters three times when we subtracted $S_1$, once for each way we could have designated one of those pairs as the pair of adjacent identical letters, and then added them three times when we added $S_2$, once for each of the $\binom{3}{2}$ ways we could have designated two of those three pairs as the two pairs of adjacent identical letters. That means we have not subtracted those arrangements with three pairs of adjacent identical letters at all, so we must subtract $S_3$ from the total.

Since there can be as many as five pairs of adjacent identical letters, we must continue correcting over counts and under counts by adding $S_4$ and subtracting $S_5$ to obtain the $S_0 - S_1 + S_2 - S_3 - S_4 + S_5$ arrangements with no pairs of adjacent identical letters.