Mathematics
The Principle of Inclusion-Exclusion for Counting Union of Sets
Quick fact
For three sets A, B, and C, the number of elements in their union is |A|+|B|+|C| − |A∩B| − |A∩C| − |B∩C| + |A∩B∩C|. This alternating pattern—add all, subtract pairwise, add triple—applies for any number of sets.
Why this is interesting
You have a bag of red marbles, a bag of blue marbles, and some that are both. How many distinct marbles are there in total? Simply adding the counts would count the mixed ones twice—so what's the right way?