Graduate

GraduateDiscrete MathematicsCombinatorics


Inclusion-Exclusion Principle


The inclusion-exclusion principle is an essential concept in combinatorics, a branch of discrete mathematics that deals with counting and enumerating possible outcomes. This principle helps us determine the size of the union of multiple sets when the sizes of the individual sets and their intersection are known. This principle is not only powerful but is widely applicable in various fields ranging from probability and statistics to computer science and logic.

Original idea

Let's start with the simplest case: two sets, A and B. The theorem states that to find the number of elements in the union of two sets, A and B (denoted as |A ∪ B|), we should start by adding the number of elements in each set separately. However, when we do this, we count the elements that are common to both sets, A ∩ B. Therefore, we should subtract the number of elements in the intersection of the two sets to correct this double counting.

In set theory the formula for the combination of two sets is described as follows:

|A ∪ B| = |A| + |B| - |A ∩ B|

Visualise the concept

Consider an example where we have two overlapping circles or groups:

A B

In this illustration, the blue circle represents the set A, the green circle represents the set B, and the region where they overlap is the intersection A ∩ B.

Expansion to three sets

When dealing with three sets, such as A, B and C, the theory gets a little more complicated. For the union of three sets, the inclusion-exclusion principle tells us the following:

|A ∪ B ∪ C| = |A| + |B| + |C| - |A ∩ B| - |A ∩ C| - |B ∩ C| + |A ∩ B ∩ C|

Here, we first add the sizes of the individual sets. Then we subtract the sizes of all pairwise intersections to correct for double counting. However, this subtraction also discards elements that are the same three times (for each pairwise subtraction) in all three sets, so we add the size of the triple intersection back once.

Step-by-step example with three sets

Let us consider a practical example:

  • Set A represents people who like apples.
  • Set B represents people who like bananas.
  • Set C represents people who like cherries.

Suppose we have the following data:

  • |A| = 30 (people like apples)
  • |B| = 25 (people like bananas)
  • |C| = 20 (people like cherries)
  • |A ∩ B| = 10 (same as both apples and bananas)
  • |A ∩ C| = 5 (same as both apple and cherry)
  • |B ∩ C| = 8 (same as both banana and cherry)
  • |A ∩ B ∩ C| = 3 (all three same as fruits)

Applying the Inclusion-Exclusion Principle:

|A ∪ B ∪ C| = 30 + 25 + 20 – 10 – 5 – 8 + 3
            = 60

Thus, 60 people like at least one of the three types of fruits.

Generalization to n sets

The inclusion-exclusion principle can be generalized to more than three sets. Suppose we have n sets, A1 , A2 , ..., An. The principle is generalized as follows:

|A1 ∪ A2 ∪ ... ∪ An | ,
∑ |Ai | - ∑ |Ai ∩ Aj | + ∑ |Ai ∩ Aj ∩ Ak | - ... + (-1)n+1 |A1 ∩ A2 ... ∩ An |

Here, the sums are taken based on increasing number of intersections, and the sign changes between subtraction and addition depending on the number of sets in each intersection.

Visual example for three sets

Here's a more detailed illustration of the three overlapping sets:

A B C

The three circles represent sets. The three paired intersections and the center intersection represent regions subtracted and then added back according to the inclusion-exclusion formula.

Applications and advanced examples

The inclusion-exclusion principle is incredibly versatile and can be applied in many scenarios, such as:

1. Counting restricted system

Suppose we are asked to count the number of permutations of the numbers {1, 2, ..., n} such that none of the numbers appear in their original positions (a perturbation). The inclusion-exclusion principle allows us to systematically include and exclude those calculations where a certain number of items are in their original positions.

2. Estimating the probability

In probability, the principle can be used to calculate the probability of the union of multiple events. If we know the probability of individual events and their intersection, we can use the inclusion-exclusion principle to find the probability of at least one of the events occurring.

3. Network reliability

In network design, this principle can assess the reliability of complex systems by calculating the probability that at least one critical component will fail.

Working on a more complex example

Let's look at a more complex example of four sets:

Consider four groups of students:

  • Set A: Students playing football
  • Set B: Students playing basketball
  • Set C: Students playing cricket
  • Set D: Students playing tennis

Assume we have the following data:

  • |A| = 40
  • |B| = 35
  • |C| = 25
  • |D| = 20
  • |A ∩ B| = 15
  • |A ∩ C| = 10
  • |A ∩ D| = 5
  • |B ∩ C| = 10
  • |B ∩ D| = 8
  • |C ∩ D| = 6
  • |A ∩ B ∩ C| = 4
  • |A ∩ B ∩ D| = 2
  • |A ∩ C ∩ D| = 1
  • |B ∩ C ∩ D| = 3
  • |A ∩ B ∩ C ∩ D| = 1

Using the Inclusion-Exclusion Principle:

|A ∪ B ∪ C ∪ D| = |A| + |B| + |C| + |D|
                    - (|A ∩ B| + |A ∩ C| + |A ∩ D| + |B ∩ C| + |B ∩ D| + |C ∩ D|)
                    + (|A ∩ B ∩ C| + |A ∩ B ∩ D| + |A ∩ C ∩ D| + |B ∩ C ∩ D|)
                    − |A ∩ B ∩ C ∩ D|
                 = 40 + 35 + 25 + 20
                   - (15 + 10 + 5 + 10 + 8 + 6)
                   + (4 + 2 + 1 + 3)
                   - 1
                 = 120 – 54 + 10 – 1
                 = 75

Hence, 75 students play at least one of the four sports.

Special considerations and tips

  • When using this principle, make sure you calculate the intersections correctly. Ignoring or miscalculating them can lead to incorrect results.
  • This method involves alternating sums and differences, so it is important to keep track of the signals for accuracy.
  • Complexity increases with more sets, so careful data organization is important to avoid errors.

Conclusion

The inclusion-exclusion principle is an important tool in combinatorics that allows for accurate calculations and probability computations in complex scenarios. Through careful application and consideration of overlapping sets, the principle makes addressing many problems in mathematics and related fields more manageable. By practicing with diverse and increasingly complex examples, one can better understand the mechanics of the principle and its wide range of applications.


Graduate → 10.2.4


U
username
0%
completed in Graduate


Comments