Inclusion and Exclusion Principle (Venn Diagram)
Basic

Video tutorial

Lecture Notes

The inclusion and exclusion principle are used to count the cases where there is an overlap. The Venn diagram is a graphicall representation of this principle and can be used to derive the formula intuitively.

**Tips**: The word "at least" usual indicates that the inclusion-exclusion principle is needed.

Examples

(1006) Sets $A$ and $B$, shown in the Venn diagram, have the same number of elements. Their union has $2007$ elements and their intersection has $1001$ elements. Find the number of elements in $A$. |

Comments

A **set** is an important mathematics concept. The keywords for set are __unordered__ and __unique__. As we will see later in this course, whether order matters is an important factor in counting. Almost all modern programming languages, such as C#, Java, etc, have set as a standard built-in data type with built-in support for all its essential operations.