mysimulator.uk
Combinatorics 🇺🇦 UA

🔢 Inclusion-Exclusion

The inclusion-exclusion principle counts elements in the union of sets by alternately adding and subtracting intersection sizes to avoid double-counting.

2 sets: |A∪B| = |A|+|B|−|A∩B|
3 sets: |A∪B∪C| = |A|+|B|+|C|−|A∩B|−|A∩C|−|B∩C|+|A∩B∩C|

⚙ Mode

Region sizes

Region sizes

🔭 View

📊 Results

|A∪B[∪C]|
35
Neither (N=100)
65
Largest set
A=23
Smallest ∩
A∩B=8

© 2026 mysimulator.uk — About · Blog

Related simulations

🔢 🎨 Graph Coloring 🎂 Birthday Paradox — Probability Simulation ♛ N-Queens Problem