The Inclusion-Exclusion Principle

The inclusion-exclusion principle

The inclusion-exclusion principle is a counting technique used to count the number of elements in a union of sets so that each element is counted only once.

Case of two sets

Remember that the relation between the cardinalities of two arbitrary sets, AA and BB, and the cardinality of their union is as follows:

Get hands-on with 1200+ tech skills courses.