Discrete Mathematics · Advanced Combinatorics
Inclusion-Exclusion Principle and Derangements
Explanation
Inclusion-Exclusion Principle
Two sets:
Three sets:
General form ( sets):
Example: How many integers from 1 to 30 are divisible by 2, 3, or 5?
- , ,
- , , ,
- Result:
Pigeonhole Principle
If objects are placed in boxes, at least one box contains two or more objects.
Derangements
A derangement is a permutation of where no element is in its original position.
Formula:
Recurrence: , , .
For large : .
Two sets:
Three sets:
General form ( sets):
Example: How many integers from 1 to 30 are divisible by 2, 3, or 5?
- , ,
- , , ,
- Result:
Pigeonhole Principle
If objects are placed in boxes, at least one box contains two or more objects.
Derangements
A derangement is a permutation of where no element is in its original position.
Formula:
Recurrence: , , .
For large : .
Interactive Visualization
Loading visualization
Worked Examples
Practice
Exercise 1 of 6
1
Survey of 100 people: 70 like coffee, 50 like tea, 30 like both. How many like at least one?
★Quiz
Test your knowledge from this lesson
A mix of questions from the lesson — each attempt varies slightly
Answer at least 4 out of 5 questions correctly to pass (70%)