Section 4.5 Combinatorics: Inclusion/Exclusion
Subsection 4.5.1 Terminology
Sometimes to count possibilities it is easier to over count and then count how much the over count was and fix it. For example, consider the size of the union of two sets \(A\) and \(B\) as shown in Figure 4.5.1. Note that \(|A|+|B|\) over counts the size of the union by precisely \(|A \cap B|.\) Thus the correct count is \((|A|+|B|)-|A \cap B|.\)
This can be extended to three sets. See Figure 4.5.2. This time there are three pairs of sets that overlap. Thus the count starts \((|A|+|B|+|C|)-(|A \cap B|+|A \cap C|+|B \cap C|).\) However this removes \(|A \cap B \cap C|\) three times. Thus the correct count is \((|A|+|B|+|C|)-(|A \cap B|+|A \cap C|+|B \cap C|)+|A \cap B \cap C|.\)
Because this process first includes (adds) everything, next excludes (subtracts) some things, then includes (adds) other things, the technique is called inclusion/exclusion.
Example 4.5.3. Inclusion-Exclusion Count.
To use inclusion-exclusion to count we must know the size of each of the sets and each of the intersections. Suppose we know the following.
- 210 students in Calculus I
- 36 students in Discrete Math
- 32 students in Programming I
- 1 student is in Calculus I and Discrete Math
- 8 students are in Calculus I and Programming I
- 6 students are in Discrete Math and Programming I
- 0 students are taking all three
The calculation for the total number of (distinct) students is as follows.
Definition 4.5.4. Derangement.
A permutation is a derangement if no element is in its original position.
For example “het” is a derangement of “the”, but “teh” is not a derangement.
Subsection 4.5.2 Practice
Checkpoint 4.5.5.
Write the formula for the number of elements in the union of four, distinct sets.
Checkpoint 4.5.6.
Suppose you know that in the fall 2020 semester 37 distinct students took MATH A261, 25 distinct students took CSCE A311, and 11 distinct students took both. How many students total took either MATH A261 or CSCE A311 in the Fall 2020 semester?
Checkpoint 4.5.7.
Count all derangements of “one”.
Checkpoint 4.5.8.
Count all derangements of “four”.
Checkpoint 4.5.9.
Count the number of positive multiples of 2,3,5 that are less than 100.
Checkpoint 4.5.10.
If you know the following, what do you still need to know to determine the number of distinct students placing into MATH A054, WRTG A080, or having an SAT score below 1290?
- Number of distinct students taking MATH A054.
- Number of distinct students taking WRTG A080.
- Number of distinct students with SAT score below 1290.