Rule of Sum and the Inclusion-Exclusion Principle
Requires a Wolfram Notebook System
Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.
If there are ways of getting a result and ways to get a result , then the number of ways of getting or is , as long as the results and do not overlap.
[more]
Contributed by: George Beck (July 2018)
Open content licensed under CC BY-NC-SA
Snapshots
Details
The sum rule generalizes when there are more than two kinds of results, giving
,
as long as all the pairwise intersections
, , ,
are empty.
If there are overlaps, the right-hand side of the formula is an alternating sum. For example, here is the formula for three sets:
.
Reference
[1] Wikipedia. "Rule of Sum." (Jun 4, 2018) en.wikipedia.org/wiki/Rule_of_sum.
Permanent Citation