Introduction

In combinatorics, counting techniques are utilized to solve problems in a variety of combinations. The rule of sum states that if A and B are sets with no elements in common, then we just combine the sets. What happens if set A and B do have elements in common? Those elements will have been double counted in the original combination. The Principle of Inclusion and Exclusion (PIE) is a counting technique that ensures that an element does not get counted twice.
Here is an example: