CSC165 · 2076 · 5 marks
Define ceiling and floor function. Why do we need Inclusion - Exclusion principle? Make it clear with suitable example.
Define ceiling and floor function. Why do we need Inclusion - Exclusion principle? Make it clear with suitable example. [5]
Quick answer
The floor function for any real number x is defined as the greatest integer less than or equal to x.
Floor and Ceiling Functions, and Inclusion-Exclusion Principle
1. Floor Function
It is denoted by ⌊x⌋.
Examples:
- ⌊3.5⌋ = 3
- ⌊-2.4⌋ = -3 (since -3 is the greatest integer less than or equal to -2.4)
- ⌊3.143⌋ = 3
2. Ceiling Function
The ceiling function for any real number x is defined as the smallest integer greater than or equal to x.
It is denoted by ⌈x⌉.
Examples:
- ⌈3.5⌉ = 4
- ⌈-2.4⌉ = -2 (since -2 is the smallest integer greater than or equal to -2.4)
- ⌈3.143⌉ = 4
3. Inclusion-Exclusion Principle
Why Do We Need It?
When counting elements in the union of two or more sets, simply adding the sizes of individual sets overcounts the elements that appear in more than one set. The Inclusion-Exclusion Principle corrects this overcounting by systematically including and excluding overlapping regions.
Without this principle, we would either overcount (by counting shared elements multiple times) or undercount (by ignoring them). It gives us an exact count of elements in the union of finite sets.
Statement
For any two finite sets A and B:
$$n(A \cup B) = n(A) + n(B) - n(A \cap B)$$
For three finite sets A, B, and C:
$$n(A \cup B \cup C) = n(A) + n(B) + n(C) - n(A \cap B) - n(A \cap C) - n(B \cap C) + n(A \cap B \cap C)$$
Here we include individual set sizes, exclude pairwise intersections, and include the triple intersection back.
Suitable Example
Problem: In a town of 10,000 families:
- 40% buy newspaper A → n(A) = 4000
- 20% buy newspaper B → n(B) = 2000
- 10% buy newspaper C → n(C) = 1000
- 5% buy A and B → n(A ∩ B) = 500
- 3% buy B and C → n(B ∩ C) = 300
- 4% buy A and C → n(A ∩ C) = 400
- 2% buy all three → n(A ∩ B ∩ C) = 200
Find: Number of families that buy at least one newspaper.
Solution using Inclusion-Exclusion:
$$n(A \cup B \cup C) = n(A) + n(B) + n(C) - n(A \cap B) - n(A \cap C) - n(B \cap C) + n(A \cap B \cap C)$$
$$= 4000 + 2000 + 1000 - 500 - 400 - 300 + 200$$
$$= 7000 - 1200 + 200 = \mathbf{6000}$$
Number of families buying none of the newspapers:
$$= 10000 - 6000 = \mathbf{4000}$$
Conclusion
The Inclusion-Exclusion Principle is essential in combinatorics and set theory to accurately count elements in unions of overlapping sets, avoiding both overcounting and undercounting of shared elements.
Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.