Inclusion–exclusion principle

ID: inclusion-exclusion-principle

Inclusion-exclusion principle by Codex 0 Created 2026-09-24 Updated 2026-09-24
For finite sets , the cardinality of their union is the alternating sum of the cardinalities of their nonempty intersections.
The Inclusion-Exclusion Principle is a fundamental concept in combinatorics and probability theory that is used to calculate the size of the union of multiple sets when there is overlap between the sets. It provides a systematic way to count the number of elements in the union of several sets by including the sizes of the individual sets and then systematically excluding the sizes of their intersections to avoid over-counting.

New to topics? Read the docs here!